Changeset 26952 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Mar 2, 2010 3:44:43 PM (15 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/runtime
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachine.cpp
r26950 r26952 59 59 virtual void change() = 0; 60 60 virtual void finishChange() {} 61 61 62 signals: 62 63 … … 80 81 /* Normal visual state holder constructor: */ 81 82 UIVisualStateNormal(QObject *pParent, UISession *pSession, UIActionsPool *pActionsPool) 82 : UIVisualState(pParent, pSession, pActionsPool) 83 {} 83 : UIVisualState(pParent, pSession, pActionsPool) {} 84 84 85 85 UIVisualStateType visualStateType() const { return UIVisualStateType_Normal; } … … 93 93 this, SLOT(sltGoToSeamlessMode())); 94 94 95 /* Initialize the logic object */95 /* Initialize the logic object: */ 96 96 m_pMachineLogic->initialize(); 97 97 } … … 120 120 /* Fullscreen visual state holder constructor: */ 121 121 UIVisualStateFullscreen(QObject *pParent, UISession *pSession, UIActionsPool *pActionsPool) 122 : UIVisualState(pParent, pSession, pActionsPool) 123 {} 122 : UIVisualState(pParent, pSession, pActionsPool) {} 124 123 125 124 UIVisualStateType visualStateType() const { return UIVisualStateType_Fullscreen; } … … 133 132 this, SLOT(sltGoToSeamlessMode())); 134 133 135 /* Initialize the logic object */134 /* Initialize the logic object: */ 136 135 m_pMachineLogic->initialize(); 137 136 } … … 160 159 /* Seamless visual state holder constructor: */ 161 160 UIVisualStateSeamless(QObject *pParent, UISession *pSession, UIActionsPool *pActionsPool) 162 : UIVisualState(pParent, pSession, pActionsPool) 163 {} 161 : UIVisualState(pParent, pSession, pActionsPool) {} 164 162 165 163 UIVisualStateType visualStateType() const { return UIVisualStateType_Seamless; } … … 167 165 void change() 168 166 { 169 /* Connect action handlers */167 /* Connect action handlers: */ 170 168 connect(m_pActionsPool->action(UIActionIndex_Toggle_Fullscreen), SIGNAL(triggered(bool)), 171 169 this, SLOT(sltGoToFullscreenMode())); … … 173 171 this, SLOT(sltGoToNormalMode())); 174 172 175 /* Initialize the logic object */173 /* Initialize the logic object: */ 176 174 m_pMachineLogic->initialize(); 177 175 } … … 240 238 } 241 239 242 void UIMachine::closeVirtualMachine()243 {244 delete this;245 }246 247 240 UIMachineLogic* UIMachine::machineLogic() const 248 241 { … … 255 248 void UIMachine::sltChangeVisualState(UIVisualStateType visualStateType) 256 249 { 250 /* Create new state: */ 257 251 UIVisualState *pNewVisualState = 0; 258 /* Create new state: */259 252 switch (visualStateType) 260 253 { … … 281 274 } 282 275 283 /* First we have to check if the selected mode is available at all. Only284 * then we delete the old mode and switch to the new mode. */276 /* First we have to check if the selected mode is available at all. 277 * Only then we delete the old mode and switch to the new mode. */ 285 278 if (pNewVisualState->prepareChange()) 286 279 { … … 288 281 delete m_pVisualState; 289 282 290 /* Set the new mode as current mode .*/283 /* Set the new mode as current mode: */ 291 284 m_pVisualState = pNewVisualState; 292 285 m_pVisualState->change(); 293 /* Finish any setup. */ 286 287 /* Finish any setup: */ 294 288 m_pVisualState->finishChange(); 295 289 } 296 290 else 297 /* Discard the temporary create new state */291 /* Discard the temporary create new state: */ 298 292 delete pNewVisualState; 299 293 } 300 294 295 void UIMachine::closeVirtualMachine() 296 { 297 delete this; 298 } 299 301 300 void UIMachine::enterBaseVisualState() 302 301 { -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachine.h
r26890 r26952 53 53 QWidget* mainWindow() const; 54 54 55 /* Close VM handler: */56 void closeVirtualMachine();57 58 55 private slots: 59 56 … … 62 59 63 60 private: 61 62 /* Close VM handler: */ 63 void closeVirtualMachine(); 64 64 65 65 /* Move VM to default (normal) state: */ -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.h
r26919 r26952 31 31 #include "COMDefs.h" 32 32 33 /* Global forwards */ 34 class QMenuBar; 35 33 36 /* Local forwards */ 34 37 class UIMachine; … … 36 39 class UIConsoleCallback; 37 40 class UIMachineMenuBar; 38 39 class QMenuBar;40 41 41 42 /* CConsole callback event types: */
Note:
See TracChangeset
for help on using the changeset viewer.