Changeset 49505 in vbox for trunk/src/VBox
- Timestamp:
- Nov 15, 2013 2:01:16 PM (11 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIDefs.h
r49465 r49505 1 1 /** @file 2 * 3 * VBox frontends: Qt GUI ("VirtualBox"): 4 * Global declarations and functions 2 * VBox Qt GUI - UIDefs namespace and other global declarations. 5 3 */ 6 4 7 5 /* 8 * Copyright (C) 2006-201 2Oracle Corporation6 * Copyright (C) 2006-2013 Oracle Corporation 9 7 * 10 8 * This file is part of VirtualBox Open Source Edition (OSE), as … … 17 15 */ 18 16 19 #ifndef __ UIDefs_h__20 #define __ UIDefs_h__17 #ifndef ___UIDefs_h___ 18 #define ___UIDefs_h___ 21 19 22 20 /* Qt includes: */ … … 274 272 UIVisualStateType_All = 0xFF 275 273 }; 274 Q_DECLARE_METATYPE(UIVisualStateType); 276 275 277 276 /* Details element type: */ … … 360 359 Q_DECLARE_METATYPE(MachineCloseAction); 361 360 362 #endif / / __UIDefs_h__363 361 #endif /* !___UIDefs_h___ */ 362 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachine.cpp
r49498 r49505 32 32 Q_OBJECT; 33 33 34 signals:35 36 /* Signal to change-state: */37 void sigChangeVisualState(UIVisualStateType newVisualStateType);38 39 34 public: 40 35 41 36 /* Constructor: */ 42 UIVisualState(QObject *pParent, UISession *pSession )37 UIVisualState(QObject *pParent, UISession *pSession, UIVisualStateType type) 43 38 : QObject(pParent) 39 , m_type(type) 44 40 , m_pSession(pSession) 45 41 , m_pMachineLogic(0) … … 48 44 #endif /* Q_WS_MAC */ 49 45 { 50 /* Connect state-change handler: */51 connect(this, SIGNAL(sigChangeVisualState(UIVisualStateType)), parent(), SLOT(sltChangeVisualState(UIVisualStateType)));52 46 } 53 47 … … 66 60 67 61 /* Visual state type getter: */ 68 virtual UIVisualStateType visualStateType() const = 0;62 UIVisualStateType visualStateType() const { return m_type; } 69 63 70 64 /* Machine logic getter: */ … … 72 66 73 67 /* Method to prepare change one visual state to another: */ 74 virtualbool prepareChange(UIVisualStateType previousVisualStateType)68 bool prepareChange(UIVisualStateType previousVisualStateType) 75 69 { 76 70 m_pMachineLogic = UIMachineLogic::create(this, m_pSession, visualStateType()); … … 95 89 96 90 /* Method to change one visual state to another: */ 97 v irtual void change()91 void change() 98 92 { 99 93 /* Prepare the logic object: */ … … 102 96 103 97 /* Method to finish change one visual state to another: */ 104 v irtual void finishChange()98 void finishChange() 105 99 { 106 100 #ifdef Q_WS_MAC … … 120 114 121 115 /* Variables: */ 116 UIVisualStateType m_type; 122 117 UISession *m_pSession; 123 118 UIMachineLogic *m_pMachineLogic; … … 125 120 CGDisplayFadeReservationToken m_fadeToken; 126 121 #endif /* Q_WS_MAC */ 127 };128 129 /* Normal visual state implementation: */130 class UIVisualStateNormal : public UIVisualState131 {132 Q_OBJECT;133 134 public:135 136 /* Constructor: */137 UIVisualStateNormal(QObject *pParent, UISession *pSession)138 : UIVisualState(pParent, pSession) {}139 140 private slots:141 142 /* State-change handlers: */143 void sltGoToFullscreenMode() { emit sigChangeVisualState(UIVisualStateType_Fullscreen); }144 void sltGoToSeamlessMode() { emit sigChangeVisualState(UIVisualStateType_Seamless); }145 void sltGoToScaleMode() { emit sigChangeVisualState(UIVisualStateType_Scale); }146 147 private:148 149 /* Visual state type getter: */150 UIVisualStateType visualStateType() const { return UIVisualStateType_Normal; }151 152 /* Method to change previous visual state to this one: */153 void change()154 {155 /* Call to base-class: */156 UIVisualState::change();157 158 /* Connect action handlers: */159 connect(gActionPool->action(UIActionIndexRuntime_Toggle_Fullscreen), SIGNAL(triggered(bool)),160 this, SLOT(sltGoToFullscreenMode()), Qt::QueuedConnection);161 connect(gActionPool->action(UIActionIndexRuntime_Toggle_Seamless), SIGNAL(triggered(bool)),162 this, SLOT(sltGoToSeamlessMode()), Qt::QueuedConnection);163 connect(gActionPool->action(UIActionIndexRuntime_Toggle_Scale), SIGNAL(triggered(bool)),164 this, SLOT(sltGoToScaleMode()), Qt::QueuedConnection);165 }166 };167 168 /* Fullscreen visual state implementation: */169 class UIVisualStateFullscreen : public UIVisualState170 {171 Q_OBJECT;172 173 public:174 175 /* Constructor: */176 UIVisualStateFullscreen(QObject *pParent, UISession *pSession)177 : UIVisualState(pParent, pSession) {}178 179 private slots:180 181 /* State-change handlers: */182 void sltGoToNormalMode() { emit sigChangeVisualState(UIVisualStateType_Normal); }183 void sltGoToSeamlessMode() { emit sigChangeVisualState(UIVisualStateType_Seamless); }184 void sltGoToScaleMode() { emit sigChangeVisualState(UIVisualStateType_Scale); }185 186 private:187 188 /* Visual state type getter: */189 UIVisualStateType visualStateType() const { return UIVisualStateType_Fullscreen; }190 191 /* Method to change previous visual state to this one: */192 void change()193 {194 /* Call to base-class: */195 UIVisualState::change();196 197 /* Connect action handlers: */198 connect(gActionPool->action(UIActionIndexRuntime_Toggle_Fullscreen), SIGNAL(triggered(bool)),199 this, SLOT(sltGoToNormalMode()), Qt::QueuedConnection);200 connect(gActionPool->action(UIActionIndexRuntime_Toggle_Seamless), SIGNAL(triggered(bool)),201 this, SLOT(sltGoToSeamlessMode()), Qt::QueuedConnection);202 connect(gActionPool->action(UIActionIndexRuntime_Toggle_Scale), SIGNAL(triggered(bool)),203 this, SLOT(sltGoToScaleMode()), Qt::QueuedConnection);204 }205 };206 207 /* Seamless visual state implementation: */208 class UIVisualStateSeamless : public UIVisualState209 {210 Q_OBJECT;211 212 public:213 214 /* Constructor: */215 UIVisualStateSeamless(QObject *pParent, UISession *pSession)216 : UIVisualState(pParent, pSession) {}217 218 private slots:219 220 /* State-change handlers: */221 void sltGoToNormalMode() { emit sigChangeVisualState(UIVisualStateType_Normal); }222 void sltGoToFullscreenMode() { emit sigChangeVisualState(UIVisualStateType_Fullscreen); }223 void sltGoToScaleMode() { emit sigChangeVisualState(UIVisualStateType_Scale); }224 225 private:226 227 /* Visual state type getter: */228 UIVisualStateType visualStateType() const { return UIVisualStateType_Seamless; }229 230 /* Method to change previous visual state to this one: */231 void change()232 {233 /* Call to base-class: */234 UIVisualState::change();235 236 /* Connect action handlers: */237 connect(gActionPool->action(UIActionIndexRuntime_Toggle_Seamless), SIGNAL(triggered(bool)),238 this, SLOT(sltGoToNormalMode()), Qt::QueuedConnection);239 connect(gActionPool->action(UIActionIndexRuntime_Toggle_Fullscreen), SIGNAL(triggered(bool)),240 this, SLOT(sltGoToFullscreenMode()), Qt::QueuedConnection);241 connect(gActionPool->action(UIActionIndexRuntime_Toggle_Scale), SIGNAL(triggered(bool)),242 this, SLOT(sltGoToScaleMode()), Qt::QueuedConnection);243 }244 };245 246 /* Scale visual state implementation: */247 class UIVisualStateScale : public UIVisualState248 {249 Q_OBJECT;250 251 public:252 253 /* Constructor: */254 UIVisualStateScale(QObject *pParent, UISession *pSession)255 : UIVisualState(pParent, pSession) {}256 257 private slots:258 259 /* State-change handlers: */260 void sltGoToNormalMode() { emit sigChangeVisualState(UIVisualStateType_Normal); }261 void sltGoToFullscreenMode() { emit sigChangeVisualState(UIVisualStateType_Fullscreen); }262 void sltGoToSeamlessMode() { emit sigChangeVisualState(UIVisualStateType_Seamless); }263 264 private:265 266 /* Visual state type getter: */267 UIVisualStateType visualStateType() const { return UIVisualStateType_Scale; }268 269 /* Method to change previous visual state to this one: */270 void change()271 {272 /* Call to base-class: */273 UIVisualState::change();274 275 /* Connect action handlers: */276 connect(gActionPool->action(UIActionIndexRuntime_Toggle_Scale), SIGNAL(triggered(bool)),277 this, SLOT(sltGoToNormalMode()), Qt::QueuedConnection);278 connect(gActionPool->action(UIActionIndexRuntime_Toggle_Fullscreen), SIGNAL(triggered(bool)),279 this, SLOT(sltGoToFullscreenMode()), Qt::QueuedConnection);280 connect(gActionPool->action(UIActionIndexRuntime_Toggle_Seamless), SIGNAL(triggered(bool)),281 this, SLOT(sltGoToSeamlessMode()), Qt::QueuedConnection);282 }283 122 }; 284 123 … … 308 147 loadMachineSettings(); 309 148 149 /* Prepare async visual-state change handler: */ 150 qRegisterMetaType<UIVisualStateType>(); 151 connect(this, SIGNAL(sigRequestAsyncVisualStateChange(UIVisualStateType)), 152 this, SLOT(sltChangeVisualState(UIVisualStateType)), 153 Qt::QueuedConnection); 154 310 155 /* Enter default (normal) state */ 311 156 enterInitialVisualState(); … … 345 190 } 346 191 192 void UIMachine::asyncChangeVisualState(UIVisualStateType visualStateType) 193 { 194 emit sigRequestAsyncVisualStateChange(visualStateType); 195 } 196 347 197 void UIMachine::sltChangeVisualState(UIVisualStateType newVisualStateType) 348 198 { 349 199 /* Create new state: */ 350 UIVisualState *pNewVisualState = 0; 351 switch (newVisualStateType) 352 { 353 case UIVisualStateType_Normal: 354 { 355 /* Create normal visual state: */ 356 pNewVisualState = new UIVisualStateNormal(this, m_pSession); 357 break; 358 } 359 case UIVisualStateType_Fullscreen: 360 { 361 /* Create fullscreen visual state: */ 362 pNewVisualState = new UIVisualStateFullscreen(this, m_pSession); 363 break; 364 } 365 case UIVisualStateType_Seamless: 366 { 367 /* Create seamless visual state: */ 368 pNewVisualState = new UIVisualStateSeamless(this, m_pSession); 369 break; 370 } 371 case UIVisualStateType_Scale: 372 { 373 /* Create scale visual state: */ 374 pNewVisualState = new UIVisualStateScale(this, m_pSession); 375 break; 376 } 377 default: 378 break; 379 } 200 UIVisualState *pNewVisualState = new UIVisualState(this, m_pSession, newVisualStateType); 380 201 381 202 /* Get previous visual state type: */ 382 UIVisualStateType previousVisualStateType = UIVisualStateType_Normal; 383 if (m_pVisualState) 384 previousVisualStateType = m_pVisualState->visualStateType(); 203 UIVisualStateType previousVisualStateType = m_pVisualState ? m_pVisualState->visualStateType() : UIVisualStateType_Normal; 385 204 386 205 /* First we have to check if the selected mode is available at all. -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachine.h
r49498 r49505 15 15 */ 16 16 17 #ifndef __ UIMachine_h__18 #define __ UIMachine_h__17 #ifndef ___UIMachine_h___ 18 #define ___UIMachine_h___ 19 19 20 20 /* Qt includes: */ … … 39 39 Q_OBJECT; 40 40 41 signals: 42 43 /** Requests async visual-state change. */ 44 void sigRequestAsyncVisualStateChange(UIVisualStateType visualStateType); 45 41 46 public: 42 47 … … 53 58 bool isVisualStateAllowedSeamless() const { return m_allowedVisualStateTypes & UIVisualStateType_Seamless; } 54 59 bool isVisualStateAllowedScale() const { return m_allowedVisualStateTypes & UIVisualStateType_Scale; } 60 61 /** Requests async visual-state change. */ 62 void asyncChangeVisualState(UIVisualStateType visualStateType); 55 63 56 64 private slots: … … 85 93 }; 86 94 87 #endif /* !__ UIMachine_h__ */95 #endif /* !___UIMachine_h___ */ 88 96 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp
r49341 r49505 1 1 /* $Id$ */ 2 2 /** @file 3 * 4 * VBox frontends: Qt GUI ("VirtualBox"): 5 * UIMachineLogic class implementation 3 * VBox Qt GUI - UIMachineLogic class implementation. 6 4 */ 7 5 … … 249 247 cleanupHandlers(); 250 248 249 /* Cleanup action connections: */ 250 cleanupActionConnections(); 251 251 /* Cleanup action groups: */ 252 252 cleanupActionGroups(); -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.h
r49333 r49505 1 1 /** @file 2 * 3 * VBox frontends: Qt GUI ("VirtualBox"): 4 * UIMachineLogic class declaration 2 * VBox Qt GUI - UIMachineLogic class declaration. 5 3 */ 6 4 … … 17 15 */ 18 16 19 #ifndef __ UIMachineLogic_h__20 #define __ UIMachineLogic_h__17 #ifndef ___UIMachineLogic_h___ 18 #define ___UIMachineLogic_h___ 21 19 22 20 /* GUI includes: */ … … 165 163 virtual void cleanupHandlers(); 166 164 //virtual void cleanupOtherConnections() {} 167 //virtual void cleanupActionConnections() {}165 virtual void cleanupActionConnections() {} 168 166 virtual void cleanupActionGroups(); 169 167 //virtual void cleanupSessionConnections() {} … … 281 279 }; 282 280 283 #endif / / __UIMachineLogic_h__284 281 #endif /* !___UIMachineLogic_h___ */ 282 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp
r49466 r49505 1 1 /* $Id$ */ 2 2 /** @file 3 * 4 * VBox frontends: Qt GUI ("VirtualBox"): 5 * UISession stuff implementation 3 * VBox Qt GUI - UISession class implementation. 6 4 */ 7 5 8 6 /* 9 * Copyright (C) 2006-201 2Oracle Corporation7 * Copyright (C) 2006-2013 Oracle Corporation 10 8 * 11 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 499 497 } 500 498 499 void UISession::changeVisualState(UIVisualStateType visualStateType) 500 { 501 m_pMachine->asyncChangeVisualState(visualStateType); 502 } 503 501 504 bool UISession::setPause(bool fOn) 502 505 { … … 645 648 } 646 649 650 void UISession::sltChangeVisualStateToNormal() 651 { 652 /* Reset requests: */ 653 setSeamlessModeRequested(false); 654 /* Request change: */ 655 m_pMachine->asyncChangeVisualState(UIVisualStateType_Normal); 656 } 657 658 void UISession::sltChangeVisualStateToFullscreen() 659 { 660 /* Reset requests: */ 661 setSeamlessModeRequested(false); 662 /* Request change: */ 663 m_pMachine->asyncChangeVisualState(UIVisualStateType_Fullscreen); 664 } 665 666 void UISession::sltChangeVisualStateToSeamless() 667 { 668 /* Reset requests: */ 669 setSeamlessModeRequested(false); 670 /* Request change: */ 671 m_pMachine->asyncChangeVisualState(UIVisualStateType_Seamless); 672 } 673 674 void UISession::sltChangeVisualStateToScale() 675 { 676 /* Reset requests: */ 677 setSeamlessModeRequested(false); 678 /* Request change: */ 679 m_pMachine->asyncChangeVisualState(UIVisualStateType_Scale); 680 } 681 647 682 void UISession::sltCloseRuntimeUI() 648 683 { -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.h
r49466 r49505 1 1 /** @file 2 * 3 * VBox frontends: Qt GUI ("VirtualBox"): 4 * UISession class declaration 2 * VBox Qt GUI - UISession class declaration. 5 3 */ 6 4 7 5 /* 8 * Copyright (C) 2010-201 2Oracle Corporation6 * Copyright (C) 2010-2013 Oracle Corporation 9 7 * 10 8 * This file is part of VirtualBox Open Source Edition (OSE), as … … 17 15 */ 18 16 19 #ifndef ___UI Console_h___20 #define ___UI Console_h___17 #ifndef ___UISession_h___ 18 #define ___UISession_h___ 21 19 22 20 /* Qt includes: */ … … 125 123 bool isVisualStateAllowedSeamless() const; 126 124 bool isVisualStateAllowedScale() const; 125 /** Requests visual-state change. */ 126 void changeVisualState(UIVisualStateType visualStateType); 127 127 128 128 bool isSaved() const { return machineState() == KMachineState_Saved; } … … 237 237 private slots: 238 238 239 /** Requests visual-state change to 'normal' (window). */ 240 void sltChangeVisualStateToNormal(); 241 /** Requests visual-state change to 'fullscreen'. */ 242 void sltChangeVisualStateToFullscreen(); 243 /** Requests visual-state change to 'seamless'. */ 244 void sltChangeVisualStateToSeamless(); 245 /** Requests visual-state change to 'scale'. */ 246 void sltChangeVisualStateToScale(); 247 239 248 /* Handler: Close Runtime UI stuff: */ 240 249 void sltCloseRuntimeUI(); … … 379 388 }; 380 389 381 #endif // !___UIConsole_h___ 390 #endif /* !___UISession_h___ */ 391 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineLogicFullscreen.cpp
r49498 r49505 1 1 /* $Id$ */ 2 2 /** @file 3 * 4 * VBox frontends: Qt GUI ("VirtualBox"): 5 * UIMachineLogicFullscreen class implementation 3 * VBox Qt GUI - UIMachineLogicFullscreen class implementation. 6 4 */ 7 5 … … 176 174 } 177 175 176 void UIMachineLogicFullscreen::prepareActionConnections() 177 { 178 /* Call to base-class: */ 179 UIMachineLogic::prepareActionConnections(); 180 181 /* "View" actions connections: */ 182 connect(gActionPool->action(UIActionIndexRuntime_Toggle_Fullscreen), SIGNAL(triggered(bool)), 183 uisession(), SLOT(sltChangeVisualStateToNormal())); 184 connect(gActionPool->action(UIActionIndexRuntime_Toggle_Seamless), SIGNAL(triggered(bool)), 185 uisession(), SLOT(sltChangeVisualStateToSeamless())); 186 connect(gActionPool->action(UIActionIndexRuntime_Toggle_Scale), SIGNAL(triggered(bool)), 187 uisession(), SLOT(sltChangeVisualStateToScale())); 188 } 189 178 190 #ifdef Q_WS_MAC 179 191 void UIMachineLogicFullscreen::prepareOtherConnections() … … 249 261 } 250 262 263 void UIMachineLogicFullscreen::cleanupActionConnections() 264 { 265 /* "View" actions disconnections: */ 266 disconnect(gActionPool->action(UIActionIndexRuntime_Toggle_Fullscreen), SIGNAL(triggered(bool)), 267 uisession(), SLOT(sltChangeVisualStateToNormal())); 268 disconnect(gActionPool->action(UIActionIndexRuntime_Toggle_Seamless), SIGNAL(triggered(bool)), 269 uisession(), SLOT(sltChangeVisualStateToSeamless())); 270 disconnect(gActionPool->action(UIActionIndexRuntime_Toggle_Scale), SIGNAL(triggered(bool)), 271 uisession(), SLOT(sltChangeVisualStateToScale())); 272 273 /* Call to base-class: */ 274 UIMachineLogic::cleanupActionConnections(); 275 } 276 251 277 void UIMachineLogicFullscreen::cleanupActionGroups() 252 278 { -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineLogicFullscreen.h
r49309 r49505 1 1 /** @file 2 * 3 * VBox frontends: Qt GUI ("VirtualBox"): 4 * UIMachineLogicFullscreen class declaration 2 * VBox Qt GUI - UIMachineLogicFullscreen class declaration. 5 3 */ 6 4 … … 17 15 */ 18 16 19 #ifndef __ UIMachineLogicFullscreen_h__20 #define __ UIMachineLogicFullscreen_h__17 #ifndef ___UIMachineLogicFullscreen_h___ 18 #define ___UIMachineLogicFullscreen_h___ 21 19 22 20 /* Local includes: */ … … 61 59 /* Prepare helpers: */ 62 60 void prepareActionGroups(); 61 void prepareActionConnections(); 63 62 #ifdef Q_WS_MAC 64 63 void prepareOtherConnections(); … … 73 72 //void cleanupOtherConnections() {} 74 73 #endif /* Q_WS_MAC */ 74 void cleanupActionConnections(); 75 75 void cleanupActionGroups(); 76 76 … … 88 88 }; 89 89 90 #endif / / __UIMachineLogicFullscreen_h__90 #endif /* !___UIMachineLogicFullscreen_h___ */ 91 91 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineLogicNormal.cpp
r46626 r49505 1 1 /* $Id$ */ 2 2 /** @file 3 * 4 * VBox frontends: Qt GUI ("VirtualBox"): 5 * UIMachineLogicNormal class implementation 3 * VBox Qt GUI - UIMachineLogicNormal class implementation. 6 4 */ 7 5 8 6 /* 9 * Copyright (C) 2010-201 2Oracle Corporation7 * Copyright (C) 2010-2013 Oracle Corporation 10 8 * 11 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 81 79 void UIMachineLogicNormal::prepareActionConnections() 82 80 { 83 /* Base class connections: */81 /* Call to base-class: */ 84 82 UIMachineLogic::prepareActionConnections(); 85 83 86 /* This class connections: */ 84 /* "View" actions connections: */ 85 connect(gActionPool->action(UIActionIndexRuntime_Toggle_Fullscreen), SIGNAL(triggered(bool)), 86 uisession(), SLOT(sltChangeVisualStateToFullscreen())); 87 connect(gActionPool->action(UIActionIndexRuntime_Toggle_Seamless), SIGNAL(triggered(bool)), 88 uisession(), SLOT(sltChangeVisualStateToSeamless())); 89 connect(gActionPool->action(UIActionIndexRuntime_Toggle_Scale), SIGNAL(triggered(bool)), 90 uisession(), SLOT(sltChangeVisualStateToScale())); 91 92 /* "Device" actions connections: */ 87 93 connect(gActionPool->action(UIActionIndexRuntime_Menu_Network)->menu(), SIGNAL(aboutToShow()), 88 94 this, SLOT(sltPrepareNetworkAdaptersMenu())); … … 134 140 } 135 141 142 void UIMachineLogicNormal::cleanupActionConnections() 143 { 144 /* "View" actions disconnections: */ 145 disconnect(gActionPool->action(UIActionIndexRuntime_Toggle_Fullscreen), SIGNAL(triggered(bool)), 146 uisession(), SLOT(sltChangeVisualStateToFullscreen())); 147 disconnect(gActionPool->action(UIActionIndexRuntime_Toggle_Seamless), SIGNAL(triggered(bool)), 148 uisession(), SLOT(sltChangeVisualStateToSeamless())); 149 disconnect(gActionPool->action(UIActionIndexRuntime_Toggle_Scale), SIGNAL(triggered(bool)), 150 uisession(), SLOT(sltChangeVisualStateToScale())); 151 152 /* Call to base-class: */ 153 UIMachineLogic::cleanupActionConnections(); 154 } 155 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineLogicNormal.h
r46582 r49505 1 1 /** @file 2 * 3 * VBox frontends: Qt GUI ("VirtualBox"): 4 * UIMachineLogicNormal class declaration 2 * VBox Qt GUI - UIMachineLogicNormal class declaration. 5 3 */ 6 4 7 5 /* 8 * Copyright (C) 2010-201 2Oracle Corporation6 * Copyright (C) 2010-2013 Oracle Corporation 9 7 * 10 8 * This file is part of VirtualBox Open Source Edition (OSE), as … … 17 15 */ 18 16 19 #ifndef __ UIMachineLogicNormal_h__20 #define __ UIMachineLogicNormal_h__17 #ifndef ___UIMachineLogicNormal_h___ 18 #define ___UIMachineLogicNormal_h___ 21 19 22 20 /* Local includes: */ … … 52 50 /* Cleanup helpers: */ 53 51 void cleanupMachineWindows(); 54 //void cleanupActionConnections() {}52 void cleanupActionConnections(); 55 53 56 54 /* Friend classes: */ … … 58 56 }; 59 57 60 #endif / / __UIMachineLogicNormal_h__58 #endif /* !___UIMachineLogicNormal_h___ */ 61 59 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/scale/UIMachineLogicScale.cpp
r49498 r49505 1 1 /* $Id$ */ 2 2 /** @file 3 * 4 * VBox frontends: Qt GUI ("VirtualBox"): 5 * UIMachineLogicScale class implementation 3 * VBox Qt GUI - UIMachineLogicScale class implementation. 6 4 */ 7 5 8 6 /* 9 * Copyright (C) 2010-201 2Oracle Corporation7 * Copyright (C) 2010-2013 Oracle Corporation 10 8 * 11 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 73 71 } 74 72 73 void UIMachineLogicScale::prepareActionConnections() 74 { 75 /* Call to base-class: */ 76 UIMachineLogic::prepareActionConnections(); 77 78 /* "View" actions connections: */ 79 connect(gActionPool->action(UIActionIndexRuntime_Toggle_Scale), SIGNAL(triggered(bool)), 80 uisession(), SLOT(sltChangeVisualStateToNormal())); 81 connect(gActionPool->action(UIActionIndexRuntime_Toggle_Fullscreen), SIGNAL(triggered(bool)), 82 uisession(), SLOT(sltChangeVisualStateToFullscreen())); 83 connect(gActionPool->action(UIActionIndexRuntime_Toggle_Seamless), SIGNAL(triggered(bool)), 84 uisession(), SLOT(sltChangeVisualStateToSeamless())); 85 } 86 75 87 void UIMachineLogicScale::prepareMachineWindows() 76 88 { … … 112 124 } 113 125 126 void UIMachineLogicScale::cleanupActionConnections() 127 { 128 /* "View" actions disconnections: */ 129 disconnect(gActionPool->action(UIActionIndexRuntime_Toggle_Scale), SIGNAL(triggered(bool)), 130 uisession(), SLOT(sltChangeVisualStateToNormal())); 131 disconnect(gActionPool->action(UIActionIndexRuntime_Toggle_Fullscreen), SIGNAL(triggered(bool)), 132 uisession(), SLOT(sltChangeVisualStateToFullscreen())); 133 disconnect(gActionPool->action(UIActionIndexRuntime_Toggle_Seamless), SIGNAL(triggered(bool)), 134 uisession(), SLOT(sltChangeVisualStateToSeamless())); 135 136 /* Call to base-class: */ 137 UIMachineLogic::cleanupActionConnections(); 138 139 } 140 114 141 void UIMachineLogicScale::cleanupActionGroups() 115 142 { -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/scale/UIMachineLogicScale.h
r41064 r49505 1 1 /** @file 2 * 3 * VBox frontends: Qt GUI ("VirtualBox"): 4 * UIMachineLogicScale class declaration 2 * VBox Qt GUI - UIMachineLogicScale class declaration. 5 3 */ 6 4 7 5 /* 8 * Copyright (C) 2010-201 2Oracle Corporation6 * Copyright (C) 2010-2013 Oracle Corporation 9 7 * 10 8 * This file is part of VirtualBox Open Source Edition (OSE), as … … 17 15 */ 18 16 19 #ifndef __ UIMachineLogicScale_h__20 #define __ UIMachineLogicScale_h__17 #ifndef ___UIMachineLogicScale_h___ 18 #define ___UIMachineLogicScale_h___ 21 19 22 20 /* Local includes: */ … … 40 38 /* Prepare helpers: */ 41 39 void prepareActionGroups(); 40 void prepareActionConnections(); 42 41 void prepareMachineWindows(); 43 42 44 43 /* Cleanup helpers: */ 45 44 void cleanupMachineWindows(); 45 void cleanupActionConnections(); 46 46 void cleanupActionGroups(); 47 47 … … 50 50 }; 51 51 52 #endif / / __UIMachineLogicScale_h__52 #endif /* !___UIMachineLogicScale_h___ */ 53 53 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineLogicSeamless.cpp
r49498 r49505 1 1 /* $Id$ */ 2 2 /** @file 3 * 4 * VBox frontends: Qt GUI ("VirtualBox"): 5 * UIMachineLogicSeamless class implementation 3 * VBox Qt GUI - UIMachineLogicSeamless class implementation. 6 4 */ 7 5 … … 180 178 } 181 179 180 void UIMachineLogicSeamless::prepareActionConnections() 181 { 182 /* Call to base-class: */ 183 UIMachineLogic::prepareActionConnections(); 184 185 /* "View" actions connections: */ 186 connect(gActionPool->action(UIActionIndexRuntime_Toggle_Seamless), SIGNAL(triggered(bool)), 187 uisession(), SLOT(sltChangeVisualStateToNormal())); 188 connect(gActionPool->action(UIActionIndexRuntime_Toggle_Fullscreen), SIGNAL(triggered(bool)), 189 uisession(), SLOT(sltChangeVisualStateToFullscreen())); 190 connect(gActionPool->action(UIActionIndexRuntime_Toggle_Scale), SIGNAL(triggered(bool)), 191 uisession(), SLOT(sltChangeVisualStateToScale())); 192 } 193 182 194 void UIMachineLogicSeamless::prepareMachineWindows() 183 195 { … … 229 241 foreach (UIMachineWindow *pMachineWindow, machineWindows()) 230 242 UIMachineWindow::destroy(pMachineWindow); 243 } 244 245 void UIMachineLogicSeamless::cleanupActionConnections() 246 { 247 /* "View" actions connections: */ 248 disconnect(gActionPool->action(UIActionIndexRuntime_Toggle_Seamless), SIGNAL(triggered(bool)), 249 uisession(), SLOT(sltChangeVisualStateToNormal())); 250 disconnect(gActionPool->action(UIActionIndexRuntime_Toggle_Fullscreen), SIGNAL(triggered(bool)), 251 uisession(), SLOT(sltChangeVisualStateToFullscreen())); 252 disconnect(gActionPool->action(UIActionIndexRuntime_Toggle_Scale), SIGNAL(triggered(bool)), 253 uisession(), SLOT(sltChangeVisualStateToScale())); 254 255 /* Call to base-class: */ 256 UIMachineLogic::cleanupActionConnections(); 231 257 } 232 258 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineLogicSeamless.h
r49309 r49505 1 1 /** @file 2 * 3 * VBox frontends: Qt GUI ("VirtualBox"): 4 * UIMachineLogicSeamless class declaration 2 * VBox Qt GUI - UIMachineLogicSeamless class declaration. 5 3 */ 6 4 … … 17 15 */ 18 16 19 #ifndef __ UIMachineLogicSeamless_h__20 #define __ UIMachineLogicSeamless_h__17 #ifndef ___UIMachineLogicSeamless_h___ 18 #define ___UIMachineLogicSeamless_h___ 21 19 22 20 /* Local includes: */ … … 60 58 /* Prepare helpers: */ 61 59 void prepareActionGroups(); 60 void prepareActionConnections(); 62 61 void prepareMachineWindows(); 63 62 void prepareMenu(); … … 66 65 //void cleanupMenu() {} 67 66 void cleanupMachineWindows(); 67 void cleanupActionConnections(); 68 68 void cleanupActionGroups(); 69 69 … … 77 77 }; 78 78 79 #endif / / __UIMachineLogicSeamless_h__79 #endif /* !___UIMachineLogicSeamless_h___ */ 80 80
Note:
See TracChangeset
for help on using the changeset viewer.