diff options
Diffstat (limited to 'kugar/lib/mfieldobject.cpp')
-rw-r--r-- | kugar/lib/mfieldobject.cpp | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/kugar/lib/mfieldobject.cpp b/kugar/lib/mfieldobject.cpp index c2d60203..b0918c8c 100644 --- a/kugar/lib/mfieldobject.cpp +++ b/kugar/lib/mfieldobject.cpp @@ -54,30 +54,30 @@ MFieldObject::~MFieldObject() {} /** Returns the bound data field name */ -QString MFieldObject::getFieldName() +TQString MFieldObject::getFieldName() { return fieldName; } /** Sets the bound data field */ -void MFieldObject::setFieldName( const QString field ) +void MFieldObject::setFieldName( const TQString field ) { fieldName = field; } /** Sets the field's data string */ -void MFieldObject::setText( const QString txt ) +void MFieldObject::setText( const TQString txt ) { int ret; - QDate d; + TQDate d; int pos; - QString month, day, year; - QRegExp regexp( "[0-9][0-9](-|//)[0-9][0-9](-|//)[0-9][0-9][0-9][0-9]" ); + TQString month, day, year; + TQRegExp regexp( "[0-9][0-9](-|//)[0-9][0-9](-|//)[0-9][0-9][0-9][0-9]" ); // Check for empty string if ( txt.isEmpty() && dataType == MFieldObject::Date ) { - text = QString::null; + text = TQString(); return ; } @@ -115,7 +115,7 @@ void MFieldObject::setText( const QString txt ) day = txt.mid( 3, 2 ); d.setYMD( year.toInt(), month.toInt(), day.toInt() ); - // d = QDate::fromString(txt, Qt::LocalDate); + // d = TQDate::fromString(txt, Qt::LocalDate); text = MUtil::formatDate( d, format ); } else @@ -126,24 +126,24 @@ void MFieldObject::setText( const QString txt ) bool ok; text.setNum( txt.toDouble( &ok ), 'f', prec ); if( !ok ) - text = QString::null; + text = TQString(); else { if ( comma ) formatCommas(); formatNegValue(); - text = QString( currency + text ); + text = TQString( currency + text ); } break; } } -QString MFieldObject::getInputMask() const +TQString MFieldObject::getInputMask() const { - return m_inputMask->mask(); + return m_inputMask->tqmask(); } -void MFieldObject::setInputMask( const QString &inputMask ) +void MFieldObject::setInputMask( const TQString &inputMask ) { m_inputMask->setMask( inputMask ); } @@ -171,7 +171,7 @@ void MFieldObject::setPrecision( int p ) } /** Sets the field's currency symbol */ -void MFieldObject::setCurrency( const QChar c ) +void MFieldObject::setCurrency( const TQChar c ) { if ( c.isNull() ) currency = 36; @@ -203,8 +203,8 @@ void MFieldObject::formatNegValue() /** Formats the string representation of a number with comma separators */ void MFieldObject::formatCommas() { - // text = text.replace(".", ","); - QString tmp; + // text = text.tqreplace(".", ","); + TQString tmp; int i, j; int offset; @@ -215,7 +215,7 @@ void MFieldObject::formatCommas() offset = 0; // Look for decimal point - int pos = text.findRev( "." ); + int pos = text.tqfindRev( "." ); // If a decimal was not found, start at end of string if ( pos == -1 ) |