Changeset 30542 in vbox
- Timestamp:
- Jun 30, 2010 9:53:06 PM (15 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/runtime
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp
r30408 r30542 554 554 } 555 555 556 void UIMachineLogic::prepareHandlers() 557 { 558 /* Create mouse-handler: */ 559 setMouseHandler(UIMouseHandler::create(this, visualStateType())); 560 } 561 556 562 #ifdef Q_WS_MAC 557 563 void UIMachineLogic::prepareDock() … … 647 653 } 648 654 #endif /* Q_WS_MAC */ 655 656 void UIMachineLogic::cleanupHandlers() 657 { 658 /* Cleanup mouse-handler: */ 659 UIMouseHandler::destroy(mouseHandler()); 660 } 649 661 650 662 void UIMachineLogic::sltMachineStateChanged() -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.h
r30408 r30542 115 115 virtual void prepareActionConnections(); 116 116 virtual void prepareActionGroups(); 117 virtual void prepareHandlers(); 117 118 #ifdef Q_WS_MAC 118 119 virtual void prepareDock(); … … 125 126 virtual void cleanupDock(); 126 127 #endif /* Q_WS_MAC */ 128 virtual void cleanupHandlers(); 127 129 //virtual void cleanupActionGroups() {} 128 130 //virtual void cleanupActionConnections() {} -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.cpp
r30409 r30542 556 556 NOREF(ok); 557 557 #endif 558 559 /* Register mouse-handler: */560 machineLogic()->mouseHandler()->addMachineView(screenId(), this);561 558 } 562 559 … … 615 612 void UIMachineView::cleanupCommon() 616 613 { 617 /* Unregister mouse-handler: */618 machineLogic()->mouseHandler()->delMachineView(screenId());619 620 614 #ifdef Q_WS_PM 621 615 bool ok = VBoxHlpUninstallKbdHook(0, winId(), UM_PREACCEL_CHAR); -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineWindow.cpp
r30213 r30542 35 35 #include "UISession.h" 36 36 #include "UIActionsPool.h" 37 #include "UIMouseHandler.h" 37 38 #include "UIMachineLogic.h" 38 39 #include "UIMachineWindow.h" … … 458 459 } 459 460 461 void UIMachineWindow::prepareHandlers() 462 { 463 /* Register machine-view in mouse-handler: */ 464 machineLogic()->mouseHandler()->addMachineView(m_uScreenId, this->machineView()); 465 } 466 467 void UIMachineWindow::cleanupHandlers() 468 { 469 /* Unregister machine-view from mouse-handler: */ 470 machineLogic()->mouseHandler()->delMachineView(m_uScreenId); 471 } 472 460 473 void UIMachineWindow::updateAppearanceOf(int iElement) 461 474 { -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineWindow.h
r30213 r30542 80 80 virtual void prepareMachineViewContainer(); 81 81 //virtual void loadWindowSettings() {} 82 virtual void prepareHandlers(); 82 83 83 84 /* Cleanup helpers: */ 85 virtual void cleanupHandlers(); 84 86 //virtual void saveWindowSettings() {} 85 87 //virtual void cleanupMachineViewContainer() {} -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineLogicFullscreen.cpp
r30408 r30542 55 55 /* Cleanup machine window(s): */ 56 56 cleanupMachineWindows(); 57 58 /* Cleanup handlers: */ 59 cleanupHandlers(); 57 60 58 61 /* Cleanup action related stuff */ … … 133 136 prepareActionConnections(); 134 137 138 /* Prepare handlers: */ 139 prepareHandlers(); 140 135 141 /* Prepare machine window: */ 136 142 prepareMachineWindows(); … … 194 200 /* Update the multi screen layout: */ 195 201 m_pScreenLayout->update(); 196 197 /* Create mouse-handler: */198 UIMouseHandler *pMouseHandler = UIMouseHandler::create(this, visualStateType());199 setMouseHandler(pMouseHandler);200 202 201 203 /* Create machine window(s): */ … … 230 232 foreach (UIMachineWindow *pMachineWindow, machineWindows()) 231 233 UIMachineWindow::destroy(pMachineWindow); 232 233 /* Cleanup mouse-handler: */234 UIMouseHandler::destroy(mouseHandler());235 234 236 235 #ifdef Q_WS_MAC -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineWindowFullscreen.cpp
r30347 r30542 64 64 prepareMachineView(); 65 65 66 /* Prepare handlers: */ 67 prepareHandlers(); 68 66 69 /* Prepare mini tool-bar: */ 67 70 prepareMiniToolBar(); … … 96 99 /* Save window settings: */ 97 100 saveWindowSettings(); 101 102 /* Prepare handlers: */ 103 cleanupHandlers(); 98 104 99 105 /* Cleanup machine view: */ -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineLogicNormal.cpp
r30408 r30542 50 50 /* Cleanup machine window(s): */ 51 51 cleanupMachineWindow(); 52 53 /* Cleanup handlers: */ 54 cleanupHandlers(); 52 55 } 53 56 … … 67 70 /* Prepare action connections: */ 68 71 prepareActionConnections(); 72 73 /* Prepare handlers: */ 74 prepareHandlers(); 69 75 70 76 /* Prepare normal machine window: */ … … 143 149 #endif /* Q_WS_MAC */ 144 150 145 /* Create mouse-handler: */146 UIMouseHandler *pMouseHandler = UIMouseHandler::create(this, visualStateType());147 setMouseHandler(pMouseHandler);148 149 151 /* Get monitors count: */ 150 152 ulong uMonitorCount = session().GetMachine().GetMonitorCount(); … … 169 171 foreach (UIMachineWindow *pMachineWindow, machineWindows()) 170 172 UIMachineWindow::destroy(pMachineWindow); 171 172 /* Cleanup mouse-handler: */173 UIMouseHandler::destroy(mouseHandler());174 173 } 175 174 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineWindowNormal.cpp
r30408 r30542 80 80 prepareMachineView(); 81 81 82 /* Prepare handlers: */ 83 prepareHandlers(); 84 82 85 /* Load normal window settings: */ 83 86 loadWindowSettings(); … … 94 97 /* Save normal window settings: */ 95 98 saveWindowSettings(); 99 100 /* Prepare handlers: */ 101 cleanupHandlers(); 96 102 97 103 /* Cleanup normal machine view: */ -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineLogicSeamless.cpp
r30408 r30542 53 53 /* Cleanup machine window(s): */ 54 54 cleanupMachineWindows(); 55 56 /* Cleanup handlers: */ 57 cleanupHandlers(); 55 58 56 59 /* Cleanup actions groups: */ … … 125 128 prepareActionConnections(); 126 129 130 /* Prepare handlers: */ 131 prepareHandlers(); 132 127 133 /* Prepare normal machine window: */ 128 134 prepareMachineWindows(); … … 185 191 m_pScreenLayout->update(); 186 192 187 /* Create machine mouse-handler: */188 UIMouseHandler *pMouseHandler = UIMouseHandler::create(this, visualStateType());189 setMouseHandler(pMouseHandler);190 191 193 /* Create machine window(s): */ 192 194 for (int cScreenId = 0; cScreenId < m_pScreenLayout->guestScreenCount(); ++cScreenId) … … 211 213 foreach (UIMachineWindow *pMachineWindow, machineWindows()) 212 214 UIMachineWindow::destroy(pMachineWindow); 213 214 /* Cleanup mouse-handler: */215 UIMouseHandler::destroy(mouseHandler());216 215 } 217 216 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineWindowSeamless.cpp
r30347 r30542 75 75 prepareMachineView(); 76 76 77 /* Prepare handlers: */ 78 prepareHandlers(); 79 77 80 /* Prepare mini tool-bar: */ 78 81 #ifndef Q_WS_MAC … … 99 102 /* Save window settings: */ 100 103 saveWindowSettings(); 104 105 /* Prepare handlers: */ 106 cleanupHandlers(); 101 107 102 108 /* Cleanup machine view: */
Note:
See TracChangeset
for help on using the changeset viewer.