VirtualBox

Ignore:
Timestamp:
Jun 20, 2019 3:21:37 PM (6 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:9495: Add New Cloud VM wizard into File menu of VirtualBox Manager.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIActionPoolManager.cpp

    r78323 r79258  
    237237        setName(QApplication::translate("UIActionPool", "&Export Appliance..."));
    238238        setStatusTip(QApplication::translate("UIActionPool", "Export one or more VirtualBox virtual machines as an appliance"));
     239        setToolTip(text().remove('&').remove('.') +
     240                   (shortcut().toString().isEmpty() ? "" : QString(" (%1)").arg(shortcut().toString())));
     241    }
     242};
     243
     244/** Simple action extension, used as 'Show New Cloud VM Wizard' action class. */
     245class UIActionSimpleSelectorFileShowNewCloudVMWizard : public UIActionSimple
     246{
     247    Q_OBJECT;
     248
     249public:
     250
     251    /** Constructs action passing @a pParent to the base-class. */
     252    UIActionSimpleSelectorFileShowNewCloudVMWizard(UIActionPool *pParent)
     253        : UIActionSimple(pParent,
     254                         ":/import_32px.png", ":/import_16px.png",
     255                         ":/import_disabled_32px.png", ":/import_disabled_16px.png")
     256    {}
     257
     258protected:
     259
     260    /** Returns shortcut extra-data ID. */
     261    virtual QString shortcutExtraDataID() const /* override */
     262    {
     263        return QString("NewCloudVM");
     264    }
     265
     266    /** Handles translation event. */
     267    virtual void retranslateUi() /* override */
     268    {
     269        setName(QApplication::translate("UIActionPool", "&New Cloud VM..."));
     270        setStatusTip(QApplication::translate("UIActionPool", "Create new cloud virtual machine"));
    239271        setToolTip(text().remove('&').remove('.') +
    240272                   (shortcut().toString().isEmpty() ? "" : QString(" (%1)").arg(shortcut().toString())));
     
    27192751    m_pool[UIActionIndexST_M_File_S_ImportAppliance] = new UIActionSimpleSelectorFileShowImportApplianceWizard(this);
    27202752    m_pool[UIActionIndexST_M_File_S_ExportAppliance] = new UIActionSimpleSelectorFileShowExportApplianceWizard(this);
     2753    m_pool[UIActionIndexST_M_File_S_NewCloudVM] = new UIActionSimpleSelectorFileShowNewCloudVMWizard(this);
    27212754#ifdef VBOX_GUI_WITH_EXTRADATA_MANAGER_UI
    27222755    m_pool[UIActionIndexST_M_File_S_ShowExtraDataManager] = new UIActionSimpleSelectorFileShowExtraDataManager(this);
     
    29883021    /* 'Export Appliance' action goes to 'File' menu: */
    29893022    pMenu->addAction(action(UIActionIndexST_M_File_S_ExportAppliance));
     3023    /* 'New Cloud VM' action goes to 'File' menu: */
     3024    pMenu->addAction(action(UIActionIndexST_M_File_S_NewCloudVM));
    29903025# ifdef VBOX_GUI_WITH_EXTRADATA_MANAGER_UI
    29913026    /* 'Show Extra-data Manager' action goes to 'File' menu for Debug build: */
     
    30103045    /* 'Export Appliance' action goes to 'File' menu: */
    30113046    pMenu->addAction(action(UIActionIndexST_M_File_S_ExportAppliance));
     3047    /* 'New Cloud VM' action goes to 'File' menu: */
     3048    pMenu->addAction(action(UIActionIndexST_M_File_S_NewCloudVM));
    30123049    /* Separator after 'Export Appliance' action of the 'File' menu: */
    30133050    pMenu->addSeparator();
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