VirtualBox

Changeset 86986 in vbox


Ignore:
Timestamp:
Nov 26, 2020 2:22:34 PM (4 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:9831. Some fixes on setting and retrieving dialog help keywords

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  
    187187    /* Update button states finally: */
    188188    updateButtonStates();
     189    uiCommon().setHelpKeyword(this, "ovf-cloud-profile-manager");
    189190}
    190191
  • trunk/src/VBox/Frontends/VirtualBox/src/cloud/profilemanager/UICloudProfileManager.cpp

    r86928 r86986  
    568568    /* Load cloud stuff: */
    569569    loadCloudStuff();
     570
     571    /* Set help keyowrd for context sensitive help: */
     572    uiCommon().setHelpKeyword(this, "ovf-cloud-profile-manager");
     573
    570574}
    571575
     
    951955    button(ButtonType_Apply)->setText(tr("Apply"));
    952956    button(ButtonType_Close)->setText(tr("Close"));
     957    button(ButtonType_Help)->setText(tr("Help"));
    953958    button(ButtonType_Reset)->setStatusTip(tr("Reset changes in current cloud profile details"));
    954959    button(ButtonType_Apply)->setStatusTip(tr("Apply changes in current cloud profile details"));
    955960    button(ButtonType_Close)->setStatusTip(tr("Close dialog without saving"));
     961    button(ButtonType_Help)->setStatusTip(tr("Show dialog help"));
    956962    button(ButtonType_Reset)->setShortcut(QString("Ctrl+Backspace"));
    957963    button(ButtonType_Apply)->setShortcut(QString("Ctrl+Return"));
    958964    button(ButtonType_Close)->setShortcut(Qt::Key_Escape);
     965    button(ButtonType_Help)->setShortcut(Qt::Key_F1);
    959966    button(ButtonType_Reset)->setToolTip(tr("Reset Changes (%1)").arg(button(ButtonType_Reset)->shortcut().toString()));
    960967    button(ButtonType_Apply)->setToolTip(tr("Apply Changes (%1)").arg(button(ButtonType_Apply)->shortcut().toString()));
    961968    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()));
    962970}
    963971
     
    10081016    button(ButtonType_Apply)->setVisible(gEDataManager->cloudProfileManagerDetailsExpanded());
    10091017    button(ButtonType_Reset)->setVisible(gEDataManager->cloudProfileManagerDetailsExpanded());
    1010 
    1011     configureButtonBoxHelpButton("ovf-cloud-profile-manager");
    10121018}
    10131019
  • trunk/src/VBox/Frontends/VirtualBox/src/extensions/QIManagerDialog.cpp

    r86928 r86986  
    7979}
    8080
    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     }
     81void QIManagerDialog::sltHandleHelpRequested()
     82{
     83    emit sigHelpRequested(uiCommon().helpKeyword(m_pWidget));
    9084}
    9185
     
    178172#endif
    179173        m_buttons[ButtonType_Close] = m_pButtonBox->button(QDialogButtonBox::Close);
     174        m_buttons[ButtonType_Help] = m_pButtonBox->button(QDialogButtonBox::Help);
     175
    180176        /* Assign shortcuts: */
    181177        button(ButtonType_Close)->setShortcut(Qt::Key_Escape);
     178        button(ButtonType_Help)->setShortcut(Qt::Key_F1);
     179
    182180        /* Hide 'Reset' and 'Apply' initially: */
    183181        button(ButtonType_Reset)->hide();
     
    187185        button(ButtonType_Apply)->setEnabled(false);
    188186        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);
    189190
    190191        /* Configure button-box: */
  • trunk/src/VBox/Frontends/VirtualBox/src/extensions/QIManagerDialog.h

    r86928 r86986  
    5757    ButtonType_Apply   = RT_BIT(1),
    5858    ButtonType_Close   = RT_BIT(2),
     59    ButtonType_Help    = RT_BIT(3)
    5960};
    6061
     
    9495    /** Notifies listeners about dialog should be closed. */
    9596    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);
    96100
    97101protected:
     
    150154        virtual void closeEvent(QCloseEvent *pEvent) /* override */;
    151155    /** @} */
    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
     157private slots:
     158
     159    /** Possbily connected to QDialogBox::helpRequested signal and is used to emit sigHelpRequired
     160      * with a proper help tag. */
     161    void sltHandleHelpRequested();
    155162
    156163private:
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UICommon.cpp

    r86608 r86986  
    39053905}
    39063906
     3907/* static */
     3908void UICommon::setHelpKeyword(QObject *pObject, const QString &strHelpKeyword)
     3909{
     3910    if (pObject)
     3911        pObject->setProperty("helpkeyword", strHelpKeyword);
     3912}
     3913
     3914/* static */
     3915QString UICommon::helpKeyword(const QObject *pObject)
     3916{
     3917    if (!pObject)
     3918        return QString();
     3919    return pObject->property("helpkeyword").toString();
     3920}
     3921
    39073922bool UICommon::openURL(const QString &strUrl) const
    39083923{
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UICommon.h

    r86608 r86986  
    695695    /** @} */
    696696
     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
    697708public slots:
    698709
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.cpp

    r86979 r86986  
    620620}
    621621
    622 void UIMessageCenter::cannotFindHelpTag() const
     622void UIMessageCenter::cannotFindHelpKeyword() const
    623623{
    624624    alert(0, MessageType_Error, QString("<p>%1</p>").arg(tr("There is no help page for this dialog.")));
     
    34633463{
    34643464# 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
     3469void 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())
    34703473    {
    3471         cannotFindHelpTag();
     3474        cannotFindHelpKeyword();
    34723475        return;
    34733476    }
    3474     QString strKeyword = keyWordProp.toString();
    3475     if (strKeyword.isEmpty())
    3476     {
    3477         cannotFindHelpTag();
    3478         return;
    3479     }
    3480 
     3477    /* First open or show the help browser: */
    34813478    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);
    34863482# endif /* #if defined(VBOX_WITH_DOCS_QHELP) && (QT_VERSION >= QT_VERSION_CHECK(5, 9, 0))&& (QT_VERSION >= QT_VERSION_CHECK(5, 9, 0)) */
    34873483}
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.h

    r86963 r86986  
    267267    void cannotAcquireMachineParameter(const CMachine &comMachine, QWidget *pParent = 0) const;
    268268    void cannotFindHelpFile(const QString &strFileLocation) const;
    269     void cannotFindHelpTag() const;
     269    void cannotFindHelpKeyword() const;
    270270
    271271    /* API: Selector warnings: */
     
    555555    void sltHelpBrowserClosed();
    556556    void sltHandleDialogHelpButtonPress();
     557    void sltHandleHelpRequest(const QString &strHelpKeyword);
    557558
    558559private slots:
  • trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIFileManager.cpp

    r86541 r86986  
    135135    restorePanelVisibility();
    136136    UIFileManagerOptions::create();
     137    uiCommon().setHelpKeyword(this, "guestadd-gc-file-manager");
    137138}
    138139
  • trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIFileManagerDialog.cpp

    r86939 r86986  
    102102}
    103103
    104 void UIFileManagerDialog::configureButtonBox()
    105 {
    106     configureButtonBoxHelpButton("guestadd-gc-file-manager");
    107 }
    108 
    109104void UIFileManagerDialog::finalize()
    110105{
  • trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIFileManagerDialog.h

    r86939 r86986  
    8686        /** Configures central-widget. */
    8787        virtual void configureCentralWidget() /* override */;
    88         /** Configures button box. */
    89         virtual void configureButtonBox() /* override */;
    9088        /** Perform final preparations. */
    9189        virtual void finalize() /* override */;
  • trunk/src/VBox/Frontends/VirtualBox/src/hostnetwork/UIHostNetworkManager.cpp

    r86928 r86986  
    201201    /* Prepare: */
    202202    prepare();
     203    uiCommon().setHelpKeyword(this, "networkingdetails");
    203204}
    204205
     
    992993    button(ButtonType_Apply)->setText(tr("Apply"));
    993994    button(ButtonType_Close)->setText(tr("Close"));
     995    button(ButtonType_Help)->setText(tr("Help"));
    994996    button(ButtonType_Reset)->setStatusTip(tr("Reset changes in current host network details"));
    995997    button(ButtonType_Apply)->setStatusTip(tr("Apply changes in current host network details"));
    996998    button(ButtonType_Close)->setStatusTip(tr("Close dialog without saving"));
     999    button(ButtonType_Help)->setStatusTip(tr("Show dialog help"));
    9971000    button(ButtonType_Reset)->setShortcut(QString("Ctrl+Backspace"));
    9981001    button(ButtonType_Apply)->setShortcut(QString("Ctrl+Return"));
    9991002    button(ButtonType_Close)->setShortcut(Qt::Key_Escape);
     1003    button(ButtonType_Help)->setShortcut(Qt::Key_F1);
    10001004    button(ButtonType_Reset)->setToolTip(tr("Reset Changes (%1)").arg(button(ButtonType_Reset)->shortcut().toString()));
    10011005    button(ButtonType_Apply)->setToolTip(tr("Apply Changes (%1)").arg(button(ButtonType_Apply)->shortcut().toString()));
    10021006    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()));
    10031008}
    10041009
     
    10491054    button(ButtonType_Apply)->setVisible(gEDataManager->hostNetworkManagerDetailsExpanded());
    10501055    button(ButtonType_Reset)->setVisible(gEDataManager->hostNetworkManagerDetailsExpanded());
    1051 
    1052     configureButtonBoxHelpButton("networkingdetails");
    10531056}
    10541057
  • trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerDialog.cpp

    r86939 r86986  
    7878    /* Translate buttons: */
    7979    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()));
    8087}
    8188
     
    104111        centralWidget()->layout()->addWidget(pWidget);
    105112    }
    106 }
    107 
    108 void UIVMLogViewerDialog::configureButtonBox()
    109 {
    110     configureButtonBoxHelpButton("collect-debug-info");
    111113}
    112114
  • trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerDialog.h

    r86939 r86986  
    9393        /** Configures central-widget. */
    9494        virtual void configureCentralWidget() /* override */;
    95         virtual void configureButtonBox() /* override */;
    9695        /** Perform final preparations. */
    9796        virtual void finalize() /* override */;
  • trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerWidget.cpp

    r86233 r86986  
    435435    /* Setup escape shortcut: */
    436436    manageEscapeShortCut();
     437    uiCommon().setHelpKeyword(this, "collect-debug-info");
    437438}
    438439
  • trunk/src/VBox/Frontends/VirtualBox/src/medium/UIMediumManager.cpp

    r86928 r86986  
    707707            sltHandleMediumEnumerationFinish();
    708708    }
     709    uiCommon().setHelpKeyword(this,"vdis");
    709710}
    710711
     
    16531654    button(ButtonType_Apply)->setText(tr("Apply"));
    16541655    button(ButtonType_Close)->setText(tr("Close"));
     1656    button(ButtonType_Help)->setText(tr("Help"));
    16551657    button(ButtonType_Reset)->setStatusTip(tr("Reset changes in current medium details"));
    16561658    button(ButtonType_Apply)->setStatusTip(tr("Apply changes in current medium details"));
    16571659    button(ButtonType_Close)->setStatusTip(tr("Close dialog without saving"));
     1660    button(ButtonType_Help)->setStatusTip(tr("Show dialog help"));
    16581661    button(ButtonType_Reset)->setShortcut(QString("Ctrl+Backspace"));
    16591662    button(ButtonType_Apply)->setShortcut(QString("Ctrl+Return"));
    16601663    button(ButtonType_Close)->setShortcut(Qt::Key_Escape);
     1664    button(ButtonType_Help)->setShortcut(Qt::Key_F1);
    16611665    button(ButtonType_Reset)->setToolTip(tr("Reset Changes (%1)").arg(button(ButtonType_Reset)->shortcut().toString()));
    16621666    button(ButtonType_Apply)->setToolTip(tr("Apply Changes (%1)").arg(button(ButtonType_Apply)->shortcut().toString()));
    16631667    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()));
    16641669}
    16651670
     
    17221727        widget()->setProgressBar(m_pProgressBar);
    17231728    }
    1724     configureButtonBoxHelpButton("vdis");
    17251729}
    17261730
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/information/UIVMInformationDialog.cpp

    r86939 r86986  
    116116    m_pTabWidget->setTabText(2, tr("Performance &Monitor"));
    117117    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    }
    118131}
    119132
     
    249262        m_pButtonBox->setStandardButtons(QDialogButtonBox::Close | QDialogButtonBox::Help);
    250263        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");
    252265        connect(m_pButtonBox, &QIDialogButtonBox::rejected, this, &UIVMInformationDialog::close);
    253266        connect(m_pButtonBox->button(QDialogButtonBox::Help), &QPushButton::pressed,
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/UISettingsDialog.cpp

    r86980 r86986  
    117117void UISettingsDialog::sltCategoryChanged(int cId)
    118118{
     119    if (m_pButtonBox)
     120        uiCommon().setHelpKeyword(m_pButtonBox->button(QDialogButtonBox::Help), m_pageHelpKeywords[cId]);
    119121    const int iIndex = m_pages.value(cId);
    120     setHelpButtonHelpTag(cId);
     122
    121123#ifdef VBOX_WS_MAC
    122124    /* If index is within the stored size list bounds: */
     
    426428}
    427429
    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;
     430void UISettingsDialog::addPageHelpKeyword(int iPageType, const QString &strHelpKeyword)
     431{
     432    m_pageHelpKeywords[iPageType] = strHelpKeyword;
    437433}
    438434
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/UISettingsDialog.h

    r86913 r86986  
    136136    virtual void recorrelate(UISettingsPage *pSettingsPage) { Q_UNUSED(pSettingsPage); }
    137137
    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);
    143140
    144141    /** Validates data correctness using certain @a pValidator. */
     
    211208    /** Stores the help tag per page. Key is the page type (either GlobalSettingsPageType or MachineSettingsPageType)
    212209      * and value is the help tag. Used in context sensitive help: */
    213     QMap<int, QString> m_pageHelpTags;
     210    QMap<int, QString> m_pageHelpKeywords;
    214211
    215212#ifdef VBOX_WS_MAC
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/UISettingsDialogSpecific.cpp

    r86913 r86986  
    197197                    addItem(":/machine_32px.png", ":/machine_24px.png", ":/machine_16px.png",
    198198                            iPageIndex, "#general", pSettingsPage);
    199                     addPageHelpTag(iPageIndex, "globalsettings");
     199                    addPageHelpKeyword(iPageIndex, "globalsettings");
    200200                    break;
    201201                }
     
    206206                    addItem(":/keyboard_32px.png", ":/keyboard_24px.png", ":/keyboard_16px.png",
    207207                            iPageIndex, "#input", pSettingsPage);
    208                     addPageHelpTag(iPageIndex, "globalsettings");
     208                    addPageHelpKeyword(iPageIndex, "globalsettings");
    209209                    break;
    210210                }
     
    216216                    addItem(":/refresh_32px.png", ":/refresh_24px.png", ":/refresh_16px.png",
    217217                            iPageIndex, "#update", pSettingsPage);
    218                     addPageHelpTag(iPageIndex, "globalsettings");
     218                    addPageHelpKeyword(iPageIndex, "globalsettings");
    219219                    break;
    220220                }
     
    226226                    addItem(":/site_32px.png", ":/site_24px.png", ":/site_16px.png",
    227227                            iPageIndex, "#language", pSettingsPage);
    228                     addPageHelpTag(iPageIndex, "globalsettings");
     228                    addPageHelpKeyword(iPageIndex, "globalsettings");
    229229                    break;
    230230                }
     
    235235                    addItem(":/vrdp_32px.png", ":/vrdp_24px.png", ":/vrdp_16px.png",
    236236                            iPageIndex, "#display", pSettingsPage);
    237                     addPageHelpTag(iPageIndex, "globalsettings");
     237                    addPageHelpKeyword(iPageIndex, "globalsettings");
    238238                    break;
    239239                }
     
    244244                    addItem(":/nw_32px.png", ":/nw_24px.png", ":/nw_16px.png",
    245245                            iPageIndex, "#network", pSettingsPage);
    246                     addPageHelpTag(iPageIndex, "globalsettings");
     246                    addPageHelpKeyword(iPageIndex, "globalsettings");
    247247                    break;
    248248                }
     
    253253                    addItem(":/extension_pack_32px.png", ":/extension_pack_24px.png", ":/extension_pack_16px.png",
    254254                            iPageIndex, "#extensions", pSettingsPage);
    255                     addPageHelpTag(iPageIndex, "globalsettings");
     255                    addPageHelpKeyword(iPageIndex, "globalsettings");
    256256                    break;
    257257                }
     
    263263                    addItem(":/proxy_32px.png", ":/proxy_24px.png", ":/proxy_16px.png",
    264264                            iPageIndex, "#proxy", pSettingsPage);
    265                     addPageHelpTag(iPageIndex, "globalsettings");
     265                    addPageHelpKeyword(iPageIndex, "globalsettings");
    266266                    break;
    267267                }
     
    711711                    addItem(":/machine_32px.png", ":/machine_24px.png", ":/machine_16px.png",
    712712                            iPageIndex, "#general", pSettingsPage);
    713                     addPageHelpTag(iPageIndex, "generalsettings");
     713                    addPageHelpKeyword(iPageIndex, "generalsettings");
    714714                    break;
    715715                }
     
    720720                    addItem(":/chipset_32px.png", ":/chipset_24px.png", ":/chipset_16px.png",
    721721                            iPageIndex, "#system", pSettingsPage);
    722                     addPageHelpTag(iPageIndex, "settings-system");
     722                    addPageHelpKeyword(iPageIndex, "settings-system");
    723723                    break;
    724724                }
     
    729729                    addItem(":/vrdp_32px.png", ":/vrdp_24px.png", ":/vrdp_16px.png",
    730730                            iPageIndex, "#display", pSettingsPage);
    731                     addPageHelpTag(iPageIndex, "settings-display");
     731                    addPageHelpKeyword(iPageIndex, "settings-display");
    732732                    break;
    733733                }
     
    740740                    addItem(":/hd_32px.png", ":/hd_24px.png", ":/hd_16px.png",
    741741                            iPageIndex, "#storage", pSettingsPage);
    742                     addPageHelpTag(iPageIndex, "settings-storage");
     742                    addPageHelpKeyword(iPageIndex, "settings-storage");
    743743                    break;
    744744                }
     
    749749                    addItem(":/sound_32px.png", ":/sound_24px.png", ":/sound_16px.png",
    750750                            iPageIndex, "#audio", pSettingsPage);
    751                     addPageHelpTag(iPageIndex, "settings-audio");
     751                    addPageHelpKeyword(iPageIndex, "settings-audio");
    752752                    break;
    753753                }
     
    758758                    addItem(":/nw_32px.png", ":/nw_24px.png", ":/nw_16px.png",
    759759                            iPageIndex, "#network", pSettingsPage);
    760                     addPageHelpTag(iPageIndex, "settings-network");
     760                    addPageHelpKeyword(iPageIndex, "settings-network");
    761761                    break;
    762762                }
     
    774774                    addItem(":/serial_port_32px.png", ":/serial_port_24px.png", ":/serial_port_16px.png",
    775775                            iPageIndex, "#serialPorts", pSettingsPage, MachineSettingsPageType_Ports);
    776                     addPageHelpTag(iPageIndex, "serialports");
     776                    addPageHelpKeyword(iPageIndex, "serialports");
    777777                    break;
    778778                }
     
    783783                    addItem(":/usb_32px.png", ":/usb_24px.png", ":/usb_16px.png",
    784784                            iPageIndex, "#usb", pSettingsPage, MachineSettingsPageType_Ports);
    785                     addPageHelpTag(iPageIndex, "usb-support");
     785                    addPageHelpKeyword(iPageIndex, "usb-support");
    786786                    break;
    787787                }
     
    792792                    addItem(":/sf_32px.png", ":/sf_24px.png", ":/sf_16px.png",
    793793                            iPageIndex, "#sharedFolders", pSettingsPage);
    794                     addPageHelpTag(iPageIndex, "shared-folders");
     794                    addPageHelpKeyword(iPageIndex, "shared-folders");
    795795                    break;
    796796                }
     
    801801                    addItem(":/interface_32px.png", ":/interface_24px.png", ":/interface_16px.png",
    802802                            iPageIndex, "#userInterface", pSettingsPage);
    803                     addPageHelpTag(iPageIndex, "user-interface");
     803                    addPageHelpKeyword(iPageIndex, "user-interface");
    804804                    break;
    805805                }
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/UIWizard.cpp

    r86979 r86986  
    268268#endif
    269269
    270 void UIWizard::enableHelpButton(const QString &strHelpTag /* = QString() */)
     270void UIWizard::enableHelpButton(const QString &strHelpKeyword)
    271271{
    272272    setOptions(options() | QWizard::HaveHelpButton);
    273     setProperty("helptag", strHelpTag);
     273    uiCommon().setHelpKeyword(this, strHelpKeyword);
    274274    if (button(QWizard::HelpButton))
    275275        button(QWizard::HelpButton)->setShortcut(Qt::Key_F1);
    276276    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);
    283277}
    284278
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/UIWizard.h

    r86907 r86986  
    7878    void assignBackground(const QString &strBackground);
    7979#endif
    80     /** Inserts the standard help button to the button box of the wizard. Optional @param strHelpTag
     80    /** Inserts the standard help button to the button box of the wizard. @param strHelpKeyword
    8181      * 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);
    8483
    8584protected slots:
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIWizardImportApp.cpp

    r86924 r86986  
    162162void UIWizardImportApp::prepare()
    163163{
     164    enableHelpButton("ovf");
    164165    /* Create corresponding pages: */
    165166    switch (mode())
     
    183184        }
    184185    }
    185     enableHelpButton("ovf");
    186186    /* Call to base-class: */
    187187    UIWizard::prepare();
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette