VirtualBox

Changeset 64091 in vbox for trunk/src


Ignore:
Timestamp:
Sep 29, 2016 1:58:02 PM (8 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:6899: Accessibility support (step 62): Continuing with the r111025.

File:
1 edited

Legend:

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

    r64084 r64091  
    9696    /** Holds the item parent ID. */
    9797    int m_iParentID;
     98};
     99
     100
     101/** UISelectorItem subclass used as tab-widget selector item. */
     102class UISelectorActionItem : public UISelectorItem
     103{
     104public:
     105
     106    /** Constructs selector item.
     107      * @param  icon       Brings the item icon.
     108      * @param  strText    Brings the item text.
     109      * @param  iID        Brings the item ID.
     110      * @param  strLink    Brings the item link.
     111      * @param  pPage      Brings the item page reference.
     112      * @param  iParentID  Brings the item parent ID.
     113      * @param  pParent    Brings the item parent. */
     114    UISelectorActionItem(const QIcon &icon, const QString &strText, int iID, const QString &strLink, UISettingsPage *pPage, int iParentID, QObject *pParent)
     115        : UISelectorItem(icon, strText, iID, strLink, pPage, iParentID)
     116        , m_pAction(new QAction(icon, strText, pParent))
     117        , m_pTabWidget(0)
     118    {
     119        m_pAction->setCheckable(true);
     120    }
     121
     122    /** Returns the action instance. */
     123    QAction *action() const { return m_pAction; }
     124
     125    /** Defines the @a pTabWidget instance. */
     126    void setTabWidget(QTabWidget *pTabWidget) { m_pTabWidget = pTabWidget; }
     127    /** Returns the tab-widget instance. */
     128    QTabWidget *tabWidget() const { return m_pTabWidget; }
     129
     130protected:
     131
     132    /** Holds the action instance. */
     133    QAction *m_pAction;
     134    /** Holds the tab-widget instance. */
     135    QTabWidget *m_pTabWidget;
    98136};
    99137
     
    396434*********************************************************************************************************************************/
    397435
    398 /** UISelectorItem subclass providing GUI
    399   * with the tab-widget selector item. */
    400 class UISelectorActionItem : public UISelectorItem
    401 {
    402 public:
    403 
    404     /** Constructs selector item.
    405       * @param  icon       Brings the item icon.
    406       * @param  strText    Brings the item text.
    407       * @param  iID        Brings the item ID.
    408       * @param  strLink    Brings the item link.
    409       * @param  pPage      Brings the item page reference.
    410       * @param  iParentID  Brings the item parent ID.
    411       * @param  pParent    Brings the item parent. */
    412     UISelectorActionItem(const QIcon &icon, const QString &strText, int iID, const QString &strLink, UISettingsPage *pPage, int iParentID, QObject *pParent)
    413         : UISelectorItem(icon, strText, iID, strLink, pPage, iParentID)
    414         , m_pAction(new QAction(icon, strText, pParent))
    415         , m_pTabWidget(0)
    416     {
    417         m_pAction->setCheckable(true);
    418     }
    419 
    420     /** Returns the action instance. */
    421     QAction *action() const { return m_pAction; }
    422 
    423     /** Defines the @a pTabWidget instance. */
    424     void setTabWidget(QTabWidget *pTabWidget) { m_pTabWidget = pTabWidget; }
    425     /** Returns the tab-widget instance. */
    426     QTabWidget *tabWidget() const { return m_pTabWidget; }
    427 
    428 protected:
    429 
    430     /** Holds the action instance. */
    431     QAction *m_pAction;
    432     /** Holds the tab-widget instance. */
    433     QTabWidget *m_pTabWidget;
    434 };
    435 
    436 
    437436UISettingsSelectorToolBar::UISettingsSelectorToolBar(QWidget *pParent /* = 0 */)
    438437    : UISettingsSelector(pParent)
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