summaryrefslogtreecommitdiffstats
path: root/src/common/gui/hexword_gui.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/gui/hexword_gui.cpp')
-rw-r--r--src/common/gui/hexword_gui.cpp44
1 files changed, 22 insertions, 22 deletions
diff --git a/src/common/gui/hexword_gui.cpp b/src/common/gui/hexword_gui.cpp
index d794a11..b85e829 100644
--- a/src/common/gui/hexword_gui.cpp
+++ b/src/common/gui/hexword_gui.cpp
@@ -9,16 +9,16 @@
***************************************************************************/
#include "hexword_gui.h"
-#include <qtimer.h>
+#include <tqtimer.h>
#include "common/gui/number_gui.h"
#include "common/common/misc.h"
//-----------------------------------------------------------------------------
-HexValueValidator::HexValueValidator(uint nbChars, QObject *parent)
- : QValidator(parent, "hex_value_validator"), _nbChars(nbChars) {}
+HexValueValidator::HexValueValidator(uint nbChars, TQObject *tqparent)
+ : TQValidator(tqparent, "hex_value_validator"), _nbChars(nbChars) {}
-QValidator::State HexValueValidator::validate(QString &input, int &) const
+TQValidator::State HexValueValidator::validate(TQString &input, int &) const
{
if ( input.length()==0 ) return Acceptable;
if ( input.length()>_nbChars ) return Invalid;
@@ -28,12 +28,12 @@ QValidator::State HexValueValidator::validate(QString &input, int &) const
}
//-----------------------------------------------------------------------------
-GenericHexWordEditor::GenericHexWordEditor(uint nbChars, bool hasBlankValue, QWidget *parent)
- : KLineEdit(parent, "hex_word_editor"), _nbChars(nbChars), _hasBlankValue(hasBlankValue)
+GenericHexWordEditor::GenericHexWordEditor(uint nbChars, bool hasBlankValue, TQWidget *tqparent)
+ : KLineEdit(tqparent, "hex_word_editor"), _nbChars(nbChars), _hasBlankValue(hasBlankValue)
{
- setFocusPolicy(ClickFocus);
- setValidator(new HexValueValidator(nbChars, this));
- connect(this, SIGNAL(textChanged(const QString &)), SLOT(slotTextChanged()));
+ setFocusPolicy(TQ_ClickFocus);
+ setValidator(new HexValueValidator(nbChars, TQT_TQOBJECT(this)));
+ connect(this, TQT_SIGNAL(textChanged(const TQString &)), TQT_SLOT(slotTextChanged()));
setFrame(false);
}
@@ -46,9 +46,9 @@ void GenericHexWordEditor::slotTextChanged()
bool GenericHexWordEditor::changeValue()
{
if ( !isValid() ) return false;
- QString s = text();
+ TQString s = text();
BitValue v = blankValue();
- if ( s!=QString(repeat("-", _nbChars)) ) {
+ if ( s!=TQString(repeat("-", _nbChars)) ) {
s = s.leftJustify(_nbChars, '0', true);
for (uint i=0; i<_nbChars; i++)
if ( !isxdigit(s[i].latin1()) ) s[i] = '0';
@@ -74,17 +74,17 @@ void GenericHexWordEditor::set()
blockSignals(false);
}
-bool GenericHexWordEditor::event(QEvent *e)
+bool GenericHexWordEditor::event(TQEvent *e)
{
switch (e->type()) {
- case QEvent::FocusOut:
+ case TQEvent::FocusOut:
changeValue();
break;
- case QEvent::FocusIn:
- QTimer::singleShot(0, this, SLOT(selectAll())); // ugly but it works
+ case TQEvent::FocusIn:
+ TQTimer::singleShot(0, this, TQT_SLOT(selectAll())); // ugly but it works
break;
- case QEvent::KeyPress:
- switch ( static_cast<QKeyEvent *>(e)->key() ) {
+ case TQEvent::KeyPress:
+ switch ( TQT_TQKEYEVENT(e)->key() ) {
case Key_Next:
emit moveNextPage();
return true;
@@ -122,15 +122,15 @@ bool GenericHexWordEditor::event(QEvent *e)
}
default: break;
}
- return QLineEdit::event(e);
+ return TQLineEdit::event(e);
}
-QSize GenericHexWordEditor::sizeHint() const
+TQSize GenericHexWordEditor::tqsizeHint() const
{
- return QSize(maxCharWidth(NumberBase::Hex, font()) * (_nbChars+1), fontMetrics().height());
+ return TQSize(maxCharWidth(NumberBase::Hex, font()) * (_nbChars+1), fontMetrics().height());
}
-QSize GenericHexWordEditor::minimumSizeHint() const
+TQSize GenericHexWordEditor::tqminimumSizeHint() const
{
- return QSize(maxCharWidth(NumberBase::Hex, font()) * (_nbChars+1), fontMetrics().height());
+ return TQSize(maxCharWidth(NumberBase::Hex, font()) * (_nbChars+1), fontMetrics().height());
}