Changeset 46242 in vbox for trunk/src/VBox/Frontends/VirtualBox/src/globals/UIAnimationFramework.h
- Timestamp:
- May 23, 2013 3:16:35 PM (12 years ago)
- svn:sync-xref-src-repo-rev:
- 85971
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIAnimationFramework.h
r46195 r46242 20 20 #define __UIAnimationFramework_h__ 21 21 22 /* Qt includes: */ 23 #include <QObject> 24 22 25 /* Forward declaration: */ 23 26 class QStateMachine; 27 class QPropertyAnimation; 24 28 25 /* UIAnimation Framework namespace: */26 namespace UIAnimationFramework 29 /* UIAnimation factory: */ 30 class UIAnimation : public QObject 27 31 { 28 /* API: Animation stuff: */ 29 QStateMachine* installPropertyAnimation(QWidget *pTarget, const char *pszPropertyName, 30 const char *pszValuePropertyNameStart, const char *pszValuePropertyNameFinal, 31 const char *pSignalForward, const char *pSignalBackward, 32 bool fReversive = false, int iAnimationDuration = 300); 33 } 32 Q_OBJECT; 33 34 public: 35 36 /* API: Factory stuff: */ 37 static UIAnimation* installPropertyAnimation(QWidget *pTarget, const char *pszPropertyName, 38 const char *pszValuePropertyNameStart, const char *pszValuePropertyNameFinal, 39 const char *pszSignalForward, const char *pszSignalReverse, 40 bool fReverse = false, int iAnimationDuration = 300); 41 42 /* API: Update stuff: */ 43 void update(); 44 45 protected: 46 47 /* Constructor: */ 48 UIAnimation(QWidget *pParent, const char *pszPropertyName, 49 const char *pszValuePropertyNameStart, const char *pszValuePropertyNameFinal, 50 const char *pszSignalForward, const char *pszSignalReverse, 51 bool fReverse, int iAnimationDuration); 52 53 private: 54 55 /* Helper: Prepare stuff: */ 56 void prepare(); 57 58 /* Variables: General stuff: */ 59 const char *m_pszPropertyName; 60 const char *m_pszValuePropertyNameStart; 61 const char *m_pszValuePropertyNameFinal; 62 const char *m_pszSignalForward; 63 const char *m_pszSignalReverse; 64 bool m_fReverse; 65 int m_iAnimationDuration; 66 67 /* Variables: Animation-machine stuff: */ 68 QStateMachine *m_pAnimationMachine; 69 QPropertyAnimation *m_pForwardAnimation; 70 QPropertyAnimation *m_pReverseAnimation; 71 }; 34 72 35 73 #endif /* __UIAnimationFramework_h__ */
Note:
See TracChangeset
for help on using the changeset viewer.