Changeset 83674 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Apr 10, 2020 5:37:18 PM (5 years ago)
- svn:sync-xref-src-repo-rev:
- 137163
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/manager
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManager.cpp
r83608 r83674 1616 1616 } 1617 1617 1618 bool UIVirtualBoxManager::isSingleLocalGroupSelected() const 1619 { 1620 return m_pWidget->isSingleLocalGroupSelected(); 1621 } 1622 1623 bool UIVirtualBoxManager::isSingleCloudProfileGroupSelected() const 1624 { 1625 return m_pWidget->isSingleCloudProfileGroupSelected(); 1626 } 1627 1618 1628 void UIVirtualBoxManager::performStartOrShowVirtualMachines(const QList<UIVirtualMachineItem*> &items, UICommon::LaunchMode enmLaunchMode) 1619 1629 { … … 1893 1903 { 1894 1904 return !isGroupSavingInProgress() && 1895 isSingleGroupSelected(); 1905 (isSingleLocalGroupSelected() || 1906 isSingleCloudProfileGroupSelected()); 1896 1907 } 1897 1908 case UIActionIndexST_M_Group_S_Add: … … 1913 1924 case UIActionIndexST_M_Machine_S_Add: 1914 1925 { 1915 return !isGroupSavingInProgress() && 1916 isItemsLocal(items); 1926 return !isGroupSavingInProgress(); 1917 1927 } 1918 1928 case UIActionIndexST_M_Machine_S_Settings: -
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManager.h
r83290 r83674 297 297 /** Returns whether single group is selected. */ 298 298 bool isSingleGroupSelected() const; 299 /** Returns whether single local group is selected. */ 300 bool isSingleLocalGroupSelected() const; 301 /** Returns whether single cloud profile group is selected. */ 302 bool isSingleCloudProfileGroupSelected() const; 299 303 /** @} */ 300 304 -
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManagerWidget.cpp
r83616 r83674 98 98 { 99 99 return m_pPaneChooser->isSingleGroupSelected(); 100 } 101 102 bool UIVirtualBoxManagerWidget::isSingleLocalGroupSelected() const 103 { 104 return m_pPaneChooser->isSingleLocalGroupSelected(); 105 } 106 107 bool UIVirtualBoxManagerWidget::isSingleCloudProfileGroupSelected() const 108 { 109 return m_pPaneChooser->isSingleCloudProfileGroupSelected(); 100 110 } 101 111 -
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManagerWidget.h
r83290 r83674 98 98 /** Returns whether single group is selected. */ 99 99 bool isSingleGroupSelected() const; 100 /** Returns whether single local group is selected. */ 101 bool isSingleLocalGroupSelected() const; 102 /** Returns whether single cloud profile group is selected. */ 103 bool isSingleCloudProfileGroupSelected() const; 100 104 101 105 /** Defines tools @a enmType. */ -
trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooser.cpp
r83064 r83674 79 79 } 80 80 81 bool UIChooser::isSingleLocalGroupSelected() const 82 { 83 return m_pChooserModel->isSingleLocalGroupSelected(); 84 } 85 86 bool UIChooser::isSingleCloudProfileGroupSelected() const 87 { 88 return m_pChooserModel->isSingleCloudProfileGroupSelected(); 89 } 90 81 91 bool UIChooser::isAllItemsOfOneGroupSelected() const 82 92 { -
trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooser.h
r83290 r83674 108 108 /** Returns whether single group is selected. */ 109 109 bool isSingleGroupSelected() const; 110 /** Returns whether single local group is selected. */ 111 bool isSingleLocalGroupSelected() const; 112 /** Returns whether single cloud profile group is selected. */ 113 bool isSingleCloudProfileGroupSelected() const; 110 114 /** Returns whether all machine items of one group is selected. */ 111 115 bool isAllItemsOfOneGroupSelected() const; -
trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserModel.cpp
r83673 r83674 334 334 return selectedItems().size() == 1 335 335 && firstSelectedItem()->type() == UIChooserNodeType_Group; 336 } 337 338 bool UIChooserModel::isSingleLocalGroupSelected() const 339 { 340 return isSingleGroupSelected() 341 && firstSelectedItem()->node()->toGroupNode()->groupType() == UIChooserNodeGroupType_Local; 342 } 343 344 bool UIChooserModel::isSingleCloudProfileGroupSelected() const 345 { 346 return isSingleGroupSelected() 347 && firstSelectedItem()->node()->toGroupNode()->groupType() == UIChooserNodeGroupType_Profile; 336 348 } 337 349 -
trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserModel.h
r83671 r83674 153 153 /** Returns whether single group is selected. */ 154 154 bool isSingleGroupSelected() const; 155 /** Returns whether single local group is selected. */ 156 bool isSingleLocalGroupSelected() const; 157 /** Returns whether single cloud profile group is selected. */ 158 bool isSingleCloudProfileGroupSelected() const; 155 159 /** Returns whether all machine items of one group is selected. */ 156 160 bool isAllItemsOfOneGroupSelected() const;
Note:
See TracChangeset
for help on using the changeset viewer.