VirtualBox

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


Ignore:
Timestamp:
Oct 17, 2016 4:55:33 PM (8 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
111356
Message:

FE/Qt: bugref:6899: Accessibility support (step 97): Preferences: Extension page: Move tree-widget stuff onto QITreeWidget rails.

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

Legend:

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

    r62493 r64305  
    4040
    4141/* Extension package item: */
    42 class UIExtensionPackageItem : public QTreeWidgetItem
     42class UIExtensionPackageItem : public QITreeWidgetItem
    4343{
    4444public:
    4545
    46     /* Extension package item type: */
    47     enum { UIItemType = QTreeWidgetItem::UserType + 1 };
    48 
    4946    /* Extension package item constructor: */
    50     UIExtensionPackageItem(QTreeWidget *pParent, const UISettingsCacheGlobalExtensionItem &data)
    51         : QTreeWidgetItem(pParent, UIItemType)
     47    UIExtensionPackageItem(QITreeWidget *pParent, const UISettingsCacheGlobalExtensionItem &data)
     48        : QITreeWidgetItem(pParent)
    5249        , m_data(data)
    5350    {
     
    8178
    8279    QString name() const { return m_data.m_strName; }
     80
     81    /** Returns default text. */
     82    virtual QString defaultText() const /* override */
     83    {
     84        /* Return 2nd cell text as default: */
     85        return text(1);
     86    }
    8387
    8488private:
     
    402406    /* Get current item: */
    403407    UIExtensionPackageItem *pItem = m_pPackagesTree &&
    404                                     m_pPackagesTree->currentItem() &&
    405                                     m_pPackagesTree->currentItem()->type() == UIExtensionPackageItem::UIItemType ?
     408                                    m_pPackagesTree->currentItem() ?
    406409                                    static_cast<UIExtensionPackageItem*>(m_pPackagesTree->currentItem()) : 0;
    407410
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsExtension.ui

    r62495 r64305  
    3939      </property>
    4040      <item>
    41        <widget class="QTreeWidget" name="m_pPackagesTree">
     41       <widget class="QITreeWidget" name="m_pPackagesTree">
    4242        <property name="sizePolicy">
    4343         <sizepolicy vsizetype="MinimumExpanding" hsizetype="MinimumExpanding">
     
    9494   <header>UIToolBar.h</header>
    9595  </customwidget>
     96  <customwidget>
     97   <class>QITreeWidget</class>
     98   <extends>QTreeWidget</extends>
     99   <header>QITreeWidget.h</header>
     100  </customwidget>
    96101 </customwidgets>
    97102 <resources/>
Note: See TracChangeset for help on using the changeset viewer.

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