summaryrefslogtreecommitdiffstats
path: root/src/common/gui/hexword_gui.h
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-30 00:15:53 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-30 00:15:53 +0000
commit0aaa8e3fc8f8a1481333b564f0922277c8d8ad59 (patch)
treeb95c0ca86c4876dd139af376b9f4afd8917cf0cd /src/common/gui/hexword_gui.h
parentb79a2c28534cf09987eeeba3077fff9236df182a (diff)
downloadpiklab-0aaa8e3fc8f8a1481333b564f0922277c8d8ad59.tar.gz
piklab-0aaa8e3fc8f8a1481333b564f0922277c8d8ad59.zip
TQt4 port piklab
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/piklab@1238822 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/common/gui/hexword_gui.h')
-rw-r--r--src/common/gui/hexword_gui.h27
1 files changed, 15 insertions, 12 deletions
diff --git a/src/common/gui/hexword_gui.h b/src/common/gui/hexword_gui.h
index 5da6840..f607f07 100644
--- a/src/common/gui/hexword_gui.h
+++ b/src/common/gui/hexword_gui.h
@@ -10,18 +10,19 @@
#ifndef HEXWORD_GUI_H
#define HEXWORD_GUI_H
-#include <qvalidator.h>
+#include <tqvalidator.h>
#include <klineedit.h>
#include "common/common/bitvalue.h"
//-----------------------------------------------------------------------------
-class HexValueValidator : public QValidator
+class HexValueValidator : public TQValidator
{
Q_OBJECT
+ TQ_OBJECT
public:
- HexValueValidator(uint nbChars, QObject *parent);
- virtual State validate(QString &input, int &pos) const;
+ HexValueValidator(uint nbChars, TQObject *tqparent);
+ virtual State validate(TQString &input, int &pos) const;
private:
uint _nbChars;
@@ -31,10 +32,11 @@ private:
class GenericHexWordEditor : public KLineEdit
{
Q_OBJECT
+ TQ_OBJECT
public:
- GenericHexWordEditor(uint nbChars, bool hasBlankValue, QWidget *parent);
- virtual QSize sizeHint() const;
- virtual QSize minimumSizeHint() const;
+ GenericHexWordEditor(uint nbChars, bool hasBlankValue, TQWidget *tqparent);
+ virtual TQSize tqsizeHint() const;
+ virtual TQSize tqminimumSizeHint() const;
signals:
void modified();
@@ -56,9 +58,9 @@ protected:
bool _hasBlankValue;
virtual bool isValid() const = 0;
- virtual BitValue mask() const = 0;
+ virtual BitValue tqmask() const = 0;
virtual BitValue normalizeWord(BitValue value) const = 0;
- virtual bool event(QEvent *e);
+ virtual bool event(TQEvent *e);
virtual void set();
virtual BitValue word() const = 0;
virtual void setWord(BitValue value) = 0;
@@ -69,8 +71,9 @@ protected:
class HexWordEditor : public GenericHexWordEditor
{
Q_OBJECT
+ TQ_OBJECT
public:
- HexWordEditor(uint nbChars, QWidget *parent) : GenericHexWordEditor(nbChars, false, parent) {}
+ HexWordEditor(uint nbChars, TQWidget *tqparent) : GenericHexWordEditor(nbChars, false, tqparent) {}
void setValue(BitValue word) { _word = word; set(); }
BitValue value() const { return _word; }
@@ -78,8 +81,8 @@ protected:
BitValue _word;
virtual bool isValid() const { return true; }
- virtual BitValue mask() const { return maxValue(NumberBase::Hex, _nbChars); }
- virtual BitValue normalizeWord(BitValue value) const { return value.maskWith(mask()); }
+ virtual BitValue tqmask() const { return maxValue(NumberBase::Hex, _nbChars); }
+ virtual BitValue normalizeWord(BitValue value) const { return value.tqmaskWith(tqmask()); }
virtual BitValue word() const { return _word; }
virtual void setWord(BitValue value) { _word = value; }
virtual BitValue blankValue() const { return 0; }