VirtualBox

Changeset 42845 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Aug 16, 2012 12:30:40 PM (12 years ago)
Author:
vboxsync
Message:

FE/Qt: 6234: Support for VM groups: Sort action logic / name rework.

Location:
trunk/src/VBox/Frontends/VirtualBox/src/selector
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/selector/UIActionPoolSelector.cpp

    r42767 r42845  
    241241    void retranslateUi()
    242242    {
    243         setText(QApplication::translate("UIActionPool", "Sort Group"));
     243        setText(QApplication::translate("UIActionPool", "Sort"));
    244244        setStatusTip(QApplication::translate("UIActionPool", "Sort the items of the selected virtual machine group alphabetically"));
    245245        setShortcut(gSS->keySequence(UISelectorShortcuts::SortGroup));
     
    607607};
    608608
    609 class UIActionSimpleCommonSortParent : public UIActionSimple
    610 {
    611     Q_OBJECT;
    612 
    613 public:
    614 
    615     UIActionSimpleCommonSortParent(QObject *pParent)
     609class UIActionSimpleMachineSortParent : public UIActionSimple
     610{
     611    Q_OBJECT;
     612
     613public:
     614
     615    UIActionSimpleMachineSortParent(QObject *pParent)
    616616        : UIActionSimple(pParent/*, ":/settings_16px.png", ":/settings_dis_16px.png"*/)
    617617    {
     
    623623    void retranslateUi()
    624624    {
    625         setText(QApplication::translate("UIActionPool", "Sort Parent Group"));
    626         setStatusTip(QApplication::translate("UIActionPool", "Sort the parent group of the first selected item alphabetically"));
     625        setText(QApplication::translate("UIActionPool", "Sort"));
     626        setStatusTip(QApplication::translate("UIActionPool", "Sort the group of the first selected machine alphabetically"));
    627627        setShortcut(gSS->keySequence(UISelectorShortcuts::SortParentGroup));
    628628    }
     
    768768    m_pool[UIActionIndexSelector_Simple_Machine_Remove] = new UIActionSimpleMachineRemove(this);
    769769    m_pool[UIActionIndexSelector_Simple_Machine_AddGroup] = new UIActionSimpleMachineAddGroup(this);
     770    m_pool[UIActionIndexSelector_Simple_Machine_SortParent] = new UIActionSimpleMachineSortParent(this);
    770771    m_pool[UIActionIndexSelector_Simple_Machine_Close_Save] = new UIActionSimpleSave(this);
    771772    m_pool[UIActionIndexSelector_Simple_Machine_Close_ACPIShutdown] = new UIActionSimpleACPIShutdown(this);
     
    782783    m_pool[UIActionIndexSelector_Simple_Common_ShowInFileManager] = new UIActionSimpleCommonShowInFileManager(this);
    783784    m_pool[UIActionIndexSelector_Simple_Common_CreateShortcut] = new UIActionSimpleCommonCreateShortcut(this);
    784     m_pool[UIActionIndexSelector_Simple_Common_SortParent] = new UIActionSimpleCommonSortParent(this);
    785785}
    786786
  • trunk/src/VBox/Frontends/VirtualBox/src/selector/UIActionPoolSelector.h

    r42767 r42845  
    5050    UIActionIndexSelector_Simple_Machine_Remove,
    5151    UIActionIndexSelector_Simple_Machine_AddGroup,
     52    UIActionIndexSelector_Simple_Machine_SortParent,
    5253    UIActionIndexSelector_Menu_Machine_Close,
    5354    UIActionIndexSelector_Simple_Machine_Close_Save,
     
    6566    UIActionIndexSelector_Simple_Common_ShowInFileManager,
    6667    UIActionIndexSelector_Simple_Common_CreateShortcut,
    67     UIActionIndexSelector_Simple_Common_SortParent,
    6868
    6969    /* Maximum index: */
  • trunk/src/VBox/Frontends/VirtualBox/src/selector/UISelectorWindow.cpp

    r42767 r42845  
    11541154    m_pAction_Common_ShowInFileManager = gActionPool->action(UIActionIndexSelector_Simple_Common_ShowInFileManager);
    11551155    m_pAction_Common_CreateShortcut    = gActionPool->action(UIActionIndexSelector_Simple_Common_CreateShortcut);
    1156     m_pAction_Common_SortParent        = gActionPool->action(UIActionIndexSelector_Simple_Common_SortParent);
    11571156}
    11581157
     
    11661165void UISelectorWindow::prepareMachineActions()
    11671166{
    1168     m_pAction_Machine_Settings = gActionPool->action(UIActionIndexSelector_Simple_Machine_Settings);
    1169     m_pAction_Machine_Clone    = gActionPool->action(UIActionIndexSelector_Simple_Machine_Clone);
    1170     m_pAction_Machine_Remove   = gActionPool->action(UIActionIndexSelector_Simple_Machine_Remove);
    1171     m_pAction_Machine_AddGroup = gActionPool->action(UIActionIndexSelector_Simple_Machine_AddGroup);
     1167    m_pAction_Machine_Settings   = gActionPool->action(UIActionIndexSelector_Simple_Machine_Settings);
     1168    m_pAction_Machine_Clone      = gActionPool->action(UIActionIndexSelector_Simple_Machine_Clone);
     1169    m_pAction_Machine_Remove     = gActionPool->action(UIActionIndexSelector_Simple_Machine_Remove);
     1170    m_pAction_Machine_AddGroup   = gActionPool->action(UIActionIndexSelector_Simple_Machine_AddGroup);
     1171    m_pAction_Machine_SortParent = gActionPool->action(UIActionIndexSelector_Simple_Machine_SortParent);
    11721172}
    11731173
     
    11971197    pMenu->addAction(m_pAction_Common_CreateShortcut);
    11981198    pMenu->addSeparator();
    1199     pMenu->addAction(m_pAction_Common_SortParent);
    12001199    pMenu->addAction(m_pAction_Group_Sort);
    12011200
     
    12321231    pMenu->addAction(m_pAction_Common_CreateShortcut);
    12331232    pMenu->addSeparator();
    1234     pMenu->addAction(m_pAction_Common_SortParent);
     1233    pMenu->addAction(m_pAction_Machine_SortParent);
    12351234
    12361235    /* Remember action list: */
     
    12381237                     << m_pAction_Machine_Clone
    12391238                     << m_pAction_Machine_Remove
    1240                      << m_pAction_Machine_AddGroup;
     1239                     << m_pAction_Machine_AddGroup
     1240                     << m_pAction_Machine_SortParent;
    12411241}
    12421242
     
    15971597    m_pAction_Machine_Remove->setEnabled(isActionEnabled(UIActionIndexSelector_Simple_Machine_Remove, items));
    15981598    m_pAction_Machine_AddGroup->setEnabled(isActionEnabled(UIActionIndexSelector_Simple_Machine_AddGroup, items));
     1599    m_pAction_Machine_SortParent->setEnabled(isActionEnabled(UIActionIndexSelector_Simple_Machine_SortParent, items));
    15991600
    16001601    /* Enable/disable common actions: */
     
    16071608    m_pAction_Common_ShowInFileManager->setEnabled(isActionEnabled(UIActionIndexSelector_Simple_Common_ShowInFileManager, items));
    16081609    m_pAction_Common_CreateShortcut->setEnabled(isActionEnabled(UIActionIndexSelector_Simple_Common_CreateShortcut, items));
    1609     m_pAction_Common_SortParent->setEnabled(isActionEnabled(UIActionIndexSelector_Simple_Common_SortParent, items));
    16101610
    16111611    /* Enable/disable group-close actions: */
     
    17201720            return isAtLeastOneItemAccessible(items);
    17211721        }
    1722         case UIActionIndexSelector_Simple_Common_SortParent:
     1722        case UIActionIndexSelector_Simple_Machine_SortParent:
    17231723        {
    17241724            return !m_pChooser->isGroupSavingInProgress();
  • trunk/src/VBox/Frontends/VirtualBox/src/selector/UISelectorWindow.h

    r42767 r42845  
    205205    UIAction *m_pAction_Common_ShowInFileManager;
    206206    UIAction *m_pAction_Common_CreateShortcut;
    207     UIAction *m_pAction_Common_SortParent;
    208207
    209208    /* 'Group' menu action pointers: */
     
    229228    UIAction *m_pAction_Machine_Remove;
    230229    UIAction *m_pAction_Machine_AddGroup;
     230    UIAction *m_pAction_Machine_SortParent;
    231231    /* 'Machine / Close' menu action pointers: */
    232232    UIAction *m_pMachineCloseMenuAction;
  • trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserModel.cpp

    r42832 r42845  
    976976    m_pContextMenuGroup->addAction(gActionPool->action(UIActionIndexSelector_Simple_Common_CreateShortcut));
    977977    m_pContextMenuGroup->addSeparator();
    978     m_pContextMenuGroup->addAction(gActionPool->action(UIActionIndexSelector_Simple_Common_SortParent));
    979978    m_pContextMenuGroup->addAction(gActionPool->action(UIActionIndexSelector_Simple_Group_Sort));
    980979
     
    998997    m_pContextMenuMachine->addAction(gActionPool->action(UIActionIndexSelector_Simple_Common_CreateShortcut));
    999998    m_pContextMenuMachine->addSeparator();
    1000     m_pContextMenuMachine->addAction(gActionPool->action(UIActionIndexSelector_Simple_Common_SortParent));
     999    m_pContextMenuMachine->addAction(gActionPool->action(UIActionIndexSelector_Simple_Machine_SortParent));
    10011000
    10021001    connect(m_pContextMenuGroup, SIGNAL(hovered(QAction*)), this, SLOT(sltActionHovered(QAction*)));
     
    10131012    connect(gActionPool->action(UIActionIndexSelector_Simple_Machine_AddGroup), SIGNAL(triggered()),
    10141013            this, SLOT(sltAddGroupBasedOnChosenItems()));
    1015     connect(gActionPool->action(UIActionIndexSelector_Simple_Common_SortParent), SIGNAL(triggered()),
     1014    connect(gActionPool->action(UIActionIndexSelector_Simple_Machine_SortParent), SIGNAL(triggered()),
    10161015            this, SLOT(sltSortParentGroup()));
    10171016    connect(gActionPool->action(UIActionIndexSelector_Simple_Group_Sort), SIGNAL(triggered()),
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