VirtualBox

Changeset 64489 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Oct 31, 2016 2:09:57 PM (8 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:6899: Accessibility support (step 113): Settings: Storage page: Move AbstractItem onto QITreeViewItem rails.

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  
    447447
    448448/* Abstract Item */
    449 AbstractItem::AbstractItem (AbstractItem *aParent)
    450     : mParent (aParent)
    451     , mId (QUuid::createUuid())
    452 {
    453     if (mParent) mParent->addChild (this);
     449AbstractItem::AbstractItem(AbstractItem *pParentItem)
     450    : QITreeViewItem(pParentItem)
     451    , m_pParentItem(pParentItem)
     452    , mId(QUuid::createUuid())
     453{
     454    if (m_pParentItem)
     455        m_pParentItem->addChild(this);
    454456}
    455457
    456458AbstractItem::~AbstractItem()
    457459{
    458     if (mParent) mParent->delChild (this);
     460    if (m_pParentItem)
     461        m_pParentItem->delChild(this);
    459462}
    460463
    461464AbstractItem* AbstractItem::parent() const
    462465{
    463     return mParent;
     466    return m_pParentItem;
    464467}
    465468
     
    566569{
    567570    /* 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"));
    569572
    570573    /* Select default type */
     
    763766{
    764767    /* 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"));
    766769
    767770    /* Select default slot */
     
    777780SlotsList AttachmentItem::attSlots() const
    778781{
    779     ControllerItem *ctr = static_cast <ControllerItem*> (mParent);
     782    ControllerItem *ctr = static_cast<ControllerItem*>(m_pParentItem);
    780783
    781784    /* Filter list from used slots */
     
    796799DeviceTypeList AttachmentItem::attDeviceTypes() const
    797800{
    798     return static_cast <ControllerItem*> (mParent)->ctrDeviceTypeList();
     801    return static_cast<ControllerItem*>(m_pParentItem)->ctrDeviceTypeList();
    799802}
    800803
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsStorage.h

    r64487 r64489  
    246246
    247247/* Abstract Item */
    248 class AbstractItem
    249 {
     248class AbstractItem : public QITreeViewItem
     249{
     250    Q_OBJECT;
     251
    250252public:
    251253
     
    258260    };
    259261
    260     AbstractItem (AbstractItem *aParent = 0);
     262    AbstractItem(AbstractItem *pParentItem = 0);
    261263    virtual ~AbstractItem();
    262264
     
    271273    virtual AbstractItem* childItemById (const QUuid &aId) const = 0;
    272274    virtual int posOfChild (AbstractItem *aItem) const = 0;
    273     virtual int childCount() const = 0;
    274     virtual QString text() const = 0;
    275275    virtual QString tip() const = 0;
    276276    virtual QPixmap pixmap (ItemState aState = State_DefaultItem) = 0;
     
    281281    virtual void delChild (AbstractItem *aItem) = 0;
    282282
    283     AbstractItem *mParent;
     283    AbstractItem *m_pParentItem;
    284284    QUuid         mId;
    285285    QString       mMachineId;
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