diff options
Diffstat (limited to 'kexi/kexiutils/longlongvalidator.cpp')
-rw-r--r-- | kexi/kexiutils/longlongvalidator.cpp | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/kexi/kexiutils/longlongvalidator.cpp b/kexi/kexiutils/longlongvalidator.cpp index 6e7c0f7e..7d985c32 100644 --- a/kexi/kexiutils/longlongvalidator.cpp +++ b/kexi/kexiutils/longlongvalidator.cpp @@ -21,19 +21,19 @@ #include "longlongvalidator.h" -#include <qwidget.h> +#include <tqwidget.h> using namespace KexiUtils; -LongLongValidator::LongLongValidator( QWidget * parent, int base, const char * name ) - : QValidator(parent, name) +LongLongValidator::LongLongValidator( TQWidget * tqparent, int base, const char * name ) + : TQValidator(TQT_TQOBJECT(tqparent), name) , m_min(0), m_max(0) { setBase(base); } -LongLongValidator::LongLongValidator( Q_LLONG bottom, Q_LLONG top, QWidget * parent, int base, const char * name ) - : QValidator(parent, name) +LongLongValidator::LongLongValidator( TQ_LLONG bottom, TQ_LLONG top, TQWidget * tqparent, int base, const char * name ) + : TQValidator(TQT_TQOBJECT(tqparent), name) { setBase(base); setRange( bottom, top ); @@ -43,21 +43,21 @@ LongLongValidator::~LongLongValidator() { } -QValidator::State LongLongValidator::validate( QString &str, int & ) const +TQValidator::State LongLongValidator::validate( TQString &str, int & ) const { bool ok; - Q_LLONG val = 0; - QString newStr; + TQ_LLONG val = 0; + TQString newStr; newStr = str.stripWhiteSpace(); if (m_base > 10) newStr = newStr.upper(); - if (newStr == QString::fromLatin1("-")) {// a special case + if (newStr == TQString::tqfromLatin1("-")) {// a special case if ((m_min || m_max) && m_min >= 0) ok = false; else - return QValidator::Acceptable; + return TQValidator::Acceptable; } else if (!newStr.isEmpty()) val = newStr.toLongLong(&ok, m_base); @@ -67,26 +67,26 @@ QValidator::State LongLongValidator::validate( QString &str, int & ) const } if (! ok) - return QValidator::Invalid; + return TQValidator::Invalid; if ((! m_min && ! m_max) || (val >= m_min && val <= m_max)) - return QValidator::Acceptable; + return TQValidator::Acceptable; if (m_max && m_min >= 0 && val < 0) - return QValidator::Invalid; + return TQValidator::Invalid; - return QValidator::Valid; + return TQValidator::Valid; } -void LongLongValidator::fixup( QString &str ) const +void LongLongValidator::fixup( TQString &str ) const { int dummy; - Q_LLONG val; - QValidator::State state; + TQ_LLONG val; + TQValidator::State state; state = validate(str, dummy); - if (state == QValidator::Invalid || state == QValidator::Acceptable) + if (state == TQValidator::Invalid || state == TQValidator::Acceptable) return; if (! m_min && ! m_max) @@ -102,7 +102,7 @@ void LongLongValidator::fixup( QString &str ) const str.setNum(val, m_base); } -void LongLongValidator::setRange( Q_LLONG bottom, Q_LLONG top ) +void LongLongValidator::setRange( TQ_LLONG bottom, TQ_LLONG top ) { m_min = bottom; m_max = top; @@ -120,12 +120,12 @@ void LongLongValidator::setBase( int base ) m_base = 36; } -Q_LLONG LongLongValidator::bottom() const +TQ_LLONG LongLongValidator::bottom() const { return m_min; } -Q_LLONG LongLongValidator::top() const +TQ_LLONG LongLongValidator::top() const { return m_max; } |