VirtualBox

Changeset 64491 in vbox for trunk/src/VBox/Frontends


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

FE/Qt: bugref:6899: Accessibility support (step 115): Settings: Storage page: Finally connect storage-view to accessibility interface.

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/extensions/QITreeView.cpp

    r64480 r64491  
    408408void QITreeView::prepare()
    409409{
    410 //    /* Install QITreeViewItem accessibility interface factory: */
    411 //    QAccessible::installFactory(QIAccessibilityInterfaceForQITreeViewItem::pFactory);
    412 //    /* Install QITreeView accessibility interface factory: */
    413 //    QAccessible::installFactory(QIAccessibilityInterfaceForQITreeView::pFactory);
     410    /* Install QITreeViewItem accessibility interface factory: */
     411    QAccessible::installFactory(QIAccessibilityInterfaceForQITreeViewItem::pFactory);
     412    /* Install QITreeView accessibility interface factory: */
     413    QAccessible::installFactory(QIAccessibilityInterfaceForQITreeView::pFactory);
    414414
    415415    /* Mark header hidden: */
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsStorage.cpp

    r64490 r64491  
    18581858}
    18591859
     1860/* Storage view */
     1861int StorageView::childCount() const
     1862{
     1863    StorageModel *pModel = qobject_cast<StorageModel*>(model());
     1864    AssertPtrReturn(pModel, 0);
     1865    return pModel->rowCount(pModel->root());
     1866}
     1867
     1868QITreeViewItem *StorageView::childItem(int iIndex) const
     1869{
     1870    StorageModel *pModel = qobject_cast<StorageModel*>(model());
     1871    AssertPtrReturn(pModel, 0);
     1872    return (AbstractItem*)pModel->index(iIndex, 0, pModel->root()).internalPointer();
     1873}
     1874
    18601875/* Storage Delegate */
    18611876StorageDelegate::StorageDelegate (QObject *aParent)
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsStorage.h

    r64490 r64491  
    582582    /** Constructs storage-view passing @a pParent to the base-class. */
    583583    StorageView(QWidget *pParent) : QITreeView(pParent) {}
     584
     585protected:
     586
     587    /** Returns the number of children. */
     588    virtual int childCount() const /* override */;
     589    /** Returns the child item with @a iIndex. */
     590    virtual QITreeViewItem *childItem(int iIndex) const /* override */;
    584591};
    585592
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