diff options
Diffstat (limited to 'src/common/gui/config_widget.h')
-rw-r--r-- | src/common/gui/config_widget.h | 45 |
1 files changed, 23 insertions, 22 deletions
diff --git a/src/common/gui/config_widget.h b/src/common/gui/config_widget.h index abfafab..787780b 100644 --- a/src/common/gui/config_widget.h +++ b/src/common/gui/config_widget.h @@ -10,10 +10,10 @@ #ifndef CONFIG_WIDGET_H #define CONFIG_WIDGET_H -#include <qpixmap.h> -#include <qcheckbox.h> -#include <qvaluevector.h> -#include <qvariant.h> +#include <tqpixmap.h> +#include <tqcheckbox.h> +#include <tqvaluevector.h> +#include <tqvariant.h> #include "container.h" @@ -21,11 +21,12 @@ class ConfigWidget : public Container { Q_OBJECT + TQ_OBJECT public: - ConfigWidget(QWidget *parent = 0) : Container(parent) {} - virtual QString title() const { return QString::null; } - virtual QString header() const { return QString::null; } - virtual QPixmap pixmap() const { return QPixmap(); } + ConfigWidget(TQWidget *tqparent = 0) : Container(tqparent) {} + virtual TQString title() const { return TQString(); } + virtual TQString header() const { return TQString(); } + virtual TQPixmap pixmap() const { return TQPixmap(); } public slots: virtual void loadConfig() = 0; @@ -52,40 +53,40 @@ public: } private: - QValueVector<QWidget *> _widgets; + TQValueVector<TQWidget *> _widgets; - static QWidget *createWidget(Type type, ConfigWidget *widget) { - QWidget *w = 0; + static TQWidget *createWidget(Type type, ConfigWidget *widget) { + TQWidget *w = 0; uint row = widget->numRows(); switch (type.data().defValue.type()) { - case QVariant::Bool: - w = new QCheckBox(type.label(), widget); + case TQVariant::Bool: + w = new TQCheckBox(type.label(), widget); widget->addWidget(w, row,row, 0,1); break; default: Q_ASSERT(false); break; } return w; } - void load(Type type, QWidget *widget) const { + void load(Type type, TQWidget *widget) const { switch (type.data().defValue.type()) { - case QVariant::Bool: - static_cast<QCheckBox *>(widget)->setChecked(readConfigEntry(type).toBool()); + case TQVariant::Bool: + static_cast<TQCheckBox *>(widget)->setChecked(readConfigEntry(type).toBool()); break; default: Q_ASSERT(false); break; } } - void save(Type type, QWidget *widget) { + void save(Type type, TQWidget *widget) { switch (type.data().defValue.type()) { - case QVariant::Bool: - writeConfigEntry(type, QVariant(static_cast<QCheckBox *>(widget)->isChecked(), 0)); + case TQVariant::Bool: + writeConfigEntry(type, TQVariant(static_cast<TQCheckBox *>(widget)->isChecked(), 0)); break; default: Q_ASSERT(false); break; } } - void setDefault(Type type, QWidget *widget) const { + void setDefault(Type type, TQWidget *widget) const { switch (type.data().defValue.type()) { - case QVariant::Bool: - static_cast<QCheckBox *>(widget)->setChecked(type.data().defValue.toBool()); + case TQVariant::Bool: + static_cast<TQCheckBox *>(widget)->setChecked(type.data().defValue.toBool()); break; default: Q_ASSERT(false); break; } |