VirtualBox

Changeset 64266 in vbox


Ignore:
Timestamp:
Oct 13, 2016 4:57:28 PM (8 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
111279
Message:

FE/Qt: bugref:6899: Accessibility support (step 94): Preferences: Input page: Finally attach the UIHotKeyTable to accessibility support of the QITableView base-class.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsInput.cpp

    r64265 r64266  
    306306    UIHotKeyTableModel(QObject *pParent, UIActionPoolType type);
    307307
     308    /** Returns the number of children. */
     309    int childCount() const;
     310    /** Returns the child item with @a iIndex. */
     311    QITableViewRow *childItem(int iIndex);
     312
    308313    /* API: Loading/saving stuff: */
    309314    void load(const UIShortcutCache &shortcuts);
     
    355360    UIHotKeyTable(QWidget *pParent, UIHotKeyTableModel *pModel, const QString &strObjectName);
    356361
     362protected:
     363
     364    /** Returns the number of children. */
     365    virtual int childCount() const /* override */;
     366    /** Returns the child item with @a iIndex. */
     367    virtual QITableViewRow *childItem(int iIndex) const /* override */;
     368
    357369private slots:
    358370
     
    375387    , m_type(type)
    376388{
     389}
     390
     391int UIHotKeyTableModel::childCount() const
     392{
     393    /* Return row count: */
     394    return rowCount();
     395}
     396
     397QITableViewRow *UIHotKeyTableModel::childItem(int iIndex)
     398{
     399    /* Make sure index within the bounds: */
     400    AssertReturn(iIndex >= 0 && iIndex < m_filteredShortcuts.size(), 0);
     401    /* Return corresponding filtered row: */
     402    return &m_filteredShortcuts[iIndex];
    377403}
    378404
     
    699725}
    700726
     727int UIHotKeyTable::childCount() const
     728{
     729    /* Redirect request to table model: */
     730    return qobject_cast<UIHotKeyTableModel*>(model())->childCount();
     731}
     732
     733QITableViewRow *UIHotKeyTable::childItem(int iIndex) const
     734{
     735    /* Redirect request to table model: */
     736    return qobject_cast<UIHotKeyTableModel*>(model())->childItem(iIndex);
     737}
     738
    701739void UIHotKeyTable::sltHandleShortcutsLoaded()
    702740{
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