Changeset 83482 in vbox for trunk/src/VBox
- Timestamp:
- Mar 30, 2020 1:35:12 PM (5 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/manager
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIToolPaneGlobal.cpp
r83481 r83482 45 45 , m_pPaneCloud(0) 46 46 , m_pPaneResourceMonitor(0) 47 , m_fActive(false) 47 48 { 48 49 /* Prepare: */ … … 54 55 /* Cleanup: */ 55 56 cleanup(); 57 } 58 59 void UIToolPaneGlobal::setActive(bool fActive) 60 { 61 /* Save activity: */ 62 if (m_fActive != fActive) 63 { 64 m_fActive = fActive; 65 66 /* Handle token change: */ 67 handleTokenChange(); 68 } 56 69 } 57 70 … … 194 207 } 195 208 } 209 210 /* Handle token change: */ 211 handleTokenChange(); 196 212 } 197 213 … … 221 237 delete pWidget; 222 238 } 239 240 /* Handle token change: */ 241 handleTokenChange(); 223 242 } 224 243 … … 242 261 } 243 262 } 263 264 void UIToolPaneGlobal::handleTokenChange() 265 { 266 // printf("UIToolPaneGlobal::handleTokenChange: Active = %d, current tool = %d\n", m_fActive, currentTool()); 267 } -
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIToolPaneGlobal.h
r83481 r83482 59 59 virtual ~UIToolPaneGlobal() /* override */; 60 60 61 /** Defines whether this pane is @a fActive. */ 62 void setActive(bool fActive); 63 /** Returns whether this pane is active. */ 64 bool active() const { return m_fActive; } 65 61 66 /** Returns type of tool currently opened. */ 62 67 UIToolType currentTool() const; … … 77 82 void cleanup(); 78 83 84 /** Handles token change. */ 85 void handleTokenChange(); 86 79 87 /** Holds the action pool reference. */ 80 88 UIActionPool *m_pActionPool; … … 92 100 /** Holds the VM Resource Monitor instance. */ 93 101 UIResourceMonitorWidget *m_pPaneResourceMonitor; 102 103 /** Holds whether this pane is active. */ 104 bool m_fActive; 94 105 }; 95 106 -
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIToolPaneMachine.cpp
r82968 r83482 46 46 , m_pPaneSnapshots(0) 47 47 , m_pPaneLogViewer(0) 48 , m_fActive(false) 48 49 { 49 50 /* Prepare: */ … … 55 56 /* Cleanup: */ 56 57 cleanup(); 58 } 59 60 void UIToolPaneMachine::setActive(bool fActive) 61 { 62 /* Save activity: */ 63 if (m_fActive != fActive) 64 { 65 m_fActive = fActive; 66 67 /* Handle token change: */ 68 handleTokenChange(); 69 } 57 70 } 58 71 … … 175 188 } 176 189 } 190 191 /* Handle token change: */ 192 handleTokenChange(); 177 193 } 178 194 … … 202 218 delete pWidget; 203 219 } 220 221 /* Handle token change: */ 222 handleTokenChange(); 204 223 } 205 224 … … 278 297 } 279 298 } 299 300 void UIToolPaneMachine::handleTokenChange() 301 { 302 // printf("UIToolPaneMachine::handleTokenChange: Active = %d, current tool = %d\n", m_fActive, currentTool()); 303 } -
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIToolPaneMachine.h
r82968 r83482 68 68 virtual ~UIToolPaneMachine() /* override */; 69 69 70 /** Defines whether this pane is @a fActive. */ 71 void setActive(bool fActive); 72 /** Returns whether this pane is active. */ 73 bool active() const { return m_fActive; } 74 70 75 /** Returns type of tool currently opened. */ 71 76 UIToolType currentTool() const; … … 101 106 void cleanup(); 102 107 108 /** Handles token change. */ 109 void handleTokenChange(); 110 103 111 /** Holds the action pool reference. */ 104 112 UIActionPool *m_pActionPool; … … 118 126 UIVMLogViewerWidget *m_pPaneLogViewer; 119 127 128 /** Holds whether this pane is active. */ 129 bool m_fActive; 130 120 131 /** Holds the cache of passed items. */ 121 132 QList<UIVirtualMachineItem*> m_items; -
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManagerWidget.cpp
r83480 r83482 270 270 m_pPaneTools->setToolsClass(UIToolClass_Machine); 271 271 m_pStackedWidget->setCurrentWidget(m_pPaneToolsMachine); 272 m_pPaneToolsGlobal->setActive(false); 273 m_pPaneToolsMachine->setActive(true); 272 274 break; 273 275 } … … 276 278 m_pPaneTools->setToolsClass(UIToolClass_Global); 277 279 m_pStackedWidget->setCurrentWidget(m_pPaneToolsGlobal); 280 m_pPaneToolsMachine->setActive(false); 281 m_pPaneToolsGlobal->setActive(true); 278 282 break; 279 283 } … … 461 465 if (m_pPaneToolsGlobal) 462 466 { 467 if (m_pPaneChooser->isGlobalItemSelected()) 468 m_pPaneToolsGlobal->setActive(true); 463 469 connect(m_pPaneToolsGlobal, &UIToolPaneGlobal::sigCloudProfileManagerChange, 464 470 this, &UIVirtualBoxManagerWidget::sigCloudProfileManagerChange); … … 472 478 if (m_pPaneToolsMachine) 473 479 { 480 if (!m_pPaneChooser->isGlobalItemSelected()) 481 m_pPaneToolsMachine->setActive(true); 474 482 connect(m_pPaneToolsMachine, &UIToolPaneMachine::sigCurrentSnapshotItemChange, 475 483 this, &UIVirtualBoxManagerWidget::sigCurrentSnapshotItemChange);
Note:
See TracChangeset
for help on using the changeset viewer.