- Timestamp:
- Jan 24, 2024 1:28:00 PM (8 months ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/manager
- Files:
-
- 6 edited
-
UIVirtualBoxManagerWidget.cpp (modified) (3 diffs)
-
UIVirtualBoxManagerWidget.h (modified) (1 diff)
-
chooser/UIChooser.cpp (modified) (3 diffs)
-
chooser/UIChooser.h (modified) (3 diffs)
-
chooser/UIChooserAbstractModel.cpp (modified) (2 diffs)
-
chooser/UIChooserAbstractModel.h (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManagerWidget.cpp
r102838 r103023 517 517 } 518 518 519 void UIVirtualBoxManagerWidget::sltHandleCloudProfileStateChange(const QString &strProviderShortName, 520 const QString &strProfileName) 521 { 522 RT_NOREF(strProviderShortName, strProfileName); 523 524 /* If Global Activity Overview tool is currently chosen: */ 525 if ( m_pStackedWidget->currentWidget() == m_pPaneToolsGlobal 526 && m_pPaneToolsGlobal->currentTool() == UIToolType_VMActivityOverview) 527 m_pPaneToolsGlobal->setCloudMachineItems(m_pPaneChooser->cloudMachineItems()); 528 } 529 519 530 void UIVirtualBoxManagerWidget::sltHandleCloudMachineStateChange(const QUuid &uId) 520 531 { … … 809 820 connect(m_pPaneChooser, &UIChooser::sigToolMenuRequested, 810 821 this, &UIVirtualBoxManagerWidget::sltHandleToolMenuRequested); 822 connect(m_pPaneChooser, &UIChooser::sigCloudProfileStateChange, 823 this, &UIVirtualBoxManagerWidget::sltHandleCloudProfileStateChange); 811 824 connect(m_pPaneChooser, &UIChooser::sigCloudMachineStateChange, 812 825 this, &UIVirtualBoxManagerWidget::sltHandleCloudMachineStateChange); … … 1063 1076 disconnect(m_pPaneChooser, &UIChooser::sigToolMenuRequested, 1064 1077 this, &UIVirtualBoxManagerWidget::sltHandleToolMenuRequested); 1078 disconnect(m_pPaneChooser, &UIChooser::sigCloudProfileStateChange, 1079 this, &UIVirtualBoxManagerWidget::sltHandleCloudProfileStateChange); 1065 1080 disconnect(m_pPaneChooser, &UIChooser::sigCloudMachineStateChange, 1066 1081 this, &UIVirtualBoxManagerWidget::sltHandleCloudMachineStateChange); -
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManagerWidget.h
r102838 r103023 315 315 void sltHandleSlidingAnimationComplete(SlidingDirection enmDirection); 316 316 317 /** Handles state change for cloud profile with certain @a strProviderShortName and @a strProfileName. */ 318 void sltHandleCloudProfileStateChange(const QString &strProviderShortName, 319 const QString &strProfileName); 317 320 /** Handles state change for cloud machine with certain @a uId. */ 318 321 void sltHandleCloudMachineStateChange(const QUuid &uId); -
trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooser.cpp
r103022 r103023 67 67 AssertPtrReturn(model(), false); 68 68 return model()->isCloudProfileUpdateInProgress(); 69 } 70 71 QList<UIVirtualMachineItemCloud*> UIChooser::cloudMachineItems() const 72 { 73 AssertPtrReturn(model(), QList<UIVirtualMachineItemCloud*>()); 74 return model()->cloudMachineItems(); 69 75 } 70 76 … … 276 282 connect(model(), &UIChooserModel::sigGroupSavingStateChanged, 277 283 this, &UIChooser::sigGroupSavingStateChanged); 284 connect(model(), &UIChooserModel::sigCloudProfileStateChange, 285 this, &UIChooser::sigCloudProfileStateChange); 278 286 connect(model(), &UIChooserModel::sigCloudMachineStateChange, 279 287 this, &UIChooser::sigCloudMachineStateChange); … … 324 332 disconnect(model(), &UIChooserModel::sigGroupSavingStateChanged, 325 333 this, &UIChooser::sigGroupSavingStateChanged); 334 disconnect(model(), &UIChooserModel::sigCloudProfileStateChange, 335 this, &UIChooser::sigCloudProfileStateChange); 326 336 disconnect(model(), &UIChooserModel::sigCloudMachineStateChange, 327 337 this, &UIChooser::sigCloudMachineStateChange); -
trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooser.h
r103022 r103023 43 43 class UIChooserView; 44 44 class UIVirtualMachineItem; 45 class UIVirtualMachineItemCloud; 45 46 46 47 /** QWidget extension used as VM Chooser-pane. */ … … 59 60 /** @name Cloud update stuff. 60 61 * @{ */ 62 /** Notifies listeners about cloud profile state change. 63 * @param strProviderShortName Brings the cloud provider short name. 64 * @param strProfileName Brings the cloud profile name. */ 65 void sigCloudProfileStateChange(const QString &strProviderShortName, 66 const QString &strProfileName); 61 67 /** Notifies listeners about cloud machine state change. 62 68 * @param uId Brings the cloud machine ID. */ … … 126 132 /** Returns whether at least one cloud profile currently being updated. */ 127 133 bool isCloudProfileUpdateInProgress() const; 134 135 /** Returns a list of real cloud machine items. */ 136 QList<UIVirtualMachineItemCloud*> cloudMachineItems() const; 128 137 /** @} */ 129 138 -
trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserAbstractModel.cpp
r103021 r103023 664 664 /* False by default: */ 665 665 return false; 666 } 667 668 QList<UIVirtualMachineItemCloud*> UIChooserAbstractModel::cloudMachineItems() const 669 { 670 QList<UIVirtualMachineItemCloud*> items; 671 foreach (UIChooserNode *pNode, enumerateCloudMachineNodes()) 672 { 673 AssertReturn(pNode && pNode->type() == UIChooserNodeType_Machine, items); 674 UIChooserNodeMachine *pMachineNode = pNode->toMachineNode(); 675 AssertPtrReturn(pMachineNode, items); 676 if (pMachineNode->cacheType() != UIVirtualMachineItemType_CloudReal) 677 continue; 678 UIVirtualMachineItemCloud *pCloudMachineItem = pMachineNode->cache()->toCloud(); 679 AssertPtrReturn(pCloudMachineItem, items); 680 items << pCloudMachineItem; 681 } 682 return items; 666 683 } 667 684 … … 1011 1028 /* Remove cloud entity key from the list of keys currently being updated: */ 1012 1029 removeCloudEntityKey(guiCloudProfileKey); 1030 1031 /* Notify listeners: */ 1032 emit sigCloudProfileStateChange(guiCloudProfileKey.m_strProviderShortName, 1033 guiCloudProfileKey.m_strProfileName); 1013 1034 } 1014 1035 -
trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserAbstractModel.h
r103021 r103023 48 48 class UIChooser; 49 49 class UIChooserNode; 50 class UIVirtualMachineItemCloud; 50 51 class CMachine; 51 52 … … 69 70 /** @name Cloud update stuff. 70 71 * @{ */ 72 /** Notifies listeners about cloud profile state change. 73 * @param strProviderShortName Brings the cloud provider short name. 74 * @param strProfileName Brings the cloud profile name. */ 75 void sigCloudProfileStateChange(const QString &strProviderShortName, 76 const QString &strProfileName); 71 77 /** Notifies listeners about cloud machine state change. 72 78 * @param uId Brings the cloud machine ID. */ … … 155 161 /** Returns whether at least one cloud profile currently being updated. */ 156 162 bool isCloudProfileUpdateInProgress() const; 163 164 /** Returns a list of real cloud machine items. */ 165 QList<UIVirtualMachineItemCloud*> cloudMachineItems() const; 157 166 /** @} */ 158 167
Note:
See TracChangeset
for help on using the changeset viewer.

