diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:52:55 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:52:55 +0000 |
commit | 5f5ee2367157176ed223b86343eb0a9e4022e020 (patch) | |
tree | 6a9c87f14ee38e90eff3c77c784f14e4f38fd5a1 /kregexpeditor/limitedcharlineedit.cpp | |
parent | 4facf42feec57b22dcf46badc115ad6c5b5cc512 (diff) | |
download | tdeutils-5f5ee2367157176ed223b86343eb0a9e4022e020.tar.gz tdeutils-5f5ee2367157176ed223b86343eb0a9e4022e020.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeutils@1157653 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kregexpeditor/limitedcharlineedit.cpp')
-rw-r--r-- | kregexpeditor/limitedcharlineedit.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/kregexpeditor/limitedcharlineedit.cpp b/kregexpeditor/limitedcharlineedit.cpp index 9631603..6322016 100644 --- a/kregexpeditor/limitedcharlineedit.cpp +++ b/kregexpeditor/limitedcharlineedit.cpp @@ -16,7 +16,7 @@ * Boston, MA 02110-1301, USA. **/ #include "limitedcharlineedit.h" -#include <qvalidator.h> +#include <tqvalidator.h> /** @internal @@ -25,22 +25,22 @@ class Validator :public QValidator { public: - Validator( LimitedCharLineEdit::Mode mode, QWidget* parent ) - :QValidator( parent, "Validator" ), _mode(mode) + Validator( LimitedCharLineEdit::Mode mode, TQWidget* parent ) + :TQValidator( parent, "Validator" ), _mode(mode) { } - virtual QValidator::State validate( QString& txt, int & /*pos*/ ) const + virtual TQValidator::State validate( TQString& txt, int & /*pos*/ ) const { if ( _mode == LimitedCharLineEdit::NORMAL || (_mode == LimitedCharLineEdit::HEX && - QRegExp(QString::fromLocal8Bit("^[0-9A-Fa-f]*$")).search( txt ) != -1) || + TQRegExp(TQString::fromLocal8Bit("^[0-9A-Fa-f]*$")).search( txt ) != -1) || (_mode == LimitedCharLineEdit::OCT && - QRegExp(QString::fromLocal8Bit("^[0-7]*$")).search( txt ) != -1 ) ) { - return QValidator::Acceptable; + TQRegExp(TQString::fromLocal8Bit("^[0-7]*$")).search( txt ) != -1 ) ) { + return TQValidator::Acceptable; } else { - return QValidator::Invalid; + return TQValidator::Invalid; } } @@ -49,15 +49,15 @@ private: }; -void LimitedCharLineEdit::keyPressEvent ( QKeyEvent *event ) +void LimitedCharLineEdit::keyPressEvent ( TQKeyEvent *event ) { - QLineEdit::keyPressEvent( event ); + TQLineEdit::keyPressEvent( event ); if ( text().length() == _count && !event->text().isNull() ) focusNextPrevChild(true); } -LimitedCharLineEdit::LimitedCharLineEdit( Mode mode, QWidget* parent, const char* name ) - :QLineEdit( parent, name ), _mode(mode) +LimitedCharLineEdit::LimitedCharLineEdit( Mode mode, TQWidget* parent, const char* name ) + :TQLineEdit( parent, name ), _mode(mode) { if ( mode == NORMAL ) _count = 1; |