Changeset 86742 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Oct 28, 2020 4:53:05 PM (4 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserAbstractModel.cpp
r86740 r86742 411 411 m_pInvisibleRootNode = new UIChooserNodeGroup(0 /* parent */, 412 412 0 /* position */, 413 true /* opened */,413 QUuid() /* id */, 414 414 QString() /* name */, 415 UIChooserNodeGroupType_Local); 415 UIChooserNodeGroupType_Local, 416 true /* opened */); 416 417 if (invisibleRoot()) 417 418 { … … 1078 1079 UIChooserNodeDataPrefixType_Provider, 1079 1080 strProviderShortName), 1081 uProviderId, 1082 strProviderShortName, 1083 UIChooserNodeGroupType_Provider, 1080 1084 shouldGroupNodeBeOpened(invisibleRoot(), 1081 1085 UIChooserNodeDataPrefixType_Provider, 1082 strProviderShortName), 1083 strProviderShortName, 1084 UIChooserNodeGroupType_Provider); 1086 strProviderShortName)); 1085 1087 pProviderNode->setProperty("id", uProviderId); 1086 1088 … … 1108 1110 UIChooserNodeDataPrefixType_Profile, 1109 1111 strProfileName), 1112 QUuid() /* id */, 1113 strProfileName, 1114 UIChooserNodeGroupType_Profile, 1110 1115 shouldGroupNodeBeOpened(pProviderNode, 1111 1116 UIChooserNodeDataPrefixType_Profile, 1112 strProfileName), 1113 strProfileName, 1114 UIChooserNodeGroupType_Profile); 1117 strProfileName)); 1115 1118 1116 1119 /* Add fake cloud VM item: */ … … 1250 1253 UIChooserNodeDataPrefixType_Local, 1251 1254 strSecondSubName), 1255 QUuid() /* id */, 1256 strSecondSubName, 1257 UIChooserNodeGroupType_Local, 1252 1258 fAllGroupsOpened || shouldGroupNodeBeOpened(pParentNode, 1253 1259 UIChooserNodeDataPrefixType_Local, 1254 strSecondSubName), 1255 strSecondSubName, 1256 UIChooserNodeGroupType_Local); 1260 strSecondSubName)); 1257 1261 return strSecondSuffix.isEmpty() ? pNewGroupNode : getLocalGroupNode(strFirstSuffix, pNewGroupNode, fAllGroupsOpened); 1258 1262 } -
trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserItemMachine.cpp
r84625 r86742 467 467 UIChooserNodeGroup *pNewGroupNode = new UIChooserNodeGroup(parentItem()->node(), 468 468 parentItem()->node()->nodes().size(), 469 true /* opened */,469 QUuid() /* id */, 470 470 UIChooserModel::uniqueGroupName(parentItem()->node()), 471 parentItem()->node()->toGroupNode()->groupType()); 471 parentItem()->node()->toGroupNode()->groupType(), 472 true /* opened */); 472 473 UIChooserItemGroup *pNewGroupItem = new UIChooserItemGroup(parentItem(), pNewGroupNode); 473 474 UIChooserNodeMachine *pNewMachineNode1 = new UIChooserNodeMachine(pNewGroupNode, -
trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserModel.cpp
r86731 r86742 791 791 pTargetGroupNode = new UIChooserNodeGroup(invisibleRoot(), 792 792 invisibleRoot()->nodes().size() /* position */, 793 true /* opened */,793 QUuid() /* id */, 794 794 uniqueGroupName(invisibleRoot()), 795 UIChooserNodeGroupType_Local); 795 UIChooserNodeGroupType_Local, 796 true /* opened */); 796 797 pTargetGroupItem = new UIChooserItemGroup(root(), pTargetGroupNode); 797 798 } -
trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserNodeGroup.cpp
r84625 r86742 28 28 UIChooserNodeGroup::UIChooserNodeGroup(UIChooserNode *pParent, 29 29 int iPosition, 30 bool fOpened,30 const QUuid &uId, 31 31 const QString &strName, 32 UIChooserNodeGroupType enmGroupType) 32 UIChooserNodeGroupType enmGroupType, 33 bool fOpened) 33 34 : UIChooserNode(pParent, false /* favorite */) 34 , m_ fOpened(fOpened)35 , m_uId(uId) 35 36 , m_strName(strName) 36 37 , m_enmGroupType(enmGroupType) 38 , m_fOpened(fOpened) 37 39 { 38 40 /* Add to parent: */ … … 48 50 UIChooserNodeGroup *pCopyFrom) 49 51 : UIChooserNode(pParent, false /* favorite */) 50 , m_ fOpened(pCopyFrom->isOpened())52 , m_uId(pCopyFrom->id()) 51 53 , m_strName(pCopyFrom->name()) 52 54 , m_enmGroupType(pCopyFrom->groupType()) 55 , m_fOpened(pCopyFrom->isOpened()) 53 56 { 54 57 /* Add to parent: */ … … 287 290 } 288 291 292 QUuid UIChooserNodeGroup::id() const 293 { 294 return m_uId; 295 } 296 289 297 void UIChooserNodeGroup::retranslateUi() 290 298 { -
trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserNodeGroup.h
r84625 r86742 34 34 35 35 /** Constructs chooser node passing @a pParent to the base-class. 36 * @param iPosition Brings the initial node position 37 * @param fOpened Brings whether this group node is opened..36 * @param iPosition Brings the initial node position. 37 * @param uId Brings current node id. 38 38 * @param strName Brings current node name. 39 * @param enmGroupType Brings group node type. */ 39 * @param enmGroupType Brings group node type. 40 * @param fOpened Brings whether this group node is opened. */ 40 41 UIChooserNodeGroup(UIChooserNode *pParent, 41 42 int iPosition, 42 bool fOpened,43 const QUuid &uId, 43 44 const QString &strName, 44 UIChooserNodeGroupType enmGroupType); 45 UIChooserNodeGroupType enmGroupType, 46 bool fOpened); 45 47 /** Constructs chooser node passing @a pParent to the base-class. 46 48 * @param iPosition Brings the initial node position. … … 108 110 virtual void sortNodes() /* override */; 109 111 112 /** Returns node group id. */ 113 QUuid id() const; 114 110 115 protected: 111 116 … … 118 123 void copyContents(UIChooserNodeGroup *pCopyFrom); 119 124 120 /** Holds whether node is opened. */121 bool m_fOpened;125 /** Holds the node id. */ 126 QUuid m_uId; 122 127 /** Holds the node name. */ 123 128 QString m_strName; 124 129 /** Holds the group node type. */ 125 130 UIChooserNodeGroupType m_enmGroupType; 131 /** Holds whether node is opened. */ 132 bool m_fOpened; 126 133 127 134 /** Holds group children. */
Note:
See TracChangeset
for help on using the changeset viewer.