From d34e9bd43cab9fa296ee24dff173e86d5cf9954a Mon Sep 17 00:00:00 2001 From: zecke Date: Sat, 30 Aug 2003 20:26:05 +0000 Subject: Add comments about API changes when possible again Add currentWidget() method and mark it as since 1.2 --- diff --git a/libopie/otabwidget.cpp b/libopie/otabwidget.cpp index fe2c60f..1b8c085 100644 --- a/libopie/otabwidget.cpp +++ b/libopie/otabwidget.cpp @@ -408,3 +408,12 @@ int OTabWidget::currentTab() return -1; } +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 @@ -124,6 +124,7 @@ 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 * ); /** @@ -198,8 +199,14 @@ public: * @fn currentTab( ) * @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: -- cgit v0.9.0.2