- Timestamp:
- May 24, 2023 6:53:04 AM (20 months ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 27 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/UITakeSnapshotDialog.cpp
r98779 r99946 39 39 #include "UICommon.h" 40 40 #include "UIDesktopWidgetWatchdog.h" 41 #include "UI MessageCenter.h"41 #include "UIHelpBrowserDialog.h" 42 42 #include "UITakeSnapshotDialog.h" 43 43 … … 302 302 this, &UITakeSnapshotDialog::reject); 303 303 connect(m_pButtonBox->button(QIDialogButtonBox::Help), &QPushButton::pressed, 304 &(msgCenter()), &UIMessageCenter::sltHandleHelpRequest);304 m_pButtonBox, &QIDialogButtonBox::sltHandleHelpRequest); 305 305 m_pButtonBox->button(QDialogButtonBox::Help)->setShortcut(QKeySequence::HelpContents); 306 306 uiCommon().setHelpKeyword(m_pButtonBox->button(QIDialogButtonBox::Help), "snapshots"); 307 307 308 /* Add into layout: */ 308 309 pLayout->addWidget(m_pButtonBox, 3, 0, 1, 2); -
trunk/src/VBox/Frontends/VirtualBox/src/extensions/QIDialogButtonBox.cpp
r98103 r99946 32 32 /* GUI includes: */ 33 33 #include "QIDialogButtonBox.h" 34 #include "UIHelpBrowserDialog.h" 34 35 #include "UISpecialControls.h" 35 36 … … 168 169 return i; 169 170 } 171 172 void QIDialogButtonBox::sltHandleHelpRequest() 173 { 174 AssertReturnVoid(sender()); 175 UIHelpBrowserDialog::findManualFileAndShow(uiCommon().helpKeyword(sender())); 176 } -
trunk/src/VBox/Frontends/VirtualBox/src/extensions/QIDialogButtonBox.h
r98103 r99946 81 81 void setDoNotPickDefaultButton(bool fDoNotPickDefaultButton); 82 82 83 public slots: 84 85 /** Handles help request. */ 86 void sltHandleHelpRequest(); 87 83 88 protected: 84 89 -
trunk/src/VBox/Frontends/VirtualBox/src/extensions/QIManagerDialog.cpp
r98103 r99946 37 37 #include "UICommon.h" 38 38 #include "UIDesktopWidgetWatchdog.h" 39 #include "UIHelpBrowserDialog.h" 39 40 #include "UIMessageCenter.h" 40 41 #ifdef VBOX_WS_MAC … … 91 92 void QIManagerDialog::sltHandleHelpRequested() 92 93 { 93 emit sigHelpRequested(uiCommon().helpKeyword(m_pWidget));94 UIHelpBrowserDialog::findManualFileAndShow(uiCommon().helpKeyword(m_pWidget)); 94 95 } 95 96 … … 197 198 /* Connections to enable the context sensitive help: */ 198 199 connect(m_pButtonBox, &QDialogButtonBox::helpRequested, this, &QIManagerDialog::sltHandleHelpRequested); 199 connect(this, &QIManagerDialog::sigHelpRequested, &msgCenter(), &UIMessageCenter::sltHandleHelpRequestWithKeyword);200 200 201 201 /* Configure button-box: */ -
trunk/src/VBox/Frontends/VirtualBox/src/extensions/QIManagerDialog.h
r98103 r99946 105 105 /** Notifies listeners about dialog should be closed. */ 106 106 void sigClose(); 107 /** Notifies listeners about help requested.108 * @param strHelpKeyword Brings the tag to find related section in the manual. */109 void sigHelpRequested(const QString &strHelpKeyword);110 107 111 108 protected: -
trunk/src/VBox/Frontends/VirtualBox/src/extensions/QIMessageBox.cpp
r98103 r99946 45 45 #include "UICommon.h" 46 46 #include "UIIconPool.h" 47 #include "UIHelpBrowserDialog.h" 47 48 #include "UIMessageCenter.h" 48 49 … … 290 291 { 291 292 uiCommon().setHelpKeyword(m_pButtonHelp, m_strHelpKeyword); 292 connect(m_pButtonHelp, &QPushButton::clicked, &msgCenter(), &UIMessageCenter::sltHandleHelpRequest);293 connect(m_pButtonHelp, &QPushButton::clicked, m_pButtonBox, &QIDialogButtonBox::sltHandleHelpRequest); 293 294 } 294 295 } -
trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.cpp
r99929 r99946 1689 1689 m_pButtonBox->setStandardButtons(QDialogButtonBox::Help | QDialogButtonBox::Close); 1690 1690 m_pButtonBox->button(QDialogButtonBox::Close)->setShortcut(Qt::Key_Escape); 1691 connect(m_pButtonBox, &QIDialogButtonBox::helpRequested, &msgCenter(), &UIMessageCenter::sltHandleHelpRequest);1691 connect(m_pButtonBox, &QIDialogButtonBox::helpRequested, m_pButtonBox, &QIDialogButtonBox::sltHandleHelpRequest); 1692 1692 connect(m_pButtonBox, &QIDialogButtonBox::rejected, this, &UIExtraDataManagerWindow::close); 1693 1693 /* Add button-box into main layout: */ -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.cpp
r99929 r99946 2103 2103 } 2104 2104 2105 void UIMessageCenter::sltShowUserManual(const QString &strHelpFilePath)2106 {2107 if (!QFileInfo(strHelpFilePath).exists())2108 {2109 UINotificationMessage::cannotFindHelpFile(strHelpFilePath);2110 return;2111 }2112 if (!m_pHelpBrowserDialog)2113 {2114 m_pHelpBrowserDialog = new UIHelpBrowserDialog(0 /* parent */, 0 /* Center Widget */, strHelpFilePath);2115 AssertReturnVoid(m_pHelpBrowserDialog);2116 connect(m_pHelpBrowserDialog, &QMainWindow::destroyed, this, &UIMessageCenter::sltHelpBrowserClosed);2117 }2118 2119 m_pHelpBrowserDialog->show();2120 m_pHelpBrowserDialog->setWindowState(m_pHelpBrowserDialog->windowState() & ~Qt::WindowMinimized);2121 m_pHelpBrowserDialog->activateWindow();2122 }2123 2124 void UIMessageCenter::sltHelpBrowserClosed()2125 {2126 m_pHelpBrowserDialog = 0;2127 }2128 2129 void UIMessageCenter::sltHandleHelpRequest()2130 {2131 sltHandleHelpRequestWithKeyword(uiCommon().helpKeyword(sender()));2132 }2133 2134 void UIMessageCenter::sltHandleHelpRequestWithKeyword(const QString &strHelpKeyword)2135 {2136 /* First open or show the help browser: */2137 checkManualFileAndShow();2138 /* Show the help page for the @p strHelpKeyword: */2139 if (m_pHelpBrowserDialog && !strHelpKeyword.isEmpty())2140 m_pHelpBrowserDialog->showHelpForKeyword(strHelpKeyword);2141 }2142 2143 void UIMessageCenter::checkManualFileAndShow()2144 {2145 #ifndef VBOX_OSE2146 /* For non-OSE version we just open it: */2147 sltShowUserManual(uiCommon().helpFile());2148 #else /* #ifndef VBOX_OSE */2149 /* For OSE version we have to check if it present first: */2150 QString strUserManualFileName1 = uiCommon().helpFile();2151 QString strShortFileName = QFileInfo(strUserManualFileName1).fileName();2152 QString strUserManualFileName2 = QDir(uiCommon().homeFolder()).absoluteFilePath(strShortFileName);2153 /* Show if user manual already present: */2154 if (QFile::exists(strUserManualFileName1))2155 sltShowUserManual(strUserManualFileName1);2156 else if (QFile::exists(strUserManualFileName2))2157 sltShowUserManual(strUserManualFileName2);2158 # ifdef VBOX_GUI_WITH_NETWORK_MANAGER2159 /* If downloader is running already: */2160 else if (UINotificationDownloaderUserManual::exists())2161 gpNotificationCenter->invoke();2162 /* Else propose to download user manual: */2163 else if (confirmLookingForUserManual(strUserManualFileName1))2164 {2165 /* Download user manual: */2166 UINotificationDownloaderUserManual *pNotification = UINotificationDownloaderUserManual::instance(UICommon::helpFile());2167 /* After downloading finished => show User Manual: */2168 connect(pNotification, &UINotificationDownloaderUserManual::sigUserManualDownloaded,2169 this, &UIMessageCenter::sltShowUserManual);2170 /* Append and start notification: */2171 gpNotificationCenter->append(pNotification);2172 }2173 # endif /* VBOX_GUI_WITH_NETWORK_MANAGER */2174 #endif /* #ifdef VBOX_OSE */2175 }2176 2177 2105 void UIMessageCenter::sltShowMessageBox(QWidget *pParent, MessageType enmType, 2178 2106 const QString &strMessage, const QString &strDetails, … … 2190 2118 2191 2119 UIMessageCenter::UIMessageCenter() 2192 : m_pHelpBrowserDialog(0)2193 2120 { 2194 2121 /* Assign instance: */ -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.h
r99929 r99946 44 44 45 45 /* Forward declarations: */ 46 class UIHelpBrowserDialog;47 46 class UIMedium; 48 47 struct StorageSlot; … … 466 465 void sltShowHelpAboutDialog(); 467 466 void sltResetSuppressedMessages(); 468 void sltShowUserManual(const QString &strHelpFilePath);469 470 /// @todo move it away ..471 void sltHelpBrowserClosed();472 void sltHandleHelpRequest();473 void sltHandleHelpRequestWithKeyword(const QString &strHelpKeyword);474 467 475 468 private slots: … … 525 518 const QString &strAutoConfirmId, const QString &strHelpKeyword) const; 526 519 527 /// @todo move it away ..528 void checkManualFileAndShow();529 530 520 /** Holds the list of shown warnings. */ 531 521 mutable QStringList m_warnings; 532 533 /** Holds UIHelpBrowserDialog instance. */534 UIHelpBrowserDialog *m_pHelpBrowserDialog;535 522 536 523 /** Holds the singleton message-center instance. */ -
trunk/src/VBox/Frontends/VirtualBox/src/helpbrowser/UIHelpBrowserDialog.cpp
r99910 r99946 40 40 #include "UIHelpBrowserDialog.h" 41 41 #include "UIHelpBrowserWidget.h" 42 #include "UINotificationObjects.h" 42 43 #ifdef VBOX_WS_MAC 43 44 # include "VBoxUtils-darwin.h" … … 45 46 46 47 #include <iprt/assert.h> 48 49 QPointer<UIHelpBrowserDialog> UIHelpBrowserDialog::m_pInstance; 47 50 48 51 … … 168 171 m_pZoomLabel->setText(QString("%1%").arg(QString::number(iPercentage))); 169 172 } 173 174 /* static */ 175 void UIHelpBrowserDialog::findManualFileAndShow(const QString &strKeyword /*= QString() */) 176 { 177 #ifndef VBOX_OSE 178 /* For non-OSE version we just open it: */ 179 showUserManual(uiCommon().helpFile(), strKeyword); 180 #else /* #ifndef VBOX_OSE */ 181 /* For OSE version we have to check if it present first: */ 182 QString strUserManualFileName1 = uiCommon().helpFile(); 183 QString strShortFileName = QFileInfo(strUserManualFileName1).fileName(); 184 QString strUserManualFileName2 = QDir(uiCommon().homeFolder()).absoluteFilePath(strShortFileName); 185 /* Show if user manual already present: */ 186 if (QFile::exists(strUserManualFileName1)) 187 showUserManual(strUserManualFileName1, strKeyword); 188 else if (QFile::exists(strUserManualFileName2)) 189 showUserManual(strUserManualFileName2, strKeyword); 190 # ifdef VBOX_GUI_WITH_NETWORK_MANAGER 191 /* If downloader is running already: */ 192 if (UINotificationDownloaderUserManual::exists()) 193 gpNotificationCenter->invoke(); 194 /* Else propose to download user manual: */ 195 else if (confirmLookingForUserManual(strUserManualFileName1)) 196 { 197 /* Download user manual: */ 198 UINotificationDownloaderUserManual *pNotification = UINotificationDownloaderUserManual::instance(UICommon::helpFile()); 199 /* After downloading finished => show User Manual: */ 200 /// @todo 201 // connect(pNotification, &UINotificationDownloaderUserManual::sigUserManualDownloaded, 202 // this, &UIMessageCenter::showUserManual); 203 /* Append and start notification: */ 204 gpNotificationCenter->append(pNotification); 205 } 206 # endif /* VBOX_GUI_WITH_NETWORK_MANAGER */ 207 #endif /* #ifdef VBOX_OSE */ 208 } 209 210 /* static */ 211 void UIHelpBrowserDialog::showUserManual(const QString &strHelpFilePath, const QString &strKeyword) 212 { 213 if (!QFileInfo(strHelpFilePath).exists()) 214 { 215 UINotificationMessage::cannotFindHelpFile(strHelpFilePath); 216 return; 217 } 218 if (!m_pInstance) 219 { 220 m_pInstance = new UIHelpBrowserDialog(0 /* parent */, 0 /* Center Widget */, strHelpFilePath); 221 AssertReturnVoid(m_pInstance); 222 } 223 224 if (!strKeyword.isEmpty()) 225 m_pInstance->showHelpForKeyword(strKeyword); 226 m_pInstance->show(); 227 m_pInstance->setWindowState(m_pInstance->windowState() & ~Qt::WindowMinimized); 228 m_pInstance->activateWindow(); 229 } -
trunk/src/VBox/Frontends/VirtualBox/src/helpbrowser/UIHelpBrowserDialog.h
r98103 r99946 32 32 #endif 33 33 34 /* Qt includes: */ 35 #include <QPointer> 36 34 37 /* GUI includes: */ 35 38 #include "QIWithRestorableGeometry.h" 36 39 #include "QIWithRetranslateUI.h" 40 37 41 38 42 /* Forward declarations: */ … … 46 50 public: 47 51 48 UIHelpBrowserDialog(QWidget *pParent, QWidget *pCenterWidget, const QString &strHelpFilePath); 52 49 53 /** A passthru function for QHelpIndexWidget::showHelpForKeyword. */ 50 54 void showHelpForKeyword(const QString &strKeyword); 55 56 static void findManualFileAndShow(const QString &strKeyword = QString()); 57 58 /** @name Remove default ctor, and copying. 59 * @{ */ 60 UIHelpBrowserDialog() = delete; 61 UIHelpBrowserDialog(const UIHelpBrowserDialog &other) = delete; 62 void operator=(const UIHelpBrowserDialog &other) = delete; 63 /** @} */ 51 64 52 65 protected: … … 58 71 /** @name Prepare/cleanup cascade. 59 72 * @{ */ 60 virtual void prepareCentralWidget();61 virtual void loadSettings();62 virtual void saveDialogGeometry();73 virtual void prepareCentralWidget(); 74 virtual void loadSettings(); 75 virtual void saveDialogGeometry(); 63 76 /** @} */ 64 77 … … 74 87 private: 75 88 89 UIHelpBrowserDialog(QWidget *pParent, QWidget *pCenterWidget, const QString &strHelpFilePath); 90 static void showUserManual(const QString &strHelpFilePath, const QString &strKeyword); 91 76 92 QString m_strHelpFilePath; 77 93 UIHelpBrowserWidget *m_pWidget; … … 79 95 int m_iGeometrySaveTimerId; 80 96 QLabel *m_pZoomLabel; 97 static QPointer<UIHelpBrowserDialog> m_pInstance; 81 98 }; 82 99 -
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManager.cpp
r99438 r99946 58 58 #include "UIExtensionPackManager.h" 59 59 #include "UIExtraDataManager.h" 60 #include "UIHelpBrowserDialog.h" 60 61 #include "UIIconPool.h" 61 62 #include "UIMedium.h" … … 2140 2141 void UIVirtualBoxManager::sltPerformShowHelpBrowser() 2141 2142 { 2142 m_pWidget->showHelpBrowser(); 2143 QString strHelpKeyword; 2144 if (m_pWidget) 2145 strHelpKeyword = m_pWidget->currentHelpKeyword(); 2146 UIHelpBrowserDialog::findManualFileAndShow(strHelpKeyword); 2143 2147 } 2144 2148 … … 2306 2310 connect(m_pWidget, &UIVirtualBoxManagerWidget::sigCurrentSnapshotItemChange, 2307 2311 this, &UIVirtualBoxManager::sltCurrentSnapshotItemChange); 2312 2308 2313 connect(menuBar(), &QMenuBar::customContextMenuRequested, 2309 2314 m_pWidget, &UIVirtualBoxManagerWidget::sltHandleToolBarContextMenuRequest); -
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManagerWidget.cpp
r99628 r99946 288 288 } 289 289 290 void UIVirtualBoxManagerWidget::showHelpBrowser() 290 QString UIVirtualBoxManagerWidget::currentHelpKeyword() const 291 291 { 292 292 QString strHelpKeyword; … … 295 295 else if (isMachineItemSelected()) 296 296 strHelpKeyword = m_pPaneToolsMachine->currentHelpKeyword(); 297 298 msgCenter().sltHandleHelpRequestWithKeyword(strHelpKeyword); 297 return strHelpKeyword; 299 298 } 300 299 -
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManagerWidget.h
r99390 r99946 236 236 /** @name Help browser stuff. 237 237 * @{ */ 238 /** Shpws the help browser. */239 void showHelpBrowser();238 /** Returns the current help key word. */ 239 QString currentHelpKeyword() const; 240 240 /** @} */ 241 241 -
trunk/src/VBox/Frontends/VirtualBox/src/medium/UIFDCreationDialog.cpp
r98103 r99946 271 271 connect(m_pButtonBox, &QDialogButtonBox::rejected, this, &UIFDCreationDialog::reject); 272 272 connect(m_pButtonBox->button(QDialogButtonBox::Help), &QPushButton::pressed, 273 &(msgCenter()), &UIMessageCenter::sltHandleHelpRequest);273 m_pButtonBox, &QIDialogButtonBox::sltHandleHelpRequest); 274 274 pLayoutMain->addWidget(m_pButtonBox, 3, 0, 1, 3); 275 275 } -
trunk/src/VBox/Frontends/VirtualBox/src/medium/viso/UIVisoCreator.cpp
r98103 r99946 38 38 #include "UIExtraDataManager.h" 39 39 #include "UIIconPool.h" 40 #include "UIMessageCenter.h"41 40 #include "UIModalWindowManager.h" 42 41 #include "QIToolBar.h" … … 688 687 689 688 connect(m_pButtonBox->button(QIDialogButtonBox::Help), &QPushButton::pressed, 690 &(msgCenter()), &UIMessageCenter::sltHandleHelpRequest);689 m_pButtonBox, &QIDialogButtonBox::sltHandleHelpRequest); 691 690 m_pButtonBox->button(QDialogButtonBox::Help)->setShortcut(QKeySequence::HelpContents); 692 691 -
trunk/src/VBox/Frontends/VirtualBox/src/notificationcenter/UINotificationObjectItem.cpp
r98103 r99946 39 39 #include "QIRichTextLabel.h" 40 40 #include "QIToolButton.h" 41 #include "UIHelpBrowserDialog.h" 41 42 #include "UIIconPool.h" 42 43 #include "UIMessageCenter.h" … … 90 91 m_pButtonHelp->setProperty("helpkeyword", m_pObject->helpKeyword()); 91 92 connect(m_pButtonHelp, &QIToolButton::clicked, 92 &msgCenter(), &UIMessageCenter::sltHandleHelpRequest);93 this, &UINotificationObjectItem::sltHandleHelpRequest); 93 94 94 95 m_pLayoutUpper->addWidget(m_pButtonHelp); … … 443 444 return new UINotificationObjectItem(pParent, pObject); 444 445 } 446 447 void UINotificationObjectItem::sltHandleHelpRequest() 448 { 449 UIHelpBrowserDialog::findManualFileAndShow("helpkeyword"); 450 } -
trunk/src/VBox/Frontends/VirtualBox/src/notificationcenter/UINotificationObjectItem.h
r98103 r99946 92 92 /** Holds whether item is toggled. */ 93 93 bool m_fToggled; 94 95 private slots: 96 97 /** Handles help request. */ 98 void sltHandleHelpRequest(); 94 99 }; 95 100 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp
r99929 r99946 52 52 #include "UIFrameBuffer.h" 53 53 #include "UIGuestProcessControlDialog.h" 54 #include "UIHelpBrowserDialog.h" 54 55 #include "UIHostComboEditor.h" 55 56 #include "UIIconPool.h" … … 749 750 } 750 751 752 void UIMachineLogic::sltHandleHelpRequest() 753 { 754 UIHelpBrowserDialog::findManualFileAndShow(); 755 } 756 751 757 UIMachineLogic::UIMachineLogic(UIMachine *pMachine) 752 758 : QIWithRetranslateUI3<QObject>(pMachine) … … 1087 1093 * in manager and runtime UI: */ 1088 1094 connect(actionPool()->action(UIActionIndex_Simple_Contents), &UIAction::triggered, 1089 &msgCenter(), &UIMessageCenter::sltHandleHelpRequest);1095 this, &UIMachineLogic::sltHandleHelpRequest); 1090 1096 1091 1097 #ifdef VBOX_WITH_DEBUGGER_GUI -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.h
r99561 r99946 159 159 /** Handles host-screen available-area change. */ 160 160 virtual void sltHostScreenAvailableAreaChange(); 161 /* Handles Help Request. */ 162 virtual void sltHandleHelpRequest(); 161 163 162 164 protected: -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIVMCloseDialog.cpp
r98675 r99946 42 42 #include "UIConverter.h" 43 43 #include "UIExtraDataManager.h" 44 #include "UIHelpBrowserDialog.h" 44 45 #include "UIIconPool.h" 45 46 #include "UIMachine.h" … … 525 526 connect(pButtonBox, &QIDialogButtonBox::accepted, this, &UIVMCloseDialog::accept); 526 527 connect(pButtonBox, &QIDialogButtonBox::rejected, this, &UIVMCloseDialog::reject); 528 uiCommon().setHelpKeyword(pButtonBox->button(QIDialogButtonBox::Help), "intro-save-machine-state"); 527 529 connect(pButtonBox->button(QIDialogButtonBox::Help), &QPushButton::pressed, 528 &msgCenter(), &UIMessageCenter::sltHandleHelpRequest);530 pButtonBox, &QIDialogButtonBox::sltHandleHelpRequest); 529 531 pButtonBox->button(QIDialogButtonBox::Help)->setShortcut(QKeySequence::HelpContents); 530 uiCommon().setHelpKeyword(pButtonBox->button(QIDialogButtonBox::Help), "intro-save-machine-state");531 532 532 533 /* Add into layout: */ -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/information/UIVMInformationDialog.cpp
r98874 r99946 265 265 connect(m_pButtonBox, &QIDialogButtonBox::rejected, this, &UIVMInformationDialog::sigClose); 266 266 connect(m_pButtonBox->button(QDialogButtonBox::Help), &QPushButton::pressed, 267 &(msgCenter()), &UIMessageCenter::sltHandleHelpRequest);267 m_pButtonBox, &QIDialogButtonBox::sltHandleHelpRequest); 268 268 /* add button-box into main-layout: */ 269 269 centralWidget()->layout()->addWidget(m_pButtonBox); -
trunk/src/VBox/Frontends/VirtualBox/src/settings/UISettingsDialog.cpp
r98103 r99946 875 875 #ifndef VBOX_WS_MAC 876 876 connect(m_pButtonBox->button(QDialogButtonBox::Help), &QAbstractButton::pressed, 877 &msgCenter(), &UIMessageCenter::sltHandleHelpRequest);877 m_pButtonBox, &QIDialogButtonBox::sltHandleHelpRequest); 878 878 #endif 879 879 -
trunk/src/VBox/Frontends/VirtualBox/src/softkeyboard/UISoftKeyboard.cpp
r98996 r99946 53 53 #include "UIDesktopWidgetWatchdog.h" 54 54 #include "UIExtraDataManager.h" 55 #include "UIHelpBrowserDialog.h" 55 56 #include "UIIconPool.h" 56 57 #include "UIMachine.h" … … 4243 4244 void UISoftKeyboard::sltHandleHelpRequest() 4244 4245 { 4245 emit sigHelpRequested(uiCommon().helpKeyword(this));4246 UIHelpBrowserDialog::findManualFileAndShow(uiCommon().helpKeyword(this)); 4246 4247 } 4247 4248 … … 4327 4328 connect(m_pSettingsWidget, &UISoftKeyboardSettingsWidget::sigColorThemeSelectionChanged, this, &UISoftKeyboard::sltHandleColorThemeListSelection); 4328 4329 4329 connect(this, &UISoftKeyboard::sigHelpRequested, &msgCenter(), &UIMessageCenter::sltHandleHelpRequest);4330 4330 connect(&uiCommon(), &UICommon::sigAskToCommitData, this, &UISoftKeyboard::sltReleaseKeys); 4331 4331 } -
trunk/src/VBox/Frontends/VirtualBox/src/softkeyboard/UISoftKeyboard.h
r98500 r99946 65 65 signals: 66 66 67 void sigHelpRequested(const QString &strHelpKeyword);68 67 void sigClose(); 69 68 -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/UINativeWizard.cpp
r99265 r99946 41 41 #include "UIDesktopWidgetWatchdog.h" 42 42 #include "UIExtraDataManager.h" 43 #include "UIHelpBrowserDialog.h" 43 44 #include "UIIconPool.h" 44 #include "UIMessageCenter.h"45 45 #include "UINativeWizard.h" 46 46 #include "UINativeWizardPage.h" … … 92 92 WizardType enmType, 93 93 WizardMode enmMode /* = WizardMode_Auto */, 94 const QString &strHelp Tag/* = QString() */)94 const QString &strHelpKeyword /* = QString() */) 95 95 : QIWithRetranslateUI2<QDialog>(pParent, Qt::Window) 96 96 , m_enmType(enmType) 97 97 , m_enmMode(enmMode == WizardMode_Auto ? gEDataManager->modeForWizardType(m_enmType) : enmMode) 98 , m_strHelp Hashtag(strHelpTag)98 , m_strHelpKeyword(strHelpKeyword) 99 99 , m_iLastIndex(-1) 100 100 , m_fClosed(false) … … 425 425 accept(); 426 426 } 427 } 428 429 void UINativeWizard::sltHandleHelpRequest() 430 { 431 UIHelpBrowserDialog::findManualFileAndShow(uiCommon().helpKeyword(this)); 427 432 } 428 433 … … 555 560 { 556 561 const WizardButtonType enmType = (WizardButtonType)i; 557 /* Create Help button only if help hash tagis set.562 /* Create Help button only if help keyword is set. 558 563 * Create other buttons in any case: */ 559 if (enmType != WizardButtonType_Help || !m_strHelp Hashtag.isEmpty())564 if (enmType != WizardButtonType_Help || !m_strHelpKeyword.isEmpty()) 560 565 m_buttons[enmType] = new QPushButton(pWidgetBottom); 561 566 QPushButton *pButton = wizardButton(enmType); … … 572 577 { 573 578 connect(wizardButton(WizardButtonType_Help), &QPushButton::clicked, 574 &(msgCenter()), &UIMessageCenter::sltHandleHelpRequest);579 this, &UINativeWizard::sltHandleHelpRequest); 575 580 wizardButton(WizardButtonType_Help)->setShortcut(QKeySequence::HelpContents); 576 uiCommon().setHelpKeyword( wizardButton(WizardButtonType_Help), m_strHelpHashtag);581 uiCommon().setHelpKeyword(this, m_strHelpKeyword); 577 582 } 578 583 connect(wizardButton(WizardButtonType_Expert), &QPushButton::clicked, -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/UINativeWizard.h
r99194 r99946 97 97 * @param enmType Brings the wizard type. 98 98 * @param enmMode Brings the wizard mode. 99 * @param strHelp Hashtag Brings the wizard help hashtag. */99 * @param strHelpKeyword Brings the wizard help keyword. */ 100 100 UINativeWizard(QWidget *pParent, 101 101 WizardType enmType, 102 102 WizardMode enmMode = WizardMode_Auto, 103 const QString &strHelp Hashtag= QString());103 const QString &strHelpKeyword = QString()); 104 104 /** Destructs wizard. */ 105 105 virtual ~UINativeWizard() RT_OVERRIDE; … … 172 172 /** Switches to next page. */ 173 173 void sltNext(); 174 175 /** Handle help request*/ 176 void sltHandleHelpRequest(); 174 177 175 178 private: … … 204 207 /** Holds the wizard mode. */ 205 208 WizardMode m_enmMode; 206 /** Holds the wizard help hashtag. */207 QString m_strHelp Hashtag;209 /** Holds the wizard help keyword. */ 210 QString m_strHelpKeyword; 208 211 /** Holds the pixmap name. */ 209 212 QString m_strPixmapName;
Note:
See TracChangeset
for help on using the changeset viewer.