4 #ifndef RAPTOR_SCROLL_HANDLER_H
5 #define RAPTOR_SCROLL_HANDLER_H
7 #include <QGraphicsItem>
8 #include <QtCore/QObject>
9 #include <QtGui/QGraphicsTextItem>
10 #include <QtGui/QLayoutItem>
12 #include <plasma/svg.h>
13 #include <plasma/theme.h>
14 #include <plasma/datacontainer.h>
17 class RaptorScrollHandler
: public QObject
,
24 typedef enum OwnState
{REGULAR
, Hovered
, PRESSED
};
25 typedef QHash
<OwnState
, QString
> ElementHash
;
26 typedef enum ArrowState
{UP
=0, DOWN
, LEFT
, RIGHT
};
28 RaptorScrollHandler(QGraphicsItem
* parent
= 0);
30 virtual ~RaptorScrollHandler();
32 QRectF
boundingRect() const;
33 void paint(QPainter
*painter
, const QStyleOptionGraphicsItem
*option
, QWidget
*widget
= 0);
34 QSize
sizeHint() const;
35 QSize
minimumSize() const {} //TODO Implement me
36 QSize
maximumSize() const {} //TODO Implement me
37 void setArrowState(RaptorScrollHandler::ArrowState state
);
38 Qt::Orientations
expandingDirections() const{} //TODO Implement me
39 void setExpandingDirections(Qt::Orientations ori
);
40 void setGeometry(const QRect
&geometry
);
41 QRect
geometry() const;
42 bool isEmpty() const { return false; }
51 virtual void hoverEnterEvent(QGraphicsSceneHoverEvent
*event
);
52 virtual void hoverMoveEvent(QGraphicsSceneHoverEvent
*event
);
53 virtual void hoverLeaveEvent(QGraphicsSceneHoverEvent
*event
);
54 virtual void mousePressEvent(QGraphicsSceneMouseEvent
*event
);
57 QString
getElementNameForState(OwnState state
);