VirtualBox

Changeset 43592 in vbox


Ignore:
Timestamp:
Oct 10, 2012 1:31:57 PM (12 years ago)
Author:
vboxsync
Message:

FE/Qt: VM group feature UI: Group/machine item handling cleanup (part 2).

Location:
trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserModel.cpp

    r43590 r43592  
    521521void UIGChooserModel::startEditingGroupItemName()
    522522{
    523     sltStartEditingSelectedGroup();
     523    sltEditGroupName();
    524524}
    525525
     
    693693}
    694694
    695 void UIGChooserModel::sltAddGroupBasedOnChosenItems()
     695void UIGChooserModel::sltGroupSelectedMachines()
    696696{
    697697    /* Create new group in the current root: */
     
    713713                /* Add name to busy: */
    714714                busyGroupNames << pItem->name();
    715                 /* Copy or move group item: */
     715                /* Copy or move group-item: */
    716716                new UIGChooserItemGroup(pNewGroupItem, pItem->toGroupItem());
    717717                delete pItem;
     
    740740}
    741741
    742 void UIGChooserModel::sltStartEditingSelectedGroup()
     742void UIGChooserModel::sltEditGroupName()
    743743{
    744744    /* Check if action is enabled: */
     
    756756void UIGChooserModel::sltSortGroup()
    757757{
    758     if (isSingleGroupSelected())
    759         sortItems(currentItem());
    760 }
    761 
    762 void UIGChooserModel::sltRemoveCurrentlySelectedGroup()
     758    /* Only for single selected group: */
     759    if (!isSingleGroupSelected())
     760        return;
     761
     762    /* Sorting group: */
     763    sortItems(currentItem());
     764}
     765
     766void UIGChooserModel::sltUngroupSelectedGroup()
    763767{
    764768    /* Make sure focus item is of group type! */
     
    873877void UIGChooserModel::sltSortParentGroup()
    874878{
    875     if (!currentItems().isEmpty())
    876         sortItems(currentItem()->parentItem());
     879    /* Only if some item selected: */
     880    if (!currentItem())
     881        return;
     882
     883    /* Sorting parent group: */
     884    sortItems(currentItem()->parentItem());
    877885}
    878886
     
    910918}
    911919
    912 void UIGChooserModel::sltRemoveCurrentlySelectedMachine()
     920void UIGChooserModel::sltRemoveSelectedMachine()
    913921{
    914922    /* Enumerate all the selected machine-items: */
     
    11311139            this, SLOT(sltCreateNewMachine()));
    11321140    connect(gActionPool->action(UIActionIndexSelector_Simple_Group_Rename), SIGNAL(triggered()),
    1133             this, SLOT(sltStartEditingSelectedGroup()));
     1141            this, SLOT(sltEditGroupName()));
    11341142    connect(gActionPool->action(UIActionIndexSelector_Simple_Group_Remove), SIGNAL(triggered()),
    1135             this, SLOT(sltRemoveCurrentlySelectedGroup()));
     1143            this, SLOT(sltUngroupSelectedGroup()));
    11361144    connect(gActionPool->action(UIActionIndexSelector_Simple_Machine_Remove), SIGNAL(triggered()),
    1137             this, SLOT(sltRemoveCurrentlySelectedMachine()));
     1145            this, SLOT(sltRemoveSelectedMachine()));
    11381146    connect(gActionPool->action(UIActionIndexSelector_Simple_Machine_AddGroup), SIGNAL(triggered()),
    1139             this, SLOT(sltAddGroupBasedOnChosenItems()));
     1147            this, SLOT(sltGroupSelectedMachines()));
    11401148    connect(gActionPool->action(UIActionIndexSelector_Simple_Common_Refresh), SIGNAL(triggered()),
    11411149            this, SLOT(sltPerformRefreshAction()));
  • trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserModel.h

    r43565 r43592  
    175175
    176176    /* Handlers: Group-item stuff: */
    177     void sltAddGroupBasedOnChosenItems();
    178     void sltStartEditingSelectedGroup();
     177    void sltGroupSelectedMachines();
     178    void sltEditGroupName();
    179179    void sltSortGroup();
    180     void sltRemoveCurrentlySelectedGroup();
     180    void sltUngroupSelectedGroup();
    181181
    182182    /* Handlers: Machine-item stuff: */
     
    185185    void sltSortParentGroup();
    186186    void sltPerformRefreshAction();
    187     void sltRemoveCurrentlySelectedMachine();
     187    void sltRemoveSelectedMachine();
    188188
    189189    /* Handlers: Drag&drop stuff: */
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