summaryrefslogtreecommitdiffstats
path: root/src/common/gui/key_gui.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/gui/key_gui.h')
-rw-r--r--src/common/gui/key_gui.h58
1 files changed, 29 insertions, 29 deletions
diff --git a/src/common/gui/key_gui.h b/src/common/gui/key_gui.h
index fb8a9f5..5ae0a84 100644
--- a/src/common/gui/key_gui.h
+++ b/src/common/gui/key_gui.h
@@ -9,9 +9,9 @@
#ifndef KEY_GUI_H
#define KEY_GUI_H
-#include <qcombobox.h>
-#include <qwidgetstack.h>
-#include <qpopupmenu.h>
+#include <tqcombobox.h>
+#include <tqwidgetstack.h>
+#include <tqpopupmenu.h>
#include "common/gui/misc_gui.h"
#include "common/common/misc.h"
@@ -21,10 +21,10 @@ template <typename KeyType, typename Type, typename WidgetType>
class KeyWidget
{
public:
- typedef QMapConstIterator<KeyType, int> ConstIterator;
+ typedef TQMapConstIterator<KeyType, int> ConstIterator;
public:
- KeyWidget(QWidget *parent) { _widget = new WidgetType(parent); }
+ KeyWidget(TQWidget *tqparent) { _widget = new WidgetType(tqparent); }
virtual ~KeyWidget() { delete _widget; }
virtual WidgetType *widget() { return _widget; }
virtual void clear() { _ids.clear(); }
@@ -32,16 +32,16 @@ public:
ConstIterator end() const { return _ids.end(); }
uint count() const { return _ids.count(); }
void appendItem(const KeyType &key, Type type) {
- CRASH_ASSERT( !_ids.contains(key) );
+ CRASH_ASSERT( !_ids.tqcontains(key) );
_ids[key] = append(type);
}
KeyType currentItem() const { return key(currentId()); }
void setCurrentItem(const KeyType &key) {
- if ( _ids.contains(key) ) setCurrentId(_ids[key]);
+ if ( _ids.tqcontains(key) ) setCurrentId(_ids[key]);
}
- bool contains(const KeyType &key) const { return _ids.contains(key); }
+ bool tqcontains(const KeyType &key) const { return _ids.tqcontains(key); }
Type item(const KeyType &key) const {
- CRASH_ASSERT( _ids.contains(key) );
+ CRASH_ASSERT( _ids.tqcontains(key) );
return get(_ids[key]);
}
Type item(ConstIterator it) const {
@@ -60,64 +60,64 @@ protected:
virtual void setCurrentId(int id) = 0;
virtual Type get(int id) const = 0;
- QWidget *_parent;
- QMap<KeyType, int> _ids;
+ TQWidget *_parent;
+ TQMap<KeyType, int> _ids;
WidgetType *_widget;
};
//-----------------------------------------------------------------------------
template <typename KeyType>
-class KeyComboBox : public KeyWidget<KeyType, QString, QComboBox>
+class KeyComboBox : public KeyWidget<KeyType, TQString, TQComboBox>
{
public:
- typedef KeyWidget<KeyType, QString, QComboBox> ParentType;
- KeyComboBox(QWidget *parent = 0) : ParentType(parent) {}
+ typedef KeyWidget<KeyType, TQString, TQComboBox> ParentType;
+ KeyComboBox(TQWidget *tqparent = 0) : ParentType(tqparent) {}
virtual void clear() {
ParentType::clear();
ParentType::_widget->clear();
}
void fixMinimumWidth() {
- ParentType::_widget->setMinimumWidth(ParentType::_widget->sizeHint().width());
+ ParentType::_widget->setMinimumWidth(ParentType::_widget->tqsizeHint().width());
}
protected:
- virtual int append(QString label) { ParentType::_widget->insertItem(label); return ParentType::_widget->count()-1; }
+ virtual int append(TQString label) { ParentType::_widget->insertItem(label); return ParentType::_widget->count()-1; }
virtual int currentId() const { return ParentType::_widget->currentItem(); }
virtual void setCurrentId(int id) { ParentType::_widget->setCurrentItem(id); }
- virtual QString get(int id) const { return ParentType::_widget->text(id); }
+ virtual TQString get(int id) const { return ParentType::_widget->text(id); }
};
//-----------------------------------------------------------------------------
template <typename KeyType>
-class KeyWidgetStack : public KeyWidget<KeyType, QWidget *, QWidgetStack>
+class KeyWidgetStack : public KeyWidget<KeyType, TQWidget *, TQWidgetStack>
{
public:
- typedef KeyWidget<KeyType, QWidget *, QWidgetStack> ParentType;
- KeyWidgetStack(QWidget *parent = 0) : ParentType(parent) {}
+ typedef KeyWidget<KeyType, TQWidget *, TQWidgetStack> ParentType;
+ KeyWidgetStack(TQWidget *tqparent = 0) : ParentType(tqparent) {}
protected:
- virtual int append(QWidget *widget) { return ParentType::_widget->addWidget(widget); }
+ virtual int append(TQWidget *widget) { return ParentType::_widget->addWidget(widget); }
virtual int currentId() const { return ParentType::_widget->id(ParentType::_widget->visibleWidget()); }
virtual void setCurrentId(int id) { ParentType::_widget->raiseWidget(id); }
- virtual QWidget *get(int id) const { return ParentType::_widget->widget(id); }
+ virtual TQWidget *get(int id) const { return ParentType::_widget->widget(id); }
};
//-----------------------------------------------------------------------------
template <typename KeyType>
-class KeyPopupButton : public KeyWidget<KeyType, QString, PopupButton>
+class KeyPopupButton : public KeyWidget<KeyType, TQString, PopupButton>
{
public:
- typedef KeyWidget<KeyType, QString, PopupButton> ParentType;
- KeyPopupButton(QWidget *parent = 0) : ParentType(parent) {}
+ typedef KeyWidget<KeyType, TQString, PopupButton> ParentType;
+ KeyPopupButton(TQWidget *tqparent = 0) : ParentType(tqparent) {}
protected:
- virtual int append(QString label) { return ParentType::_widget->appendItem(label, QPixmap()); }
- virtual QString get(int id) const { return ParentType::_widget->popup()->text(id); }
+ virtual int append(TQString label) { return ParentType::_widget->appendItem(label, TQPixmap()); }
+ virtual TQString get(int id) const { return ParentType::_widget->popup()->text(id); }
private:
// disabled
- QString currentItem() const;
- void setCurrentItem(const QString &key);
+ TQString currentItem() const;
+ void setCurrentItem(const TQString &key);
virtual int currentId() const { return 0; }
virtual void setCurrentId(int) {}
};