diff options
Diffstat (limited to 'src/kvilib/tal/kvi_tal_listview.cpp')
-rw-r--r-- | src/kvilib/tal/kvi_tal_listview.cpp | 164 |
1 files changed, 82 insertions, 82 deletions
diff --git a/src/kvilib/tal/kvi_tal_listview.cpp b/src/kvilib/tal/kvi_tal_listview.cpp index f7c31719..2d946a21 100644 --- a/src/kvilib/tal/kvi_tal_listview.cpp +++ b/src/kvilib/tal/kvi_tal_listview.cpp @@ -69,8 +69,8 @@ lvi.features |= TQStyleOptionQ3ListViewItem::MultiLine; if (item->isVisible()) lvi.features |= TQStyleOptionQ3ListViewItem::Visible; - if (item->tqparent() && item->tqparent()->rtti() == 1 - && static_cast<Q3CheckListItem *>(item->tqparent())->type() == Q3CheckListItem::Controller) + if (item->parent() && item->parent()->rtti() == 1 + && static_cast<Q3CheckListItem *>(item->parent())->type() == Q3CheckListItem::Controller) lvi.features |= TQStyleOptionQ3ListViewItem::ParentControl; opt.items.append(lvi); if (!firstItem) { @@ -210,39 +210,39 @@ bool tristate; }; - KviTalCheckListItem::KviTalCheckListItem(KviTalCheckListItem *tqparent, const TQString &text, + KviTalCheckListItem::KviTalCheckListItem(KviTalCheckListItem *parent, const TQString &text, Type tt) - : KviTalListViewItem(tqparent, text, TQString()) + : KviTalListViewItem(parent, text, TQString()) { myType = tt; init(); if (myType == RadioButton) { - if (tqparent->type() != RadioButtonController) + if (parent->type() != RadioButtonController) qWarning("KviTalCheckListItem::KviTalCheckListItem(), radio button must be " "child of a controller"); else - d->exclusive = tqparent; + d->exclusive = parent; } } - KviTalCheckListItem::KviTalCheckListItem(KviTalCheckListItem *tqparent, KviTalListViewItem *after, + KviTalCheckListItem::KviTalCheckListItem(KviTalCheckListItem *parent, KviTalListViewItem *after, const TQString &text, Type tt) - : KviTalListViewItem(tqparent, after, text) + : KviTalListViewItem(parent, after, text) { myType = tt; init(); if (myType == RadioButton) { - if (tqparent->type() != RadioButtonController) + if (parent->type() != RadioButtonController) qWarning("KviTalCheckListItem::KviTalCheckListItem(), radio button must be " "child of a controller"); else - d->exclusive = tqparent; + d->exclusive = parent; } } - KviTalCheckListItem::KviTalCheckListItem(KviTalListViewItem *tqparent, const TQString &text, + KviTalCheckListItem::KviTalCheckListItem(KviTalListViewItem *parent, const TQString &text, Type tt) - : KviTalListViewItem(tqparent, text, TQString()) + : KviTalListViewItem(parent, text, TQString()) { myType = tt; if (myType == RadioButton) { @@ -252,9 +252,9 @@ init(); } - KviTalCheckListItem::KviTalCheckListItem(KviTalListViewItem *tqparent, KviTalListViewItem *after, + KviTalCheckListItem::KviTalCheckListItem(KviTalListViewItem *parent, KviTalListViewItem *after, const TQString &text, Type tt) - : KviTalListViewItem(tqparent, after, text) + : KviTalListViewItem(parent, after, text) { myType = tt; if (myType == RadioButton) { @@ -264,9 +264,9 @@ init(); } - KviTalCheckListItem::KviTalCheckListItem(KviTalListView *tqparent, const TQString &text, + KviTalCheckListItem::KviTalCheckListItem(KviTalListView *parent, const TQString &text, Type tt) - : KviTalListViewItem(tqparent, text) + : KviTalListViewItem(parent, text) { myType = tt; if (tt == RadioButton) @@ -275,9 +275,9 @@ init(); } - KviTalCheckListItem::KviTalCheckListItem(KviTalListView *tqparent, KviTalListViewItem *after, + KviTalCheckListItem::KviTalCheckListItem(KviTalListView *parent, KviTalListViewItem *after, const TQString &text, Type tt) - : KviTalListViewItem(tqparent, after, text) + : KviTalListViewItem(parent, after, text) { myType = tt; if (tt == RadioButton) @@ -291,18 +291,18 @@ return RTTI; } - KviTalCheckListItem::KviTalCheckListItem(KviTalListView *tqparent, const TQString &text, + KviTalCheckListItem::KviTalCheckListItem(KviTalListView *parent, const TQString &text, const TQPixmap & p) - : KviTalListViewItem(tqparent, text) + : KviTalListViewItem(parent, text) { myType = RadioButtonController; setPixmap(0, p); init(); } - KviTalCheckListItem::KviTalCheckListItem(KviTalListViewItem *tqparent, const TQString &text, + KviTalCheckListItem::KviTalCheckListItem(KviTalListViewItem *parent, const TQString &text, const TQPixmap & p) - : KviTalListViewItem(tqparent, text) + : KviTalListViewItem(parent, text) { myType = RadioButtonController; setPixmap(0, p); @@ -373,9 +373,9 @@ if (myType == CheckBox) { setCurrentState(s); stateChange(state()); - if (update && tqparent() && tqparent()->rtti() == 1 - && ((KviTalCheckListItem*)tqparent())->type() == CheckBoxController) - ((KviTalCheckListItem*)tqparent())->updateController(update, store); + if (update && parent() && parent()->rtti() == 1 + && ((KviTalCheckListItem*)parent())->type() == CheckBoxController) + ((KviTalCheckListItem*)parent())->updateController(update, store); } else if (myType == CheckBoxController) { if (s == NoChange && childCount()) { restoreState(this); @@ -397,18 +397,18 @@ ToggleState oldState = internalState(); updateController(false, false); if (oldState != internalState() && - tqparent() && tqparent()->rtti() == 1 && - ((KviTalCheckListItem*)tqparent())->type() == CheckBoxController) - ((KviTalCheckListItem*)tqparent())->updateController(update, store); + parent() && parent()->rtti() == 1 && + ((KviTalCheckListItem*)parent())->type() == CheckBoxController) + ((KviTalCheckListItem*)parent())->updateController(update, store); updateController(update, store); } else { - // if there are no tqchildren we simply set the CheckBoxController and update its tqparent + // if there are no tqchildren we simply set the CheckBoxController and update its parent setCurrentState(s); stateChange(state()); - if (tqparent() && tqparent()->rtti() == 1 - && ((KviTalCheckListItem*)tqparent())->type() == CheckBoxController) - ((KviTalCheckListItem*)tqparent())->updateController(update, store); + if (parent() && parent()->rtti() == 1 + && ((KviTalCheckListItem*)parent())->type() == CheckBoxController) + ((KviTalCheckListItem*)parent())->updateController(update, store); } } else { setCurrentState(s); @@ -482,8 +482,8 @@ int boxsize = lv->tqstyle()->tqpixelMetric(TQStyle::PM_CheckListButtonSize, 0, lv); if (activatedPos(pos)) { bool parentControl = false; - if (tqparent() && tqparent()->rtti() == 1 && - ((KviTalCheckListItem*) tqparent())->type() == RadioButtonController) + if (parent() && parent()->rtti() == 1 && + ((KviTalCheckListItem*) parent())->type() == RadioButtonController) parentControl = true; int x = parentControl ? 0 : 3; @@ -588,10 +588,10 @@ return; KviTalCheckListItem *controller = 0; - // checks if this CheckBoxController has another CheckBoxController as tqparent - if (tqparent() && tqparent()->rtti() == 1 - && ((KviTalCheckListItem*)tqparent())->type() == CheckBoxController) - controller = (KviTalCheckListItem*)tqparent(); + // checks if this CheckBoxController has another CheckBoxController as parent + if (parent() && parent()->rtti() == 1 + && ((KviTalCheckListItem*)parent())->type() == CheckBoxController) + controller = (KviTalCheckListItem*)parent(); ToggleState theState = Off; bool first = true; @@ -695,8 +695,8 @@ } bool parentControl = false; - if (tqparent() && tqparent()->rtti() == 1 && - ((KviTalCheckListItem*) tqparent())->type() == RadioButtonController) + if (parent() && parent()->rtti() == 1 && + ((KviTalCheckListItem*) parent())->type() == RadioButtonController) parentControl = true; TQFontMetrics fm(lv->fontMetrics()); @@ -775,8 +775,8 @@ intersect = r.intersects(TQRect(p, r.y(), xdepth - p + 1, r.height())); } bool parentControl = false; - if (tqparent() && tqparent()->rtti() == 1 && - ((KviTalCheckListItem*) tqparent())->type() == RadioButtonController) + if (parent() && parent()->rtti() == 1 && + ((KviTalCheckListItem*) parent())->type() == RadioButtonController) parentControl = true; if (myType != RadioButtonController && intersect && (lv->rootIsDecorated() || myType == RadioButton || @@ -935,39 +935,39 @@ // ### obscenity is warranted. - KviTalCheckListItem::KviTalCheckListItem( KviTalCheckListItem *tqparent, const TQString &text, + KviTalCheckListItem::KviTalCheckListItem( KviTalCheckListItem *parent, const TQString &text, Type tt ) - : KviTalListViewItem( tqparent, text, TQString() ) + : KviTalListViewItem( parent, text, TQString() ) { myType = tt; init(); if ( myType == RadioButton ) { - if ( tqparent->type() != RadioButtonController ) + if ( parent->type() != RadioButtonController ) qWarning( "KviTalCheckListItem::KviTalCheckListItem(), radio button must be " "child of a controller" ); else - d->exclusive = tqparent; + d->exclusive = parent; } } - KviTalCheckListItem::KviTalCheckListItem( KviTalCheckListItem *tqparent, KviTalListViewItem *after, + KviTalCheckListItem::KviTalCheckListItem( KviTalCheckListItem *parent, KviTalListViewItem *after, const TQString &text, Type tt ) - : KviTalListViewItem( tqparent, after, text ) + : KviTalListViewItem( parent, after, text ) { myType = tt; init(); if ( myType == RadioButton ) { - if ( tqparent->type() != RadioButtonController ) + if ( parent->type() != RadioButtonController ) qWarning( "KviTalCheckListItem::KviTalCheckListItem(), radio button must be " "child of a controller" ); else - d->exclusive = tqparent; + d->exclusive = parent; } } - KviTalCheckListItem::KviTalCheckListItem( KviTalListViewItem *tqparent, const TQString &text, + KviTalCheckListItem::KviTalCheckListItem( KviTalListViewItem *parent, const TQString &text, Type tt ) - : KviTalListViewItem( tqparent, text, TQString() ) + : KviTalListViewItem( parent, text, TQString() ) { myType = tt; if ( myType == RadioButton ) { @@ -977,9 +977,9 @@ init(); } - KviTalCheckListItem::KviTalCheckListItem( KviTalListViewItem *tqparent, KviTalListViewItem *after, + KviTalCheckListItem::KviTalCheckListItem( KviTalListViewItem *parent, KviTalListViewItem *after, const TQString &text, Type tt ) - : KviTalListViewItem( tqparent, after, text ) + : KviTalListViewItem( parent, after, text ) { myType = tt; if ( myType == RadioButton ) { @@ -989,9 +989,9 @@ init(); } - KviTalCheckListItem::KviTalCheckListItem( KviTalListView *tqparent, const TQString &text, + KviTalCheckListItem::KviTalCheckListItem( KviTalListView *parent, const TQString &text, Type tt ) - : KviTalListViewItem( tqparent, text ) + : KviTalListViewItem( parent, text ) { myType = tt; if ( tt == RadioButton ) @@ -1000,9 +1000,9 @@ init(); } - KviTalCheckListItem::KviTalCheckListItem( KviTalListView *tqparent, KviTalListViewItem *after, + KviTalCheckListItem::KviTalCheckListItem( KviTalListView *parent, KviTalListViewItem *after, const TQString &text, Type tt ) - : KviTalListViewItem( tqparent, after, text ) + : KviTalListViewItem( parent, after, text ) { myType = tt; if ( tt == RadioButton ) @@ -1019,18 +1019,18 @@ return RTTI; } - KviTalCheckListItem::KviTalCheckListItem( KviTalListView *tqparent, const TQString &text, + KviTalCheckListItem::KviTalCheckListItem( KviTalListView *parent, const TQString &text, const TQPixmap & p ) - : KviTalListViewItem( tqparent, text ) + : KviTalListViewItem( parent, text ) { myType = RadioButtonController; setPixmap( 0, p ); init(); } - KviTalCheckListItem::KviTalCheckListItem( KviTalListViewItem *tqparent, const TQString &text, + KviTalCheckListItem::KviTalCheckListItem( KviTalListViewItem *parent, const TQString &text, const TQPixmap & p ) - : KviTalListViewItem( tqparent, text ) + : KviTalListViewItem( parent, text ) { myType = RadioButtonController; setPixmap( 0, p ); @@ -1107,9 +1107,9 @@ if ( myType == CheckBox ) { setCurrentState( s ); stateChange( state() ); - if ( update && tqparent() && tqparent()->rtti() == 1 - && ((KviTalCheckListItem*)tqparent())->type() == CheckBoxController ) - ((KviTalCheckListItem*)tqparent())->updateController( update, store ); + if ( update && parent() && parent()->rtti() == 1 + && ((KviTalCheckListItem*)parent())->type() == CheckBoxController ) + ((KviTalCheckListItem*)parent())->updateController( update, store ); } else if ( myType == CheckBoxController ) { if ( s == NoChange && childCount()) { restoreState( (void*) this ); @@ -1131,18 +1131,18 @@ ToggleState oldState = internalState(); updateController( FALSE, FALSE ); if ( oldState != internalState() && - tqparent() && tqparent()->rtti() == 1 && - ((KviTalCheckListItem*)tqparent())->type() == CheckBoxController ) - ((KviTalCheckListItem*)tqparent())->updateController( update, store ); + parent() && parent()->rtti() == 1 && + ((KviTalCheckListItem*)parent())->type() == CheckBoxController ) + ((KviTalCheckListItem*)parent())->updateController( update, store ); updateController( update, store ); } else { - // if there are no tqchildren we simply set the CheckBoxController and update its tqparent + // if there are no tqchildren we simply set the CheckBoxController and update its parent setCurrentState( s ); stateChange( state() ); - if ( tqparent() && tqparent()->rtti() == 1 - && ((KviTalCheckListItem*)tqparent())->type() == CheckBoxController ) - ((KviTalCheckListItem*)tqparent())->updateController( update, store ); + if ( parent() && parent()->rtti() == 1 + && ((KviTalCheckListItem*)parent())->type() == CheckBoxController ) + ((KviTalCheckListItem*)parent())->updateController( update, store ); } } else { setCurrentState( s ); @@ -1219,8 +1219,8 @@ int boxsize = lv->tqstyle().tqpixelMetric(TQStyle::PM_CheckListButtonSize, lv); if ( activatedPos( pos ) ) { bool parentControl = FALSE; - if ( tqparent() && tqparent()->rtti() == 1 && - ((KviTalCheckListItem*) tqparent())->type() == RadioButtonController ) + if ( parent() && parent()->rtti() == 1 && + ((KviTalCheckListItem*) parent())->type() == RadioButtonController ) parentControl = TRUE; int x = parentControl ? 0 : 3; @@ -1324,10 +1324,10 @@ return; KviTalCheckListItem *controller = 0; - // checks if this CheckBoxController has another CheckBoxController as tqparent - if ( tqparent() && tqparent()->rtti() == 1 - && ((KviTalCheckListItem*)tqparent())->type() == CheckBoxController ) - controller = (KviTalCheckListItem*)tqparent(); + // checks if this CheckBoxController has another CheckBoxController as parent + if ( parent() && parent()->rtti() == 1 + && ((KviTalCheckListItem*)parent())->type() == CheckBoxController ) + controller = (KviTalCheckListItem*)parent(); ToggleState theState = Off; bool first = TRUE; @@ -1432,8 +1432,8 @@ } bool parentControl = FALSE; - if ( tqparent() && tqparent()->rtti() == 1 && - ((KviTalCheckListItem*) tqparent())->type() == RadioButtonController ) + if ( parent() && parent()->rtti() == 1 && + ((KviTalCheckListItem*) parent())->type() == RadioButtonController ) parentControl = TRUE; TQFontMetrics fm( lv->fontMetrics() ); @@ -1512,8 +1512,8 @@ intersect = r.intersects( TQRect( p, r.y(), xdepth - p + 1, r.height() ) ); } bool parentControl = FALSE; - if ( tqparent() && tqparent()->rtti() == 1 && - ((KviTalCheckListItem*) tqparent())->type() == RadioButtonController ) + if ( parent() && parent()->rtti() == 1 && + ((KviTalCheckListItem*) parent())->type() == RadioButtonController ) parentControl = TRUE; if ( myType != RadioButtonController && intersect && (lv->rootIsDecorated() || myType == RadioButton || |