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>
16 * A raptor claw is a item onthe slider view
17 * it has the most basic properties that defines a
21 class RaptorClaw
: public QObject
,
27 typedef enum { REGULAR
,OVER
,PRESSED
} MouseState
;
28 typedef QHash
<MouseState
,QString
> ThemeNames
;
29 RaptorClaw(QGraphicsItem
* parent
= 0);
30 virtual ~RaptorClaw();
31 QRectF
boundingRect() const;
32 void paint( QPainter
* painter
, const QStyleOptionGraphicsItem
* option
, QWidget
* widget
= 0);
35 QSize
sizeHint() const;
36 QSize
minimumSize() const;
37 QSize
maximumSize() const ;
38 Qt::Orientations
expandingDirections() const{return Qt::Horizontal
;}
39 void setGeometry(const QRect
&) {}
40 QRect
geometry() const;
41 bool isEmpty() const {return false;}
43 void setOpacity(float op
);
44 void setName(const QString
& name
);
46 void setIcon(QPixmap icon
);
51 virtual void hoverEnterEvent ( QGraphicsSceneHoverEvent
* event
);
52 virtual void hoverMoveEvent ( QGraphicsSceneHoverEvent
* event
);
53 virtual void hoverLeaveEvent ( QGraphicsSceneHoverEvent
* event
);
56 QString
loadSvg(MouseState state
);