summaryrefslogtreecommitdiffstats
path: root/src/mechanics/mechanicsgroup.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mechanics/mechanicsgroup.cpp')
-rw-r--r--src/mechanics/mechanicsgroup.cpp48
1 files changed, 24 insertions, 24 deletions
diff --git a/src/mechanics/mechanicsgroup.cpp b/src/mechanics/mechanicsgroup.cpp
index 94fe703..8d27579 100644
--- a/src/mechanics/mechanicsgroup.cpp
+++ b/src/mechanics/mechanicsgroup.cpp
@@ -26,17 +26,17 @@ MechanicsGroup::~MechanicsGroup()
bool MechanicsGroup::addItem( Item *item )
{
- if ( !item || !item->canvas() || m_itemList.contains(item) ) {
+ if ( !item || !item->canvas() || m_itemList.tqcontains(item) ) {
return false;
}
- // Check that the item's parent isn't already selected
- Item *parent = item->parentItem();
- while (parent)
+ // Check that the item's tqparent isn't already selected
+ Item *tqparent = item->tqparentItem();
+ while (tqparent)
{
- if ( m_itemList.contains(parent) )
+ if ( m_itemList.tqcontains(tqparent) )
return false;
- parent = parent->parentItem();
+ tqparent = tqparent->tqparentItem();
}
removeChildren(item);
@@ -52,7 +52,7 @@ bool MechanicsGroup::addItem( Item *item )
bool MechanicsGroup::removeItem( Item *item )
{
- if ( !item || !m_itemList.contains(item) ) {
+ if ( !item || !m_itemList.tqcontains(item) ) {
return false;
}
unregisterItem(item);
@@ -71,9 +71,9 @@ void MechanicsGroup::removeChildren( Item *item )
if (!item)
return;
- const ItemList children = item->children();
- const ItemList::const_iterator end = children.end();
- for ( ItemList::const_iterator it = children.begin(); it != end; ++it )
+ const ItemList tqchildren = item->tqchildren();
+ const ItemList::const_iterator end = tqchildren.end();
+ for ( ItemList::const_iterator it = tqchildren.begin(); it != end; ++it )
{
removeChildren(*it);
removeItem(*it);
@@ -131,13 +131,13 @@ MechanicsItemList MechanicsGroup::toplevelMechItemList() const
const MechanicsItemList::const_iterator end = mechItemList.end();
for ( MechanicsItemList::const_iterator it = mechItemList.begin(); it != end; ++it )
{
- MechanicsItem* parent = *it;
- while (parent)
+ MechanicsItem* tqparent = *it;
+ while (tqparent)
{
- if ( !parent->parentItem() && !toplevel.contains(parent) )
- toplevel.append(parent);
+ if ( !tqparent->tqparentItem() && !toplevel.tqcontains(tqparent) )
+ toplevel.append(tqparent);
- parent = dynamic_cast<MechanicsItem*>(parent->parentItem());
+ tqparent = dynamic_cast<MechanicsItem*>(tqparent->tqparentItem());
}
}
@@ -157,14 +157,14 @@ void MechanicsGroup::setSelected( bool sel )
}
-bool MechanicsGroup::addQCanvasItem( QCanvasItem* item )
+bool MechanicsGroup::addTQCanvasItem( TQCanvasItem* item )
{
return addItem( dynamic_cast<Item*>(item) );
}
-bool MechanicsGroup::contains(QCanvasItem* item) const
+bool MechanicsGroup::tqcontains(TQCanvasItem* item) const
{
- return m_itemList.contains(dynamic_cast<Item*>(item));
+ return m_itemList.tqcontains(dynamic_cast<Item*>(item));
}
@@ -201,20 +201,20 @@ void MechanicsGroup::removeAllItems()
removeItem(m_itemList.first());
}
-void MechanicsGroup::removeQCanvasItem(QCanvasItem* item)
+void MechanicsGroup::removeTQCanvasItem(TQCanvasItem* item)
{
removeItem(dynamic_cast<Item*>(item));
}
-void MechanicsGroup::setItems(QCanvasItemList list)
+void MechanicsGroup::setItems(TQCanvasItemList list)
{
{
ItemList removeList;
const ItemList::iterator end = m_itemList.end();
for ( ItemList::iterator it = m_itemList.begin(); it != end; ++it )
{
- if ( !list.contains(*it) ) {
+ if ( !list.tqcontains(*it) ) {
removeList.append(*it);
}
}
@@ -226,12 +226,12 @@ void MechanicsGroup::setItems(QCanvasItemList list)
}
}
- const QCanvasItemList::iterator end = list.end();
- for ( QCanvasItemList::iterator it = list.begin(); it != end; ++it )
+ const TQCanvasItemList::iterator end = list.end();
+ for ( TQCanvasItemList::iterator it = list.begin(); it != end; ++it )
{
// We don't need to check that we've already got the item as it will
// be checked in the function call
- addQCanvasItem(*it);
+ addTQCanvasItem(*it);
}
}