- Timestamp:
- Jul 23, 2020 4:11:33 PM (4 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/manager
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManagerWidget.cpp
r85434 r85439 32 32 #include "UITabBar.h" 33 33 #include "UIToolBar.h" 34 #include "UIVirtualBoxEventHandler.h" 34 35 #include "UIVirtualMachineItemCloud.h" 35 36 #include "UIVirtualMachineItemLocal.h" … … 277 278 m_pToolBar->updateLayout(); 278 279 #endif 280 } 281 282 void UIVirtualBoxManagerWidget::sltHandleStateChange(const QUuid &) 283 { 284 /* Recache current item info if machine or group item selected: */ 285 if (isMachineItemSelected() || isGroupItemSelected()) 286 recacheCurrentItemInformation(); 279 287 } 280 288 … … 627 635 void UIVirtualBoxManagerWidget::prepareConnections() 628 636 { 637 /* Global VBox event handlers: */ 638 connect(gVBoxEvents, &UIVirtualBoxEventHandler::sigMachineStateChange, 639 this, &UIVirtualBoxManagerWidget::sltHandleStateChange); 640 629 641 /* Tool-bar connections: */ 630 642 connect(m_pToolBar, &UIToolBar::customContextMenuRequested, … … 947 959 QList<UIToolType> retrictedTypes; 948 960 if (pItem && pItem->itemType() != UIVirtualMachineItemType_Local) 949 {950 961 retrictedTypes << UIToolType_Snapshots << UIToolType_Logs << UIToolType_Performance; 951 if (retrictedTypes.contains(m_pPaneTools->toolsType())) 952 m_pPaneTools->setToolsType(UIToolType_Details); 953 } 954 else if (pItem && !pItem->isItemRunning()) 955 { 962 else if (pItem && !pItem->isItemStarted()) 956 963 retrictedTypes << UIToolType_Performance; 957 } 964 if (retrictedTypes.contains(m_pPaneTools->toolsType())) 965 m_pPaneTools->setToolsType(UIToolType_Details); 958 966 m_pPaneTools->setRestrictedToolTypes(retrictedTypes); 959 967 /* Update machine tools availability: */ -
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManagerWidget.h
r84595 r85439 215 215 private slots: 216 216 217 /** @name CVirtualBox event handling stuff. 218 * @{ */ 219 /** Handles CVirtualBox event about state change for machine with @a uId. */ 220 void sltHandleStateChange(const QUuid &uId); 221 /** @} */ 222 217 223 /** @name Tool-bar stuff. 218 224 * @{ */
Note:
See TracChangeset
for help on using the changeset viewer.