VirtualBox

Changeset 76757 in vbox for trunk/src


Ignore:
Timestamp:
Jan 10, 2019 4:16:12 PM (6 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:9241: VirtualBox Manager tools menu for accessibility needs (simple ations for now).

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

Legend:

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

    r76606 r76757  
    12741274    /** Constructs action passing @a pParent to the base-class. */
    12751275    UIActionMenuSelectorToolsMachine(UIActionPool *pParent)
    1276         : UIActionMenu(pParent)
     1276        : UIActionMenu(pParent, ":/tools_menu_24px.png") /// @todo replace with 16px icon
    12771277    {}
    12781278
     
    12881288    virtual void retranslateUi() /* override */
    12891289    {
    1290         setName(QApplication::translate("UIActionPool", "&Machine Tools Menu"));
     1290        setName(QApplication::translate("UIActionPool", "Tools"));
    12911291        setStatusTip(QApplication::translate("UIActionPool", "Open the machine tools menu"));
    12921292    }
     
    25332533    m_pool[UIActionIndexST_M_Group_M_Close_S_Shutdown] = new UIActionSimpleSelectorClosePerformShutdown(this);
    25342534    m_pool[UIActionIndexST_M_Group_M_Close_S_PowerOff] = new UIActionSimpleSelectorClosePerformPowerOff(this);
     2535    m_pool[UIActionIndexST_M_Group_M_Tools] = new UIActionMenuSelectorToolsMachine(this);
     2536    m_pool[UIActionIndexST_M_Group_M_Tools_S_Details] = new UIActionSimpleSelectorToolsMachineShowDetails(this);
     2537    m_pool[UIActionIndexST_M_Group_M_Tools_S_Snapshots] = new UIActionSimpleSelectorToolsMachineShowSnapshots(this);
     2538    m_pool[UIActionIndexST_M_Group_M_Tools_S_Logs] = new UIActionSimpleSelectorToolsMachineShowLogs(this);
    25352539    m_pool[UIActionIndexST_M_Group_S_Discard] = new UIActionSimpleSelectorCommonPerformDiscard(this);
    25362540    m_pool[UIActionIndexST_M_Group_S_ShowLogDialog] = new UIActionSimpleSelectorCommonShowMachineLogs(this);
     
    25602564    m_pool[UIActionIndexST_M_Machine_M_Close_S_Shutdown] = new UIActionSimpleSelectorClosePerformShutdown(this);
    25612565    m_pool[UIActionIndexST_M_Machine_M_Close_S_PowerOff] = new UIActionSimpleSelectorClosePerformPowerOff(this);
     2566    m_pool[UIActionIndexST_M_Machine_M_Tools] = new UIActionMenuSelectorToolsMachine(this);
     2567    m_pool[UIActionIndexST_M_Machine_M_Tools_S_Details] = new UIActionSimpleSelectorToolsMachineShowDetails(this);
     2568    m_pool[UIActionIndexST_M_Machine_M_Tools_S_Snapshots] = new UIActionSimpleSelectorToolsMachineShowSnapshots(this);
     2569    m_pool[UIActionIndexST_M_Machine_M_Tools_S_Logs] = new UIActionSimpleSelectorToolsMachineShowLogs(this);
    25622570    m_pool[UIActionIndexST_M_Machine_S_Discard] = new UIActionSimpleSelectorCommonPerformDiscard(this);
    25632571    m_pool[UIActionIndexST_M_Machine_S_ShowLogDialog] = new UIActionSimpleSelectorCommonShowMachineLogs(this);
     
    25662574    m_pool[UIActionIndexST_M_Machine_S_CreateShortcut] = new UIActionSimpleSelectorCommonPerformCreateShortcut(this);
    25672575    m_pool[UIActionIndexST_M_Machine_S_SortParent] = new UIActionSimpleSelectorMachinePerformSortParent(this);
    2568 
    2569     /* Machine Tools actions: */
    2570     m_pool[UIActionIndexST_M_Tools_M_Machine] = new UIActionMenuSelectorToolsMachine(this);
    2571     m_pool[UIActionIndexST_M_Tools_M_Machine_S_Details] = new UIActionSimpleSelectorToolsMachineShowDetails(this);
    2572     m_pool[UIActionIndexST_M_Tools_M_Machine_S_Snapshots] = new UIActionSimpleSelectorToolsMachineShowSnapshots(this);
    2573     m_pool[UIActionIndexST_M_Tools_M_Machine_S_LogViewer] = new UIActionSimpleSelectorToolsMachineShowLogs(this);
    25742576
    25752577    /* Global Tools actions: */
     
    26242626    m_menuUpdateHandlers[UIActionIndexST_M_Group_M_Close].ptfm =         &UIActionPoolManager::updateMenuGroupClose;
    26252627    m_menuUpdateHandlers[UIActionIndexST_M_Machine_M_Close].ptfm =       &UIActionPoolManager::updateMenuMachineClose;
     2628    m_menuUpdateHandlers[UIActionIndexST_M_Group_M_Tools].ptfm =         &UIActionPoolManager::updateMenuGroupTools;
     2629    m_menuUpdateHandlers[UIActionIndexST_M_Machine_M_Tools].ptfm =       &UIActionPoolManager::updateMenuMachineTools;
    26262630    m_menuUpdateHandlers[UIActionIndexST_M_MediumWindow].ptfm =          &UIActionPoolManager::updateMenuMediumWindow;
    26272631    m_menuUpdateHandlers[UIActionIndexST_M_Medium].ptfm =                &UIActionPoolManager::updateMenuMedium;
     
    26872691    /* 'Machine' / 'Close' menu: */
    26882692    updateMenuMachineClose();
     2693    /* 'Group' / 'Tools' menu: */
     2694    updateMenuGroupTools();
     2695    /* 'Machine' / 'Tools' menu: */
     2696    updateMenuMachineTools();
    26892697
    26902698    /* 'Virtual Media Manager' menu: */
     
    28432851    pMenu->addMenu(action(UIActionIndexST_M_Group_M_Close)->menu());
    28442852    pMenu->addSeparator();
     2853    pMenu->addMenu(action(UIActionIndexST_M_Group_M_Tools)->menu());
     2854    pMenu->addSeparator();
    28452855    pMenu->addAction(action(UIActionIndexST_M_Group_S_Discard));
    28462856    pMenu->addAction(action(UIActionIndexST_M_Group_S_ShowLogDialog));
     
    28792889    pMenu->addMenu(action(UIActionIndexST_M_Machine_M_Close)->menu());
    28802890    pMenu->addSeparator();
     2891    pMenu->addMenu(action(UIActionIndexST_M_Machine_M_Tools)->menu());
     2892    pMenu->addSeparator();
    28812893    pMenu->addAction(action(UIActionIndexST_M_Machine_S_Discard));
    28822894    pMenu->addAction(action(UIActionIndexST_M_Machine_S_ShowLogDialog));
     
    29602972    /* Mark menu as valid: */
    29612973    m_invalidations.remove(UIActionIndexST_M_Machine_M_Close);
     2974}
     2975
     2976void UIActionPoolManager::updateMenuGroupTools()
     2977{
     2978    /* Get corresponding menu: */
     2979    UIMenu *pMenu = action(UIActionIndexST_M_Group_M_Tools)->menu();
     2980    AssertPtrReturnVoid(pMenu);
     2981    /* Clear contents: */
     2982    pMenu->clear();
     2983
     2984    /* Populate 'Group' / 'Tools' menu: */
     2985    pMenu->addAction(action(UIActionIndexST_M_Group_M_Tools_S_Details));
     2986    pMenu->addAction(action(UIActionIndexST_M_Group_M_Tools_S_Snapshots));
     2987    pMenu->addAction(action(UIActionIndexST_M_Group_M_Tools_S_Logs));
     2988
     2989    /* Mark menu as valid: */
     2990    m_invalidations.remove(UIActionIndexST_M_Group_M_Tools);
     2991}
     2992
     2993void UIActionPoolManager::updateMenuMachineTools()
     2994{
     2995    /* Get corresponding menu: */
     2996    UIMenu *pMenu = action(UIActionIndexST_M_Machine_M_Tools)->menu();
     2997    AssertPtrReturnVoid(pMenu);
     2998    /* Clear contents: */
     2999    pMenu->clear();
     3000
     3001    /* Populate 'Machine' / 'Tools' menu: */
     3002    pMenu->addAction(action(UIActionIndexST_M_Machine_M_Tools_S_Details));
     3003    pMenu->addAction(action(UIActionIndexST_M_Machine_M_Tools_S_Snapshots));
     3004    pMenu->addAction(action(UIActionIndexST_M_Machine_M_Tools_S_Logs));
     3005
     3006    /* Mark menu as valid: */
     3007    m_invalidations.remove(UIActionIndexST_M_Machine_M_Tools);
    29623008}
    29633009
     
    31893235                    << action(UIActionIndexST_M_Group_M_Close_S_SaveState)
    31903236                    << action(UIActionIndexST_M_Group_M_Close_S_Shutdown)
    3191                     << action(UIActionIndexST_M_Group_M_Close_S_PowerOff);
     3237                    << action(UIActionIndexST_M_Group_M_Close_S_PowerOff)
     3238                    << action(UIActionIndexST_M_Group_M_Tools_S_Details)
     3239                    << action(UIActionIndexST_M_Group_M_Tools_S_Snapshots)
     3240                    << action(UIActionIndexST_M_Group_M_Tools_S_Logs);
    31923241            break;
    31933242        }
     
    32173266                    << action(UIActionIndexST_M_Machine_M_Close_S_SaveState)
    32183267                    << action(UIActionIndexST_M_Machine_M_Close_S_Shutdown)
    3219                     << action(UIActionIndexST_M_Machine_M_Close_S_PowerOff);
     3268                    << action(UIActionIndexST_M_Machine_M_Close_S_PowerOff)
     3269                    << action(UIActionIndexST_M_Machine_M_Tools_S_Details)
     3270                    << action(UIActionIndexST_M_Machine_M_Tools_S_Snapshots)
     3271                    << action(UIActionIndexST_M_Machine_M_Tools_S_Logs);
    32203272            break;
    32213273        }
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIActionPoolManager.h

    r76581 r76757  
    7373    UIActionIndexST_M_Group_M_Close_S_Shutdown,
    7474    UIActionIndexST_M_Group_M_Close_S_PowerOff,
     75    UIActionIndexST_M_Group_M_Tools,
     76    UIActionIndexST_M_Group_M_Tools_S_Details,
     77    UIActionIndexST_M_Group_M_Tools_S_Snapshots,
     78    UIActionIndexST_M_Group_M_Tools_S_Logs,
    7579    UIActionIndexST_M_Group_S_Discard,
    7680    UIActionIndexST_M_Group_S_ShowLogDialog,
     
    100104    UIActionIndexST_M_Machine_M_Close_S_Shutdown,
    101105    UIActionIndexST_M_Machine_M_Close_S_PowerOff,
     106    UIActionIndexST_M_Machine_M_Tools,
     107    UIActionIndexST_M_Machine_M_Tools_S_Details,
     108    UIActionIndexST_M_Machine_M_Tools_S_Snapshots,
     109    UIActionIndexST_M_Machine_M_Tools_S_Logs,
    102110    UIActionIndexST_M_Machine_S_Discard,
    103111    UIActionIndexST_M_Machine_S_ShowLogDialog,
     
    106114    UIActionIndexST_M_Machine_S_CreateShortcut,
    107115    UIActionIndexST_M_Machine_S_SortParent,
    108 
    109     /* Machine Tools actions: */
    110     UIActionIndexST_M_Tools_M_Machine,
    111     UIActionIndexST_M_Tools_M_Machine_S_Details,
    112     UIActionIndexST_M_Tools_M_Machine_S_Snapshots,
    113     UIActionIndexST_M_Tools_M_Machine_S_LogViewer,
    114116
    115117    /* Global Tools actions: */
     
    199201    /** Updates 'Machine' / 'Close' menu. */
    200202    void updateMenuMachineClose();
     203    /** Updates 'Group' / 'Tools' menu. */
     204    void updateMenuGroupTools();
     205    /** Updates 'Machine' / 'Tools' menu. */
     206    void updateMenuMachineTools();
    201207
    202208    /** Updates 'Medium' window menu. */
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManager.cpp

    r76606 r76757  
    10481048}
    10491049
     1050void UIVirtualBoxManager::sltPerformShowMachineToolDetails()
     1051{
     1052    m_pWidget->setToolsType(UIToolType_Details);
     1053}
     1054
     1055void UIVirtualBoxManager::sltPerformShowMachineToolSnapshots()
     1056{
     1057    m_pWidget->setToolsType(UIToolType_Snapshots);
     1058}
     1059
     1060void UIVirtualBoxManager::sltPerformShowMachineToolLogs()
     1061{
     1062    m_pWidget->setToolsType(UIToolType_Logs);
     1063}
     1064
    10501065void UIVirtualBoxManager::sltOpenLogViewerWindow()
    10511066{
     
    14441459    connect(actionPool()->action(UIActionIndexST_M_Machine_M_Close_S_PowerOff), &UIAction::triggered,
    14451460            this, &UIVirtualBoxManager::sltPerformPowerOffMachine);
     1461
     1462    /* 'Group/Tools' menu connections: */
     1463    connect(actionPool()->action(UIActionIndexST_M_Group_M_Tools_S_Details), &UIAction::triggered,
     1464            this, &UIVirtualBoxManager::sltPerformShowMachineToolDetails);
     1465    connect(actionPool()->action(UIActionIndexST_M_Group_M_Tools_S_Snapshots), &UIAction::triggered,
     1466            this, &UIVirtualBoxManager::sltPerformShowMachineToolSnapshots);
     1467    connect(actionPool()->action(UIActionIndexST_M_Group_M_Tools_S_Logs), &UIAction::triggered,
     1468            this, &UIVirtualBoxManager::sltPerformShowMachineToolLogs);
     1469
     1470    /* 'Machine/Tools' menu connections: */
     1471    connect(actionPool()->action(UIActionIndexST_M_Machine_M_Tools_S_Details), &UIAction::triggered,
     1472            this, &UIVirtualBoxManager::sltPerformShowMachineToolDetails);
     1473    connect(actionPool()->action(UIActionIndexST_M_Machine_M_Tools_S_Snapshots), &UIAction::triggered,
     1474            this, &UIVirtualBoxManager::sltPerformShowMachineToolSnapshots);
     1475    connect(actionPool()->action(UIActionIndexST_M_Machine_M_Tools_S_Logs), &UIAction::triggered,
     1476            this, &UIVirtualBoxManager::sltPerformShowMachineToolLogs);
    14461477}
    14471478
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManager.h

    r76581 r76757  
    222222        /** Handles call to power machine off. */
    223223        void sltPerformPowerOffMachine();
     224
     225        /** Handles call to show machine Details tool. */
     226        void sltPerformShowMachineToolDetails();
     227        /** Handles call to show machine Snapshots tool. */
     228        void sltPerformShowMachineToolSnapshots();
     229        /** Handles call to show machine Logs tool. */
     230        void sltPerformShowMachineToolLogs();
    224231
    225232        /** Handles call to open machine Log Viewer window. */
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