VirtualBox

Ignore:
Timestamp:
Nov 24, 2016 5:25:23 PM (8 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:6899: Accessibility support (step 141): Move UIApplianceModelItem onto QITreeViewItem rails.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIApplianceEditorWidget.cpp

    r64748 r64749  
    4848/** Describes the interface of Appliance item.
    4949  * Represented as a tree structure with a parent & multiple children. */
    50 class UIApplianceModelItem
     50class UIApplianceModelItem : public QITreeViewItem
    5151{
    5252public:
     
    6868    void appendChild(UIApplianceModelItem *pChildItem);
    6969    /** Returns the child specified by the @a iIndex. */
    70     UIApplianceModelItem *childItem(int iIndex) const;
     70    virtual UIApplianceModelItem *childItem(int iIndex) const /* override */;
    7171
    7272    /** Returns the row of the item in the parent. */
     
    7474
    7575    /** Returns the number of children. */
    76     int childCount() const;
     76    virtual int childCount() const /* override */;
    7777    /** Returns the number of columns. */
    7878    int columnCount() const { return 3; }
     79
     80    /** Returns the item text. */
     81    virtual QString text() const /* override */;
    7982
    8083    /** Returns the item flags for the given @a iColumn. */
     
    215218*********************************************************************************************************************************/
    216219
    217 UIApplianceModelItem::UIApplianceModelItem(int iNumber, ApplianceModelItemType enmType, QITreeView * /* pParent */)
    218     : m_iNumber(iNumber)
     220UIApplianceModelItem::UIApplianceModelItem(int iNumber, ApplianceModelItemType enmType, QITreeView *pParent)
     221    : QITreeViewItem(pParent)
     222    , m_iNumber(iNumber)
    219223    , m_enmType(enmType)
    220224    , m_pParentItem(0)
     
    223227
    224228UIApplianceModelItem::UIApplianceModelItem(int iNumber, ApplianceModelItemType enmType, UIApplianceModelItem *pParentItem)
    225     : m_iNumber(iNumber)
     229    : QITreeViewItem(pParentItem)
     230    , m_iNumber(iNumber)
    226231    , m_enmType(enmType)
    227232    , m_pParentItem(pParentItem)
     
    256261{
    257262    return m_childItems.count();
     263}
     264
     265QString UIApplianceModelItem::text() const
     266{
     267    return data(ApplianceViewSection_Description, Qt::DisplayRole).toString();
    258268}
    259269
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