summaryrefslogtreecommitdiff
path: root/libopie/otabwidget.h
authordrw <drw>2003-02-16 21:54:23 (UTC)
committer drw <drw>2003-02-16 21:54:23 (UTC)
commit8ecc375c803dc57b160bd0335891fcaf4f6de1df (patch) (side-by-side diff)
treea89c1ccc6e3a469bb8fa435dfedce9386333cb72 /libopie/otabwidget.h
parente0eb3f016d7f8a1e1e5548ef8aa115fef8999697 (diff)
downloadopie-8ecc375c803dc57b160bd0335891fcaf4f6de1df.zip
opie-8ecc375c803dc57b160bd0335891fcaf4f6de1df.tar.gz
opie-8ecc375c803dc57b160bd0335891fcaf4f6de1df.tar.bz2
Added changeTab() to OTabWidget to dynamically change tab name and/or icon (stumbled upon request for this in TinyKate todo)
Diffstat (limited to 'libopie/otabwidget.h') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie/otabwidget.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/libopie/otabwidget.h b/libopie/otabwidget.h
index 74d683b..0aa9bb8 100644
--- a/libopie/otabwidget.h
+++ b/libopie/otabwidget.h
@@ -81,96 +81,106 @@ public:
* @enum TabPosition
* @brief Defines where the widget selection control is drawn.
*
* Valid values:
* - Top: Widget selection control is drawn above widgets
* - Bottom: Widget selection control is drawn below widgets
*/
enum TabPosition { Top, Bottom };
/**
* @fn OTabWidget( QWidget *parent = 0, const char *name = 0, TabStyle s = Global, TabPosition p = Top )
* @brief Object constructor.
*
* @param parent Pointer to parent of this control.
* @param name Name of control.
* @param s Style of widget selection control.
* @param p Position of the widget selection control.
*
* Constructs a new OTabWidget control with parent and name. The style and position parameters
* determine how the widget selection control will be displayed.
*/
OTabWidget( QWidget * = 0, const char * = 0, TabStyle = Global, TabPosition = Top );
/**
* @fn ~OTabWidget()
* @brief Object destructor.
*/
~OTabWidget();
/**
* @fn addTab( QWidget *child, const QString &icon, const QString &label )
* @brief Add new widget to control.
*
* @param child Widget control.
* @param icon Path to icon.
* @param label Text label.
*/
void addTab( QWidget *, const QString &, const QString & );
/**
* @fn removePage( QWidget *widget )
* @brief Remove widget from control. Does not delete widget.
*
* @param widget Widget control to be removed.
*/
void removePage( QWidget * );
/**
+ * @fn changeTab( QWidget *widget, const QIconSet &icon, const QString &label )
+ * @brief Change text and/or icon for existing tab
+ *
+ * @param child Widget control.
+ * @param icon Path to icon.
+ * @param label Text label.
+ */
+ void changeTab( QWidget *, const QString &, const QString & );
+
+/**
* @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.