VirtualBox

Changeset 64080 in vbox


Ignore:
Timestamp:
Sep 28, 2016 1:12:04 PM (8 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
111016
Message:

FE/Qt: bugref:6899: Accessibility support (step 58): Continuing with the r110986.

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

Legend:

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

    r64058 r64080  
    3737
    3838
    39 /** Tree-widget column categories. */
     39/** Tree-widget column sections. */
    4040enum
    4141{
     
    5151public:
    5252
     53    /** Constructs selector item.
     54      * @param  aIcon      Brings the item icon.
     55      * @param  aText      Brings the item text.
     56      * @param  aId        Brings the item ID.
     57      * @param  aLink      Brings the item link.
     58      * @param  aPage      Brings the item page reference.
     59      * @param  aParentId  Brings the item parent ID. */
    5360    SelectorItem (const QIcon &aIcon, const QString &aText, int aId, const QString &aLink, UISettingsPage* aPage, int aParentId)
    5461        : mIcon (aIcon)
     
    6067    {}
    6168
     69    /** Returns the item icon. */
    6270    QIcon icon() const { return mIcon; }
     71    /** Returns the item text. */
    6372    QString text() const { return mText; }
     73    /** Defines the item @s strText. */
    6474    void setText (const QString &aText) { mText = aText; }
     75    /** Returns the item ID. */
    6576    int id() const { return mId; }
     77    /** Returns the item link. */
    6678    QString link() const { return mLink; }
     79    /** Returns the item page reference. */
    6780    UISettingsPage *page() const { return mPage; }
     81    /** Returns the item parent ID. */
    6882    int parentId() const { return mParentId; }
    6983
    7084protected:
    7185
     86    /** Holds the item icon. */
    7287    QIcon mIcon;
     88    /** Holds the item text. */
    7389    QString mText;
     90    /** Holds the item ID. */
    7491    int mId;
     92    /** Holds the item link. */
    7593    QString mLink;
     94    /** Holds the item page reference. */
    7695    UISettingsPage* mPage;
     96    /** Holds the item parent ID. */
    7797    int mParentId;
    7898};
     
    194214{
    195215    mTwSelector = new QITreeWidget (aParent);
    196     /* Configure the selector */
     216    /* Configure the selector: */
    197217    QSizePolicy sizePolicy (QSizePolicy::Minimum, QSizePolicy::Expanding);
    198218    sizePolicy.setHorizontalStretch (0);
     
    207227    mTwSelector->setUniformRowHeights (true);
    208228    mTwSelector->setIconSize(QSize((int)(1.5 * iIconMetric), (int)(1.5 * iIconMetric)));
    209     /* Add the columns */
     229    /* Add the columns: */
    210230    mTwSelector->headerItem()->setText (treeWidget_Category, "Category");
    211231    mTwSelector->headerItem()->setText (treeWidget_Id, "[id]");
    212232    mTwSelector->headerItem()->setText (treeWidget_Link, "[link]");
    213     /* Hide unnecessary columns and header */
     233    /* Hide unnecessary columns and header: */
    214234    mTwSelector->header()->hide();
    215235    mTwSelector->hideColumn (treeWidget_Id);
    216236    mTwSelector->hideColumn (treeWidget_Link);
    217     /* Setup connections */
     237    /* Setup connections: */
    218238    connect (mTwSelector, SIGNAL (currentItemChanged (QTreeWidgetItem*, QTreeWidgetItem*)),
    219239             this, SLOT (settingsGroupChanged (QTreeWidgetItem *, QTreeWidgetItem*)));
     
    373393public:
    374394
     395    /** Constructs selector item.
     396      * @param  aIcon      Brings the item icon.
     397      * @param  aText      Brings the item text.
     398      * @param  aId        Brings the item ID.
     399      * @param  aLink      Brings the item link.
     400      * @param  aPage      Brings the item page reference.
     401      * @param  aParentId  Brings the item parent ID.
     402      * @param  aParent    Brings the item parent. */
    375403    SelectorActionItem (const QIcon &aIcon, const QString &aText, int aId, const QString &aLink, UISettingsPage* aPage, int aParentId, QObject *aParent)
    376404        : SelectorItem (aIcon, aText, aId, aLink, aPage, aParentId)
     
    381409    }
    382410
     411    /** Returns the action instance. */
    383412    QAction *action() const { return mAction; }
    384413
     414    /** Defines the @a pTabWidget instance. */
    385415    void setTabWidget (QTabWidget *aTabWidget) { mTabWidget = aTabWidget; }
     416    /** Returns the tab-widget instance. */
    386417    QTabWidget *tabWidget() const { return mTabWidget; }
    387418
    388419protected:
    389420
     421    /** Holds the action instance. */
    390422    QAction *mAction;
     423    /** Holds the tab-widget instance. */
    391424    QTabWidget *mTabWidget;
    392425};
     
    396429    : UISettingsSelector (aParent)
    397430{
    398     /* Init the toolbar */
     431    /* Init the toolbar: */
    399432    mTbSelector = new UIToolBar (aParent);
    400433    mTbSelector->setUseTextLabels (true);
     
    403436    mTbSelector->setShowToolBarButton (false);
    404437#endif /* VBOX_WS_MAC */
    405     /* Init the action group for house keeping */
     438    /* Init the action group for house keeping: */
    406439    mActionGroup = new QActionGroup (this);
    407440    mActionGroup->setExclusive (true);
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/UISettingsSelector.h

    r64058 r64080  
    103103signals:
    104104
    105     /** Notifies listeners about selector section changed. */
    106     void categoryChanged (int);
     105    /** Notifies listeners about selector @a iCategory changed. */
     106    void categoryChanged (int iCategory);
    107107
    108108protected:
     
    186186    QString idToString (int aId) const;
    187187
    188     /** Holds the tree-widget selector instance. */
     188    /** Holds the tree-widget instance. */
    189189    QITreeWidget *mTwSelector;
    190190};
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