VirtualBox

Ignore:
Timestamp:
Dec 6, 2016 5:02:35 PM (8 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:6899: Accessibility support (step 149): Simplifying UIApplianceEditorWidget tree-view according to r112160 changes.

Location:
trunk/src/VBox/Frontends/VirtualBox
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/Makefile.kmk

    r64750 r64794  
    556556        src/settings/machine/UIMachineSettingsStorage.cpp \
    557557        src/settings/machine/UIMachineSettingsUSB.cpp \
    558         src/widgets/UIApplianceEditorWidget.cpp \
    559558        src/widgets/UIHotKeyEditor.cpp \
    560559        src/widgets/UIMiniToolBar.cpp \
  • trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIApplianceEditorWidget.cpp

    r64756 r64794  
    4444
    4545#endif /* !VBOX_WITH_PRECOMPILED_HEADERS */
    46 
    47 /* Forward declarations: */
    48 class UIApplianceView;
    4946
    5047
     
    214211    /** Holds whether item was modified. */
    215212    bool                           m_fModified;
    216 };
    217 
    218 
    219 /** QITreeView subclass used as Storage-view. */
    220 class UIApplianceView : public QITreeView
    221 {
    222     Q_OBJECT;
    223 
    224 public:
    225 
    226     /** Constructs storage-view passing @a pParent to the base-class. */
    227     UIApplianceView(QWidget *pParent = 0) : QITreeView(pParent) {}
    228 
    229 protected:
    230 
    231     /** Returns the number of children. */
    232     virtual int childCount() const /* override */;
    233     /** Returns the child item with @a iIndex. */
    234     virtual QITreeViewItem *childItem(int iIndex) const /* override */;
    235213};
    236214
     
    13181296
    13191297/*********************************************************************************************************************************
    1320 *   Class UIApplianceView implementation.                                                                                        *
    1321 *********************************************************************************************************************************/
    1322 
    1323 int UIApplianceView::childCount() const
    1324 {
    1325     UIApplianceSortProxyModel *pSortProxyModel = qobject_cast<UIApplianceSortProxyModel*>(model());
    1326     AssertPtrReturn(pSortProxyModel, 0);
    1327     UIApplianceModel *pModel = qobject_cast<UIApplianceModel*>(pSortProxyModel->sourceModel());
    1328     AssertPtrReturn(pModel, 0);
    1329     return pModel->rowCount(pModel->root());
    1330 }
    1331 
    1332 QITreeViewItem *UIApplianceView::childItem(int iIndex) const
    1333 {
    1334     UIApplianceSortProxyModel *pSortProxyModel = qobject_cast<UIApplianceSortProxyModel*>(model());
    1335     AssertPtrReturn(pSortProxyModel, 0);
    1336     UIApplianceModel *pModel = qobject_cast<UIApplianceModel*>(pSortProxyModel->sourceModel());
    1337     AssertPtrReturn(pModel, 0);
    1338     return (UIApplianceModelItem*)pModel->index(iIndex, 0, pModel->root()).internalPointer();
    1339 }
    1340 
    1341 
    1342 /*********************************************************************************************************************************
    13431298*   Class UIApplianceEditorWidget implementation.                                                                                *
    13441299*********************************************************************************************************************************/
     
    13741329
    13751330                /* Create tree-view: */
    1376                 m_pTreeViewSettings = new UIApplianceView;
     1331                m_pTreeViewSettings = new QITreeView;
    13771332                {
    13781333                    /* Configure tree-view: */
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