Changeset 83040 in vbox
- Timestamp:
- Feb 10, 2020 5:08:22 PM (5 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser
- Files:
-
- 8 edited
-
UIChooserItem.cpp (modified) (1 diff)
-
UIChooserNode.h (modified) (1 diff)
-
UIChooserNodeGlobal.cpp (modified) (1 diff)
-
UIChooserNodeGlobal.h (modified) (1 diff)
-
UIChooserNodeGroup.cpp (modified) (1 diff)
-
UIChooserNodeGroup.h (modified) (1 diff)
-
UIChooserNodeMachine.cpp (modified) (1 diff)
-
UIChooserNodeMachine.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserItem.cpp
r82968 r83040 495 495 return; 496 496 497 /* Initialize dragging: */ 498 QDrag *pDrag = new QDrag(pEvent->widget()); 499 model()->setCurrentDragObject(pDrag); 500 pDrag->setPixmap(toPixmap()); 501 pDrag->setMimeData(createMimeData()); 502 pDrag->exec(Qt::MoveAction | Qt::CopyAction, Qt::MoveAction); 497 /* Initialize dragging for local VMs only: */ 498 if (!m_pNode->hasAtLeastOneCloudNode()) 499 { 500 QDrag *pDrag = new QDrag(pEvent->widget()); 501 model()->setCurrentDragObject(pDrag); 502 pDrag->setPixmap(toPixmap()); 503 pDrag->setMimeData(createMimeData()); 504 pDrag->exec(Qt::MoveAction | Qt::CopyAction, Qt::MoveAction); 505 } 503 506 } 504 507 -
trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserNode.h
r82968 r83040 97 97 virtual void updateAllNodes(const QUuid &uId) = 0; 98 98 99 /** Returns whether this node is a cloud node itself 100 * or contains at least one cloud VM node child. */ 101 virtual bool hasAtLeastOneCloudNode() const = 0; 102 99 103 /** Returns node position. */ 100 104 int position(); -
trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserNodeGlobal.cpp
r82968 r83040 109 109 } 110 110 111 bool UIChooserNodeGlobal::hasAtLeastOneCloudNode() const 112 { 113 return false; 114 } 115 111 116 int UIChooserNodeGlobal::positionOf(UIChooserNode *pNode) 112 117 { -
trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserNodeGlobal.h
r82968 r83040 77 77 virtual void updateAllNodes(const QUuid &uId) /* override */; 78 78 79 /** Returns whether this node is a cloud node itself 80 * or contains at least one cloud VM node child. */ 81 virtual bool hasAtLeastOneCloudNode() const /* override */; 82 79 83 /** Returns position of specified node inside this one. */ 80 84 virtual int positionOf(UIChooserNode *pNode) /* override */; -
trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserNodeGroup.cpp
r82968 r83040 163 163 foreach (UIChooserNode *pNode, nodes()) 164 164 pNode->updateAllNodes(uId); 165 } 166 167 bool UIChooserNodeGroup::hasAtLeastOneCloudNode() const 168 { 169 foreach (UIChooserNode *pNode, m_nodesGroup) 170 if (pNode->hasAtLeastOneCloudNode()) 171 return true; 172 173 foreach (UIChooserNode *pNode, m_nodesMachine) 174 if (pNode->hasAtLeastOneCloudNode()) 175 return true; 176 177 return false; 165 178 } 166 179 -
trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserNodeGroup.h
r82968 r83040 79 79 virtual void updateAllNodes(const QUuid &uId) /* override */; 80 80 81 /** Returns whether this node is a cloud node itself 82 * or contains at least one cloud VM node child. */ 83 virtual bool hasAtLeastOneCloudNode() const /* override */; 84 81 85 /** Returns position of specified node inside this one. */ 82 86 virtual int positionOf(UIChooserNode *pNode) /* override */; -
trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserNodeMachine.cpp
r83000 r83040 161 161 } 162 162 163 bool UIChooserNodeMachine::hasAtLeastOneCloudNode() const 164 { 165 return cache()->itemType() != UIVirtualMachineItem::ItemType_Local; 166 } 167 163 168 int UIChooserNodeMachine::positionOf(UIChooserNode *pNode) 164 169 { -
trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserNodeMachine.h
r83000 r83040 95 95 virtual void updateAllNodes(const QUuid &uId) /* override */; 96 96 97 /** Returns whether this node is a cloud node itself 98 * or contains at least one cloud VM node child. */ 99 virtual bool hasAtLeastOneCloudNode() const /* override */; 100 97 101 /** Returns position of specified node inside this one. */ 98 102 virtual int positionOf(UIChooserNode *pNode) /* override */;
Note:
See TracChangeset
for help on using the changeset viewer.

