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
,
28 typedef enum {REGULAR
, OVER
, PRESSED
} MouseState
;
29 typedef QHash
<MouseState
, QString
> ThemeNames
;
31 RaptorClaw(QGraphicsItem
*parent
= 0);
32 virtual ~RaptorClaw();
33 QRectF
boundingRect() const;
34 void paint(QPainter
*painter
, const QStyleOptionGraphicsItem
*option
, QWidget
*widget
= 0);
36 QSize
sizeHint() const;
37 QSize
minimumSize() const;
38 QSize
maximumSize() const ;
39 Qt::Orientations
expandingDirections() const { return Qt::Horizontal
; }
40 void setGeometry(const QRect
&) {}
41 QRect
geometry() const;
42 bool isEmpty() const { return false; }
44 void setOpacity(float op
);
45 void setName(const QString
& name
);
47 void setIcon(QPixmap icon
);
52 virtual void hoverEnterEvent(QGraphicsSceneHoverEvent
*event
);
53 virtual void hoverMoveEvent(QGraphicsSceneHoverEvent
*event
);
54 virtual void hoverLeaveEvent(QGraphicsSceneHoverEvent
*event
);
57 QString
loadSvg(MouseState state
);