VirtualBox

Changeset 78323 in vbox for trunk/src/VBox/Frontends


Ignore:
Timestamp:
Apr 26, 2019 1:07:58 PM (6 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:9438: Adding Try Oracle Cloud for Free button to Cloud Profile Manager.

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/VirtualBox1.qrc

    r77366 r78323  
    9393        <file alias="cloud_profile_restore_disabled_16px.png">images/cloud_profile_restore_disabled_16px.png</file>
    9494        <file alias="cloud_profile_restore_disabled_32px.png">images/cloud_profile_restore_disabled_32px.png</file>
     95        <file alias="cloud_profile_try_16px.png">images/cloud_profile_try_16px.png</file>
     96        <file alias="cloud_profile_try_32px.png">images/cloud_profile_try_32px.png</file>
     97        <file alias="cloud_profile_try_disabled_16px.png">images/cloud_profile_try_disabled_16px.png</file>
     98        <file alias="cloud_profile_try_disabled_32px.png">images/cloud_profile_try_disabled_32px.png</file>
    9599        <file alias="collapse_all_16px.png">images/collapse_all_16px.png</file>
    96100        <file alias="connect_16px.png">images/connect_16px.png</file>
  • trunk/src/VBox/Frontends/VirtualBox/VirtualBox1_x2.qrc

    r77366 r78323  
    9393        <file alias="cloud_profile_restore_disabled_16px_x2.png">images/x2/cloud_profile_restore_disabled_16px_x2.png</file>
    9494        <file alias="cloud_profile_restore_disabled_32px_x2.png">images/x2/cloud_profile_restore_disabled_32px_x2.png</file>
     95        <file alias="cloud_profile_try_16px_x2.png">images/x2/cloud_profile_try_16px_x2.png</file>
     96        <file alias="cloud_profile_try_32px_x2.png">images/x2/cloud_profile_try_32px_x2.png</file>
     97        <file alias="cloud_profile_try_disabled_16px_x2.png">images/x2/cloud_profile_try_disabled_16px_x2.png</file>
     98        <file alias="cloud_profile_try_disabled_32px_x2.png">images/x2/cloud_profile_try_disabled_32px_x2.png</file>
    9599        <file alias="collapse_all_16px_x2.png">images/x2/collapse_all_16px_x2.png</file>
    96100        <file alias="connect_16px_x2.png">images/x2/connect_16px_x2.png</file>
  • trunk/src/VBox/Frontends/VirtualBox/src/cloud/UICloudProfileManager.cpp

    r76606 r78323  
    480480}
    481481
     482void UICloudProfileManagerWidget::sltShowCloudProfileTryPage()
     483{
     484    vboxGlobal().openURL("https://myservices.us.oraclecloud.com/mycloud/signup");
     485}
     486
    482487void UICloudProfileManagerWidget::sltShowCloudProfileHelp()
    483488{
     
    566571    addAction(m_pActionPool->action(UIActionIndexST_M_Cloud_S_Remove));
    567572    addAction(m_pActionPool->action(UIActionIndexST_M_Cloud_T_Details));
     573    addAction(m_pActionPool->action(UIActionIndexST_M_Cloud_S_TryPage));
    568574    addAction(m_pActionPool->action(UIActionIndexST_M_Cloud_S_Help));
    569575
     
    577583    connect(m_pActionPool->action(UIActionIndexST_M_Cloud_T_Details), &QAction::toggled,
    578584            this, &UICloudProfileManagerWidget::sltToggleCloudProfileDetailsVisibility);
     585    connect(m_pActionPool->action(UIActionIndexST_M_Cloud_S_TryPage), &QAction::triggered,
     586            this, &UICloudProfileManagerWidget::sltShowCloudProfileTryPage);
    579587    connect(m_pActionPool->action(UIActionIndexST_M_Cloud_S_Help), &QAction::triggered,
    580588            this, &UICloudProfileManagerWidget::sltShowCloudProfileHelp);
     
    623631        m_pToolBar->addAction(m_pActionPool->action(UIActionIndexST_M_Cloud_T_Details));
    624632        m_pToolBar->addSeparator();
     633        m_pToolBar->addAction(m_pActionPool->action(UIActionIndexST_M_Cloud_S_TryPage));
    625634        m_pToolBar->addAction(m_pActionPool->action(UIActionIndexST_M_Cloud_S_Help));
    626635
  • trunk/src/VBox/Frontends/VirtualBox/src/cloud/UICloudProfileManager.h

    r76581 r78323  
    103103        /** Handles command to make cloud profile details @a fVisible. */
    104104        void sltToggleCloudProfileDetailsVisibility(bool fVisible);
     105        /** Handles command to show cloud profile help. */
     106        void sltShowCloudProfileTryPage();
    105107        /** Handles command to show cloud profile help. */
    106108        void sltShowCloudProfileHelp();
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIActionPoolManager.cpp

    r77677 r78323  
    26142614        setStatusTip(QApplication::translate("UIActionPool", "Open pane with selected cloud profile properties"));
    26152615        setToolTip(QApplication::translate("UIActionPool", "Open Cloud Profile Properties (%1)").arg(shortcut().toString()));
     2616    }
     2617};
     2618
     2619/** Simple action extension, used as 'Try Page' action class. */
     2620class UIActionMenuSelectorCloudShowTryPage : public UIActionSimple
     2621{
     2622    Q_OBJECT;
     2623
     2624public:
     2625
     2626    /** Constructs action passing @a pParent to the base-class. */
     2627    UIActionMenuSelectorCloudShowTryPage(UIActionPool *pParent)
     2628        : UIActionSimple(pParent,
     2629                         ":/cloud_profile_try_32px.png",          ":/cloud_profile_try_16px.png",
     2630                         ":/cloud_profile_try_disabled_32px.png", ":/cloud_profile_try_disabled_16px.png")
     2631    {
     2632        setShortcutContext(Qt::WidgetWithChildrenShortcut);
     2633    }
     2634
     2635protected:
     2636
     2637    /** Returns shortcut extra-data ID. */
     2638    virtual QString shortcutExtraDataID() const /* override */
     2639    {
     2640        return QString("ShowCloudProfileTryPage");
     2641    }
     2642
     2643    /** Returns default shortcut. */
     2644    virtual QKeySequence defaultShortcut(UIActionPoolType) const /* override */
     2645    {
     2646        return QKeySequence("Ctrl+Shift+T");
     2647    }
     2648
     2649    /** Handles translation event. */
     2650    virtual void retranslateUi() /* override */
     2651    {
     2652        setIconText(QApplication::translate("UIActionPool", "Try"));
     2653        setName(QApplication::translate("UIActionPool", "&Try Oracle Cloud for Free..."));
     2654        setShortcutScope(QApplication::translate("UIActionPool", "Cloud Profile Manager"));
     2655        setStatusTip(QApplication::translate("UIActionPool", "Try Oracle cloud for free"));
     2656        const QString strToolTip = QApplication::translate("UIActionPool", "Try Oracle Cloud for Free");
     2657        setToolTip(shortcut().isEmpty() ? strToolTip : QString("%1 (%2)").arg(strToolTip, shortcut().toString()));
    26162658    }
    26172659};
     
    27902832    m_pool[UIActionIndexST_M_Cloud_S_Remove] = new UIActionMenuSelectorCloudPerformRemove(this);
    27912833    m_pool[UIActionIndexST_M_Cloud_T_Details] = new UIActionMenuSelectorCloudToggleProperties(this);
     2834    m_pool[UIActionIndexST_M_Cloud_S_TryPage] = new UIActionMenuSelectorCloudShowTryPage(this);
    27922835    m_pool[UIActionIndexST_M_Cloud_S_Help] = new UIActionMenuSelectorCloudShowHelp(this);
    27932836
     
    33603403    }
    33613404
     3405    /* 'Try Page' action: */
     3406    fSeparator = addAction(pMenu, action(UIActionIndexST_M_Cloud_S_TryPage)) || fSeparator;
    33623407    /* 'Help' action: */
    33633408    fSeparator = addAction(pMenu, action(UIActionIndexST_M_Cloud_S_Help)) || fSeparator;
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIActionPoolManager.h

    r77677 r78323  
    159159    UIActionIndexST_M_Cloud_S_Remove,
    160160    UIActionIndexST_M_Cloud_T_Details,
     161    UIActionIndexST_M_Cloud_S_TryPage,
    161162    UIActionIndexST_M_Cloud_S_Help,
    162163
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManagerWidget.cpp

    r77337 r78323  
    599599                    m_pToolBar->addAction(actionPool()->action(UIActionIndexST_M_Cloud_T_Details));
    600600                    m_pToolBar->addSeparator();
     601                    m_pToolBar->addAction(actionPool()->action(UIActionIndexST_M_Cloud_S_TryPage));
    601602                    m_pToolBar->addAction(actionPool()->action(UIActionIndexST_M_Cloud_S_Help));
    602603                    break;
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