Changeset 64489 in vbox for trunk/src/VBox
- Timestamp:
- Oct 31, 2016 2:09:57 PM (8 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/settings/machine
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsStorage.cpp
r64487 r64489 447 447 448 448 /* Abstract Item */ 449 AbstractItem::AbstractItem (AbstractItem *aParent) 450 : mParent (aParent) 451 , mId (QUuid::createUuid()) 452 { 453 if (mParent) mParent->addChild (this); 449 AbstractItem::AbstractItem(AbstractItem *pParentItem) 450 : QITreeViewItem(pParentItem) 451 , m_pParentItem(pParentItem) 452 , mId(QUuid::createUuid()) 453 { 454 if (m_pParentItem) 455 m_pParentItem->addChild(this); 454 456 } 455 457 456 458 AbstractItem::~AbstractItem() 457 459 { 458 if (mParent) mParent->delChild (this); 460 if (m_pParentItem) 461 m_pParentItem->delChild(this); 459 462 } 460 463 461 464 AbstractItem* AbstractItem::parent() const 462 465 { 463 return m Parent;466 return m_pParentItem; 464 467 } 465 468 … … 566 569 { 567 570 /* Check for proper parent type */ 568 AssertMsg (mParent->rtti() == AbstractItem::Type_RootItem, ("Incorrect parent type!\n"));571 AssertMsg(m_pParentItem->rtti() == AbstractItem::Type_RootItem, ("Incorrect parent type!\n")); 569 572 570 573 /* Select default type */ … … 763 766 { 764 767 /* Check for proper parent type */ 765 AssertMsg (mParent->rtti() == AbstractItem::Type_ControllerItem, ("Incorrect parent type!\n"));768 AssertMsg(m_pParentItem->rtti() == AbstractItem::Type_ControllerItem, ("Incorrect parent type!\n")); 766 769 767 770 /* Select default slot */ … … 777 780 SlotsList AttachmentItem::attSlots() const 778 781 { 779 ControllerItem *ctr = static_cast <ControllerItem*> (mParent);782 ControllerItem *ctr = static_cast<ControllerItem*>(m_pParentItem); 780 783 781 784 /* Filter list from used slots */ … … 796 799 DeviceTypeList AttachmentItem::attDeviceTypes() const 797 800 { 798 return static_cast <ControllerItem*> (mParent)->ctrDeviceTypeList();801 return static_cast<ControllerItem*>(m_pParentItem)->ctrDeviceTypeList(); 799 802 } 800 803 -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsStorage.h
r64487 r64489 246 246 247 247 /* Abstract Item */ 248 class AbstractItem 249 { 248 class AbstractItem : public QITreeViewItem 249 { 250 Q_OBJECT; 251 250 252 public: 251 253 … … 258 260 }; 259 261 260 AbstractItem (AbstractItem *aParent= 0);262 AbstractItem(AbstractItem *pParentItem = 0); 261 263 virtual ~AbstractItem(); 262 264 … … 271 273 virtual AbstractItem* childItemById (const QUuid &aId) const = 0; 272 274 virtual int posOfChild (AbstractItem *aItem) const = 0; 273 virtual int childCount() const = 0;274 virtual QString text() const = 0;275 275 virtual QString tip() const = 0; 276 276 virtual QPixmap pixmap (ItemState aState = State_DefaultItem) = 0; … … 281 281 virtual void delChild (AbstractItem *aItem) = 0; 282 282 283 AbstractItem *m Parent;283 AbstractItem *m_pParentItem; 284 284 QUuid mId; 285 285 QString mMachineId;
Note:
See TracChangeset
for help on using the changeset viewer.