|
|
// ########################################################################## // #### #### // #### RTP Audio Server Project #### // #### ============================ #### // #### #### // #### QInfoTabWidget #### // #### #### // #### Version 1.00 -- February 23, 2001 #### // #### #### // #### Copyright (C) 1999 Thomas Dreibholz #### // #### 2000 Universität Bonn, Abt. IV #### // #### 2001 EMail: Dreibholz@bigfoot.com #### // #### WWW: http://www.bigfoot.com/~dreibholz #### // #### #### // ########################################################################## #ifndef QINFOTABWIDGET_H #define QINFOTABWIDGET_H #include "system.h" #include <qapp.h> #if QT_VERSION < 200 #error QT Version 2.00 or better required!!! #endif #include <qlayout.h> #include <qpushbutton.h> #include <qtabwidget.h> #include <qwhatsthis.h> #include <qlabel.h> #include <qdict.h> #include <qlist.h> namespace Coral { /** * This structure describes a single info string for QInfoWidget * and QInfoTabWidget. * * @short InfoEntry * @author Thomas Dreibholz (Dreibholz@bigfoot.com) * @version 1.0 */ struct InfoEntry { /** * ID for update() call. * * @see QInfoWidget#update. * @see QInfoTabWidget#update */ const char* ID; /** * Title of the info string. */ const char* Title; /** * Help text for the info string. */ const char* Help; }; /** * This structure is a table of InfoEntries for QInfoWidget * and QInfoTabWidget. * * @short InfoTable * @author Thomas Dreibholz (Dreibholz@bigfoot.com) * @version 1.0 */ struct InfoTable { /** * Number of entries in the table. */ const cardinal Entries; /** * List of InfoEntries. */ const InfoEntry* Entry; }; /** * This class is a widget for displaying sets of info strings. * * @short QInfoWidget * @author Thomas Dreibholz (Dreibholz@bigfoot.com) * @version 1.0 */ class QInfoWidget : public QWidget { Q_OBJECT // ====== Constructor ==================================================== /** * Constructor. * * @param table InfoTable with info string descriptions. * @param parent Parent widget. * @param name Widget name. */ public: QInfoWidget(const InfoTable* table, QWidget* parent = NULL, const char* name = NULL); // ====== Update ========================================================= /** * Update string with given ID. * * @param id String ID. * @param value New value. */ bool update(const QString& id, const QString& value); /** * Clear all entries. */ void clear(); // ====== Private data =================================================== private: const InfoTable* Table; QWhatsThis* WhatsThis; QDict<QLabel> LabelDict; QList<QLabel> LabelList; }; /** * This class is a widget for displaying groups of sets of info strings. * * @short QInfoTabWidget * @author Thomas Dreibholz (Dreibholz@bigfoot.com) * @version 1.0 */ class QInfoTabWidget : public QTabWidget { Q_OBJECT // ====== Constructor ==================================================== /** * Constructor. * * @param table InfoTable with info string descriptions. * @param title Tab title. * @param pixmapName Name of pixmap for tab. * @param parent Parent widget. * @param name Widget name. */ public: QInfoTabWidget(const InfoTable* table, const char* title, const char* pixmapName = NULL, QWidget* parent = NULL, const char* name = NULL); // ====== Add InfoTable ================================================== /** * Add InfoTable to widget. * * @param table InfoTable with info string descriptions. * @param title Tab title. * @param pixmapName Name of pixmap for tab. */ QInfoWidget* addTable(const InfoTable* table, const char* title, const char* pixmapName = NULL); // ====== Update ========================================================= /** * Update string with given ID. * * @param id String ID. * @param value New value. */ bool update(const QString& id, const QString& value); /** * Clear all entries. */ void clear(); // ====== Private data =================================================== private: QList<QInfoWidget> InfoWidgetList; }; } #endif
Generated by: viper@odin on Fri Feb 23 12:41:26 2001, using kdoc 2.0a36. |