Changeset 83755 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Apr 17, 2020 1:57:48 PM (5 years ago)
- svn:sync-xref-src-repo-rev:
- 137276
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/manager
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManager.cpp
r83752 r83755 2183 2183 if ( pItem->toLocal() 2184 2184 && pItem->isItemStarted() 2185 && ( pItem->toLocal()->canSwitchTo() 2186 || pItem->isItemRunningHeadless())) 2185 && pItem->isItemCanBeSwitchedTo()) 2187 2186 return true; 2188 2187 } … … 2199 2198 && pItem->isItemEditable()) 2200 2199 || ( pItem->isItemStarted() 2201 && ( pItem->toLocal()->canSwitchTo() 2202 || pItem->isItemRunningHeadless())))) 2200 && pItem->isItemCanBeSwitchedTo()))) 2203 2201 return true; 2204 2202 } -
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualMachineItem.h
r83290 r83755 120 120 /** @name Validation stuff. 121 121 * @{ */ 122 /** Returns whether passed machine @a pItem is editable. */122 /** Returns whether this item is editable. */ 123 123 virtual bool isItemEditable() const = 0; 124 /** Returns whether passed machine @a pItem is saved. */124 /** Returns whether this item is saved. */ 125 125 virtual bool isItemSaved() const = 0; 126 /** Returns whether passed machine @a pItem is powered off. */126 /** Returns whether this item is powered off. */ 127 127 virtual bool isItemPoweredOff() const = 0; 128 /** Returns whether passed machine @a pItem is started. */128 /** Returns whether this item is started. */ 129 129 virtual bool isItemStarted() const = 0; 130 /** Returns whether passed machine @a pItem is running. */130 /** Returns whether this item is running. */ 131 131 virtual bool isItemRunning() const = 0; 132 /** Returns whether passed machine @a pItem is running headless. */132 /** Returns whether this item is running headless. */ 133 133 virtual bool isItemRunningHeadless() const = 0; 134 /** Returns whether passed machine @a pItem is paused. */134 /** Returns whether this item is paused. */ 135 135 virtual bool isItemPaused() const = 0; 136 /** Returns whether passed machine @a pItem is stuck. */136 /** Returns whether this item is stuck. */ 137 137 virtual bool isItemStuck() const = 0; 138 /** Returns whether this item can be switched to. */ 139 virtual bool isItemCanBeSwitchedTo() const = 0; 138 140 /** @} */ 139 141 -
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualMachineItemCloud.cpp
r83700 r83755 219 219 return accessible() 220 220 && machineState() == KMachineState_Stuck; 221 } 222 223 bool UIVirtualMachineItemCloud::isItemCanBeSwitchedTo() const 224 { 225 return false; 221 226 } 222 227 -
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualMachineItemCloud.h
r83654 r83755 97 97 /** @name Validation stuff. 98 98 * @{ */ 99 /** Returns whether passed machine @a pItem is editable. */99 /** Returns whether this item is editable. */ 100 100 virtual bool isItemEditable() const /* override */; 101 /** Returns whether passed machine @a pItem is saved. */101 /** Returns whether this item is saved. */ 102 102 virtual bool isItemSaved() const /* override */; 103 /** Returns whether passed machine @a pItem is powered off. */103 /** Returns whether this item is powered off. */ 104 104 virtual bool isItemPoweredOff() const /* override */; 105 /** Returns whether passed machine @a pItem is started. */105 /** Returns whether this item is started. */ 106 106 virtual bool isItemStarted() const /* override */; 107 /** Returns whether passed machine @a pItem is running. */107 /** Returns whether this item is running. */ 108 108 virtual bool isItemRunning() const /* override */; 109 /** Returns whether passed machine @a pItem is running headless. */109 /** Returns whether this item is running headless. */ 110 110 virtual bool isItemRunningHeadless() const /* override */; 111 /** Returns whether passed machine @a pItem is paused. */111 /** Returns whether this item is paused. */ 112 112 virtual bool isItemPaused() const /* override */; 113 /** Returns whether passed machine @a pItem is stuck. */113 /** Returns whether this item is stuck. */ 114 114 virtual bool isItemStuck() const /* override */; 115 /** Returns whether this item can be switched to. */ 116 virtual bool isItemCanBeSwitchedTo() const /* override */; 115 117 /** @} */ 116 118 -
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualMachineItemLocal.cpp
r83290 r83755 167 167 } 168 168 169 bool UIVirtualMachineItemLocal::canSwitchTo() const170 {171 return const_cast <CMachine&>(m_comMachine).CanShowConsoleWindow();172 }173 174 169 bool UIVirtualMachineItemLocal::switchTo() 175 170 { … … 281 276 } 282 277 278 bool UIVirtualMachineItemLocal::isItemCanBeSwitchedTo() const 279 { 280 return const_cast<CMachine&>(m_comMachine).CanShowConsoleWindow() 281 || isItemRunningHeadless(); 282 } 283 283 284 void UIVirtualMachineItemLocal::retranslateUi() 284 285 { -
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualMachineItemLocal.h
r83108 r83755 75 75 /** @name Console attributes. 76 76 * @{ */ 77 /** Returns whether we can switch to main window of VM process. */78 bool canSwitchTo() const;79 77 /** Tries to switch to the main window of the VM process. 80 78 * @return true if switched successfully. */ … … 92 90 /** @name Validation stuff. 93 91 * @{ */ 94 /** Returns whether passed machine @a pItem is editable. */92 /** Returns whether this item is editable. */ 95 93 virtual bool isItemEditable() const /* override */; 96 /** Returns whether passed machine @a pItem is saved. */94 /** Returns whether this item is saved. */ 97 95 virtual bool isItemSaved() const /* override */; 98 /** Returns whether passed machine @a pItem is powered off. */96 /** Returns whether this item is powered off. */ 99 97 virtual bool isItemPoweredOff() const /* override */; 100 /** Returns whether passed machine @a pItem is started. */98 /** Returns whether this item is started. */ 101 99 virtual bool isItemStarted() const /* override */; 102 /** Returns whether passed machine @a pItem is running. */100 /** Returns whether this item is running. */ 103 101 virtual bool isItemRunning() const /* override */; 104 /** Returns whether passed machine @a pItem is running headless. */102 /** Returns whether this item is running headless. */ 105 103 virtual bool isItemRunningHeadless() const /* override */; 106 /** Returns whether passed machine @a pItem is paused. */104 /** Returns whether this item is paused. */ 107 105 virtual bool isItemPaused() const /* override */; 108 /** Returns whether passed machine @a pItem is stuck. */106 /** Returns whether this item is stuck. */ 109 107 virtual bool isItemStuck() const /* override */; 108 /** Returns whether this item can be switched to. */ 109 virtual bool isItemCanBeSwitchedTo() const /* override */; 110 110 /** @} */ 111 111
Note:
See TracChangeset
for help on using the changeset viewer.