00001 #ifndef ACCOUNTGRAPHICSPROXYWIDGET_H 00002 #define ACCOUNTGRAPHICSPROXYWIDGET_H 00003 00004 #include <QGraphicsProxyWidget> 00005 #include <QTimeLine> 00006 00007 class AccountGraphicsProxyWidget : public QGraphicsProxyWidget 00008 { 00009 Q_OBJECT 00010 00011 public: 00012 AccountGraphicsProxyWidget(QGraphicsItem *parent = 0, Qt::WindowFlags wFlags = 0); 00013 ~AccountGraphicsProxyWidget(); 00014 00015 QRectF boundingRect() const; 00016 void paintWindowFrame(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget); 00017 00018 protected: 00019 void hoverEnterEvent(QGraphicsSceneHoverEvent *event); 00020 void hoverLeaveEvent(QGraphicsSceneHoverEvent *event); 00021 bool sceneEventFilter(QGraphicsItem *watched, QEvent *event); 00022 QVariant itemChange(GraphicsItemChange change, const QVariant &value); 00023 00024 private slots: 00025 void updateStep(qreal step); 00026 void stateChanged(QTimeLine::State); 00027 void zoomIn(); 00028 void zoomOut(); 00029 00030 private: 00031 QTimeLine *timeLine; 00032 bool popupShown; 00033 }; 00034 00035 #endif // ACCOUNTGRAPHICSPROXYWIDGET_H