-rw-r--r-- | libopie/otabwidget.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/libopie/otabwidget.h b/libopie/otabwidget.h index d61fe9e..74d683b 100644 --- a/libopie/otabwidget.h +++ b/libopie/otabwidget.h @@ -125,126 +125,141 @@ public: */ void removePage( QWidget * ); /** * @fn tabStyle() * @brief Returns current widget selection control style. */ TabStyle tabStyle() const; /** * @fn setTabStyle( TabStyle s ) * @brief Set the current widget selection control style. * * @param s New style to be used. */ void setTabStyle( TabStyle ); /** * @fn tabPosition() * @brief Returns current widget selection control position. */ TabPosition tabPosition() const; /** * @fn setTabPosition( TabPosition p ) * @brief Set the current widget selection control position. * * @param p New position of widget selection control. */ void setTabPosition( TabPosition ); /** * @fn setCurrentTab( QWidget *childwidget ) * @brief Selects and brings to top the desired widget by using widget pointer. * * @param childwidget Widget to select. */ void setCurrentTab( QWidget * ); /** * @fn setCurrentTab( const QString &tabname ) * @brief Selects and brings to top the desired widget, by using label. * * @param tabname Text label for widget to select. */ void setCurrentTab( const QString & ); /** + * @fn setCurrentTab( int ) + * @brief Selects and brings to top the desired widget, by using id. + * + * @param tab id for widget to select. + */ + void setCurrentTab(int); + +/** * @fn sizeHint() * @brief Reimplemented for internal purposes. */ QSize sizeHint() const; +/** + * @fn getCurrentTab( ) + * @brief returns current tab id. + */ + int getCurrentTab(); + protected: /** * @fn resizeEvent( QResizeEvent * ) * @brief Reimplemented for internal purposes. */ void resizeEvent( QResizeEvent * ); private: OTabInfoList tabs; OTabInfo *currentTab; TabStyle tabBarStyle; TabPosition tabBarPosition; QWidgetStack *tabBarStack; OTabBar *tabBar; QComboBox *tabList; QWidgetStack *widgetStack; /** * @fn loadSmooth( const QString &name ) * @brief Loads icon for widget. * * @param name Name of icon image file. */ QPixmap loadSmooth( const QString & ); /** * @fn selectTab( OTabInfo *tab ) * @brief Internal function to select desired widget. * * @param tab Pointer to data for widget. */ void selectTab( OTabInfo * ); /** * @fn setUpLayout() * @brief Internal function to adjust layout. */ void setUpLayout(); + signals: /** * @fn currentChanegd( QWidget *widget ) * @brief This signal is emitted whenever the widget has changed. * * @param widget Pointer to new current widget. */ void currentChanged( QWidget * ); private slots: /** * @fn slotTabBarSelected( int id ) * @brief Slot which is called when a tab is selected. * * @param id ID of widget selected. */ void slotTabBarSelected( int ); /** * @fn slotTabListSelected( int index ) * @brief Slot which is called when a drop down selection is made. * * @param id Index of widget selected. */ void slotTabListSelected( int ); }; #endif |