From 5f5ee2367157176ed223b86343eb0a9e4022e020 Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 31 Jul 2010 19:52:55 +0000 Subject: Trinity Qt initial conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeutils@1157653 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- khexedit/hexvalidator.cc | 48 ++++++++++++++++++++++++------------------------ 1 file changed, 24 insertions(+), 24 deletions(-) (limited to 'khexedit/hexvalidator.cc') diff --git a/khexedit/hexvalidator.cc b/khexedit/hexvalidator.cc index e8c1731..96cd982 100644 --- a/khexedit/hexvalidator.cc +++ b/khexedit/hexvalidator.cc @@ -20,12 +20,12 @@ #include #include -#include +#include #include "hexvalidator.h" -CHexValidator::CHexValidator( QWidget *parent, EState state, +CHexValidator::CHexValidator( TQWidget *parent, EState state, const char *name ) - :QValidator( parent, name ) + :TQValidator( parent, name ) { setState( state ); } @@ -34,7 +34,7 @@ CHexValidator::~CHexValidator( void ) { } -QValidator::State CHexValidator::validate( QString &string, int &/*pos*/ ) const +TQValidator::State CHexValidator::validate( TQString &string, int &/*pos*/ ) const { if( mState == hexadecimal ) { @@ -43,10 +43,10 @@ QValidator::State CHexValidator::validate( QString &string, int &/*pos*/ ) const int val = string[i].latin1(); if( isxdigit( val ) == 0 && isspace( val ) == 0 ) { - return( QValidator::Invalid ); + return( TQValidator::Invalid ); } } - return( QValidator::Valid ); + return( TQValidator::Valid ); } if( mState == decimal ) { @@ -55,10 +55,10 @@ QValidator::State CHexValidator::validate( QString &string, int &/*pos*/ ) const int val = string[i].latin1(); if( isdigit( val ) == 0 && isspace( val ) == 0 ) { - return( QValidator::Invalid ); + return( TQValidator::Invalid ); } } - return( QValidator::Valid ); + return( TQValidator::Valid ); } else if( mState == octal ) { @@ -68,10 +68,10 @@ QValidator::State CHexValidator::validate( QString &string, int &/*pos*/ ) const if( (isdigit( val ) == 0 || val == '8' || val == '9') && isspace( val ) == 0 ) { - return( QValidator::Invalid ); + return( TQValidator::Invalid ); } } - return( QValidator::Valid ); + return( TQValidator::Valid ); } else if( mState == binary ) { @@ -80,18 +80,18 @@ QValidator::State CHexValidator::validate( QString &string, int &/*pos*/ ) const int val = string[i].latin1(); if( val != '0' && val != '1' && isspace( val ) == 0 ) { - return( QValidator::Invalid ); + return( TQValidator::Invalid ); } } - return( QValidator::Valid ); + return( TQValidator::Valid ); } else if( mState == regularText ) { - return( QValidator::Valid ); + return( TQValidator::Valid ); } else { - return( QValidator::Invalid ); + return( TQValidator::Invalid ); } } @@ -103,7 +103,7 @@ void CHexValidator::setState( EState state ) } -void CHexValidator::convert( QByteArray &dest, const QString &src ) +void CHexValidator::convert( TQByteArray &dest, const TQString &src ) { uint value; uint k=0; @@ -286,29 +286,29 @@ void CHexValidator::convert( QByteArray &dest, const QString &src ) -void CHexValidator::format( QString &dest, const QByteArray &src ) +void CHexValidator::format( TQString &dest, const TQByteArray &src ) { for( uint i=0; i= destLen ) return src; - QString zeroes; + TQString zeroes; zeroes.fill( '0', destLen - src.length() ); return zeroes + src; } -- cgit v1.2.1