44 #ifndef QT_SLIDE_WINDOW_ 45 #define QT_SLIDE_WINDOW_ 56 #include <QGraphicsProxyWidget> 57 #include <QPropertyAnimation> 66 class QGraphicsItemAnimation;
86 QtSlideWindow (QString _name = 0, QGraphicsItem *_parent = 0);
89 void updateGeometry ();
92 void attachWidget (QWidget *_m);
99 void saveState (QSettings &_settings);
102 void restoreState (QSettings &_settings);
105 void updateParentGeometry();
110 virtual void paintWindowFrame(QPainter *_painter,
const QStyleOptionGraphicsItem *_option, QWidget *_widget = 0);
113 virtual bool windowFrameEvent(QEvent *_e);
116 virtual Qt::WindowFrameSection windowFrameSectionAt(
const QPointF &_pos)
const;
119 virtual void hoverEnterEvent (QGraphicsSceneHoverEvent *_event);
120 virtual void hoverLeaveEvent (QGraphicsSceneHoverEvent *_event);
123 virtual void resizeEvent (QGraphicsSceneResizeEvent *_event);
124 virtual void moveEvent (QGraphicsSceneMoveEvent *_event);
128 void detachPressed ();
131 void dialogClosed ();
134 void autohidePressed ();
143 void animationFinished();
146 void startSlideDownAnimation();
187 #endif // QT_SLIDE_WINDOW_ defined const int fontHeight_
height of the default font
QPointF endP_
Ending position (for animation)
bool animating_
Is widget animating in this moment?
QDialog * dialog_
detached dialog
bool down_
Track if widget is at bottom position.
QPropertyAnimation * animation_
Animation object.
QtGraphicsButton * autohideButton_
buttons
QPointF startP_
Starting position (for animation)
QWidget * mainWidget_
child widget
QTimer * timer_
Wait some milliseconds before sliding widget down.