Changeset 108655 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Mar 20, 2025 3:02:10 PM (4 weeks ago)
- svn:sync-xref-src-repo-rev:
- 168068
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/manager
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIGlobalToolsWidget.cpp
r108645 r108655 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 else 228 { 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 207 247 void UIGlobalToolsWidget::sltHandleGlobalToolMenuUpdate() 208 248 { … … 370 410 connect(chooser(), &UIChooser::sigCloudProfileStateChange, 371 411 this, &UIGlobalToolsWidget::sltHandleCloudProfileStateChange); 412 connect(chooser(), &UIChooser::sigCloudMachineStateChange, 413 this, &UIGlobalToolsWidget::sltHandleCloudMachineStateChange); 372 414 373 415 /* Tools-menu connections: */ … … 416 458 disconnect(chooser(), &UIChooser::sigCloudProfileStateChange, 417 459 this, &UIGlobalToolsWidget::sltHandleCloudProfileStateChange); 460 disconnect(chooser(), &UIChooser::sigCloudMachineStateChange, 461 this, &UIGlobalToolsWidget::sltHandleCloudMachineStateChange); 418 462 419 463 /* Tools-menu connections: */ -
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIGlobalToolsWidget.h
r108561 r108655 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 67 73 public: 68 74 … … 134 140 void sltHandleCloudProfileStateChange(const QString &strProviderShortName, 135 141 const QString &strProfileName); 142 143 /** Handles state change for cloud machine with certain @a uId. */ 144 void sltHandleCloudMachineStateChange(const QUuid &uId); 136 145 /** @} */ 137 146 -
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIMachineToolsWidget.cpp
r108645 r108655 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 else321 {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 340 300 void UIMachineToolsWidget::sltHandleToolMenuUpdate(UIVirtualMachineItem *pItem) 341 301 { … … 497 457 connect(chooser(), &UIChooser::sigToolMenuRequested, 498 458 this, &UIMachineToolsWidget::sltHandleToolMenuRequested); 499 connect(chooser(), &UIChooser::sigCloudMachineStateChange,500 this, &UIMachineToolsWidget::sltHandleCloudMachineStateChange);501 459 connect(chooser(), &UIChooser::sigToggleStarted, 502 460 toolPane(), &UIToolPane::sigToggleStarted); … … 552 510 disconnect(chooser(), &UIChooser::sigToolMenuRequested, 553 511 this, &UIMachineToolsWidget::sltHandleToolMenuRequested); 554 disconnect(chooser(), &UIChooser::sigCloudMachineStateChange,555 this, &UIMachineToolsWidget::sltHandleCloudMachineStateChange);556 512 disconnect(chooser(), &UIChooser::sigToggleStarted, 557 513 toolPane(), &UIToolPane::sigToggleStarted); -
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIMachineToolsWidget.h
r108550 r108655 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);76 73 /** @} */ 77 74 … … 188 185 /** Handles signal about Chooser-pane selection invalidated. */ 189 186 void sltHandleChooserPaneSelectionInvalidated(); 190 191 /** Handles state change for cloud machine with certain @a uId. */192 void sltHandleCloudMachineStateChange(const QUuid &uId);193 187 /** @} */ 194 188
Note:
See TracChangeset
for help on using the changeset viewer.