diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-25 05:28:35 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-25 05:28:35 +0000 |
commit | f008adb5a77e094eaf6abf3fc0f36958e66896a5 (patch) | |
tree | 8e9244c4d4957c36be81e15b566b4aa5ea26c982 /kexi/kexiutils/longlongvalidator.cpp | |
parent | 1210f27b660efb7b37ff43ec68763e85a403471f (diff) | |
download | koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.tar.gz koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.zip |
TQt4 port koffice
This should enable compilation under both Qt3 and Qt4; fixes for any missed components will be forthcoming
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1238284 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
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; } |