VirtualBox

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


Ignore:
Timestamp:
Dec 18, 2024 1:13:22 PM (4 weeks ago)
Author:
vboxsync
Message:

FE/Qt: bugref:10814: VBox Manager: Continue with the code intentionally missing in r166364; Machines global tool is now shown for the advanced widget architecture.

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

Legend:

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

    r107289 r107355  
    394394};
    395395
     396/** Simple action extension, used as 'Machine Manager' action class. */
     397class UIActionToggleManagerToolsGlobalShowMachineManager : public UIActionToggle
     398{
     399    Q_OBJECT;
     400
     401public:
     402
     403    /** Constructs action passing @a pParent to the base-class. */
     404    UIActionToggleManagerToolsGlobalShowMachineManager(UIActionPool *pParent)
     405        : UIActionToggle(pParent)
     406    {
     407        setProperty("UIToolType", QVariant::fromValue(UIToolType_Machines));
     408        /// @todo use icons with check-boxes
     409        setIcon(UIIconPool::iconSetFull(":/machine_24px.png", ":/machine_16px.png""));
     410    }
     411
     412protected:
     413
     414    /** Returns shortcut extra-data ID. */
     415    virtual QString shortcutExtraDataID() const RT_OVERRIDE
     416    {
     417        return QString("ToolsGlobalMachineManager");
     418    }
     419
     420    /** Handles translation event. */
     421    virtual void retranslateUi() RT_OVERRIDE
     422    {
     423        setName(QApplication::translate("UIActionPool", "&Machine Manager"));
     424        setStatusTip(QApplication::translate("UIActionPool", "Open the Machine Manager"));
     425    }
     426};
     427
    396428#ifdef VBOX_GUI_WITH_EXTRADATA_MANAGER_UI
    397429/** Simple action extension, used as 'Show Extra-data Manager' action class. */
     
    35013533    m_pool[UIActionIndexMN_M_File_M_Tools_T_CloudProfileManager] = new UIActionToggleManagerToolsGlobalShowCloudProfileManager(this);
    35023534    m_pool[UIActionIndexMN_M_File_M_Tools_T_VMActivityOverview] = new UIActionToggleManagerToolsGlobalShowVMActivityOverview(this);
     3535    m_pool[UIActionIndexMN_M_File_M_Tools_T_MachineManager] = new UIActionToggleManagerToolsGlobalShowMachineManager(this);
    35033536#ifdef VBOX_GUI_WITH_EXTRADATA_MANAGER_UI
    35043537    m_pool[UIActionIndexMN_M_File_S_ShowExtraDataManager] = new UIActionSimpleManagerFileShowExtraDataManager(this);
     
    36603693    m_groupPool[UIActionIndexMN_M_File_M_Tools]->addAction(m_pool.value(UIActionIndexMN_M_File_M_Tools_T_CloudProfileManager));
    36613694    m_groupPool[UIActionIndexMN_M_File_M_Tools]->addAction(m_pool.value(UIActionIndexMN_M_File_M_Tools_T_VMActivityOverview));
     3695    m_groupPool[UIActionIndexMN_M_File_M_Tools]->addAction(m_pool.value(UIActionIndexMN_M_File_M_Tools_T_MachineManager));
    36623696
    36633697    /* 'Group' action groups: */
     
    40304064    pMenu->addAction(action(UIActionIndexMN_M_File_M_Tools_T_CloudProfileManager));
    40314065    pMenu->addAction(action(UIActionIndexMN_M_File_M_Tools_T_VMActivityOverview));
     4066    //pMenu->addAction(action(UIActionIndexMN_M_File_M_Tools_T_MachineManager));
    40324067
    40334068    /* Mark menu as valid: */
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIActionPoolManager.h

    r106061 r107355  
    5656    UIActionIndexMN_M_File_M_Tools_T_CloudProfileManager,
    5757    UIActionIndexMN_M_File_M_Tools_T_VMActivityOverview,
     58    UIActionIndexMN_M_File_M_Tools_T_MachineManager,
    5859#ifdef VBOX_GUI_WITH_EXTRADATA_MANAGER_UI
    5960    UIActionIndexMN_M_File_S_ShowExtraDataManager,
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/tools/UIToolsModel.cpp

    r107289 r107355  
    234234    actions[UIToolType_Cloud] = actionPool()->action(UIActionIndexMN_M_File_M_Tools_T_CloudProfileManager);
    235235    actions[UIToolType_Activities] = actionPool()->action(UIActionIndexMN_M_File_M_Tools_T_VMActivityOverview);
     236#ifdef VBOX_GUI_WITH_ADVANCED_WIDGETS
     237    actions[UIToolType_Machines] = actionPool()->action(UIActionIndexMN_M_File_M_Tools_T_MachineManager);
     238#endif
    236239    if (actions.contains(enmType))
    237240        actions.value(enmType)->setChecked(true);
     
    427430            case UIToolType_Cloud:       pItem->reconfigure(tr("Cloud")); break;
    428431            case UIToolType_Activities:  pItem->reconfigure(tr("Activities")); break;
     432#ifdef VBOX_GUI_WITH_ADVANCED_WIDGETS
     433            case UIToolType_Machines:    pItem->reconfigure(tr("Machines")); break;
     434#endif
    429435            case UIToolType_Details:     pItem->reconfigure(tr("Details")); break;
    430436            case UIToolType_Snapshots:   pItem->reconfigure(tr("Snapshots")); break;
     
    499505                                       UIIconPool::iconSet(":/resources_monitor_24px.png",
    500506                                                           ":/resources_monitor_disabled_24px.png"));
     507
     508#ifdef VBOX_GUI_WITH_ADVANCED_WIDGETS
     509            /* Machines: */
     510            m_items << new UIToolsItem(scene(), UIToolClass_Global, UIToolType_Machines, QString(),
     511                                       UIIconPool::iconSet(":/machine_details_manager_24px.png",
     512                                                           ":/machine_details_manager_disabled_24px.png"));
     513#endif
    501514
    502515            break;
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/tools/UIToolsModel.h

    r106061 r107355  
    3939
    4040/* GUI includes: */
     41#include "UIManagerDefs.h"
    4142#include "UIToolsItem.h"
    4243
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