summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--libopie/otabwidget.cpp9
-rw-r--r--libopie/otabwidget.h11
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
@@ -409,2 +409,11 @@ int OTabWidget::currentTab()
}
+QWidget* OTabWidget::currentWidget()const
+{
+ if ( currTab )
+ {
+ return currTab->control();
+ }
+
+ return 0;
+}
diff --git a/libopie/otabwidget.h b/libopie/otabwidget.h
index c140c0b..acb9223 100644
--- a/libopie/otabwidget.h
+++ b/libopie/otabwidget.h
@@ -125,4 +125,5 @@ public:
* @param widget Widget control to be removed.
*/
+ /* ### Page vs. Tab.. yes the widget is a Page but then is addTab wrong -zecke */
void removePage( QWidget * );
@@ -199,6 +200,12 @@ public:
* @brief returns current tab id.
*/
- int currentTab();
-
+ // ### make const
+ int currentTab()/* const */;
+/**
+ * @brief returns the current page of the active tab
+ *
+ * @since 1.2
+ */
+ QWidget* currentWidget()const;
protected: