Changeset 73845 in vbox
- Timestamp:
- Aug 22, 2018 6:18:34 PM (6 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/widgets
- Files:
-
- 2 edited
-
UISlidingAnimation.cpp (modified) (3 diffs)
-
UISlidingAnimation.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UISlidingAnimation.cpp
r73844 r73845 32 32 , m_fReverse(fReverse) 33 33 , m_pAnimation(0) 34 , m_fIsInProgress(false) 34 35 , m_pWidget(0) 35 36 , m_pLabel1(0) … … 51 52 void UISlidingAnimation::animate(SlidingDirection enmDirection) 52 53 { 54 /* Mark animation started: */ 55 m_fIsInProgress = true; 56 53 57 /* Acquire parent size: */ 54 58 const QSize parentSize = parentWidget()->size(); … … 100 104 break; 101 105 } 106 } 107 } 108 109 void UISlidingAnimation::sltHandleStateEnteredStart() 110 { 111 /* If animation started: */ 112 if (m_fIsInProgress) 113 { 114 /* Mark animation finished: */ 115 m_fIsInProgress = false; 116 /* And notify listeners: */ 117 emit sigAnimationComplete(SlidingDirection_Reverse); 118 } 119 } 120 121 void UISlidingAnimation::sltHandleStateEnteredFinal() 122 { 123 /* If animation started: */ 124 if (m_fIsInProgress) 125 { 126 /* Mark animation finished: */ 127 m_fIsInProgress = false; 128 /* And notify listeners: */ 129 emit sigAnimationComplete(SlidingDirection_Forward); 102 130 } 103 131 } -
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UISlidingAnimation.h
r73844 r73845 72 72 73 73 /** Handles entering for 'Start' state. */ 74 void sltHandleStateEnteredStart() { emit sigAnimationComplete(SlidingDirection_Reverse); }74 void sltHandleStateEnteredStart(); 75 75 /** Handles entering for 'Final' state. */ 76 void sltHandleStateEnteredFinal() { emit sigAnimationComplete(SlidingDirection_Forward); }76 void sltHandleStateEnteredFinal(); 77 77 78 78 private: … … 96 96 /** Holds the animation instance. */ 97 97 UIAnimation *m_pAnimation; 98 /** Holds whether animation is in progress. */ 99 bool m_fIsInProgress; 98 100 /** Holds sub-window start-geometry. */ 99 101 QRect m_startWidgetGeometry;
Note:
See TracChangeset
for help on using the changeset viewer.

