VirtualBox

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


Ignore:
Timestamp:
May 27, 2020 11:56:13 AM (5 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
138287
Message:

FE/Qt: bugref:9653: VirtualBox Manager: Chooser pane: A possibility to move group items to existing group with certain name; Not used for now, just interface implementation.

Location:
trunk/src/VBox/Frontends/VirtualBox/src/manager
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManagerWidget.cpp

    r84545 r84557  
    139139{
    140140    return m_pPaneChooser->possibleGroupsForMachineToMove(uId);
     141}
     142
     143QStringList UIVirtualBoxManagerWidget::possibleGroupsForGroupToMove(const QString &strFullName)
     144{
     145    return m_pPaneChooser->possibleGroupsForGroupToMove(strFullName);
    141146}
    142147
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManagerWidget.h

    r84545 r84557  
    148148        /** Moves machine to a group with certain @a strName. */
    149149        void moveMachineToGroup(const QString &strName = QString());
    150         /** Returns possible groups for VM with passed @a uId to move to. */
     150        /** Returns possible groups for machine with passed @a uId to move to. */
    151151        QStringList possibleGroupsForMachineToMove(const QUuid &uId);
     152        /** Returns possible groups for group with passed @a strFullName to move to. */
     153        QStringList possibleGroupsForGroupToMove(const QString &strFullName);
    152154        /** Refreshes machine. */
    153155        void refreshMachine();
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooser.cpp

    r84545 r84557  
    141141    AssertPtrReturn(model(), QStringList());
    142142    return model()->possibleGroupNodeNamesForMachineNodeToMove(uId);
     143}
     144
     145QStringList UIChooser::possibleGroupsForGroupToMove(const QString &strFullName)
     146{
     147    AssertPtrReturn(model(), QStringList());
     148    return model()->possibleGroupNodeNamesForGroupNodeToMove(strFullName);
    143149}
    144150
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooser.h

    r84545 r84557  
    142142        /** Moves machine to a group with certain @a strName. */
    143143        void moveMachineToGroup(const QString &strName);
    144         /** Returns possible groups for VM with passed @a uId to move to. */
     144        /** Returns possible groups for machine with passed @a uId to move to. */
    145145        QStringList possibleGroupsForMachineToMove(const QUuid &uId);
     146        /** Returns possible groups for group with passed @a strFullName to move to. */
     147        QStringList possibleGroupsForGroupToMove(const QString &strFullName);
    146148        /** Refreshes machine. */
    147149        void refreshMachine();
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserAbstractModel.cpp

    r84545 r84557  
    526526    /* Return group nodes starting from root one: */
    527527    return gatherPossibleGroupNodeNames(invisibleRoot(), machineNodes);
     528}
     529
     530QStringList UIChooserAbstractModel::possibleGroupNodeNamesForGroupNodeToMove(const QString &strFullName)
     531{
     532    /* Search for all the group nodes with passed full-name: */
     533    QList<UIChooserNode*> groupNodes;
     534    invisibleRoot()->searchForNodes(strFullName,
     535                                    UIChooserItemSearchFlag_LocalGroup | UIChooserItemSearchFlag_ExactId,
     536                                    groupNodes);
     537
     538    /* Return group nodes starting from root one: */
     539    return gatherPossibleGroupNodeNames(invisibleRoot(), groupNodes);
    528540}
    529541
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserAbstractModel.h

    r84545 r84557  
    8080        void wipeOutEmptyGroups();
    8181
    82         /** Returns possible group node names for VM node with passed @a uId to move to. */
     82        /** Returns possible group node names for machine node with passed @a uId to move to. */
    8383        QStringList possibleGroupNodeNamesForMachineNodeToMove(const QUuid &uId);
     84        /** Returns possible group node names for group node with passed @a strFullName to move to. */
     85        QStringList possibleGroupNodeNamesForGroupNodeToMove(const QString &strFullName);
    8486
    8587        /** Generates unique group name traversing recursively starting from @a pRoot. */
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette