-rw-r--r-- | libopie/otabwidget.cpp | 9 | ||||
-rw-r--r-- | libopie/otabwidget.h | 11 |
2 files changed, 18 insertions, 2 deletions
diff --git a/libopie/otabwidget.cpp b/libopie/otabwidget.cpp index fe2c60f..1b8c085 100644 --- a/libopie/otabwidget.cpp +++ b/libopie/otabwidget.cpp | |||
@@ -407,4 +407,13 @@ int OTabWidget::currentTab() | |||
407 | } | 407 | } |
408 | return -1; | 408 | return -1; |
409 | } | 409 | } |
410 | 410 | ||
411 | QWidget* OTabWidget::currentWidget()const | ||
412 | { | ||
413 | if ( currTab ) | ||
414 | { | ||
415 | return currTab->control(); | ||
416 | } | ||
417 | |||
418 | return 0; | ||
419 | } | ||
diff --git a/libopie/otabwidget.h b/libopie/otabwidget.h index c140c0b..acb9223 100644 --- a/libopie/otabwidget.h +++ b/libopie/otabwidget.h | |||
@@ -123,8 +123,9 @@ public: | |||
123 | * @brief Remove widget from control. Does not delete widget. | 123 | * @brief Remove widget from control. Does not delete widget. |
124 | * | 124 | * |
125 | * @param widget Widget control to be removed. | 125 | * @param widget Widget control to be removed. |
126 | */ | 126 | */ |
127 | /* ### Page vs. Tab.. yes the widget is a Page but then is addTab wrong -zecke */ | ||
127 | void removePage( QWidget * ); | 128 | void removePage( QWidget * ); |
128 | 129 | ||
129 | /** | 130 | /** |
130 | * @fn changeTab( QWidget *widget, const QString &icon, const QString &label ) | 131 | * @fn changeTab( QWidget *widget, const QString &icon, const QString &label ) |
@@ -197,10 +198,16 @@ public: | |||
197 | /** | 198 | /** |
198 | * @fn currentTab( ) | 199 | * @fn currentTab( ) |
199 | * @brief returns current tab id. | 200 | * @brief returns current tab id. |
200 | */ | 201 | */ |
201 | int currentTab(); | 202 | // ### make const |
202 | 203 | int currentTab()/* const */; | |
204 | /** | ||
205 | * @brief returns the current page of the active tab | ||
206 | * | ||
207 | * @since 1.2 | ||
208 | */ | ||
209 | QWidget* currentWidget()const; | ||
203 | 210 | ||
204 | protected: | 211 | protected: |
205 | 212 | ||
206 | /** | 213 | /** |