diff options
Diffstat (limited to 'kdevdesigner/designer/listviewdnd.cpp')
-rw-r--r-- | kdevdesigner/designer/listviewdnd.cpp | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/kdevdesigner/designer/listviewdnd.cpp b/kdevdesigner/designer/listviewdnd.cpp index b1d5323d..953551df 100644 --- a/kdevdesigner/designer/listviewdnd.cpp +++ b/kdevdesigner/designer/listviewdnd.cpp @@ -36,10 +36,10 @@ class ListViewItemDrag : public TQStoredDrag { public: enum DropRelation { Sibling, Child }; - ListViewItemDrag( ListViewItemList & items, TQWidget * tqparent = 0, const char * name = 0 ); + ListViewItemDrag( ListViewItemList & items, TQWidget * parent = 0, const char * name = 0 ); ~ListViewItemDrag() {}; static bool canDecode( TQDragMoveEvent * event ); - static bool decode( TQDropEvent * event, TQListView * tqparent, TQListViewItem * insertPoint, DropRelation dr ); + static bool decode( TQDropEvent * event, TQListView * parent, TQListViewItem * insertPoint, DropRelation dr ); }; // ------------------------------------------------------------------ @@ -74,7 +74,7 @@ bool ListViewDnd::dropEvent( TQDropEvent * event ) } else if ( dpos < item->depth() ) { // Parent(s) Sibling while ( item && (item->depth() > dpos) ) - item = item->tqparent(); + item = item->parent(); } } @@ -150,10 +150,10 @@ int ListViewDnd::buildFlatList( ListViewItemList & list ) // processing tqchildren...if any such item addKids = TRUE; nextSibling = (*it)->nextSibling(); - nextParent = (*it)->tqparent(); + nextParent = (*it)->parent(); while ( nextParent && !nextSibling ) { nextSibling = nextParent->nextSibling(); - nextParent = nextParent->tqparent(); + nextParent = nextParent->parent(); } } } else if ( ((*it)->childCount() == 0) && addKids ) { @@ -209,13 +209,13 @@ TQListViewItem * ListViewDnd::itemAt( TQPoint pos ) if ( result && ( pos.ry() < (src->itemPos(result) + result->height()/2) ) ) result = result->itemAbove(); - // Wind back if has tqparent, and we're in flat mode - while ( result && result->tqparent() && (dMode & Flat) ) - result = result->tqparent(); + // Wind back if has parent, and we're in flat mode + while ( result && result->parent() && (dMode & Flat) ) + result = result->parent(); - // Wind back if has tqparent, and we're in flat mode - while ( result && !result->isVisible() && result->tqparent() ) - result = result->tqparent(); + // Wind back if has parent, and we're in flat mode + while ( result && !result->isVisible() && result->parent() ) + result = result->parent(); if ( !result && src->firstChild() && (pos.y() > src->tqitemRect(src->firstChild()).bottom()) ) { result = src->lastItem(); @@ -259,8 +259,8 @@ bool ListViewDnd::canDecode( TQDragEnterEvent * event ) TQDataStream & operator<< ( TQDataStream & stream, const TQListViewItem & item ); TQDataStream & operator>> ( TQDataStream & stream, TQListViewItem & item ); -ListViewItemDrag::ListViewItemDrag( ListViewItemList & items, TQWidget * tqparent, const char * name ) - : TQStoredDrag( "qt/listviewitem", tqparent, name ) +ListViewItemDrag::ListViewItemDrag( ListViewItemList & items, TQWidget * parent, const char * name ) + : TQStoredDrag( "qt/listviewitem", parent, name ) { // ### FIX! TQByteArray data( sizeof( TQ_INT32 ) + sizeof( TQListViewItem ) * items.count() ); @@ -282,10 +282,10 @@ bool ListViewItemDrag::canDecode( TQDragMoveEvent * event ) return event->provides( "qt/listviewitem" ); } -bool ListViewItemDrag::decode( TQDropEvent * event, TQListView * tqparent, TQListViewItem * insertPoint, DropRelation dr ) +bool ListViewItemDrag::decode( TQDropEvent * event, TQListView * parent, TQListViewItem * insertPoint, DropRelation dr ) { TQByteArray data = event->tqencodedData( "qt/listviewitem" ); - TQListViewItem* itemParent = insertPoint ? insertPoint->tqparent() : 0; + TQListViewItem* itemParent = insertPoint ? insertPoint->parent() : 0; // Change from sibling (default) to child creation if ( insertPoint && dr == Child ) { @@ -304,8 +304,8 @@ bool ListViewItemDrag::decode( TQDropEvent * event, TQListView * tqparent, TQLis if ( itemParent ) { insertPoint = new TQListViewItem( itemParent, insertPoint ); itemParent->setOpen( TRUE ); - } else { // No tqparent for insertPoint, use TQListView - insertPoint = new TQListViewItem( tqparent, insertPoint ); + } else { // No parent for insertPoint, use TQListView + insertPoint = new TQListViewItem( parent, insertPoint ); } stream >> *insertPoint; } |