- Timestamp:
- Jan 8, 2024 3:59:38 PM (13 months ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/manager
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIToolPaneMachine.cpp
r102723 r102787 196 196 m_pPaneLogViewer->setProperty("ToolType", QVariant::fromValue(UIToolType_Logs)); 197 197 connect(m_pPaneLogViewer, &UIVMLogViewerWidget::sigDetach, 198 this, &UIToolPaneMachine::s igDetachLogViewer);198 this, &UIToolPaneMachine::sltDetachToolPane); 199 199 m_pPaneLogViewer->setSelectedVMListItems(m_items); 200 200 … … 392 392 // printf("UIToolPaneMachine::handleTokenChange: Active = %d, current tool = %d\n", m_fActive, currentTool()); 393 393 } 394 395 void UIToolPaneMachine::sltDetachToolPane() 396 { 397 AssertPtrReturnVoid(sender()); 398 UIToolType enmToolType = UIToolType_Invalid; 399 if (sender() == m_pPaneLogViewer) 400 enmToolType = UIToolType_Logs; 401 402 if (enmToolType != UIToolType_Invalid) 403 emit sigDetachToolPane(enmToolType); 404 } -
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIToolPaneMachine.h
r102723 r102787 76 76 void sigSwitchToActivityOverviewPane(); 77 77 78 /** Notifies listeners about request to detach Log Viewer pane. */79 void sigDetach LogViewer();78 /** Notifies listeners about request to detach pane with tool type @enmToolType. */ 79 void sigDetachToolPane(UIToolType enmToolType); 80 80 81 81 public: … … 114 114 /** Returns the help keyword of the current tool's widget. */ 115 115 QString currentHelpKeyword() const; 116 117 private slots: 118 119 /** Handles the detach signals received from panes.*/ 120 void sltDetachToolPane(); 116 121 117 122 private: -
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManager.cpp
r102775 r102787 963 963 } 964 964 965 void UIVirtualBoxManager::sltDetachLogViewer() 966 { 965 void UIVirtualBoxManager::sltDetachToolPane(UIToolType enmToolType) 966 { 967 AssertReturnVoid(enmToolType != UIToolType_Invalid); 967 968 /* Add tool to detached: */ 968 969 QList<UIToolType> tools = gEDataManager->detachedTools(); 969 if (!tools.contains( UIToolType_Logs))970 { 971 tools << UIToolType_Logs;970 if (!tools.contains(enmToolType)) 971 { 972 tools << enmToolType; 972 973 gEDataManager->setDetachedTools(tools); 973 974 } 974 975 975 976 /* Detach Log Viewer: */ 976 sltOpenManagerWindow( UIToolType_Logs);977 sltOpenManagerWindow(enmToolType); 977 978 } 978 979 … … 2528 2529 connect(m_pWidget, &UIVirtualBoxManagerWidget::sigCurrentSnapshotItemChange, 2529 2530 this, &UIVirtualBoxManager::sltCurrentSnapshotItemChange); 2530 connect(m_pWidget, &UIVirtualBoxManagerWidget::sigDetach LogViewer,2531 this, &UIVirtualBoxManager::sltDetach LogViewer);2531 connect(m_pWidget, &UIVirtualBoxManagerWidget::sigDetachToolPane, 2532 this, &UIVirtualBoxManager::sltDetachToolPane); 2532 2533 2533 2534 connect(menuBar(), &QMenuBar::customContextMenuRequested, -
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManager.h
r102762 r102787 169 169 170 170 /** Handles request to detach Log Viewer pane. */ 171 void sltDetach LogViewer();171 void sltDetachToolPane(UIToolType enmToolType); 172 172 173 173 /** Handles state change for cloud machine with certain @a uId. */ -
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManagerWidget.cpp
r102743 r102787 705 705 connect(m_pPaneToolsMachine, &UIToolPaneMachine::sigSwitchToActivityOverviewPane, 706 706 this, &UIVirtualBoxManagerWidget::sltSwitchToActivityOverviewPane); 707 connect(m_pPaneToolsMachine, &UIToolPaneMachine::sigDetach LogViewer,708 this, &UIVirtualBoxManagerWidget::sigDetach LogViewer);707 connect(m_pPaneToolsMachine, &UIToolPaneMachine::sigDetachToolPane, 708 this, &UIVirtualBoxManagerWidget::sigDetachToolPane); 709 709 710 710 /* Add into stack: */ -
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManagerWidget.h
r102743 r102787 124 124 /** @} */ 125 125 126 /** @name Tools / Log Viewerpane stuff.127 * @{ */ 128 /** Notifies listeners about request to detach Log Viewer pane. */129 void sigDetach LogViewer();126 /** @name Tools / Generic pane stuff. 127 * @{ */ 128 /** Notifies listeners about request to detach pane with tool type @p enmToolType. */ 129 void sigDetachToolPane(UIToolType enmToolType); 130 130 /** @} */ 131 131
Note:
See TracChangeset
for help on using the changeset viewer.