Changeset 86923 in vbox
- Timestamp:
- Nov 19, 2020 5:37:32 PM (4 years ago)
- svn:sync-xref-src-repo-rev:
- 141405
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/manager
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManagerWidget.cpp
r86771 r86923 87 87 } 88 88 89 bool UIVirtualBoxManagerWidget::isLocalMachineItemSelected() const 90 { 91 return m_pPaneChooser->isLocalMachineItemSelected(); 92 } 93 94 bool UIVirtualBoxManagerWidget::isCloudMachineItemSelected() const 95 { 96 return m_pPaneChooser->isCloudMachineItemSelected(); 97 } 98 89 99 bool UIVirtualBoxManagerWidget::isSingleGroupSelected() const 90 100 { … … 95 105 { 96 106 return m_pPaneChooser->isSingleLocalGroupSelected(); 107 } 108 109 bool UIVirtualBoxManagerWidget::isSingleCloudProviderGroupSelected() const 110 { 111 return m_pPaneChooser->isSingleCloudProviderGroupSelected(); 97 112 } 98 113 … … 338 353 339 354 /* Calculate selection type: */ 340 const SelectionType enmSelectedItemType = isSingleGroupSelected() 341 ? SelectionType_SingleGroupItem 355 const SelectionType enmSelectedItemType = isSingleLocalGroupSelected() 356 ? SelectionType_SingleLocalGroupItem 357 : isSingleCloudProviderGroupSelected() || isSingleCloudProfileGroupSelected() 358 ? SelectionType_SingleCloudGroupItem 342 359 : isGlobalItemSelected() 343 360 ? SelectionType_FirstIsGlobalItem 344 : isMachineItemSelected() 345 ? SelectionType_FirstIsMachineItem 361 : isLocalMachineItemSelected() 362 ? SelectionType_FirstIsLocalMachineItem 363 : isCloudMachineItemSelected() 364 ? SelectionType_FirstIsCloudMachineItem 346 365 : SelectionType_Invalid; 347 366 /* Acquire current item: */ -
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManagerWidget.h
r86734 r86923 51 51 { 52 52 SelectionType_Invalid, 53 SelectionType_SingleGroupItem, 53 SelectionType_SingleLocalGroupItem, 54 SelectionType_SingleCloudGroupItem, 54 55 SelectionType_FirstIsGlobalItem, 55 SelectionType_FirstIsMachineItem 56 SelectionType_FirstIsLocalMachineItem, 57 SelectionType_FirstIsCloudMachineItem 56 58 }; 57 59 … … 126 128 /** Returns whether machine item is selected. */ 127 129 bool isMachineItemSelected() const; 130 /** Returns whether local machine item is selected. */ 131 bool isLocalMachineItemSelected() const; 132 /** Returns whether cloud machine item is selected. */ 133 bool isCloudMachineItemSelected() const; 128 134 129 135 /** Returns whether single group is selected. */ … … 131 137 /** Returns whether single local group is selected. */ 132 138 bool isSingleLocalGroupSelected() const; 139 /** Returns whether single cloud provider group is selected. */ 140 bool isSingleCloudProviderGroupSelected() const; 133 141 /** Returns whether single cloud profile group is selected. */ 134 142 bool isSingleCloudProfileGroupSelected() const; -
trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooser.cpp
r86734 r86923 82 82 } 83 83 84 bool UIChooser::isLocalMachineItemSelected() const 85 { 86 AssertPtrReturn(model(), false); 87 return model()->isLocalMachineItemSelected(); 88 } 89 90 bool UIChooser::isCloudMachineItemSelected() const 91 { 92 AssertPtrReturn(model(), false); 93 return model()->isCloudMachineItemSelected(); 94 } 95 84 96 bool UIChooser::isSingleGroupSelected() const 85 97 { … … 92 104 AssertPtrReturn(model(), false); 93 105 return model()->isSingleLocalGroupSelected(); 106 } 107 108 bool UIChooser::isSingleCloudProviderGroupSelected() const 109 { 110 AssertPtrReturn(model(), false); 111 return model()->isSingleCloudProviderGroupSelected(); 94 112 } 95 113 -
trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooser.h
r86734 r86923 130 130 /** Returns whether machine item is selected. */ 131 131 bool isMachineItemSelected() const; 132 /** Returns whether local machine item is selected. */ 133 bool isLocalMachineItemSelected() const; 134 /** Returns whether cloud machine item is selected. */ 135 bool isCloudMachineItemSelected() const; 132 136 133 137 /** Returns whether single group is selected. */ … … 135 139 /** Returns whether single local group is selected. */ 136 140 bool isSingleLocalGroupSelected() const; 141 /** Returns whether single cloud provider group is selected. */ 142 bool isSingleCloudProviderGroupSelected() const; 137 143 /** Returns whether single cloud profile group is selected. */ 138 144 bool isSingleCloudProfileGroupSelected() const; -
trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserModel.cpp
r86922 r86923 293 293 } 294 294 295 bool UIChooserModel::isLocalMachineItemSelected() const 296 { 297 return isMachineItemSelected() 298 && firstSelectedItem()->toMachineItem()->cacheType() == UIVirtualMachineItemType_Local; 299 } 300 301 bool UIChooserModel::isCloudMachineItemSelected() const 302 { 303 return isMachineItemSelected() 304 && firstSelectedItem()->toMachineItem()->cacheType() == UIVirtualMachineItemType_CloudReal; 305 } 306 295 307 bool UIChooserModel::isSingleGroupSelected() const 296 308 { … … 303 315 return isSingleGroupSelected() 304 316 && firstSelectedItem()->toGroupItem()->groupType() == UIChooserNodeGroupType_Local; 317 } 318 319 bool UIChooserModel::isSingleCloudProviderGroupSelected() const 320 { 321 return isSingleGroupSelected() 322 && firstSelectedItem()->toGroupItem()->groupType() == UIChooserNodeGroupType_Provider; 305 323 } 306 324 -
trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserModel.h
r86795 r86923 150 150 /** Returns whether machine item is selected. */ 151 151 bool isMachineItemSelected() const; 152 /** Returns whether local machine item is selected. */ 153 bool isLocalMachineItemSelected() const; 154 /** Returns whether cloud machine item is selected. */ 155 bool isCloudMachineItemSelected() const; 152 156 153 157 /** Returns whether single group is selected. */ … … 155 159 /** Returns whether single local group is selected. */ 156 160 bool isSingleLocalGroupSelected() const; 161 /** Returns whether single cloud provider group is selected. */ 162 bool isSingleCloudProviderGroupSelected() const; 157 163 /** Returns whether single cloud profile group is selected. */ 158 164 bool isSingleCloudProfileGroupSelected() const;
Note:
See TracChangeset
for help on using the changeset viewer.