Changeset 86986 in vbox
- Timestamp:
- Nov 26, 2020 2:22:34 PM (4 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 23 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/cloud/profilemanager/UICloudProfileDetailsWidget.cpp
r85387 r86986 187 187 /* Update button states finally: */ 188 188 updateButtonStates(); 189 uiCommon().setHelpKeyword(this, "ovf-cloud-profile-manager"); 189 190 } 190 191 -
trunk/src/VBox/Frontends/VirtualBox/src/cloud/profilemanager/UICloudProfileManager.cpp
r86928 r86986 568 568 /* Load cloud stuff: */ 569 569 loadCloudStuff(); 570 571 /* Set help keyowrd for context sensitive help: */ 572 uiCommon().setHelpKeyword(this, "ovf-cloud-profile-manager"); 573 570 574 } 571 575 … … 951 955 button(ButtonType_Apply)->setText(tr("Apply")); 952 956 button(ButtonType_Close)->setText(tr("Close")); 957 button(ButtonType_Help)->setText(tr("Help")); 953 958 button(ButtonType_Reset)->setStatusTip(tr("Reset changes in current cloud profile details")); 954 959 button(ButtonType_Apply)->setStatusTip(tr("Apply changes in current cloud profile details")); 955 960 button(ButtonType_Close)->setStatusTip(tr("Close dialog without saving")); 961 button(ButtonType_Help)->setStatusTip(tr("Show dialog help")); 956 962 button(ButtonType_Reset)->setShortcut(QString("Ctrl+Backspace")); 957 963 button(ButtonType_Apply)->setShortcut(QString("Ctrl+Return")); 958 964 button(ButtonType_Close)->setShortcut(Qt::Key_Escape); 965 button(ButtonType_Help)->setShortcut(Qt::Key_F1); 959 966 button(ButtonType_Reset)->setToolTip(tr("Reset Changes (%1)").arg(button(ButtonType_Reset)->shortcut().toString())); 960 967 button(ButtonType_Apply)->setToolTip(tr("Apply Changes (%1)").arg(button(ButtonType_Apply)->shortcut().toString())); 961 968 button(ButtonType_Close)->setToolTip(tr("Close Window (%1)").arg(button(ButtonType_Close)->shortcut().toString())); 969 button(ButtonType_Help)->setToolTip(tr("Close Window (%1)").arg(button(ButtonType_Help)->shortcut().toString())); 962 970 } 963 971 … … 1008 1016 button(ButtonType_Apply)->setVisible(gEDataManager->cloudProfileManagerDetailsExpanded()); 1009 1017 button(ButtonType_Reset)->setVisible(gEDataManager->cloudProfileManagerDetailsExpanded()); 1010 1011 configureButtonBoxHelpButton("ovf-cloud-profile-manager");1012 1018 } 1013 1019 -
trunk/src/VBox/Frontends/VirtualBox/src/extensions/QIManagerDialog.cpp
r86928 r86986 79 79 } 80 80 81 void QIManagerDialog::configureButtonBoxHelpButton(const QString &strHelpTag) 82 { 83 QPushButton *pHelpButton = m_pButtonBox->button(QDialogButtonBox::Help); 84 if (pHelpButton) 85 { 86 pHelpButton->setProperty("helptag", strHelpTag); 87 connect(pHelpButton, &QPushButton::pressed, 88 &(msgCenter()), &UIMessageCenter::sltHandleDialogHelpButtonPress); 89 } 81 void QIManagerDialog::sltHandleHelpRequested() 82 { 83 emit sigHelpRequested(uiCommon().helpKeyword(m_pWidget)); 90 84 } 91 85 … … 178 172 #endif 179 173 m_buttons[ButtonType_Close] = m_pButtonBox->button(QDialogButtonBox::Close); 174 m_buttons[ButtonType_Help] = m_pButtonBox->button(QDialogButtonBox::Help); 175 180 176 /* Assign shortcuts: */ 181 177 button(ButtonType_Close)->setShortcut(Qt::Key_Escape); 178 button(ButtonType_Help)->setShortcut(Qt::Key_F1); 179 182 180 /* Hide 'Reset' and 'Apply' initially: */ 183 181 button(ButtonType_Reset)->hide(); … … 187 185 button(ButtonType_Apply)->setEnabled(false); 188 186 connect(m_pButtonBox, &QIDialogButtonBox::rejected, this, &QIManagerDialog::close); 187 /* Connections to enable the context sensitive help: */ 188 connect(m_pButtonBox, &QDialogButtonBox::helpRequested, this, &QIManagerDialog::sltHandleHelpRequested); 189 connect(this, &QIManagerDialog::sigHelpRequested, &msgCenter(), &UIMessageCenter::sltHandleHelpRequest); 189 190 190 191 /* Configure button-box: */ -
trunk/src/VBox/Frontends/VirtualBox/src/extensions/QIManagerDialog.h
r86928 r86986 57 57 ButtonType_Apply = RT_BIT(1), 58 58 ButtonType_Close = RT_BIT(2), 59 ButtonType_Help = RT_BIT(3) 59 60 }; 60 61 … … 94 95 /** Notifies listeners about dialog should be closed. */ 95 96 void sigClose(); 97 /** Emitted when help botton is pressed. Listerners use @param strHelpKeyword to find related 98 * section in the manual and show it. */ 99 void sigHelpRequested(const QString &strHelpKeyword); 96 100 97 101 protected: … … 150 154 virtual void closeEvent(QCloseEvent *pEvent) /* override */; 151 155 /** @} */ 152 /** Sets the property 'helptag' of the button box's help button to @param strHelpTag and 153 * sets up the appropirate connection. */ 154 void configureButtonBoxHelpButton(const QString &strHelpTag); 156 157 private slots: 158 159 /** Possbily connected to QDialogBox::helpRequested signal and is used to emit sigHelpRequired 160 * with a proper help tag. */ 161 void sltHandleHelpRequested(); 155 162 156 163 private: -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UICommon.cpp
r86608 r86986 3905 3905 } 3906 3906 3907 /* static */ 3908 void UICommon::setHelpKeyword(QObject *pObject, const QString &strHelpKeyword) 3909 { 3910 if (pObject) 3911 pObject->setProperty("helpkeyword", strHelpKeyword); 3912 } 3913 3914 /* static */ 3915 QString UICommon::helpKeyword(const QObject *pObject) 3916 { 3917 if (!pObject) 3918 return QString(); 3919 return pObject->property("helpkeyword").toString(); 3920 } 3921 3907 3922 bool UICommon::openURL(const QString &strUrl) const 3908 3923 { -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UICommon.h
r86608 r86986 695 695 /** @} */ 696 696 697 /** @name Context sensitive help related functionality 698 * @{ */ 699 /** Sets the property for help keyword on a QObject 700 * @param pObject The object to set the help keyword property on 701 * @param strKeyword The values of the key word property. */ 702 static void setHelpKeyword(QObject *pObject, const QString &strHelpKeyword); 703 /** Returns the property for help keyword of a QObject. If no such property exists returns an empty QString. 704 * @param pWidget The object to get the help keyword property from. */ 705 static QString helpKeyword(const QObject *pWidget); 706 /** @} */ 707 697 708 public slots: 698 709 -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.cpp
r86979 r86986 620 620 } 621 621 622 void UIMessageCenter::cannotFindHelp Tag() const622 void UIMessageCenter::cannotFindHelpKeyword() const 623 623 { 624 624 alert(0, MessageType_Error, QString("<p>%1</p>").arg(tr("There is no help page for this dialog."))); … … 3463 3463 { 3464 3464 # if defined(VBOX_WITH_DOCS_QHELP) && (QT_VERSION >= QT_VERSION_CHECK(5, 9, 0)) 3465 QWidget *pSender = qobject_cast<QWidget*>(sender()); 3466 if (!pSender) 3467 return; 3468 QVariant keyWordProp = pSender->property("helptag"); 3469 if (!keyWordProp.isValid() || !keyWordProp.canConvert(QMetaType::QString)) 3465 sltHandleHelpRequest(uiCommon().helpKeyword(sender())); 3466 #endif /* #if defined(VBOX_WITH_DOCS_QHELP) && (QT_VERSION >= QT_VERSION_CHECK(5, 9, 0))&& (QT_VERSION >= QT_VERSION_CHECK(5, 9, 0)) */ 3467 } 3468 3469 void UIMessageCenter::sltHandleHelpRequest(const QString &strHelpKeyword) 3470 { 3471 # if defined(VBOX_WITH_DOCS_QHELP) && (QT_VERSION >= QT_VERSION_CHECK(5, 9, 0)) 3472 if (strHelpKeyword.isEmpty()) 3470 3473 { 3471 cannotFindHelp Tag();3474 cannotFindHelpKeyword(); 3472 3475 return; 3473 3476 } 3474 QString strKeyword = keyWordProp.toString(); 3475 if (strKeyword.isEmpty()) 3476 { 3477 cannotFindHelpTag(); 3478 return; 3479 } 3480 3477 /* First open or show the help browser: */ 3481 3478 showHelpBrowser(uiCommon().helpFile()); 3482 3483 UIHelpBrowserDialog *pWidget = qobject_cast<UIHelpBrowserDialog*>(m_pHelpBrowserDialog); 3484 if (pWidget) 3485 pWidget->showHelpForKeyword(strKeyword); 3479 /* Show the help page for the @p strHelpKeyword: */ 3480 if (m_pHelpBrowserDialog) 3481 m_pHelpBrowserDialog->showHelpForKeyword(strHelpKeyword); 3486 3482 # endif /* #if defined(VBOX_WITH_DOCS_QHELP) && (QT_VERSION >= QT_VERSION_CHECK(5, 9, 0))&& (QT_VERSION >= QT_VERSION_CHECK(5, 9, 0)) */ 3487 3483 } -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.h
r86963 r86986 267 267 void cannotAcquireMachineParameter(const CMachine &comMachine, QWidget *pParent = 0) const; 268 268 void cannotFindHelpFile(const QString &strFileLocation) const; 269 void cannotFindHelp Tag() const;269 void cannotFindHelpKeyword() const; 270 270 271 271 /* API: Selector warnings: */ … … 555 555 void sltHelpBrowserClosed(); 556 556 void sltHandleDialogHelpButtonPress(); 557 void sltHandleHelpRequest(const QString &strHelpKeyword); 557 558 558 559 private slots: -
trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIFileManager.cpp
r86541 r86986 135 135 restorePanelVisibility(); 136 136 UIFileManagerOptions::create(); 137 uiCommon().setHelpKeyword(this, "guestadd-gc-file-manager"); 137 138 } 138 139 -
trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIFileManagerDialog.cpp
r86939 r86986 102 102 } 103 103 104 void UIFileManagerDialog::configureButtonBox()105 {106 configureButtonBoxHelpButton("guestadd-gc-file-manager");107 }108 109 104 void UIFileManagerDialog::finalize() 110 105 { -
trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIFileManagerDialog.h
r86939 r86986 86 86 /** Configures central-widget. */ 87 87 virtual void configureCentralWidget() /* override */; 88 /** Configures button box. */89 virtual void configureButtonBox() /* override */;90 88 /** Perform final preparations. */ 91 89 virtual void finalize() /* override */; -
trunk/src/VBox/Frontends/VirtualBox/src/hostnetwork/UIHostNetworkManager.cpp
r86928 r86986 201 201 /* Prepare: */ 202 202 prepare(); 203 uiCommon().setHelpKeyword(this, "networkingdetails"); 203 204 } 204 205 … … 992 993 button(ButtonType_Apply)->setText(tr("Apply")); 993 994 button(ButtonType_Close)->setText(tr("Close")); 995 button(ButtonType_Help)->setText(tr("Help")); 994 996 button(ButtonType_Reset)->setStatusTip(tr("Reset changes in current host network details")); 995 997 button(ButtonType_Apply)->setStatusTip(tr("Apply changes in current host network details")); 996 998 button(ButtonType_Close)->setStatusTip(tr("Close dialog without saving")); 999 button(ButtonType_Help)->setStatusTip(tr("Show dialog help")); 997 1000 button(ButtonType_Reset)->setShortcut(QString("Ctrl+Backspace")); 998 1001 button(ButtonType_Apply)->setShortcut(QString("Ctrl+Return")); 999 1002 button(ButtonType_Close)->setShortcut(Qt::Key_Escape); 1003 button(ButtonType_Help)->setShortcut(Qt::Key_F1); 1000 1004 button(ButtonType_Reset)->setToolTip(tr("Reset Changes (%1)").arg(button(ButtonType_Reset)->shortcut().toString())); 1001 1005 button(ButtonType_Apply)->setToolTip(tr("Apply Changes (%1)").arg(button(ButtonType_Apply)->shortcut().toString())); 1002 1006 button(ButtonType_Close)->setToolTip(tr("Close Window (%1)").arg(button(ButtonType_Close)->shortcut().toString())); 1007 button(ButtonType_Help)->setToolTip(tr("Show Help (%1)").arg(button(ButtonType_Help)->shortcut().toString())); 1003 1008 } 1004 1009 … … 1049 1054 button(ButtonType_Apply)->setVisible(gEDataManager->hostNetworkManagerDetailsExpanded()); 1050 1055 button(ButtonType_Reset)->setVisible(gEDataManager->hostNetworkManagerDetailsExpanded()); 1051 1052 configureButtonBoxHelpButton("networkingdetails");1053 1056 } 1054 1057 -
trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerDialog.cpp
r86939 r86986 78 78 /* Translate buttons: */ 79 79 button(ButtonType_Close)->setText(UIVMLogViewerWidget::tr("Close")); 80 button(ButtonType_Help)->setText(UIVMLogViewerWidget::tr("Help")); 81 button(ButtonType_Close)->setStatusTip(UIVMLogViewerWidget::tr("Close dialog")); 82 button(ButtonType_Help)->setStatusTip(UIVMLogViewerWidget::tr("Show dialog help")); 83 button(ButtonType_Close)->setShortcut(Qt::Key_Escape); 84 button(ButtonType_Help)->setShortcut(Qt::Key_F1); 85 button(ButtonType_Close)->setToolTip(UIVMLogViewerWidget::tr("Close Window (%1)").arg(button(ButtonType_Close)->shortcut().toString())); 86 button(ButtonType_Help)->setToolTip(UIVMLogViewerWidget::tr("Show Help (%1)").arg(button(ButtonType_Help)->shortcut().toString())); 80 87 } 81 88 … … 104 111 centralWidget()->layout()->addWidget(pWidget); 105 112 } 106 }107 108 void UIVMLogViewerDialog::configureButtonBox()109 {110 configureButtonBoxHelpButton("collect-debug-info");111 113 } 112 114 -
trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerDialog.h
r86939 r86986 93 93 /** Configures central-widget. */ 94 94 virtual void configureCentralWidget() /* override */; 95 virtual void configureButtonBox() /* override */;96 95 /** Perform final preparations. */ 97 96 virtual void finalize() /* override */; -
trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerWidget.cpp
r86233 r86986 435 435 /* Setup escape shortcut: */ 436 436 manageEscapeShortCut(); 437 uiCommon().setHelpKeyword(this, "collect-debug-info"); 437 438 } 438 439 -
trunk/src/VBox/Frontends/VirtualBox/src/medium/UIMediumManager.cpp
r86928 r86986 707 707 sltHandleMediumEnumerationFinish(); 708 708 } 709 uiCommon().setHelpKeyword(this,"vdis"); 709 710 } 710 711 … … 1653 1654 button(ButtonType_Apply)->setText(tr("Apply")); 1654 1655 button(ButtonType_Close)->setText(tr("Close")); 1656 button(ButtonType_Help)->setText(tr("Help")); 1655 1657 button(ButtonType_Reset)->setStatusTip(tr("Reset changes in current medium details")); 1656 1658 button(ButtonType_Apply)->setStatusTip(tr("Apply changes in current medium details")); 1657 1659 button(ButtonType_Close)->setStatusTip(tr("Close dialog without saving")); 1660 button(ButtonType_Help)->setStatusTip(tr("Show dialog help")); 1658 1661 button(ButtonType_Reset)->setShortcut(QString("Ctrl+Backspace")); 1659 1662 button(ButtonType_Apply)->setShortcut(QString("Ctrl+Return")); 1660 1663 button(ButtonType_Close)->setShortcut(Qt::Key_Escape); 1664 button(ButtonType_Help)->setShortcut(Qt::Key_F1); 1661 1665 button(ButtonType_Reset)->setToolTip(tr("Reset Changes (%1)").arg(button(ButtonType_Reset)->shortcut().toString())); 1662 1666 button(ButtonType_Apply)->setToolTip(tr("Apply Changes (%1)").arg(button(ButtonType_Apply)->shortcut().toString())); 1663 1667 button(ButtonType_Close)->setToolTip(tr("Close Window (%1)").arg(button(ButtonType_Close)->shortcut().toString())); 1668 button(ButtonType_Help)->setToolTip(tr("Show Help (%1)").arg(button(ButtonType_Help)->shortcut().toString())); 1664 1669 } 1665 1670 … … 1722 1727 widget()->setProgressBar(m_pProgressBar); 1723 1728 } 1724 configureButtonBoxHelpButton("vdis");1725 1729 } 1726 1730 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/information/UIVMInformationDialog.cpp
r86939 r86986 116 116 m_pTabWidget->setTabText(2, tr("Performance &Monitor")); 117 117 m_pTabWidget->setTabText(3, tr("&Guest Control")); 118 119 /* Retranslate button box buttons: */ 120 if (m_pButtonBox) 121 { 122 m_pButtonBox->button(QDialogButtonBox::Close)->setText(tr("Close")); 123 m_pButtonBox->button(QDialogButtonBox::Help)->setText(tr("Help")); 124 m_pButtonBox->button(QDialogButtonBox::Close)->setStatusTip(tr("Close dialog without saving")); 125 m_pButtonBox->button(QDialogButtonBox::Help)->setStatusTip(tr("Show dialog help")); 126 m_pButtonBox->button(QDialogButtonBox::Close)->setShortcut(Qt::Key_Escape); 127 m_pButtonBox->button(QDialogButtonBox::Help)->setShortcut(Qt::Key_F1); 128 m_pButtonBox->button(QDialogButtonBox::Close)->setToolTip(tr("Reset Changes (%1)").arg(m_pButtonBox->button(QDialogButtonBox::Close)->shortcut().toString())); 129 m_pButtonBox->button(QDialogButtonBox::Help)->setToolTip(tr("Reset Changes (%1)").arg(m_pButtonBox->button(QDialogButtonBox::Help)->shortcut().toString())); 130 } 118 131 } 119 132 … … 249 262 m_pButtonBox->setStandardButtons(QDialogButtonBox::Close | QDialogButtonBox::Help); 250 263 m_pButtonBox->button(QDialogButtonBox::Close)->setShortcut(Qt::Key_Escape); 251 m_pButtonBox->button(QDialogButtonBox::Help)->setProperty("helptag", "guestadd-guestprops");264 uiCommon().setHelpKeyword(m_pButtonBox->button(QDialogButtonBox::Help), "guestadd-guestprops"); 252 265 connect(m_pButtonBox, &QIDialogButtonBox::rejected, this, &UIVMInformationDialog::close); 253 266 connect(m_pButtonBox->button(QDialogButtonBox::Help), &QPushButton::pressed, -
trunk/src/VBox/Frontends/VirtualBox/src/settings/UISettingsDialog.cpp
r86980 r86986 117 117 void UISettingsDialog::sltCategoryChanged(int cId) 118 118 { 119 if (m_pButtonBox) 120 uiCommon().setHelpKeyword(m_pButtonBox->button(QDialogButtonBox::Help), m_pageHelpKeywords[cId]); 119 121 const int iIndex = m_pages.value(cId); 120 setHelpButtonHelpTag(cId); 122 121 123 #ifdef VBOX_WS_MAC 122 124 /* If index is within the stored size list bounds: */ … … 426 428 } 427 429 428 void UISettingsDialog::setHelpButtonHelpTag(int iPageType) 429 { 430 if (m_pButtonBox && m_pButtonBox->button(QDialogButtonBox::Help)) 431 m_pButtonBox->button(QDialogButtonBox::Help)->setProperty("helptag", m_pageHelpTags[iPageType]); 432 } 433 434 void UISettingsDialog::addPageHelpTag(int iPageType, const QString &strHelpTag) 435 { 436 m_pageHelpTags[iPageType] = strHelpTag; 430 void UISettingsDialog::addPageHelpKeyword(int iPageType, const QString &strHelpKeyword) 431 { 432 m_pageHelpKeywords[iPageType] = strHelpKeyword; 437 433 } 438 434 -
trunk/src/VBox/Frontends/VirtualBox/src/settings/UISettingsDialog.h
r86913 r86986 136 136 virtual void recorrelate(UISettingsPage *pSettingsPage) { Q_UNUSED(pSettingsPage); } 137 137 138 /** Set/change/reset the help tag of the help buttons help tag. Possibly used as tabs are changed. Searches the map 139 * m_pageHelpTags for the help tag for the page with @iPageType (GlobalSettingsPageType or MachineSettingsPageType) */ 140 void setHelpButtonHelpTag(int iPageType); 141 /** Inserts an item to the map m_pageHelpTags. */ 142 void addPageHelpTag(int iPageType, const QString &strHelpTag); 138 /** Inserts an item to the map m_pageHelpKeywords. */ 139 void addPageHelpKeyword(int iPageType, const QString &strHelpKeyword); 143 140 144 141 /** Validates data correctness using certain @a pValidator. */ … … 211 208 /** Stores the help tag per page. Key is the page type (either GlobalSettingsPageType or MachineSettingsPageType) 212 209 * and value is the help tag. Used in context sensitive help: */ 213 QMap<int, QString> m_pageHelp Tags;210 QMap<int, QString> m_pageHelpKeywords; 214 211 215 212 #ifdef VBOX_WS_MAC -
trunk/src/VBox/Frontends/VirtualBox/src/settings/UISettingsDialogSpecific.cpp
r86913 r86986 197 197 addItem(":/machine_32px.png", ":/machine_24px.png", ":/machine_16px.png", 198 198 iPageIndex, "#general", pSettingsPage); 199 addPageHelp Tag(iPageIndex, "globalsettings");199 addPageHelpKeyword(iPageIndex, "globalsettings"); 200 200 break; 201 201 } … … 206 206 addItem(":/keyboard_32px.png", ":/keyboard_24px.png", ":/keyboard_16px.png", 207 207 iPageIndex, "#input", pSettingsPage); 208 addPageHelp Tag(iPageIndex, "globalsettings");208 addPageHelpKeyword(iPageIndex, "globalsettings"); 209 209 break; 210 210 } … … 216 216 addItem(":/refresh_32px.png", ":/refresh_24px.png", ":/refresh_16px.png", 217 217 iPageIndex, "#update", pSettingsPage); 218 addPageHelp Tag(iPageIndex, "globalsettings");218 addPageHelpKeyword(iPageIndex, "globalsettings"); 219 219 break; 220 220 } … … 226 226 addItem(":/site_32px.png", ":/site_24px.png", ":/site_16px.png", 227 227 iPageIndex, "#language", pSettingsPage); 228 addPageHelp Tag(iPageIndex, "globalsettings");228 addPageHelpKeyword(iPageIndex, "globalsettings"); 229 229 break; 230 230 } … … 235 235 addItem(":/vrdp_32px.png", ":/vrdp_24px.png", ":/vrdp_16px.png", 236 236 iPageIndex, "#display", pSettingsPage); 237 addPageHelp Tag(iPageIndex, "globalsettings");237 addPageHelpKeyword(iPageIndex, "globalsettings"); 238 238 break; 239 239 } … … 244 244 addItem(":/nw_32px.png", ":/nw_24px.png", ":/nw_16px.png", 245 245 iPageIndex, "#network", pSettingsPage); 246 addPageHelp Tag(iPageIndex, "globalsettings");246 addPageHelpKeyword(iPageIndex, "globalsettings"); 247 247 break; 248 248 } … … 253 253 addItem(":/extension_pack_32px.png", ":/extension_pack_24px.png", ":/extension_pack_16px.png", 254 254 iPageIndex, "#extensions", pSettingsPage); 255 addPageHelp Tag(iPageIndex, "globalsettings");255 addPageHelpKeyword(iPageIndex, "globalsettings"); 256 256 break; 257 257 } … … 263 263 addItem(":/proxy_32px.png", ":/proxy_24px.png", ":/proxy_16px.png", 264 264 iPageIndex, "#proxy", pSettingsPage); 265 addPageHelp Tag(iPageIndex, "globalsettings");265 addPageHelpKeyword(iPageIndex, "globalsettings"); 266 266 break; 267 267 } … … 711 711 addItem(":/machine_32px.png", ":/machine_24px.png", ":/machine_16px.png", 712 712 iPageIndex, "#general", pSettingsPage); 713 addPageHelp Tag(iPageIndex, "generalsettings");713 addPageHelpKeyword(iPageIndex, "generalsettings"); 714 714 break; 715 715 } … … 720 720 addItem(":/chipset_32px.png", ":/chipset_24px.png", ":/chipset_16px.png", 721 721 iPageIndex, "#system", pSettingsPage); 722 addPageHelp Tag(iPageIndex, "settings-system");722 addPageHelpKeyword(iPageIndex, "settings-system"); 723 723 break; 724 724 } … … 729 729 addItem(":/vrdp_32px.png", ":/vrdp_24px.png", ":/vrdp_16px.png", 730 730 iPageIndex, "#display", pSettingsPage); 731 addPageHelp Tag(iPageIndex, "settings-display");731 addPageHelpKeyword(iPageIndex, "settings-display"); 732 732 break; 733 733 } … … 740 740 addItem(":/hd_32px.png", ":/hd_24px.png", ":/hd_16px.png", 741 741 iPageIndex, "#storage", pSettingsPage); 742 addPageHelp Tag(iPageIndex, "settings-storage");742 addPageHelpKeyword(iPageIndex, "settings-storage"); 743 743 break; 744 744 } … … 749 749 addItem(":/sound_32px.png", ":/sound_24px.png", ":/sound_16px.png", 750 750 iPageIndex, "#audio", pSettingsPage); 751 addPageHelp Tag(iPageIndex, "settings-audio");751 addPageHelpKeyword(iPageIndex, "settings-audio"); 752 752 break; 753 753 } … … 758 758 addItem(":/nw_32px.png", ":/nw_24px.png", ":/nw_16px.png", 759 759 iPageIndex, "#network", pSettingsPage); 760 addPageHelp Tag(iPageIndex, "settings-network");760 addPageHelpKeyword(iPageIndex, "settings-network"); 761 761 break; 762 762 } … … 774 774 addItem(":/serial_port_32px.png", ":/serial_port_24px.png", ":/serial_port_16px.png", 775 775 iPageIndex, "#serialPorts", pSettingsPage, MachineSettingsPageType_Ports); 776 addPageHelp Tag(iPageIndex, "serialports");776 addPageHelpKeyword(iPageIndex, "serialports"); 777 777 break; 778 778 } … … 783 783 addItem(":/usb_32px.png", ":/usb_24px.png", ":/usb_16px.png", 784 784 iPageIndex, "#usb", pSettingsPage, MachineSettingsPageType_Ports); 785 addPageHelp Tag(iPageIndex, "usb-support");785 addPageHelpKeyword(iPageIndex, "usb-support"); 786 786 break; 787 787 } … … 792 792 addItem(":/sf_32px.png", ":/sf_24px.png", ":/sf_16px.png", 793 793 iPageIndex, "#sharedFolders", pSettingsPage); 794 addPageHelp Tag(iPageIndex, "shared-folders");794 addPageHelpKeyword(iPageIndex, "shared-folders"); 795 795 break; 796 796 } … … 801 801 addItem(":/interface_32px.png", ":/interface_24px.png", ":/interface_16px.png", 802 802 iPageIndex, "#userInterface", pSettingsPage); 803 addPageHelp Tag(iPageIndex, "user-interface");803 addPageHelpKeyword(iPageIndex, "user-interface"); 804 804 break; 805 805 } -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/UIWizard.cpp
r86979 r86986 268 268 #endif 269 269 270 void UIWizard::enableHelpButton(const QString &strHelp Tag /* = QString() */)270 void UIWizard::enableHelpButton(const QString &strHelpKeyword) 271 271 { 272 272 setOptions(options() | QWizard::HaveHelpButton); 273 setProperty("helptag", strHelpTag);273 uiCommon().setHelpKeyword(this, strHelpKeyword); 274 274 if (button(QWizard::HelpButton)) 275 275 button(QWizard::HelpButton)->setShortcut(Qt::Key_F1); 276 276 connect(this, &UIWizard::helpRequested, &msgCenter(), &UIMessageCenter::sltHandleDialogHelpButtonPress); 277 }278 279 void UIWizard::setHelpButtonHelpTag(const QString &strHelpTag /* = QString() */)280 {281 if (button(QWizard::HelpButton))282 button(QWizard::HelpButton)->setProperty("helptag", strHelpTag);283 277 } 284 278 -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/UIWizard.h
r86907 r86986 78 78 void assignBackground(const QString &strBackground); 79 79 #endif 80 /** Inserts the standard help button to the button box of the wizard. Optional @param strHelpTag80 /** Inserts the standard help button to the button box of the wizard. @param strHelpKeyword 81 81 * is set as property. This is used for context sensitive help. */ 82 void enableHelpButton(const QString &strHelpTag = QString()); 83 void setHelpButtonHelpTag(const QString &strHelpTag = QString()); 82 void enableHelpButton(const QString &strHelpKeyword); 84 83 85 84 protected slots: -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIWizardImportApp.cpp
r86924 r86986 162 162 void UIWizardImportApp::prepare() 163 163 { 164 enableHelpButton("ovf"); 164 165 /* Create corresponding pages: */ 165 166 switch (mode()) … … 183 184 } 184 185 } 185 enableHelpButton("ovf");186 186 /* Call to base-class: */ 187 187 UIWizard::prepare();
Note:
See TracChangeset
for help on using the changeset viewer.