- Timestamp:
- Sep 29, 2016 1:58:02 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/settings/UISettingsSelector.cpp
r64084 r64091 96 96 /** Holds the item parent ID. */ 97 97 int m_iParentID; 98 }; 99 100 101 /** UISelectorItem subclass used as tab-widget selector item. */ 102 class UISelectorActionItem : public UISelectorItem 103 { 104 public: 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 130 protected: 131 132 /** Holds the action instance. */ 133 QAction *m_pAction; 134 /** Holds the tab-widget instance. */ 135 QTabWidget *m_pTabWidget; 98 136 }; 99 137 … … 396 434 *********************************************************************************************************************************/ 397 435 398 /** UISelectorItem subclass providing GUI399 * with the tab-widget selector item. */400 class UISelectorActionItem : public UISelectorItem401 {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 437 436 UISettingsSelectorToolBar::UISettingsSelectorToolBar(QWidget *pParent /* = 0 */) 438 437 : UISettingsSelector(pParent)
Note:
See TracChangeset
for help on using the changeset viewer.