summaryrefslogtreecommitdiffstats
path: root/src/libgui/device_gui.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/libgui/device_gui.h')
-rw-r--r--src/libgui/device_gui.h84
1 files changed, 45 insertions, 39 deletions
diff --git a/src/libgui/device_gui.h b/src/libgui/device_gui.h
index a10c58a..53ad04f 100644
--- a/src/libgui/device_gui.h
+++ b/src/libgui/device_gui.h
@@ -9,11 +9,11 @@
#ifndef DEVICE_GUI_H
#define DEVICE_GUI_H
-#include <qpushbutton.h>
-#include <qlayout.h>
-#include <qcombobox.h>
-class QListViewItem;
-class QCheckBox;
+#include <tqpushbutton.h>
+#include <tqlayout.h>
+#include <tqcombobox.h>
+class TQListViewItem;
+class TQCheckBox;
#include <ktextbrowser.h>
class KListView;
@@ -50,22 +50,22 @@ template <typename Enum>
class EnumComboBox
{
public:
- EnumComboBox(const QString &key, QWidget *parent) : _key(key) {
- _combo = new QComboBox(parent);
+ EnumComboBox(const TQString &key, TQWidget *tqparent) : _key(key) {
+ _combo = new TQComboBox(tqparent);
for (Enum type; type<Enum::Nb_Types; ++type) _combo->insertItem(type.label());
Config config;
Enum type = config.readEnumEntry(key, Enum(Enum::Nb_Types));
if ( type!=Enum::Nb_Types ) _combo->setCurrentItem(type.type());
}
- EnumComboBox(const QString &emptyLabel, const QString &key, QWidget *parent) : _key(key) {
- _combo = new QComboBox(parent);
+ EnumComboBox(const TQString &emptyLabel, const TQString &key, TQWidget *tqparent) : _key(key) {
+ _combo = new TQComboBox(tqparent);
_combo->insertItem(emptyLabel);
for (Enum type; type<Enum::Nb_Types; ++type) _combo->insertItem(type.label());
Config config;
Enum type = config.readEnumEntry(key, Enum(Enum::Nb_Types));
if ( type!=Enum::Nb_Types ) _combo->setCurrentItem(type.type()+1);
}
- QComboBox *combo() { return _combo; }
+ TQComboBox *combo() { return _combo; }
Enum value() const {
if ( _combo->count()==Enum::Nb_Types ) return typename Enum::Type(_combo->currentItem());
if ( _combo->currentItem()==0 ) return Enum::Nb_Types;
@@ -78,50 +78,52 @@ public:
}
private:
- QString _key;
- QComboBox *_combo;
+ TQString _key;
+ TQComboBox *_combo;
};
//-----------------------------------------------------------------------------
class Dialog : public ::Dialog
{
Q_OBJECT
+ TQ_OBJECT
public:
- Dialog(const QString &device, Type type, QWidget *parent);
+ Dialog(const TQString &device, Type type, TQWidget *tqparent);
virtual ~Dialog();
- QString device() const;
+ TQString device() const;
private slots:
- void listDoubleClicked(QListViewItem *item);
- void currentChanged(QListViewItem *item);
- void deviceChange(const QString &device);
+ void listDoubleClicked(TQListViewItem *item);
+ void currentChanged(TQListViewItem *item);
+ void deviceChange(const TQString &device);
void updateList();
void resetFilters();
private:
bool _withAuto;
- KeyComboBox<QString> *_programmerCombo, *_toolCombo;
+ KeyComboBox<TQString> *_programmerCombo, *_toolCombo;
EnumComboBox<ListType> *_listTypeCombo;
EnumComboBox<Device::MemoryTechnology> *_memoryCombo;
- EnumComboBox<Device::Status> *_statusCombo;
+ EnumComboBox<Device::tqStatus> *_statusCombo;
EnumComboBox<Pic::Feature> *_featureCombo;
KListView *_listView;
View *_deviceView;
- void updateList(const QString &device);
+ void updateList(const TQString &device);
const Programmer::Group *programmerGroup() const;
const Tool::Group *toolGroup() const;
};
//-----------------------------------------------------------------------------
-class ComboBox : public QComboBox
+class ComboBox : public TQComboBox
{
Q_OBJECT
+ TQ_OBJECT
public:
- ComboBox(bool withAuto, QWidget *parent);
- void setDevice(const QString &device, const Device::Data *data = 0);
- QString device() const;
+ ComboBox(bool withAuto, TQWidget *tqparent);
+ void setDevice(const TQString &device, const Device::Data *data = 0);
+ TQString device() const;
bool withAuto() const { return _withAuto; }
private:
@@ -129,13 +131,14 @@ private:
};
//-----------------------------------------------------------------------------
-class Button : public QWidget
+class Button : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- Button(bool withAuto, QWidget *parent);
- void setDevice(const QString &device) { _combo->setDevice(device); }
- QString device() const { return _combo->device(); }
+ Button(bool withAuto, TQWidget *tqparent);
+ void setDevice(const TQString &device) { _combo->setDevice(device); }
+ TQString device() const { return _combo->device(); }
signals:
void changed();
@@ -151,31 +154,33 @@ private:
class Browser : public KTextBrowser
{
Q_OBJECT
+ TQ_OBJECT
public:
- Browser(QWidget *parent);
+ Browser(TQWidget *tqparent);
signals:
- void deviceChanged(const QString &device);
+ void deviceChanged(const TQString &device);
public slots:
- virtual void setSource(const QString &name);
+ virtual void setSource(const TQString &name);
};
//-----------------------------------------------------------------------------
class View : public TabWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- View(QWidget *parent);
+ View(TQWidget *tqparent);
void clear();
- void setText(const QString &text);
- void setDevice(const QString &name, bool cannotChangeDevice);
+ void setText(const TQString &text);
+ void setDevice(const TQString &name, bool cannotChangeDevice);
signals:
- void deviceChanged(const QString &device);
+ void deviceChanged(const TQString &device);
private:
- QMimeSourceFactory _msf;
+ TQMimeSourceFactory _msf;
Browser *_info, *_memory, *_vfg, *_pins;
};
@@ -183,8 +188,9 @@ private:
class Editor : public DeviceEditor
{
Q_OBJECT
+ TQ_OBJECT
public:
- Editor(const QString &title, const QString &tag, QWidget *parent);
+ Editor(const TQString &title, const TQString &tag, TQWidget *tqparent);
virtual bool isModified() const { return false; }
virtual bool isReadOnly() const { return true; }
virtual void addGui() {}
@@ -192,10 +198,10 @@ public:
virtual void setFocus() {}
signals:
- void deviceChanged(const QString &device);
+ void deviceChanged(const TQString &device);
private:
- virtual QWidget *createView(const Device::Data *data, QWidget *parent);
+ virtual TQWidget *createView(const Device::Data *data, TQWidget *tqparent);
virtual void setModifiedInternal(bool) {}
virtual void setReadOnlyInternal(bool) {}
};