VirtualBox

Changeset 61210 in vbox for trunk


Ignore:
Timestamp:
May 26, 2016 1:22:02 PM (9 years ago)
Author:
vboxsync
Message:

FE/Qt: ​​​​​​​​​​bugref:7674: Help menu: VirtualBox Forums and Oracle Website actions.

Location:
trunk/src/VBox/Frontends/VirtualBox/src
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/converter/UIConverterBackendGlobal.cpp

    r61188 r61210  
    498498        case UIExtraDataMetaDefs::MenuHelpActionType_WebSite:              strResult = "WebSite"; break;
    499499        case UIExtraDataMetaDefs::MenuHelpActionType_BugTracker:           strResult = "BugTracker"; break;
     500        case UIExtraDataMetaDefs::MenuHelpActionType_Forums:               strResult = "Forums"; break;
     501        case UIExtraDataMetaDefs::MenuHelpActionType_Oracle:               strResult = "Oracle"; break;
    500502#ifndef VBOX_WS_MAC
    501503        case UIExtraDataMetaDefs::MenuHelpActionType_About:                strResult = "About"; break;
     
    520522    keys << "WebSite";              values << UIExtraDataMetaDefs::MenuHelpActionType_WebSite;
    521523    keys << "BugTracker";           values << UIExtraDataMetaDefs::MenuHelpActionType_BugTracker;
     524    keys << "Forums";               values << UIExtraDataMetaDefs::MenuHelpActionType_Forums;
     525    keys << "Oracle";               values << UIExtraDataMetaDefs::MenuHelpActionType_Oracle;
    522526#ifndef VBOX_WS_MAC
    523527    keys << "About";                values << UIExtraDataMetaDefs::MenuHelpActionType_About;
  • trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataDefs.h

    r61188 r61210  
    367367        MenuHelpActionType_WebSite              = RT_BIT(1),
    368368        MenuHelpActionType_BugTracker           = RT_BIT(2),
     369        MenuHelpActionType_Forums               = RT_BIT(3),
     370        MenuHelpActionType_Oracle               = RT_BIT(4),
    369371#ifndef RT_OS_DARWIN
    370         MenuHelpActionType_About                = RT_BIT(3),
     372        MenuHelpActionType_About                = RT_BIT(5),
    371373#endif /* !RT_OS_DARWIN */
    372374        MenuHelpActionType_All                  = 0xFFFF
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIActionPool.cpp

    r61188 r61210  
    672672};
    673673
     674class UIActionSimpleForums : public UIActionSimple
     675{
     676    Q_OBJECT;
     677
     678public:
     679
     680    UIActionSimpleForums(UIActionPool *pParent)
     681        : UIActionSimple(pParent, ":/site_16px.png")
     682    {
     683        retranslateUi();
     684    }
     685
     686protected:
     687
     688    /** Returns action extra-data ID. */
     689    virtual int extraDataID() const { return UIExtraDataMetaDefs::MenuHelpActionType_Forums; }
     690    /** Returns action extra-data key. */
     691    virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::MenuHelpActionType_Forums); }
     692    /** Returns whether action is allowed. */
     693    virtual bool isAllowed() const { return actionPool()->isAllowedInMenuHelp(UIExtraDataMetaDefs::MenuHelpActionType_Forums); }
     694
     695    QString shortcutExtraDataID() const
     696    {
     697        return QString("Forums");
     698    }
     699
     700    void retranslateUi()
     701    {
     702        setName(QApplication::translate("UIActionPool", "&VirtualBox Forums..."));
     703        setStatusTip(QApplication::translate("UIActionPool", "Open the browser and go to the VirtualBox product forums"));
     704    }
     705};
     706
     707class UIActionSimpleOracle : public UIActionSimple
     708{
     709    Q_OBJECT;
     710
     711public:
     712
     713    UIActionSimpleOracle(UIActionPool *pParent)
     714        : UIActionSimple(pParent, ":/site_16px.png")
     715    {
     716        retranslateUi();
     717    }
     718
     719protected:
     720
     721    /** Returns action extra-data ID. */
     722    virtual int extraDataID() const { return UIExtraDataMetaDefs::MenuHelpActionType_Oracle; }
     723    /** Returns action extra-data key. */
     724    virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::MenuHelpActionType_Oracle); }
     725    /** Returns whether action is allowed. */
     726    virtual bool isAllowed() const { return actionPool()->isAllowedInMenuHelp(UIExtraDataMetaDefs::MenuHelpActionType_Oracle); }
     727
     728    QString shortcutExtraDataID() const
     729    {
     730        return QString("Oracle");
     731    }
     732
     733    void retranslateUi()
     734    {
     735        setName(QApplication::translate("UIActionPool", "&Oracle Web Site..."));
     736        setStatusTip(QApplication::translate("UIActionPool", "Open the browser and go to the Oracle web site"));
     737    }
     738};
     739
    674740class UIActionSimpleResetWarnings : public UIActionSimple
    675741{
     
    10481114    m_pool[UIActionIndex_Simple_WebSite] = new UIActionSimpleWebSite(this);
    10491115    m_pool[UIActionIndex_Simple_BugTracker] = new UIActionSimpleBugTracker(this);
     1116    m_pool[UIActionIndex_Simple_Forums] = new UIActionSimpleForums(this);
     1117    m_pool[UIActionIndex_Simple_Oracle] = new UIActionSimpleOracle(this);
    10501118#ifndef RT_OS_DARWIN
    10511119    m_pool[UIActionIndex_Simple_About] = new UIActionSimpleAbout(this);
     
    10891157    connect(action(UIActionIndex_Simple_BugTracker), SIGNAL(triggered()),
    10901158            &msgCenter(), SLOT(sltShowBugTracker()), Qt::UniqueConnection);
     1159    connect(action(UIActionIndex_Simple_Forums), SIGNAL(triggered()),
     1160            &msgCenter(), SLOT(sltShowForums()), Qt::UniqueConnection);
     1161    connect(action(UIActionIndex_Simple_Oracle), SIGNAL(triggered()),
     1162            &msgCenter(), SLOT(sltShowOracle()), Qt::UniqueConnection);
    10911163#ifndef RT_OS_DARWIN
    10921164    connect(action(UIActionIndex_Simple_About), SIGNAL(triggered()),
     
    12641336
    12651337    /* 'Contents' action: */
    1266     fSeparator = addAction(pMenu, action(UIActionIndex_Simple_Contents)) || fSeparator;;
     1338    fSeparator = addAction(pMenu, action(UIActionIndex_Simple_Contents)) || fSeparator;
    12671339    /* 'Web Site' action: */
    1268     fSeparator = addAction(pMenu, action(UIActionIndex_Simple_WebSite)) || fSeparator;;
     1340    fSeparator = addAction(pMenu, action(UIActionIndex_Simple_WebSite)) || fSeparator;
    12691341    /* 'Bug Tracker' action: */
    1270     fSeparator = addAction(pMenu, action(UIActionIndex_Simple_BugTracker)) || fSeparator;;
     1342    fSeparator = addAction(pMenu, action(UIActionIndex_Simple_BugTracker)) || fSeparator;
     1343    /* 'Forums' action: */
     1344    fSeparator = addAction(pMenu, action(UIActionIndex_Simple_Forums)) || fSeparator;
     1345    /* 'Oracle' action: */
     1346    fSeparator = addAction(pMenu, action(UIActionIndex_Simple_Oracle)) || fSeparator;
    12711347
    12721348    /* Separator? */
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIActionPool.h

    r61188 r61210  
    7979    UIActionIndex_Simple_WebSite,
    8080    UIActionIndex_Simple_BugTracker,
     81    UIActionIndex_Simple_Forums,
     82    UIActionIndex_Simple_Oracle,
    8183#ifndef RT_OS_DARWIN
    8284    UIActionIndex_Simple_About,
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.cpp

    r61195 r61210  
    26262626}
    26272627
     2628void UIMessageCenter::sltShowForums()
     2629{
     2630    vboxGlobal().openURL("https://forums.virtualbox.org/");
     2631}
     2632
     2633void UIMessageCenter::sltShowOracle()
     2634{
     2635    vboxGlobal().openURL("http://www.oracle.com/us/technologies/virtualization/virtualbox/overview/index.html");
     2636}
     2637
    26282638void UIMessageCenter::sltShowHelpAboutDialog()
    26292639{
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.h

    r61188 r61210  
    385385    void sltShowHelpWebDialog();
    386386    void sltShowBugTracker();
     387    void sltShowForums();
     388    void sltShowOracle();
    387389    void sltShowHelpAboutDialog();
    388390    void sltShowHelpHelpDialog();
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMenuBarEditorWindow.cpp

    r61188 r61210  
    992992        prepareCopiedAction(pMenu, actionPool()->action(UIActionIndex_Simple_WebSite));
    993993        prepareCopiedAction(pMenu, actionPool()->action(UIActionIndex_Simple_BugTracker));
     994        prepareCopiedAction(pMenu, actionPool()->action(UIActionIndex_Simple_Forums));
     995        prepareCopiedAction(pMenu, actionPool()->action(UIActionIndex_Simple_Oracle));
    994996        pMenu->addSeparator();
    995997#ifndef VBOX_WS_MAC
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