diff options
Diffstat (limited to 'src/widgets/tqlcdnumber.cpp')
| -rw-r--r-- | src/widgets/tqlcdnumber.cpp | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/src/widgets/tqlcdnumber.cpp b/src/widgets/tqlcdnumber.cpp index e6dbf453c..ca768057a 100644 --- a/src/widgets/tqlcdnumber.cpp +++ b/src/widgets/tqlcdnumber.cpp @@ -130,10 +130,10 @@ static TQString int2string( int num, int base, int ndigits, bool *oflow ) TQString s; bool negative; if ( num < 0 ) { - negative = TRUE; + negative = true; num = -num; } else { - negative = FALSE; + negative = false; } switch( base ) { case TQLCDNumber::HEX: @@ -189,7 +189,7 @@ static TQString double2string( double num, int base, int ndigits, bool *oflow ) bool of = num >= 2147483648.0 || num < -2147483648.0; if ( of ) { // oops, integer overflow if ( oflow ) - *oflow = TRUE; + *oflow = true; return s; } s = int2string( (int)num, base, ndigits, 0 ); @@ -344,7 +344,7 @@ void TQLCDNumber::init() setFrameStyle( TQFrame::Box | TQFrame::Raised ); val = 0; base = DEC; - smallPoint = FALSE; + smallPoint = false; setNumDigits( ndigits ); setSegmentStyle( Outline ); d = 0; @@ -365,7 +365,7 @@ TQLCDNumber::~TQLCDNumber() \brief the current number of digits displayed Corresponds to the current number of digits. If \l - TQLCDNumber::smallDecimalPoint is FALSE, the decimal point occupies + TQLCDNumber::smallDecimalPoint is false, the decimal point occupies one digit position. \sa numDigits, smallDecimalPoint @@ -427,8 +427,8 @@ void TQLCDNumber::setNumDigits( int numDigits ) /*! \overload - Returns TRUE if \a num is too big to be displayed in its entirety; - otherwise returns FALSE. + Returns true if \a num is too big to be displayed in its entirety; + otherwise returns false. \sa display(), numDigits(), smallDecimalPoint() */ @@ -442,8 +442,8 @@ bool TQLCDNumber::checkOverflow( int num ) const /*! - Returns TRUE if \a num is too big to be displayed in its entirety; - otherwise returns FALSE. + Returns true if \a num is too big to be displayed in its entirety; + otherwise returns false. \sa display(), numDigits(), smallDecimalPoint() */ @@ -563,7 +563,7 @@ void TQLCDNumber::display( int num ) void TQLCDNumber::display( const TQString &s ) { val = 0; - bool ok = FALSE; + bool ok = false; double v = s.toDouble( &ok ); if ( ok ) val = v; @@ -626,9 +626,9 @@ void TQLCDNumber::setBinMode() \property TQLCDNumber::smallDecimalPoint \brief the style of the decimal point - If TRUE the decimal point is drawn between two digit positions. + If true the decimal point is drawn between two digit positions. Otherwise it occupies a digit position of its own, i.e. is drawn - in a digit position. The default is FALSE. + in a digit position. The default is false. The inter-digit space is made slightly wider when the decimal point is drawn between the digits. @@ -651,9 +651,9 @@ void TQLCDNumber::setSmallDecimalPoint( bool b ) void TQLCDNumber::drawContents( TQPainter *p ) { if ( smallPoint ) - drawString( digitStr, *p, &points, FALSE ); + drawString( digitStr, *p, &points, false ); else - drawString( digitStr, *p, 0, FALSE ); + drawString( digitStr, *p, 0, false ); } @@ -680,7 +680,7 @@ void TQLCDNumber::internalSetString( const TQString& s ) buffer = s.right( ndigits ).rightJustify( ndigits, ' ' ); } else { int index = -1; - bool lastWasPoint = TRUE; + bool lastWasPoint = true; newPoints.clearBit(0); for ( i=0; i<len; i++ ) { if ( s[i] == '.' ) { @@ -691,14 +691,14 @@ void TQLCDNumber::internalSetString( const TQString& s ) buffer[index] = ' '; // 2 points in a row, add space } newPoints.setBit(index); // set decimal point - lastWasPoint = TRUE; + lastWasPoint = true; } else { if ( index == ndigits - 1 ) break; index++; buffer[index] = s[i]; newPoints.clearBit(index); // decimal point default off - lastWasPoint = FALSE; + lastWasPoint = false; } } if ( index < ((int) ndigits) - 1 ) { @@ -819,7 +819,7 @@ void TQLCDNumber::drawDigit( const TQPoint &pos, TQPainter &p, int segLen, if ( updates[i][0] == draw ) drawSegment( pos, updates[i][1], p, segLen ); if (updates[i][0] == erase) - drawSegment( pos, updates[i][1], p, segLen, TRUE ); + drawSegment( pos, updates[i][1], p, segLen, true ); } } |
