VirtualBox

儲存庫 vbox 的更動 64749


忽略:
時間撮記:
2016-11-24 下午05:25:23 (8 年 以前)
作者:
vboxsync
訊息:

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

檔案:
修改 1 筆資料

圖例:

未更動
新增
刪除
  • 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
注意: 瀏覽 TracChangeset 來幫助您使用更動檢視器

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette