From 0aaa8e3fc8f8a1481333b564f0922277c8d8ad59 Mon Sep 17 00:00:00 2001 From: tpearson Date: Thu, 30 Jun 2011 00:15:53 +0000 Subject: 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 --- src/common/gui/hexword_gui.h | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) (limited to 'src/common/gui/hexword_gui.h') 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 +#include #include #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; } -- cgit v1.2.1