summaryrefslogtreecommitdiffstats
path: root/libtdeedu/extdate
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2025-04-07 18:23:54 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2025-04-07 23:24:46 +0900
commitfd06779f93512aa68988b165260941e6d3f1ff0f (patch)
treebb06d03e494a97eae182a18562677e2e5b17bed5 /libtdeedu/extdate
parentf1a4e21e9735931cfb58943bb1a3da4353e14302 (diff)
downloadtdeedu-r14.1.4.tar.gz
tdeedu-r14.1.4.zip
Replace TRUE/FALSE with boolean values true/falser14.1.4
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it> (cherry picked from commit 35149ce0bd6a7e9a315a395291ed4b59499b63cf)
Diffstat (limited to 'libtdeedu/extdate')
-rw-r--r--libtdeedu/extdate/extdatetime.cpp30
-rw-r--r--libtdeedu/extdate/extdatetimeedit.cpp284
-rw-r--r--libtdeedu/extdate/extdatetimeedit.h2
-rw-r--r--libtdeedu/extdate/test_extdate.cpp4
-rw-r--r--libtdeedu/extdate/testwidget.cpp4
5 files changed, 162 insertions, 162 deletions
diff --git a/libtdeedu/extdate/extdatetime.cpp b/libtdeedu/extdate/extdatetime.cpp
index 9c12c248..696e7d84 100644
--- a/libtdeedu/extdate/extdatetime.cpp
+++ b/libtdeedu/extdate/extdatetime.cpp
@@ -623,8 +623,8 @@ ExtDateTime::ExtDateTime( const ExtDate &date, const TQTime &time )
/*!
\fn bool ExtDateTime::isNull() const
- Returns TRUE if both the date and the time are null; otherwise
- returns FALSE. A null datetime is invalid.
+ Returns true if both the date and the time are null; otherwise
+ returns false. A null datetime is invalid.
\sa ExtDate::isNull(), TQTime::isNull()
*/
@@ -632,8 +632,8 @@ ExtDateTime::ExtDateTime( const ExtDate &date, const TQTime &time )
/*!
\fn bool ExtDateTime::isValid() const
- Returns TRUE if both the date and the time are valid; otherwise
- returns FALSE.
+ Returns true if both the date and the time are valid; otherwise
+ returns false.
\sa ExtDate::isValid(), TQTime::isValid()
*/
@@ -948,7 +948,7 @@ int ExtDateTime::secsTo( const ExtDateTime &dt ) const
/*!
- Returns TRUE if this datetime is equal to \a dt; otherwise returns FALSE.
+ Returns true if this datetime is equal to \a dt; otherwise returns false.
\sa operator!=()
*/
@@ -959,8 +959,8 @@ bool ExtDateTime::operator==( const ExtDateTime &dt ) const
}
/*!
- Returns TRUE if this datetime is different from \a dt; otherwise
- returns FALSE.
+ Returns true if this datetime is different from \a dt; otherwise
+ returns false.
\sa operator==()
*/
@@ -971,8 +971,8 @@ bool ExtDateTime::operator!=( const ExtDateTime &dt ) const
}
/*!
- Returns TRUE if this datetime is earlier than \a dt; otherwise
- returns FALSE.
+ Returns true if this datetime is earlier than \a dt; otherwise
+ returns false.
*/
bool ExtDateTime::operator<( const ExtDateTime &dt ) const
@@ -983,8 +983,8 @@ bool ExtDateTime::operator<( const ExtDateTime &dt ) const
}
/*!
- Returns TRUE if this datetime is earlier than or equal to \a dt;
- otherwise returns FALSE.
+ Returns true if this datetime is earlier than or equal to \a dt;
+ otherwise returns false.
*/
bool ExtDateTime::operator<=( const ExtDateTime &dt ) const
@@ -995,8 +995,8 @@ bool ExtDateTime::operator<=( const ExtDateTime &dt ) const
}
/*!
- Returns TRUE if this datetime is later than \a dt; otherwise
- returns FALSE.
+ Returns true if this datetime is later than \a dt; otherwise
+ returns false.
*/
bool ExtDateTime::operator>( const ExtDateTime &dt ) const
@@ -1007,8 +1007,8 @@ bool ExtDateTime::operator>( const ExtDateTime &dt ) const
}
/*!
- Returns TRUE if this datetime is later than or equal to \a dt;
- otherwise returns FALSE.
+ Returns true if this datetime is later than or equal to \a dt;
+ otherwise returns false.
*/
bool ExtDateTime::operator>=( const ExtDateTime &dt ) const
diff --git a/libtdeedu/extdate/extdatetimeedit.cpp b/libtdeedu/extdate/extdatetimeedit.cpp
index d9f19cd6..77b41352 100644
--- a/libtdeedu/extdate/extdatetimeedit.cpp
+++ b/libtdeedu/extdate/extdatetimeedit.cpp
@@ -44,7 +44,7 @@
static TQString *lDateSep = 0;
static TQString *lTimeSep = 0;
-static bool lAMPM = FALSE;
+static bool lAMPM = false;
static TQString *lAM = 0;
static TQString *lPM = 0;
static ExtDateEdit::Order lOrder = ExtDateEdit::YMD;
@@ -181,11 +181,11 @@ class ExtDateTimeEditorPrivate
{
public:
ExtDateTimeEditorPrivate()
- : frm( TRUE ),
- parag( new TQTextParagraph( 0, 0, 0, FALSE ) ),
+ : frm( true ),
+ parag( new TQTextParagraph( 0, 0, 0, false ) ),
focusSec(0)
{
- parag->formatter()->setWrapEnabled( FALSE );
+ parag->formatter()->setWrapEnabled( false );
cursor = new TQTextCursor( 0 );
cursor->setParagraph( parag );
offset = 0;
@@ -242,13 +242,13 @@ public:
bool setFocusSection( int idx )
{
if ( idx > (int)sections.count()-1 || idx < 0 )
- return FALSE;
+ return false;
if ( idx != focusSec ) {
focusSec = idx;
applyFocusSelection();
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
bool inSectionSelection( int idx )
@@ -256,9 +256,9 @@ public:
for ( uint i = 0; i < sections.count(); ++i ) {
if ( idx >= sections[i].selectionStart() &&
idx <= sections[i].selectionEnd() )
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
void paint( const TQString& txt, bool focus, TQPainter& p,
@@ -304,7 +304,7 @@ public:
yoff = 0;
p.translate( xoff, yoff );
- parag->paint( p, cg, 0, TRUE );
+ parag->paint( p, cg, 0, true );
if ( frm )
p.translate( -xoff, -yoff );
}
@@ -465,7 +465,7 @@ void ExtDateTimeEditor::mousePressEvent( TQMouseEvent *e )
int sec = sectionAt( p );
if ( sec != -1 ) {
cw->setFocusSection( sec );
- repaint( rect(), FALSE );
+ repaint( rect(), false );
}
}
@@ -481,37 +481,37 @@ bool ExtDateTimeEditor::eventFilter( TQObject *o, TQEvent *e )
case Key_Right:
if ( d->focusSection() < (int)d->sectionCount()-1 ) {
if ( cw->setFocusSection( focusSection()+1 ) )
- repaint( rect(), FALSE );
+ repaint( rect(), false );
}
- return TRUE;
+ return true;
case Key_Left:
if ( d->focusSection() > 0 ) {
if ( cw->setFocusSection( focusSection()-1 ) )
- repaint( rect(), FALSE );
+ repaint( rect(), false );
}
- return TRUE;
+ return true;
case Key_Up:
cw->stepUp();
- return TRUE;
+ return true;
case Key_Down:
cw->stepDown();
- return TRUE;
+ return true;
case Key_Backspace:
if ( ::tqt_cast<ExtDateEdit*>(cw) )
((ExtDateEdit*)cw)->removeFirstNumber( d->focusSection() );
else if ( ::tqt_cast<TQTimeEdit*>(cw) )
((TQTimeEdit*)cw)->removeFirstNumber( d->focusSection() );
- return TRUE;
+ return true;
case Key_Delete:
cw->removeLastNumber( d->focusSection() );
- return TRUE;
+ return true;
case Key_Tab:
case Key_BackTab: {
if ( ke->state() == TQt::ControlButton )
- return FALSE;
+ return false;
TQWidget *w = this;
- bool hadDateEdit = FALSE;
+ bool hadDateEdit = false;
while ( w ) {
if ( ::tqt_cast<ExtDateTimeSpinWidget*>(w) && qstrcmp( w->name(), "qt_spin_widget" ) != 0 ||
::tqt_cast<ExtDateTimeEdit*>(w) )
@@ -527,10 +527,10 @@ bool ExtDateTimeEditor::eventFilter( TQObject *o, TQEvent *e )
ExtDateTimeEdit *ed = (ExtDateTimeEdit*)w;
if ( hadDateEdit && ke->key() == Key_Tab ) {
ed->timeEdit()->setFocus();
- return TRUE;
+ return true;
} else if ( !hadDateEdit && ke->key() == Key_BackTab ) {
ed->dateEdit()->setFocus();
- return TRUE;
+ return true;
} else {
while ( w && !::tqt_cast<ExtDateTimeEdit*>(w) )
w = w->parentWidget();
@@ -538,7 +538,7 @@ bool ExtDateTimeEditor::eventFilter( TQObject *o, TQEvent *e )
}
tqApp->sendEvent( w, e );
- return TRUE;
+ return true;
}
} break;
default:
@@ -547,9 +547,9 @@ bool ExtDateTimeEditor::eventFilter( TQObject *o, TQEvent *e )
// do the same thing as KEY_RIGHT when the user presses the separator key
if ( d->focusSection() < 2 ) {
if ( cw->setFocusSection( focusSection()+1 ) )
- repaint( rect(), FALSE );
+ repaint( rect(), false );
}
- return TRUE;
+ return true;
} else if ( !txt.isEmpty() && ::tqt_cast<TQTimeEdit*>(cw) && focusSection() == (int) d->sectionCount()-1 ) {
// the first character of the AM/PM indicator toggles if the section has focus
TQTimeEdit *te = (TQTimeEdit*)cw;
@@ -568,12 +568,12 @@ bool ExtDateTimeEditor::eventFilter( TQObject *o, TQEvent *e )
int num = txt[0].digitValue();
if ( num != -1 ) {
cw->addNumber( d->focusSection(), num );
- return TRUE;
+ return true;
}
}
}
}
- return FALSE;
+ return false;
}
@@ -744,13 +744,13 @@ public:
dateEdit->setRange( ExtDate::currentDate().addDays( -365 ),
ExtDate::currentDate().addDays( 365 ) );
dateEdit->setOrder( ExtDateEdit::MDY );
- dateEdit->setAutoAdvance( TRUE );
+ dateEdit->setAutoAdvance( true );
\endcode
Here we've created a new ExtDateEdit object initialised with today's
date and restricted the valid date range to today plus or minus
365 days. We've set the order to month, day, year. If the auto
- advance property is TRUE (as we've set it here) when the user
+ advance property is true (as we've set it here) when the user
completes a section of the date, e.g. enters two digits for the
month, they are automatically taken to the next section.
@@ -848,13 +848,13 @@ void ExtDateEdit::init()
d->dayCache = 0;
setOrder( localOrder() );
setFocusSection( 0 );
- d->overwrite = TRUE;
- d->adv = FALSE;
+ d->overwrite = true;
+ d->adv = false;
d->timerId = 0;
- d->typing = FALSE;
+ d->typing = false;
d->min = ExtDate( -50000, 1, 1 );
d->max = ExtDate( 50000, 12, 31 );
- d->changed = FALSE;
+ d->changed = false;
setSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Fixed );
@@ -1133,7 +1133,7 @@ void ExtDateEdit::setOrder( ExtDateEdit::Order order )
}
if ( isVisible() )
- d->ed->repaint( d->ed->rect(), FALSE );
+ d->ed->repaint( d->ed->rect(), false );
}
@@ -1149,29 +1149,29 @@ ExtDateEdit::Order ExtDateEdit::order() const
void ExtDateEdit::stepUp()
{
int sec = d->ed->focusSection();
- bool accepted = FALSE;
+ bool accepted = false;
if ( sec == d->yearSection ) {
if ( !outOfRange( d->y+1, d->m, d->d ) ) {
- accepted = TRUE;
+ accepted = true;
setYear( d->y+1 );
}
} else if ( sec == d->monthSection ) {
if ( !outOfRange( d->y, d->m+1, d->d ) ) {
- accepted = TRUE;
+ accepted = true;
setMonth( d->m+1 );
}
} else if ( sec == d->daySection ) {
if ( !outOfRange( d->y, d->m, d->d+1 ) ) {
- accepted = TRUE;
+ accepted = true;
setDay( d->d+1 );
}
}
if ( accepted ) {
- d->changed = TRUE;
+ d->changed = true;
emit valueChanged( date() );
}
- d->ed->repaint( d->ed->rect(), FALSE );
+ d->ed->repaint( d->ed->rect(), false );
}
@@ -1183,29 +1183,29 @@ void ExtDateEdit::stepUp()
void ExtDateEdit::stepDown()
{
int sec = d->ed->focusSection();
- bool accepted = FALSE;
+ bool accepted = false;
if ( sec == d->yearSection ) {
if ( !outOfRange( d->y-1, d->m, d->d ) ) {
- accepted = TRUE;
+ accepted = true;
setYear( d->y-1 );
}
} else if ( sec == d->monthSection ) {
if ( !outOfRange( d->y, d->m-1, d->d ) ) {
- accepted = TRUE;
+ accepted = true;
setMonth( d->m-1 );
}
} else if ( sec == d->daySection ) {
if ( !outOfRange( d->y, d->m, d->d-1 ) ) {
- accepted = TRUE;
+ accepted = true;
setDay( d->d-1 );
}
}
if ( accepted ) {
- d->changed = TRUE;
+ d->changed = true;
emit valueChanged( date() );
}
- d->ed->repaint( d->ed->rect(), FALSE );
+ d->ed->repaint( d->ed->rect(), false );
}
/*!
@@ -1291,8 +1291,8 @@ void ExtDateEdit::setDate( const ExtDate& date )
d->dayCache = d->d;
emit valueChanged( date );
}
- d->changed = FALSE;
- d->ed->repaint( d->ed->rect(), FALSE );
+ d->changed = false;
+ d->ed->repaint( d->ed->rect(), false );
}
ExtDate ExtDateEdit::date() const
@@ -1304,8 +1304,8 @@ ExtDate ExtDateEdit::date() const
/*! \internal
- Returns TRUE if \a y, \a m, \a d is out of range, otherwise returns
- FALSE.
+ Returns true if \a y, \a m, \a d is out of range, otherwise returns
+ false.
\sa setRange()
@@ -1317,11 +1317,11 @@ bool ExtDateEdit::outOfRange( int y, int m, int d ) const
ExtDate currentDate( y, m, d );
if ( currentDate > maxValue() || currentDate < minValue() ) {
//## outOfRange should set overwrite?
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
- return FALSE; /* assume ok */
+ return false; /* assume ok */
}
/*! \reimp
@@ -1333,25 +1333,25 @@ void ExtDateEdit::addNumber( int sec, int num )
if ( sec == -1 )
return;
killTimer( d->timerId );
- bool overwrite = FALSE;
- bool accepted = FALSE;
- d->typing = TRUE;
+ bool overwrite = false;
+ bool accepted = false;
+ d->typing = true;
TQString txt;
if ( sec == d->yearSection ) {
if ( d->overwrite ) {
d->y = num;
- d->overwrite = FALSE;
- accepted = TRUE;
+ d->overwrite = false;
+ accepted = true;
} else {
txt = TQString::number( 10*d->y + num );
if ( txt.length() > 5 ) txt = txt.mid(1);
d->y = txt.toInt();
- accepted = TRUE;
+ accepted = true;
}
/*
txt = TQString::number( d->y );
if ( d->overwrite || txt.length() == 4 ) {
- accepted = TRUE;
+ accepted = true;
d->y = num;
} else {
txt += TQString::number( num );
@@ -1364,23 +1364,23 @@ void ExtDateEdit::addNumber( int sec, int num )
else if ( outOfRange( val, d->m, d->d ) )
txt = TQString::number( d->y );
else {
- accepted = TRUE;
+ accepted = true;
d->y = val;
}
} else {
- accepted = TRUE;
+ accepted = true;
d->y = txt.toInt();
}
if ( d->adv && txt.length() == 4 ) {
d->ed->setFocusSection( d->ed->focusSection()+1 );
- overwrite = TRUE;
+ overwrite = true;
}
}
*/
} else if ( sec == d->monthSection ) {
txt = TQString::number( d->m );
if ( d->overwrite || txt.length() == 2 ) {
- accepted = TRUE;
+ accepted = true;
d->m = num;
} else {
txt += TQString::number( num );
@@ -1390,18 +1390,18 @@ void ExtDateEdit::addNumber( int sec, int num )
if ( outOfRange( d->y, temp, d->d ) )
txt = TQString::number( d->m );
else {
- accepted = TRUE;
+ accepted = true;
d->m = temp;
}
if ( d->adv && txt.length() == 2 ) {
d->ed->setFocusSection( d->ed->focusSection()+1 );
- overwrite = TRUE;
+ overwrite = true;
}
}
} else if ( sec == d->daySection ) {
txt = TQString::number( d->d );
if ( d->overwrite || txt.length() == 2 ) {
- accepted = TRUE;
+ accepted = true;
d->d = num;
d->dayCache = d->d;
} else {
@@ -1412,23 +1412,23 @@ void ExtDateEdit::addNumber( int sec, int num )
if ( outOfRange( d->y, d->m, temp ) )
txt = TQString::number( d->d );
else {
- accepted = TRUE;
+ accepted = true;
d->d = temp;
d->dayCache = d->d;
}
if ( d->adv && txt.length() == 2 ) {
d->ed->setFocusSection( d->ed->focusSection()+1 );
- overwrite = TRUE;
+ overwrite = true;
}
}
}
if ( accepted ) {
- d->changed = TRUE;
+ d->changed = true;
emit valueChanged( date() );
}
d->overwrite = overwrite;
d->timerId = startTimer( tqApp->doubleClickInterval()*4 );
- d->ed->repaint( d->ed->rect(), FALSE );
+ d->ed->repaint( d->ed->rect(), false );
}
@@ -1440,8 +1440,8 @@ bool ExtDateEdit::setFocusSection( int s )
{
if ( s != d->ed->focusSection() ) {
killTimer( d->timerId );
- d->overwrite = TRUE;
- d->typing = FALSE;
+ d->overwrite = true;
+ d->typing = false;
fix(); // will emit valueChanged if necessary
}
return d->ed->setFocusSection( s );
@@ -1466,13 +1466,13 @@ bool ExtDateEdit::setFocusSection( int s )
void ExtDateEdit::fix()
{
- bool changed = FALSE;
+ bool changed = false;
ExtDate test = ExtDate( d->y, d->m, 1 );
if ( d->d > test.daysInMonth() ) {
d->d = test.daysInMonth();
- changed = TRUE;
+ changed = true;
}
int currentYear = ExtDate::currentDate().year();
@@ -1488,11 +1488,11 @@ void ExtDateEdit::fix()
if ( year >= currentYear + 30 )
year -= 100;
}
- changed = TRUE;
+ changed = true;
} else if ( year < 1000 ) {
int currentMillennium = currentYear / 10;
year += currentMillennium * 10;
- changed = TRUE;
+ changed = true;
}
*/
if ( changed && outOfRange( year, d->m, d->d ) ) {
@@ -1513,7 +1513,7 @@ void ExtDateEdit::fix()
if ( changed ) {
// emit valueChanged( date() );
-// d->changed = FALSE;
+// d->changed = false;
}
}
@@ -1525,8 +1525,8 @@ void ExtDateEdit::fix()
bool ExtDateEdit::event( TQEvent *e )
{
if( e->type() == TQEvent::FocusOut ) {
- d->typing = FALSE;
- d->overwrite = TRUE;
+ d->typing = false;
+ d->overwrite = true;
// the following can't be done in fix() because fix() called
// from all over the place and it will break the old behaviour
if ( !ExtDate::isValid( d->y, d->m, d->d ) ) {
@@ -1537,12 +1537,12 @@ bool ExtDateEdit::event( TQEvent *e )
if ( ExtDate::isValid( d->y, d->m, d->d ) )
break;
}
- d->changed = TRUE;
+ d->changed = true;
}
if ( d->changed ) {
fix();
emit valueChanged( date() );
- d->changed = FALSE;
+ d->changed = false;
}
} else if ( e->type() == TQEvent::LocaleChange ) {
readLocaleSettings();
@@ -1581,7 +1581,7 @@ void ExtDateEdit::removeFirstNumber( int sec )
d->d = txt.toInt();
d->dayCache = d->d;
}
- d->ed->repaint( d->ed->rect(), FALSE );
+ d->ed->repaint( d->ed->rect(), false );
}
/*! \reimp
@@ -1607,7 +1607,7 @@ void ExtDateEdit::removeLastNumber( int sec )
d->d = txt.toInt();
d->dayCache = d->d;
}
- d->ed->repaint( d->ed->rect(), FALSE );
+ d->ed->repaint( d->ed->rect(), false );
}
/*!
@@ -1615,9 +1615,9 @@ void ExtDateEdit::removeLastNumber( int sec )
\brief whether the editor automatically advances to the next
section
- If autoAdvance is TRUE, the editor will automatically advance
+ If autoAdvance is true, the editor will automatically advance
focus to the next date section if a user has completed a section.
- The default is FALSE.
+ The default is false.
*/
void ExtDateEdit::setAutoAdvance( bool advance )
@@ -1636,7 +1636,7 @@ bool ExtDateEdit::autoAdvance() const
void ExtDateEdit::timerEvent( TQTimerEvent * )
{
- d->overwrite = TRUE;
+ d->overwrite = true;
}
/*!
@@ -1743,9 +1743,9 @@ public:
// connect( d->controls, TQ_SIGNAL( stepUpPressed() ), TQ_SLOT( stepUp() ) );
// connect( d->controls, TQ_SIGNAL( stepDownPressed() ), TQ_SLOT( stepDown() ) );
//
-// d->ed->appendSection( TQNumberSection( 0,0, TRUE, 0 ) );
-// d->ed->appendSection( TQNumberSection( 0,0, TRUE, 1 ) );
-// d->ed->appendSection( TQNumberSection( 0,0, TRUE, 2 ) );
+// d->ed->appendSection( TQNumberSection( 0,0, true, 0 ) );
+// d->ed->appendSection( TQNumberSection( 0,0, true, 1 ) );
+// d->ed->appendSection( TQNumberSection( 0,0, true, 2 ) );
// d->ed->setSeparator( localTimeSep() );
//
// d->h = 0;
@@ -1754,15 +1754,15 @@ public:
// d->display = Hours | Minutes | Seconds;
// if ( lAMPM ) {
// d->display |= AMPM;
-// d->ed->appendSection( TQNumberSection( 0,0, FALSE, 3 ) );
+// d->ed->appendSection( TQNumberSection( 0,0, false, 3 ) );
// }
-// d->adv = FALSE;
-// d->overwrite = TRUE;
+// d->adv = false;
+// d->overwrite = true;
// d->timerId = 0;
-// d->typing = FALSE;
+// d->typing = false;
// d->min = TQTime( 0, 0, 0 );
// d->max = TQTime( 23, 59, 59 );
-// d->changed = FALSE;
+// d->changed = false;
//
// setSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Fixed );
//
@@ -1842,13 +1842,13 @@ public:
// d->ed->clearSections();
// d->display = display;
// if ( d->display & Hours )
-// d->ed->appendSection( TQNumberSection( 0,0, TRUE, 0 ) );
+// d->ed->appendSection( TQNumberSection( 0,0, true, 0 ) );
// if ( d->display & Minutes )
-// d->ed->appendSection( TQNumberSection( 0,0, TRUE, 1 ) );
+// d->ed->appendSection( TQNumberSection( 0,0, true, 1 ) );
// if ( d->display & Seconds )
-// d->ed->appendSection( TQNumberSection( 0,0, TRUE, 2 ) );
+// d->ed->appendSection( TQNumberSection( 0,0, true, 2 ) );
// if ( d->display & AMPM )
-// d->ed->appendSection( TQNumberSection( 0,0, FALSE, 3 ) );
+// d->ed->appendSection( TQNumberSection( 0,0, false, 3 ) );
//
// d->ed->setFocusSection( 0 );
// d->ed->update();
@@ -1881,8 +1881,8 @@ public:
// d->s = time.second();
// emit valueChanged( time );
// }
-// d->changed = FALSE;
-// d->ed->repaint( d->ed->rect(), FALSE );
+// d->changed = false;
+// d->ed->repaint( d->ed->rect(), false );
// }
//
// TQTime TQTimeEdit::time() const
@@ -1897,9 +1897,9 @@ public:
// \brief whether the editor automatically advances to the next
// section
//
-// If autoAdvance is TRUE, the editor will automatically advance
+// If autoAdvance is true, the editor will automatically advance
// focus to the next time section if a user has completed a section.
-// The default is FALSE.
+// The default is false.
// */
//
// void TQTimeEdit::setAutoAdvance( bool advance )
@@ -1946,10 +1946,10 @@ public:
// bool TQTimeEdit::event( TQEvent *e )
// {
// if ( e->type() == TQEvent::FocusOut ) {
-// d->typing = FALSE;
+// d->typing = false;
// if ( d->changed ) {
// emit valueChanged( time() );
-// d->changed = FALSE;
+// d->changed = false;
// }
// } else if ( e->type() == TQEvent::LocaleChange ) {
// readLocaleSettings();
@@ -1964,7 +1964,7 @@ public:
//
// void TQTimeEdit::timerEvent( TQTimerEvent * )
// {
-// d->overwrite = TRUE;
+// d->overwrite = true;
// }
//
//
@@ -1975,7 +1975,7 @@ public:
// void TQTimeEdit::stepUp()
// {
// int sec = d->ed->mapSection( d->ed->focusSection() );
-// bool accepted = TRUE;
+// bool accepted = true;
// switch( sec ) {
// case 0:
// if ( !outOfRange( d->h+1, d->m, d->s ) )
@@ -2002,17 +2002,17 @@ public:
// setHour( d->h-12 );
// break;
// default:
-// accepted = FALSE;
+// accepted = false;
// #ifdef TQT_CHECK_RANGE
// tqWarning( "TQTimeEdit::stepUp: Focus section out of range!" );
// #endif
// break;
// }
// if ( accepted ) {
-// d->changed = TRUE;
+// d->changed = true;
// emit valueChanged( time() );
// }
-// d->ed->repaint( d->ed->rect(), FALSE );
+// d->ed->repaint( d->ed->rect(), false );
// }
//
//
@@ -2024,7 +2024,7 @@ public:
// {
// int sec = d->ed->mapSection( d->ed->focusSection() );
//
-// bool accepted = TRUE;
+// bool accepted = true;
// switch( sec ) {
// case 0:
// if ( !outOfRange( d->h-1, d->m, d->s ) )
@@ -2051,17 +2051,17 @@ public:
// setHour( d->h+12 );
// break;
// default:
-// accepted = FALSE;
+// accepted = false;
// #ifdef TQT_CHECK_RANGE
// tqWarning( "TQTimeEdit::stepDown: Focus section out of range!" );
// #endif
// break;
// }
// if ( accepted ) {
-// d->changed = TRUE;
+// d->changed = true;
// emit valueChanged( time() );
// }
-// d->ed->repaint( d->ed->rect(), FALSE );
+// d->ed->repaint( d->ed->rect(), false );
// }
//
//
@@ -2094,15 +2094,15 @@ public:
// {
// if ( sec != d->ed->focusSection() ) {
// killTimer( d->timerId );
-// d->overwrite = TRUE;
-// d->typing = FALSE;
+// d->overwrite = true;
+// d->typing = false;
// TQString txt = sectionText( sec );
// txt = txt.rightJustify( 2, EXTDATETIMEEDIT_HIDDEN_CHAR );
// int offset = sec*2+sec*separator().length() + txt.length();
// d->ed->setSectionSelection( sec, offset - txt.length(), offset );
// if ( d->changed ) {
// emit valueChanged( time() );
-// d->changed = FALSE;
+// d->changed = false;
// }
// }
// return d->ed->setFocusSection( sec );
@@ -2203,7 +2203,7 @@ public:
//
//
// /*! \internal
-// Returns TRUE if \a h, \a m, and \a s are out of range.
+// Returns true if \a h, \a m, and \a s are out of range.
// */
//
// bool TQTimeEdit::outOfRange( int h, int m, int s ) const
@@ -2212,11 +2212,11 @@ public:
// TQTime currentTime( h, m, s );
// if ( currentTime > maxValue() ||
// currentTime < minValue() )
-// return TRUE;
+// return true;
// else
-// return FALSE;
+// return false;
// }
-// return TRUE;
+// return true;
// }
//
// /*! \reimp
@@ -2229,9 +2229,9 @@ public:
// return;
// sec = d->ed->mapSection( sec );
// killTimer( d->timerId );
-// bool overwrite = FALSE;
-// bool accepted = FALSE;
-// d->typing = TRUE;
+// bool overwrite = false;
+// bool accepted = false;
+// d->typing = true;
// TQString txt;
//
// switch( sec ) {
@@ -2245,7 +2245,7 @@ public:
// if ( d->display & AMPM && d->h > 11 )
// num += 12;
// if ( !outOfRange( num, d->m, d->s ) ) {
-// accepted = TRUE;
+// accepted = true;
// d->h = num;
// }
// } else {
@@ -2257,19 +2257,19 @@ public:
// if ( d->h < 12 ) {
// temp = 0;
// }
-// accepted = TRUE;
+// accepted = true;
// } else if ( outOfRange( temp + 12, d->m, d->s ) ) {
// txt = TQString::number( d->h );
// } else {
// if ( d->h > 11 ) {
// temp += 12;
// }
-// accepted = TRUE;
+// accepted = true;
// }
// } else if ( !(d->display & AMPM) && outOfRange( temp, d->m, d->s ) ) {
// txt = TQString::number( d->h );
// } else {
-// accepted = TRUE;
+// accepted = true;
// }
//
// if ( accepted )
@@ -2277,7 +2277,7 @@ public:
//
// if ( d->adv && txt.length() == 2 ) {
// setFocusSection( d->ed->focusSection()+1 );
-// overwrite = TRUE;
+// overwrite = true;
// }
// }
// break;
@@ -2286,7 +2286,7 @@ public:
// txt = TQString::number( d->m );
// if ( d->overwrite || txt.length() == 2 ) {
// if ( !outOfRange( d->h, num, d->s ) ) {
-// accepted = TRUE;
+// accepted = true;
// d->m = num;
// }
// } else {
@@ -2297,12 +2297,12 @@ public:
// if ( outOfRange( d->h, temp, d->s ) )
// txt = TQString::number( d->m );
// else {
-// accepted = TRUE;
+// accepted = true;
// d->m = temp;
// }
// if ( d->adv && txt.length() == 2 ) {
// setFocusSection( d->ed->focusSection()+1 );
-// overwrite = TRUE;
+// overwrite = true;
// }
// }
// break;
@@ -2311,7 +2311,7 @@ public:
// txt = TQString::number( d->s );
// if ( d->overwrite || txt.length() == 2 ) {
// if ( !outOfRange( d->h, d->m, num ) ) {
-// accepted = TRUE;
+// accepted = true;
// d->s = num;
// }
// } else {
@@ -2322,12 +2322,12 @@ public:
// if ( outOfRange( d->h, d->m, temp ) )
// txt = TQString::number( d->s );
// else {
-// accepted = TRUE;
+// accepted = true;
// d->s = temp;
// }
// if ( d->adv && txt.length() == 2 ) {
// setFocusSection( d->ed->focusSection()+1 );
-// overwrite = TRUE;
+// overwrite = true;
// }
// }
// break;
@@ -2343,7 +2343,7 @@ public:
// emit valueChanged( time() );
// d->overwrite = overwrite;
// d->timerId = startTimer( tqApp->doubleClickInterval()*4 );
-// d->ed->repaint( d->ed->rect(), FALSE );
+// d->ed->repaint( d->ed->rect(), false );
// }
//
//
@@ -2383,7 +2383,7 @@ public:
// d->s = txt.toInt();
// break;
// }
-// d->ed->repaint( d->ed->rect(), FALSE );
+// d->ed->repaint( d->ed->rect(), false );
// }
//
// /*! \reimp
@@ -2418,7 +2418,7 @@ public:
// d->s = txt.toInt();
// break;
// }
-// d->ed->repaint( d->ed->rect(), FALSE );
+// d->ed->repaint( d->ed->rect(), false );
// }
//
// /*! \reimp
@@ -2609,7 +2609,7 @@ void ExtDateTimeEdit::init()
d = new ExtDateTimeEditPrivate();
de = new ExtDateEdit( this, "qt_datetime_dateedit" );
te = new TQTimeEdit( this, "qt_datetime_timeedit" );
- d->adv = FALSE;
+ d->adv = false;
connect( de, TQ_SIGNAL( valueChanged( const ExtDate& ) ),
this, TQ_SLOT( newValue( const ExtDate& ) ) );
connect( te, TQ_SIGNAL( valueChanged( const TQTime& ) ),
@@ -2684,7 +2684,7 @@ void ExtDateTimeEdit::newValue( const TQTime& )
/*!
Sets the auto advance property of the editor to \a advance. If set
- to TRUE, the editor will automatically advance focus to the next
+ to true, the editor will automatically advance focus to the next
date or time section if the user has completed a section.
*/
@@ -2695,7 +2695,7 @@ void ExtDateTimeEdit::setAutoAdvance( bool advance )
}
/*!
- Returns TRUE if auto-advance is enabled, otherwise returns FALSE.
+ Returns true if auto-advance is enabled, otherwise returns false.
\sa setAutoAdvance()
*/
diff --git a/libtdeedu/extdate/extdatetimeedit.h b/libtdeedu/extdate/extdatetimeedit.h
index 6c252731..c4feaed7 100644
--- a/libtdeedu/extdate/extdatetimeedit.h
+++ b/libtdeedu/extdate/extdatetimeedit.h
@@ -285,7 +285,7 @@ private:
class TQNumberSection
{
public:
- TQNumberSection( int selStart = 0, int selEnd = 0, bool separat = TRUE, int actual = -1 )
+ TQNumberSection( int selStart = 0, int selEnd = 0, bool separat = true, int actual = -1 )
: selstart( selStart ), selend( selEnd ), act( actual ), sep( separat )
{}
int selectionStart() const { return selstart; }
diff --git a/libtdeedu/extdate/test_extdate.cpp b/libtdeedu/extdate/test_extdate.cpp
index d70d3e94..e787f6e4 100644
--- a/libtdeedu/extdate/test_extdate.cpp
+++ b/libtdeedu/extdate/test_extdate.cpp
@@ -237,8 +237,8 @@ void test5()
void test6_unit(int y, int m, int d)
{
std::cout << d << "/" << m << "/" << y << " :: "
- << ( ExtDate::isValid(y, m, d) ? "TRUE" : "FALSE" ) << " : "
- << ( TQDate::isValid(y, m, d) ? "TRUE" : "FALSE" ) << std::endl;
+ << ( ExtDate::isValid(y, m, d) ? "true" : "false" ) << " : "
+ << ( TQDate::isValid(y, m, d) ? "true" : "false" ) << std::endl;
}
void test6()
diff --git a/libtdeedu/extdate/testwidget.cpp b/libtdeedu/extdate/testwidget.cpp
index 81965cc1..e78546e4 100644
--- a/libtdeedu/extdate/testwidget.cpp
+++ b/libtdeedu/extdate/testwidget.cpp
@@ -35,9 +35,9 @@ TestWidget::TestWidget( TQWidget *p, const char *name ) : TDEMainWindow( p, name
kdp = new KDatePicker(w);
edp = new ExtDatePicker(w);
kdpEdit = new KLineEdit(w);
- kdpEdit->setReadOnly( TRUE );
+ kdpEdit->setReadOnly( true );
edpEdit = new KLineEdit(w);
- edpEdit->setReadOnly( TRUE );
+ edpEdit->setReadOnly( true );
kdw = new KDateWidget( TQDate::currentDate(), w );
edw = new ExtDateWidget( ExtDate::currentDate(), w );