summaryrefslogtreecommitdiffstats
path: root/src/mechanics/mechanicsdocument.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mechanics/mechanicsdocument.cpp')
-rw-r--r--src/mechanics/mechanicsdocument.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/mechanics/mechanicsdocument.cpp b/src/mechanics/mechanicsdocument.cpp
index 0b2fa3b..f11d421 100644
--- a/src/mechanics/mechanicsdocument.cpp
+++ b/src/mechanics/mechanicsdocument.cpp
@@ -20,7 +20,7 @@
#include <klocale.h>
-MechanicsDocument::MechanicsDocument( const QString &caption, KTechlab *ktechlab, const char *name )
+MechanicsDocument::MechanicsDocument( const TQString &caption, KTechlab *ktechlab, const char *name )
: ItemDocument( caption, ktechlab, name )
{
m_type = Document::dt_mechanics;
@@ -67,7 +67,7 @@ ItemGroup *MechanicsDocument::selectList() const
-bool MechanicsDocument::isValidItem( const QString &itemId )
+bool MechanicsDocument::isValidItem( const TQString &itemId )
{
return itemId.startsWith("mech/") || itemId.startsWith("dp/");
}
@@ -79,7 +79,7 @@ bool MechanicsDocument::isValidItem( Item *item )
}
-Item* MechanicsDocument::addItem( const QString &id, const QPoint &p, bool newItem )
+Item* MechanicsDocument::addItem( const TQString &id, const TQPoint &p, bool newItem )
{
if ( !isValidItem(id) )
return 0l;
@@ -88,7 +88,7 @@ Item* MechanicsDocument::addItem( const QString &id, const QPoint &p, bool newIt
if (!item)
return 0L;
- QRect rect = item->boundingRect();
+ TQRect rect = item->boundingRect();
int dx = (int)(p.x())-rect.width()/2;
int dy = (int)(p.y())-rect.height()/2;
@@ -130,24 +130,24 @@ void MechanicsDocument::deleteSelection()
}
-bool MechanicsDocument::registerItem( QCanvasItem *qcanvasItem )
+bool MechanicsDocument::registerItem( TQCanvasItem *qcanvasItem )
{
return ItemDocument::registerItem(qcanvasItem);
}
-void MechanicsDocument::appendDeleteList( QCanvasItem *qcanvasItem )
+void MechanicsDocument::appendDeleteList( TQCanvasItem *qcanvasItem )
{
MechanicsItem *mechItem = dynamic_cast<MechanicsItem*>(qcanvasItem);
- if ( !mechItem || m_itemDeleteList.contains(mechItem) ) {
+ if ( !mechItem || m_itemDeleteList.tqcontains(mechItem) ) {
return;
}
m_itemDeleteList.append(mechItem);
m_itemList.remove(mechItem);
- disconnect( mechItem, SIGNAL(selected(Item*,bool)), this, SIGNAL(itemSelected(Item*)) );
- disconnect( mechItem, SIGNAL(unselected(Item*,bool)), this, SIGNAL(itemUnselected(Item*)) );
+ disconnect( mechItem, TQT_SIGNAL(selected(Item*,bool)), this, TQT_SIGNAL(itemSelected(Item*)) );
+ disconnect( mechItem, TQT_SIGNAL(unselected(Item*,bool)), this, TQT_SIGNAL(itemUnselected(Item*)) );
mechItem->removeItem();
}
@@ -159,10 +159,10 @@ void MechanicsDocument::flushDeleteList()
ItemList::iterator end = m_itemDeleteList.end();
for ( ItemList::iterator it = m_itemDeleteList.begin(); it != end; ++it )
{
- if ( *it && m_itemDeleteList.contains(*it) > 1 )
+ if ( *it && m_itemDeleteList.tqcontains(*it) > 1 )
*it = 0l;
}
- m_itemDeleteList.remove(QGuardedPtr<Item>(0l));
+ m_itemDeleteList.remove(TQGuardedPtr<Item>(0l));
end = m_itemDeleteList.end();
for ( ItemList::iterator it = m_itemDeleteList.begin(); it != end; ++it )
@@ -174,7 +174,7 @@ void MechanicsDocument::flushDeleteList()
}
-MechanicsItem* MechanicsDocument::mechanicsItemWithID( const QString &id )
+MechanicsItem* MechanicsDocument::mechanicsItemWithID( const TQString &id )
{
return dynamic_cast<MechanicsItem*>(itemWithID(id));
}