Changeset 87022 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Dec 1, 2020 1:33:04 PM (4 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIActionPool.cpp
r86996 r87022 2579 2579 &msgCenter(), &UIMessageCenter::sltResetSuppressedMessages, Qt::UniqueConnection); 2580 2580 2581 /* 'Help' menu connections: */ 2582 connect(action(UIActionIndex_Simple_Contents), &UIAction::triggered, 2583 &msgCenter(), &UIMessageCenter::sltShowHelpHelpDialog, Qt::UniqueConnection); 2581 /* 'Help' menu connections. Note that connections for UIActionIndex_Simple_Contents is done 2582 * in manager and runtime uis separately in their respective classes: */ 2584 2583 connect(action(UIActionIndex_Simple_WebSite), &UIAction::triggered, 2585 2584 &msgCenter(), &UIMessageCenter::sltShowHelpWebDialog, Qt::UniqueConnection); -
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIToolPaneGlobal.cpp
r86997 r87022 242 242 } 243 243 244 QString UIToolPaneGlobal::currentHelpKeyword() const 245 { 246 QWidget *pCurrentToolWidget = 0; 247 //UIToolType currentTool() const; 248 switch (currentTool()) 249 { 250 case UIToolType_Welcome: 251 pCurrentToolWidget = m_pPaneWelcome; 252 break; 253 case UIToolType_Media: 254 pCurrentToolWidget = m_pPaneMedia; 255 break; 256 case UIToolType_Network: 257 pCurrentToolWidget = m_pPaneNetwork; 258 break; 259 case UIToolType_Cloud: 260 pCurrentToolWidget = m_pPaneCloud; 261 break; 262 case UIToolType_Resources: 263 pCurrentToolWidget = m_pPaneResourceMonitor; 264 break; 265 default: 266 break; 267 } 268 return uiCommon().helpKeyword(pCurrentToolWidget); 269 } 270 244 271 void UIToolPaneGlobal::prepare() 245 272 { -
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIToolPaneGlobal.h
r86997 r87022 72 72 /** Closes tool of passed @a enmType, deletes one if exists. */ 73 73 void closeTool(UIToolType enmType); 74 /** Returns the help keyword of the current tool's widget. */ 75 QString currentHelpKeyword() const; 74 76 75 77 private: -
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIToolPaneMachine.cpp
r85571 r87022 311 311 } 312 312 313 QString UIToolPaneMachine::currentHelpKeyword() const 314 { 315 QWidget *pCurrentToolWidget = 0; 316 switch (currentTool()) 317 { 318 case UIToolType_Error: 319 pCurrentToolWidget = m_pPaneError; 320 break; 321 case UIToolType_Details: 322 pCurrentToolWidget = m_pPaneDetails; 323 break; 324 case UIToolType_Snapshots: 325 pCurrentToolWidget = m_pPaneSnapshots; 326 break; 327 case UIToolType_Logs: 328 pCurrentToolWidget = m_pPaneLogViewer; 329 break; 330 case UIToolType_Performance: 331 pCurrentToolWidget = m_pPanePerformanceMonitor; 332 break; 333 default: 334 break; 335 } 336 return uiCommon().helpKeyword(pCurrentToolWidget); 337 } 338 313 339 void UIToolPaneMachine::prepare() 314 340 { -
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIToolPaneMachine.h
r85396 r87022 98 98 bool isCurrentStateItemSelected() const; 99 99 100 /** Returns the help keyword of the current tool's widget. */ 101 QString currentHelpKeyword() const; 102 100 103 private: 101 104 -
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManager.cpp
r86997 r87022 2139 2139 } 2140 2140 2141 void UIVirtualBoxManager::sltPerformShowHelpBrowser() 2142 { 2143 m_pWidget->showHelpBrowser(); 2144 } 2145 2141 2146 void UIVirtualBoxManager::prepare() 2142 2147 { … … 2476 2481 connect(actionPool()->actionGroup(UIActionIndexMN_M_Machine_M_Tools), &QActionGroup::triggered, 2477 2482 this, &UIVirtualBoxManager::sltPerformShowMachineTool); 2483 2484 /* 'Help' menu contents action connection. It is done here since we need different behaviour in 2485 * the manager and runtime UIs: */ 2486 connect(actionPool()->action(UIActionIndex_Simple_Contents), &UIAction::triggered, 2487 this, &UIVirtualBoxManager::sltPerformShowHelpBrowser); 2488 2478 2489 } 2479 2490 -
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManager.h
r86925 r87022 309 309 /** Handles call to toggle machine search widget visibility to be @a fVisible. */ 310 310 void sltPerformMachineSearchWidgetVisibilityToggling(bool fVisible); 311 312 /** Handles call to show help viewer. */ 313 void sltPerformShowHelpBrowser(); 311 314 /** @} */ 312 315 -
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManagerWidget.cpp
r86925 r87022 28 28 #include "UIExtraDataManager.h" 29 29 #include "UIChooser.h" 30 #include "UIMessageCenter.h" 30 31 #include "UIVirtualBoxManager.h" 31 32 #include "UIVirtualBoxManagerWidget.h" … … 256 257 if (pButton) 257 258 pButton->setPopupMode(fSeparateMenuSection ? QToolButton::MenuButtonPopup : QToolButton::DelayedPopup); 259 } 260 261 void UIVirtualBoxManagerWidget::showHelpBrowser() 262 { 263 QString strHelpKeyword; 264 if (isGlobalItemSelected()) 265 strHelpKeyword = m_pPaneToolsGlobal->currentHelpKeyword(); 266 else if (isMachineItemSelected()) 267 strHelpKeyword = m_pPaneToolsMachine->currentHelpKeyword(); 268 269 msgCenter().sltHandleHelpRequestWithKeyword(strHelpKeyword); 258 270 } 259 271 -
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManagerWidget.h
r86923 r87022 209 209 /** @} */ 210 210 211 /** @name Help browser stuff. 212 * @{ */ 213 /** Shpws the help browser. */ 214 void showHelpBrowser(); 215 /** @} */ 216 211 217 public slots: 212 218 -
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIWelcomePane.cpp
r82968 r87022 24 24 /* GUI includes */ 25 25 #include "QIWithRetranslateUI.h" 26 #include "UICommon.h" 26 27 #include "UIIconPool.h" 27 28 #include "UIWelcomePane.h" … … 214 215 } 215 216 217 uiCommon().setHelpKeyword(this, "intro-starting"); 218 216 219 /* Translate finally: */ 217 220 retranslateUi(); -
trunk/src/VBox/Frontends/VirtualBox/src/snapshots/UISnapshotPane.cpp
r86233 r87022 1205 1205 loadSettings(); 1206 1206 1207 1208 uiCommon().setHelpKeyword(this, "snapshots"); 1209 1207 1210 /* Apply language settings: */ 1208 1211 retranslateUi();
Note:
See TracChangeset
for help on using the changeset viewer.