The API changed for rotations, requiring another argument for positions.
[contacts_plasmoid.git] / contactlabel.h
blob33b2313153a256f274411711460389636b0f33a0
1 #ifndef __CONTACT_LABEL__
2 #define __CONTACT_LABEL__
4 #include <QGraphicsWidget>
5 #include <QPen>
6 #include <QRectF>
7 class QString;
9 class ContactLabel: public QGraphicsWidget
11 Q_OBJECT
12 public:
14 ContactLabel(QGraphicsItem *parent = 0);
16 void setText(const QString &text);
17 void setPen( const QPen &pen );
18 void setFont( const QFont &font );
20 void paint(QPainter *painter, const QStyleOptionGraphicsItem *option,
21 QWidget *widget);
24 //void mousePressEvent(QGraphicsSceneMouseEvent *event);
25 //void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);
26 void setHover(qreal value);
28 virtual ~ContactLabel();
30 protected:
32 QString label;
33 QPen mPen;
34 QFont mFont;
35 bool grabbed;
36 qreal rotation;
37 qreal newRotation;
38 qreal scale;
39 qreal newScale;
40 qreal hover;
44 #endif