diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-07-09 02:23:29 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-07-09 02:23:29 +0000 |
commit | 7c71ab86d1f7e387fc3df63b48df07231f111862 (patch) | |
tree | 30ba2d2f840ff5fd458b6113e9c3f2e8a71d510d /kugar/lib | |
parent | afbfdc507bfaafc8824a9808311d57a9ece87510 (diff) | |
download | koffice-7c71ab86d1f7e387fc3df63b48df07231f111862.tar.gz koffice-7c71ab86d1f7e387fc3df63b48df07231f111862.zip |
Remove the tq in front of these incorrectly TQt4-converted methods/data members:
tqrepaint[...]
tqinvalidate[...]
tqparent[...]
tqmask[...]
tqlayout[...]
tqalignment[...]
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1240522 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kugar/lib')
-rw-r--r-- | kugar/lib/inputmask.cpp | 72 | ||||
-rw-r--r-- | kugar/lib/inputmask.h | 8 |
2 files changed, 40 insertions, 40 deletions
diff --git a/kugar/lib/inputmask.cpp b/kugar/lib/inputmask.cpp index 08d67b26..8194a211 100644 --- a/kugar/lib/inputmask.cpp +++ b/kugar/lib/inputmask.cpp @@ -23,17 +23,17 @@ InputMask::InputMask( TQObject *tqparent, const char *name ) m_maxLength( 32767 ), m_blank( ' ' ), m_tqmask( TQString() ), - m_tqmaskData( 0L ) + m_maskData( 0L ) {} InputMask::~InputMask() { - delete [] m_tqmaskData; + delete [] m_maskData; } TQString InputMask::tqmask() const { - return ( m_tqmaskData ? m_tqmask + ';' + m_blank : TQString() ); + return ( m_maskData ? m_tqmask + ';' + m_blank : TQString() ); } void InputMask::setMask( const TQString &tqmask ) @@ -43,28 +43,28 @@ void InputMask::setMask( const TQString &tqmask ) TQString InputMask::formatText( const TQString &txt ) { - return tqmaskString( 0, txt, true ); + return maskString( 0, txt, true ); } -void InputMask::parseInputMask( const TQString &tqmaskFields ) +void InputMask::parseInputMask( const TQString &maskFields ) { - if ( tqmaskFields.isEmpty() || tqmaskFields.section( ';', 0, 0 ).isEmpty() ) + if ( maskFields.isEmpty() || maskFields.section( ';', 0, 0 ).isEmpty() ) { - if ( m_tqmaskData ) + if ( m_maskData ) { - delete [] m_tqmaskData; - m_tqmaskData = 0; + delete [] m_maskData; + m_maskData = 0; m_maxLength = 32767; } return ; } - m_tqmask = tqmaskFields.section( ';', 0, 0 ); - m_blank = tqmaskFields.section( ';', 1, 1 ).at( 0 ); + m_tqmask = maskFields.section( ';', 0, 0 ); + m_blank = maskFields.section( ';', 1, 1 ).at( 0 ); if ( m_blank.isNull() ) m_blank = ' '; - // calculate m_maxLength / m_tqmaskData length + // calculate m_maxLength / m_maskData length m_maxLength = 0; TQChar c = 0; uint i; @@ -83,8 +83,8 @@ void InputMask::parseInputMask( const TQString &tqmaskFields ) m_maxLength++; } - delete [] m_tqmaskData; - m_tqmaskData = new MaskInputData[ m_maxLength ]; + delete [] m_maskData; + m_maskData = new MaskInputData[ m_maxLength ]; MaskInputData::Casemode m = MaskInputData::NoCaseMode; c = 0; @@ -97,9 +97,9 @@ void InputMask::parseInputMask( const TQString &tqmaskFields ) if ( escape ) { s = TRUE; - m_tqmaskData[ index ].tqmaskChar = c; - m_tqmaskData[ index ].separator = s; - m_tqmaskData[ index ].caseMode = m; + m_maskData[ index ].maskChar = c; + m_maskData[ index ].separator = s; + m_maskData[ index ].caseMode = m; index++; escape = FALSE; } @@ -144,9 +144,9 @@ void InputMask::parseInputMask( const TQString &tqmaskFields ) if ( !escape ) { - m_tqmaskData[ index ].tqmaskChar = c; - m_tqmaskData[ index ].separator = s; - m_tqmaskData[ index ].caseMode = m; + m_maskData[ index ].maskChar = c; + m_maskData[ index ].separator = s; + m_maskData[ index ].caseMode = m; index++; } } @@ -207,7 +207,7 @@ bool InputMask::isValidInput( TQChar key, TQChar tqmask ) const return FALSE; } -TQString InputMask::tqmaskString( uint pos, const TQString &str, bool clear ) const +TQString InputMask::maskString( uint pos, const TQString &str, bool clear ) const { if ( pos >= ( uint ) m_maxLength ) return TQString::tqfromLatin1( "" ); @@ -222,18 +222,18 @@ TQString InputMask::tqmaskString( uint pos, const TQString &str, bool clear ) co { if ( strIndex < str.length() ) { - if ( m_tqmaskData[ i ].separator ) + if ( m_maskData[ i ].separator ) { - s += m_tqmaskData[ i ].tqmaskChar; - if ( str[ ( int ) strIndex ] == m_tqmaskData[ i ].tqmaskChar ) + s += m_maskData[ i ].maskChar; + if ( str[ ( int ) strIndex ] == m_maskData[ i ].maskChar ) strIndex++; ++i; } else { - if ( isValidInput( str[ ( int ) strIndex ], m_tqmaskData[ i ].tqmaskChar ) ) + if ( isValidInput( str[ ( int ) strIndex ], m_maskData[ i ].maskChar ) ) { - switch ( m_tqmaskData[ i ].caseMode ) + switch ( m_maskData[ i ].caseMode ) { case MaskInputData::Upper: s += str[ ( int ) strIndex ].upper(); @@ -252,7 +252,7 @@ TQString InputMask::tqmaskString( uint pos, const TQString &str, bool clear ) co int n = findInMask( i, TRUE, TRUE, str[ ( int ) strIndex ] ); if ( n != -1 ) { - if ( str.length() != 1 || i == 0 || ( i > 0 && ( !m_tqmaskData[ i - 1 ].separator || m_tqmaskData[ i - 1 ].tqmaskChar != str[ ( int ) strIndex ] ) ) ) + if ( str.length() != 1 || i == 0 || ( i > 0 && ( !m_maskData[ i - 1 ].separator || m_maskData[ i - 1 ].maskChar != str[ ( int ) strIndex ] ) ) ) { s += fill.mid( i, n - i + 1 ); i = n + 1; // update i to tqfind + 1 @@ -265,7 +265,7 @@ TQString InputMask::tqmaskString( uint pos, const TQString &str, bool clear ) co if ( n != -1 ) { s += fill.mid( i, n - i ); - switch ( m_tqmaskData[ n ].caseMode ) + switch ( m_maskData[ n ].caseMode ) { case MaskInputData::Upper: s += str[ ( int ) strIndex ].upper(); @@ -298,8 +298,8 @@ TQString InputMask::clearString( uint pos, uint len ) const TQString s; int end = TQMIN( ( uint ) m_maxLength, pos + len ); for ( int i = pos; i < end; i++ ) - if ( m_tqmaskData[ i ].separator ) - s += m_tqmaskData[ i ].tqmaskChar; + if ( m_maskData[ i ].separator ) + s += m_maskData[ i ].maskChar; else s += m_blank; @@ -308,14 +308,14 @@ TQString InputMask::clearString( uint pos, uint len ) const TQString InputMask::stripString( const TQString &str ) const { - if ( !m_tqmaskData ) + if ( !m_maskData ) return str; TQString s; int end = TQMIN( m_maxLength, ( int ) str.length() ); for ( int i = 0; i < end; i++ ) - if ( m_tqmaskData[ i ].separator ) - s += m_tqmaskData[ i ].tqmaskChar; + if ( m_maskData[ i ].separator ) + s += m_maskData[ i ].maskChar; else if ( str[ i ] != m_blank ) s += str[ i ]; @@ -336,16 +336,16 @@ int InputMask::findInMask( int pos, bool forward, bool findSeparator, TQChar sea { if ( findSeparator ) { - if ( m_tqmaskData[ i ].separator && m_tqmaskData[ i ].tqmaskChar == searchChar ) + if ( m_maskData[ i ].separator && m_maskData[ i ].maskChar == searchChar ) return i; } else { - if ( !m_tqmaskData[ i ].separator ) + if ( !m_maskData[ i ].separator ) { if ( searchChar.isNull() ) return i; - else if ( isValidInput( searchChar, m_tqmaskData[ i ].tqmaskChar ) ) + else if ( isValidInput( searchChar, m_maskData[ i ].maskChar ) ) return i; } } diff --git a/kugar/lib/inputmask.h b/kugar/lib/inputmask.h index 98d5c717..93889a16 100644 --- a/kugar/lib/inputmask.h +++ b/kugar/lib/inputmask.h @@ -35,9 +35,9 @@ public: TQString formatText( const TQString &txt ); private: - void parseInputMask( const TQString &tqmaskFields ); + void parseInputMask( const TQString &maskFields ); bool isValidInput( TQChar key, TQChar tqmask ) const; - TQString tqmaskString( uint pos, const TQString &str, bool clear = FALSE ) const; + TQString maskString( uint pos, const TQString &str, bool clear = FALSE ) const; TQString clearString( uint pos, uint len ) const; TQString stripString( const TQString &str ) const; int findInMask( int pos, bool forward, bool findSeparator, TQChar searchChar = TQChar() ) const; @@ -50,11 +50,11 @@ private: struct MaskInputData { enum Casemode { NoCaseMode, Upper, Lower }; - TQChar tqmaskChar; // either the separator char or the inputtqmask + TQChar maskChar; // either the separator char or the inputtqmask bool separator; Casemode caseMode; }; - MaskInputData *m_tqmaskData; + MaskInputData *m_maskData; }; } |