Changeset 108663 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Mar 20, 2025 4:15:22 PM (4 weeks ago)
- svn:sync-xref-src-repo-rev:
- 168076
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/manager
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIGlobalToolsWidget.cpp
r108655 r108663 205 205 } 206 206 207 void UIGlobalToolsWidget::sltHandleCloudMachineStateChange(const QUuid &uId)208 {209 /* Acquire current item: */210 UIVirtualMachineItem *pItem = machineToolsWidget()->currentItem();211 const bool fCurrentItemIsOk = machineToolsWidget()->isItemAccessible(pItem);212 213 /* If current item is Ok: */214 if (fCurrentItemIsOk)215 {216 /* If Error-pane is chosen currently => switch to tool currently chosen in tools-menu: */217 if (toolPaneMachine()->currentTool() == UIToolType_Error)218 machineToolsWidget()->switchToolTo(toolMenu()->toolsType(UIToolClass_Machine));219 220 /* If we still have same item selected: */221 if (pItem && pItem->id() == uId)222 {223 /* Propagate current items to update the Details-pane: */224 toolPaneMachine()->setItems(machineToolsWidget()->currentItems());225 }226 }227 else228 {229 /* Make sure Error pane raised: */230 if (toolPaneMachine()->currentTool() != UIToolType_Error)231 toolPaneMachine()->openTool(UIToolType_Error);232 233 /* If we still have same item selected: */234 if (pItem && pItem->id() == uId)235 {236 /* Propagate current items to update the Details-pane (in any case): */237 toolPaneMachine()->setItems(machineToolsWidget()->currentItems());238 /* Propagate last access error to update the Error-pane (if machine selected but inaccessible): */239 toolPaneMachine()->setErrorDetails(pItem->accessError());240 }241 }242 243 /* Pass the signal further: */244 emit sigCloudMachineStateChange(uId);245 }246 247 207 void UIGlobalToolsWidget::sltHandleGlobalToolMenuUpdate() 248 208 { … … 410 370 connect(chooser(), &UIChooser::sigCloudProfileStateChange, 411 371 this, &UIGlobalToolsWidget::sltHandleCloudProfileStateChange); 412 connect(chooser(), &UIChooser::sigCloudMachineStateChange,413 this, &UIGlobalToolsWidget::sltHandleCloudMachineStateChange);414 372 415 373 /* Tools-menu connections: */ … … 458 416 disconnect(chooser(), &UIChooser::sigCloudProfileStateChange, 459 417 this, &UIGlobalToolsWidget::sltHandleCloudProfileStateChange); 460 disconnect(chooser(), &UIChooser::sigCloudMachineStateChange,461 this, &UIGlobalToolsWidget::sltHandleCloudMachineStateChange);462 418 463 419 /* Tools-menu connections: */ -
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIGlobalToolsWidget.h
r108655 r108663 65 65 /** @} */ 66 66 67 /** @name Chooser pane stuff.68 * @{ */69 /** Notifies about state change for cloud machine with certain @a uId. */70 void sigCloudMachineStateChange(const QUuid &uId);71 /** @} */72 73 67 public: 74 68 … … 140 134 void sltHandleCloudProfileStateChange(const QString &strProviderShortName, 141 135 const QString &strProfileName); 142 143 /** Handles state change for cloud machine with certain @a uId. */144 void sltHandleCloudMachineStateChange(const QUuid &uId);145 136 /** @} */ 146 137 -
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIMachineToolsWidget.cpp
r108655 r108663 298 298 } 299 299 300 void UIMachineToolsWidget::sltHandleCloudMachineStateChange(const QUuid &uId) 301 { 302 /* Acquire current item: */ 303 UIVirtualMachineItem *pItem = currentItem(); 304 const bool fCurrentItemIsOk = isItemAccessible(pItem); 305 306 /* If current item is Ok: */ 307 if (fCurrentItemIsOk) 308 { 309 /* If Error-pane is chosen currently => switch to tool currently chosen in tools-menu: */ 310 if (toolPane()->currentTool() == UIToolType_Error) 311 switchToolTo(toolMenu()->toolsType(UIToolClass_Machine)); 312 313 /* If we still have same item selected: */ 314 if (pItem && pItem->id() == uId) 315 { 316 /* Propagate current items to update the Details-pane: */ 317 toolPane()->setItems(currentItems()); 318 } 319 } 320 else 321 { 322 /* Make sure Error pane raised: */ 323 if (toolPane()->currentTool() != UIToolType_Error) 324 toolPane()->openTool(UIToolType_Error); 325 326 /* If we still have same item selected: */ 327 if (pItem && pItem->id() == uId) 328 { 329 /* Propagate current items to update the Details-pane (in any case): */ 330 toolPane()->setItems(currentItems()); 331 /* Propagate last access error to update the Error-pane (if machine selected but inaccessible): */ 332 toolPane()->setErrorDetails(pItem->accessError()); 333 } 334 } 335 336 /* Pass the signal further: */ 337 emit sigCloudMachineStateChange(uId); 338 } 339 300 340 void UIMachineToolsWidget::sltHandleToolMenuUpdate(UIVirtualMachineItem *pItem) 301 341 { … … 457 497 connect(chooser(), &UIChooser::sigToolMenuRequested, 458 498 this, &UIMachineToolsWidget::sltHandleToolMenuRequested); 499 connect(chooser(), &UIChooser::sigCloudMachineStateChange, 500 this, &UIMachineToolsWidget::sltHandleCloudMachineStateChange); 459 501 connect(chooser(), &UIChooser::sigToggleStarted, 460 502 toolPane(), &UIToolPane::sigToggleStarted); … … 510 552 disconnect(chooser(), &UIChooser::sigToolMenuRequested, 511 553 this, &UIMachineToolsWidget::sltHandleToolMenuRequested); 554 disconnect(chooser(), &UIChooser::sigCloudMachineStateChange, 555 this, &UIMachineToolsWidget::sltHandleCloudMachineStateChange); 512 556 disconnect(chooser(), &UIChooser::sigToggleStarted, 513 557 toolPane(), &UIToolPane::sigToggleStarted); -
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIMachineToolsWidget.h
r108655 r108663 71 71 /** Notifies about Chooser-pane selection change. */ 72 72 void sigChooserPaneSelectionChange(); 73 74 /** Notifies about state change for cloud machine with certain @a uId. */ 75 void sigCloudMachineStateChange(const QUuid &uId); 73 76 /** @} */ 74 77 … … 185 188 /** Handles signal about Chooser-pane selection invalidated. */ 186 189 void sltHandleChooserPaneSelectionInvalidated(); 190 191 /** Handles state change for cloud machine with certain @a uId. */ 192 void sltHandleCloudMachineStateChange(const QUuid &uId); 187 193 /** @} */ 188 194 -
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxWidget.cpp
r108656 r108663 461 461 connect(globalToolsWidget(), &UIGlobalToolsWidget::sigToolTypeChange, 462 462 this, &UIVirtualBoxWidget::sigToolTypeChangeGlobal); 463 connect(globalToolsWidget(), &UIGlobalToolsWidget::sigCloudMachineStateChange,464 this, &UIVirtualBoxWidget::sigCloudMachineStateChange);465 463 /* Global Tool Pane connections: */ 466 464 connect(globalToolPane(), &UIToolPane::sigCreateMedium, … … 478 476 connect(machineToolsWidget(), &UIMachineToolsWidget::sigChooserPaneSelectionChange, 479 477 this, &UIVirtualBoxWidget::sltUpdateToolbar); 478 connect(machineToolsWidget(), &UIMachineToolsWidget::sigCloudMachineStateChange, 479 this, &UIVirtualBoxWidget::sigCloudMachineStateChange); 480 480 /* Machine Tool Pane connections: */ 481 481 connect(machineToolPane(), &UIToolPane::sigLinkClicked, … … 718 718 disconnect(globalToolsWidget(), &UIGlobalToolsWidget::sigToolTypeChange, 719 719 this, &UIVirtualBoxWidget::sigToolTypeChangeGlobal); 720 disconnect(globalToolsWidget(), &UIGlobalToolsWidget::sigCloudMachineStateChange,721 this, &UIVirtualBoxWidget::sigCloudMachineStateChange);722 720 /* Global Tool Pane connections: */ 723 721 disconnect(globalToolPane(), &UIToolPane::sigCreateMedium, … … 735 733 disconnect(machineToolsWidget(), &UIMachineToolsWidget::sigChooserPaneSelectionChange, 736 734 this, &UIVirtualBoxWidget::sltUpdateToolbar); 735 disconnect(machineToolsWidget(), &UIMachineToolsWidget::sigCloudMachineStateChange, 736 this, &UIVirtualBoxWidget::sigCloudMachineStateChange); 737 737 /* Machine Tool Pane connections: */ 738 738 disconnect(machineToolPane(), &UIToolPane::sigLinkClicked,
Note:
See TracChangeset
for help on using the changeset viewer.