Changeset 107343 in vbox
- Timestamp:
- Dec 17, 2024 3:41:29 PM (4 weeks ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/manager
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIGlobalToolsManagerWidget.cpp
r107338 r107343 59 59 } 60 60 61 UIToolPaneGlobal *UIGlobalToolsManagerWidget::toolPane() const 62 { 63 return m_pPane; 64 } 65 61 66 UIToolType UIGlobalToolsManagerWidget::menuToolType() const 62 67 { … … 105 110 106 111 /* Special handling for Machines Global tool, 107 * notify machine tool-pane it's active: */112 * notify Machine tool-pane it's active: */ 108 113 if (enmType == UIToolType_Machines) 109 114 { … … 111 116 toolPaneMachine()->setActive(true); 112 117 } 113 /* Otherwise, notify global tool-pane it's active: */118 /* Otherwise, notify Global tool-pane it's active: */ 114 119 else 115 120 { … … 205 210 pLayout->setContentsMargins(0, 0, 0, 0); 206 211 207 /* Create tool s-menu: */212 /* Create tool-menu: */ 208 213 m_pMenu = new UITools(this, UIToolClass_Global, actionPool()); 209 214 if (toolMenu()) … … 213 218 } 214 219 215 /* Create tool s-pane: */220 /* Create tool-pane: */ 216 221 m_pPane = new UIToolPaneGlobal(actionPool()); 217 222 if (toolPane()) … … 283 288 { 284 289 return m_pMenu; 285 }286 287 UIToolPaneGlobal *UIGlobalToolsManagerWidget::toolPane() const288 {289 return m_pPane;290 290 } 291 291 -
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIGlobalToolsManagerWidget.h
r107339 r107343 47 47 class UIVirtualBoxManagerAdvancedWidget; 48 48 49 /** QWidget extension used as VirtualBoxManager Widget instance. */49 /** QWidget extension used as Global Tools Manager Widget instance. */ 50 50 class UIGlobalToolsManagerWidget : public QWidget 51 51 { … … 62 62 public: 63 63 64 /** Constructs VirtualBoxManager widget passing @a pParent to the base-class.64 /** Constructs Global Tools Manager widget passing @a pParent to the base-class. 65 65 * @param pActionPool Brings the action-pool reference. */ 66 66 UIGlobalToolsManagerWidget(UIVirtualBoxManagerAdvancedWidget *pParent, UIActionPool *pActionPool); 67 /** Destructs VirtualBoxManager widget. */67 /** Destructs Global Tools Manager widget. */ 68 68 virtual ~UIGlobalToolsManagerWidget() RT_OVERRIDE; 69 69 70 70 /** @name Common stuff. 71 71 * @{ */ 72 /** Returns the action-pool instance. */72 /** Returns the action-pool reference. */ 73 73 UIActionPool *actionPool() const { return m_pActionPool; } 74 74 /** @} */ … … 76 76 /** @name Tools pane stuff. 77 77 * @{ */ 78 /** Returns tool-pane instance. */ 79 UIToolPaneGlobal *toolPane() const; 80 78 81 /** Returns menu tool type. */ 79 82 UIToolType menuToolType() const; … … 85 88 /** Returns whether pane has tool of passed @a enmType. */ 86 89 bool isToolOpened(UIToolType enmType) const; 87 /** Switches tool to passed@a enmType. */90 /** Switches pane to passed tool @a enmType. */ 88 91 void switchToolTo(UIToolType enmType); 89 /** Closes tool of passed @a enmType. */92 /** Closes pane tool of passed @a enmType. */ 90 93 void closeTool(UIToolType enmType); 91 94 /** @} */ … … 105 108 /** @} */ 106 109 107 /** @name C VirtualBox extra-dataevent handling stuff.110 /** @name COM event handling stuff. 108 111 * @{ */ 109 112 /** Handles signal about settings expert mode change. */ … … 151 154 /** Returns tool-menu instance. */ 152 155 UITools *toolMenu() const; 153 /** Returns tool-pane instance. */ 154 UIToolPaneGlobal *toolPane() const; 155 /** Returns Machine Manager reference. */ 156 /** Returns Machine Manager reference. */ 156 157 UIMachineManagerWidget *machineManager() const; 157 158 /** Returns Machine Manager's Chooser-pane reference. */ -
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIMachineManagerWidget.cpp
r107339 r107343 201 201 } 202 202 203 bool UIMachineManagerWidget::isCurrentStateItemSelected() const204 {205 AssertPtrReturn(toolPane(), false);206 return toolPane()->isCurrentStateItemSelected();207 }208 209 QUuid UIMachineManagerWidget::currentSnapshotId()210 {211 AssertPtrReturn(toolPane(), QUuid());212 return toolPane()->currentSnapshotId();213 }214 215 203 QString UIMachineManagerWidget::currentHelpKeyword() const 216 204 { … … 328 316 if (fCurrentItemIsOk) 329 317 { 330 /* If Error-pane is chosen currently => switch to tool currently chosen in Tools-menu: */318 /* If Error-pane is chosen currently => switch to tool currently chosen in tools-menu: */ 331 319 if (toolPane()->currentTool() == UIToolType_Error) 332 320 switchToolTo(toolMenu()->toolsType()); … … 387 375 } 388 376 389 void UIMachineManagerWidget::sltSwitchToVMActivity Pane(const QUuid &uMachineId)377 void UIMachineManagerWidget::sltSwitchToVMActivityTool(const QUuid &uMachineId) 390 378 { 391 379 AssertPtrReturnVoid(chooser()); … … 427 415 if (m_pSplitter) 428 416 { 429 /* Create Chooser-pane: */417 /* Create chooser-pane: */ 430 418 m_pPaneChooser = new UIChooser(this, actionPool()); 431 419 if (chooser()) … … 435 423 } 436 424 437 /* Create Tools-pane: */425 /* Create tool-pane: */ 438 426 m_pPaneTools = new UIToolPaneMachine(actionPool()); 439 427 if (toolPane()) … … 454 442 } 455 443 456 /* Create Tools-menu: */444 /* Create tools-menu: */ 457 445 m_pMenuTools = new UITools(this, UIToolClass_Machine, actionPool()); 458 446 } … … 476 464 /* Parent connections: */ 477 465 connect(m_pParent, &UIToolPaneGlobal::sigSwitchToMachineActivityPane, 478 this, &UIMachineManagerWidget::sltSwitchToVMActivity Pane);466 this, &UIMachineManagerWidget::sltSwitchToVMActivityTool); 479 467 480 468 /* Splitter connections: */ … … 519 507 } 520 508 521 /* Open tool last chosen in Tools-menu: */509 /* Open tool last chosen in tools-menu: */ 522 510 switchToolTo(toolMenu()->toolsType()); 523 511 } … … 572 560 if (fCurrentItemIsOk) 573 561 { 574 /* If Error-pane is chosen currently => switch to tool currently chosen in Tools-menu: */562 /* If Error-pane is chosen currently => switch to tool currently chosen in tools-menu: */ 575 563 if (toolPane()->currentTool() == UIToolType_Error) 576 564 switchToolTo(toolMenu()->toolsType()); … … 610 598 const QList restrictions(restrictedTypes.begin(), restrictedTypes.end()); 611 599 toolMenu()->setRestrictedToolTypes(restrictions); 612 /* Update machine menu items availability: */613 600 toolMenu()->setItemsEnabled(fCurrentItemIsOk); 614 601 -
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIMachineManagerWidget.h
r107339 r107343 91 91 public: 92 92 93 /** Constructs VirtualMachine Manager widget passing @a pParent to the base-class.93 /** Constructs Machine Manager widget passing @a pParent to the base-class. 94 94 * @param pActionPool Brings the action-pool reference. */ 95 95 UIMachineManagerWidget(UIToolPaneGlobal *pParent, UIActionPool *pActionPool); 96 /** Destructs VirtualMachine Manager widget. */96 /** Destructs Machine Manager widget. */ 97 97 virtual ~UIMachineManagerWidget() RT_OVERRIDE; 98 98 … … 138 138 /** @name Tools pane stuff. 139 139 * @{ */ 140 /** Returns Tool-pane instance. */140 /** Returns tool-pane instance. */ 141 141 UIToolPaneMachine *toolPane() const; 142 142 … … 156 156 /** @} */ 157 157 158 /** @name Tools / Snapshot pane stuff.159 * @{ */160 /** Returns whether current-state item of Snapshot pane is selected. */161 bool isCurrentStateItemSelected() const;162 163 /** Returns currently selected snapshot ID if any. */164 QUuid currentSnapshotId();165 /** @} */166 167 158 /** @name Help browser stuff. 168 159 * @{ */ … … 223 214 void sltHandleToolsMenuIndexChange(UIToolType enmType); 224 215 225 /** Switches to VM Activity pane of machine with @a uMachineId. */226 void sltSwitchToVMActivity Pane(const QUuid &uMachineId);216 /** Handles signal requesting switch to VM Activity tool. */ 217 void sltSwitchToVMActivityTool(const QUuid &uMachineId); 227 218 /** @} */ 228 219
Note:
See TracChangeset
for help on using the changeset viewer.