diff options
Diffstat (limited to 'src/kvilib/tal/kvi_tal_listview.cpp')
| -rw-r--r-- | src/kvilib/tal/kvi_tal_listview.cpp | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/src/kvilib/tal/kvi_tal_listview.cpp b/src/kvilib/tal/kvi_tal_listview.cpp index ce54641..dd408ed 100644 --- a/src/kvilib/tal/kvi_tal_listview.cpp +++ b/src/kvilib/tal/kvi_tal_listview.cpp @@ -152,7 +152,7 @@ exclusive( 0 ), currentState( KviTalCheckListItem::Off ), statesDict( 0 ), - tristate( FALSE ) {} + tristate( false ) {} KviTalCheckListItem *exclusive; KviTalCheckListItem::ToggleState currentState; @@ -267,14 +267,14 @@ void KviTalCheckListItem::init() { d = new KviTalCheckListItemPrivate(); - on = FALSE; // ### remove on ver 4 + on = false; // ### remove on ver 4 if ( myType == CheckBoxController || myType == CheckBox ) { d->statesDict = new KviPointerHashTable<void *,ToggleState>(101); - d->statesDict->setAutoDelete( TRUE ); + d->statesDict->setAutoDelete( true ); } - // CheckBoxControllers by default have tristate set to TRUE + // CheckBoxControllers by default have tristate set to true if ( myType == CheckBoxController ) - setTristate( TRUE ); + setTristate( true ); } KviTalCheckListItem::~KviTalCheckListItem() @@ -322,7 +322,7 @@ { if ( myType == CheckBoxController && state() == NoChange ) updateStoredState( (void*) this ); - setState( s, TRUE, TRUE ); + setState( s, true, true ); } void KviTalCheckListItem::setState( ToggleState s, bool update, bool store) @@ -348,7 +348,7 @@ ( ((KviTalCheckListItem*)item)->type() == CheckBox || ((KviTalCheckListItem*)item)->type() == CheckBoxController ) ) { KviTalCheckListItem *checkItem = (KviTalCheckListItem*)item; - checkItem->setState( s, FALSE, FALSE ); + checkItem->setState( s, false, false ); childCount++; } item = item->nextSibling(); @@ -356,7 +356,7 @@ if ( update ) { if ( childCount > 0 ) { ToggleState oldState = internalState(); - updateController( FALSE, FALSE ); + updateController( false, false ); if ( oldState != internalState() && parent() && parent()->rtti() == 1 && ((KviTalCheckListItem*)parent())->type() == CheckBoxController ) @@ -399,9 +399,9 @@ ToggleState old = d->currentState; d->currentState = s; if (d->currentState == On) - on = TRUE; + on = true; else - on = FALSE; + on = false; #if defined(TQT_ACCESSIBILITY_SUPPORT) if ( old != d->currentState && listView() ) @@ -432,7 +432,7 @@ void KviTalCheckListItem::turnOffChild() { if ( myType == RadioButtonController && d->exclusive ) - d->exclusive->setOn( FALSE ); + d->exclusive->setOn( false ); } void KviTalCheckListItem::activate() @@ -445,10 +445,10 @@ TQPoint pos; int boxsize = lv->style().pixelMetric(TQStyle::PM_CheckListButtonSize, lv); if ( activatedPos( pos ) ) { - bool parentControl = FALSE; + bool parentControl = false; if ( parent() && parent()->rtti() == 1 && ((KviTalCheckListItem*) parent())->type() == RadioButtonController ) - parentControl = TRUE; + parentControl = true; int x = parentControl ? 0 : 3; int align = lv->columnAlignment( 0 ); @@ -486,7 +486,7 @@ } ignoreDoubleClick(); } else if ( myType == RadioButton ) { - setOn( TRUE ); + setOn( true ); ignoreDoubleClick(); } } @@ -494,9 +494,9 @@ void KviTalCheckListItem::setOn( bool b ) { if ( b ) - setState( On , TRUE, TRUE ); + setState( On , true, true ); else - setState( Off , TRUE, TRUE ); + setState( Off , true, true ); } void KviTalCheckListItem::stateChange( bool ) @@ -531,12 +531,12 @@ } if ( childCount > 0 ) { if ( depth == 0 ) - updateController( TRUE ); + updateController( true ); else - updateController( FALSE ); + updateController( false ); } else { // if there are no children we retrieve the CheckBoxController state directly. - setState( storedState( key ), TRUE, FALSE ); + setState( storedState( key ), true, false ); } } break; @@ -557,7 +557,7 @@ controller = (KviTalCheckListItem*)parent(); ToggleState theState = Off; - bool first = TRUE; + bool first = true; KviTalListViewItem *item = firstChild(); while( item && theState != NoChange ) { if ( item->rtti() == 1 && @@ -566,7 +566,7 @@ KviTalCheckListItem *checkItem = (KviTalCheckListItem*)item; if ( first ) { theState = checkItem->internalState(); - first = FALSE; + first = false; } else { if ( checkItem->internalState() == NoChange || theState != checkItem->internalState() ) @@ -658,10 +658,10 @@ return; } - bool parentControl = FALSE; + bool parentControl = false; if ( parent() && parent()->rtti() == 1 && ((KviTalCheckListItem*) parent())->type() == RadioButtonController ) - parentControl = TRUE; + parentControl = true; TQFontMetrics fm( lv->fontMetrics() ); int boxsize = lv->style().pixelMetric( myType == RadioButtonController ? TQStyle::PM_CheckListControllerSize : @@ -730,7 +730,7 @@ void KviTalCheckListItem::paintFocus( TQPainter *p, const TQColorGroup & cg,const TQRect & r ) { - bool intersect = TRUE; + bool intersect = true; KviTalListView *lv = listView(); if ( lv && lv->header()->mapToActual( 0 ) != 0 ) { int xdepth = lv->treeStepSize() * ( depth() + ( lv->rootIsDecorated() ? 1 : 0) ) + lv->itemMargin(); @@ -738,10 +738,10 @@ xdepth += p; intersect = r.intersects( TQRect( p, r.y(), xdepth - p + 1, r.height() ) ); } - bool parentControl = FALSE; + bool parentControl = false; if ( parent() && parent()->rtti() == 1 && ((KviTalCheckListItem*) parent())->type() == RadioButtonController ) - parentControl = TRUE; + parentControl = true; if ( myType != RadioButtonController && intersect && (lv->rootIsDecorated() || myType == RadioButton || (myType == CheckBox && parentControl) ) ) { |
