diff options
Diffstat (limited to 'src/itemgroup.cpp')
-rw-r--r-- | src/itemgroup.cpp | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/src/itemgroup.cpp b/src/itemgroup.cpp index 1b640d3..9abdfe0 100644 --- a/src/itemgroup.cpp +++ b/src/itemgroup.cpp @@ -13,18 +13,18 @@ #include "itemgroup.h" #include "mechanicsdocument.h" -#include <qtimer.h> +#include <tqtimer.h> ItemGroup::ItemGroup( ItemDocument *view, const char *name ) - : QObject( view, name ) + : TQObject( view, name ) { m_activeItem = 0l; b_itemsAreSameType = true; p_view = view; p_icnDocument = dynamic_cast<ICNDocument*>(p_view); p_mechanicsDocument = dynamic_cast<MechanicsDocument*>(p_view); - QTimer::singleShot( 0, this, SLOT(getViewPtrs()) ); + TQTimer::singleShot( 0, this, TQT_SLOT(getViewPtrs()) ); } @@ -46,28 +46,28 @@ ItemList ItemGroup::items( bool excludeParentedItems ) const return m_itemList; ItemList items = m_itemList; - ItemList parents = m_itemList; + ItemList tqparents = m_itemList; uint oldSize = items.size(); do { oldSize = items.size(); - ItemList children; + ItemList tqchildren; - ItemList::iterator end = parents.end(); - for ( ItemList::iterator it = parents.begin(); it != end; ++it ) - children += (*it)->children(); + ItemList::iterator end = tqparents.end(); + for ( ItemList::iterator it = tqparents.begin(); it != end; ++it ) + tqchildren += (*it)->tqchildren(); - end = children.end(); - for ( ItemList::iterator it = children.begin(); it != end; ++it ) + end = tqchildren.end(); + for ( ItemList::iterator it = tqchildren.begin(); it != end; ++it ) { - if ( children.contains(*it) > 1 ) + if ( tqchildren.tqcontains(*it) > 1 ) *it = 0l; } - children.remove((Item*)0l); + tqchildren.remove((Item*)0l); - items += children; - parents = children; + items += tqchildren; + tqparents = tqchildren; } while ( oldSize != items.size() ); @@ -75,7 +75,7 @@ ItemList ItemGroup::items( bool excludeParentedItems ) const } -bool ItemGroup::itemsHaveSameDataValue( const QString &id ) const +bool ItemGroup::itemsHaveSameDataValue( const TQString &id ) const { if ( m_itemList.size() < 1 ) { return true; @@ -87,7 +87,7 @@ bool ItemGroup::itemsHaveSameDataValue( const QString &id ) const ItemList::const_iterator it = m_itemList.begin(); const ItemList::const_iterator end = m_itemList.end(); - QVariant firstData = (*it)->property(id)->value(); + TQVariant firstData = (*it)->property(id)->value(); for ( ++it; it != end; ++it ) { if ( (*it) && (*it)->property(id) && (*it)->property(id)->value() != firstData ) { @@ -143,24 +143,24 @@ bool ItemGroup::itemsHaveDefaultData() const void ItemGroup::registerItem( Item *item ) { - if ( !item || m_itemList.contains(item) ) { + if ( !item || m_itemList.tqcontains(item) ) { return; } m_itemList += item; - updateAreSameStatus(); + updateAreSametqStatus(); } void ItemGroup::unregisterItem( Item *item ) { if ( m_itemList.remove(item) > 0 ) { - updateAreSameStatus(); + updateAreSametqStatus(); } } -void ItemGroup::updateAreSameStatus() +void ItemGroup::updateAreSametqStatus() { b_itemsAreSameType = true; @@ -168,8 +168,8 @@ void ItemGroup::updateAreSameStatus() return; } - QString activeId = (*m_itemList.begin())->id(); - int discardIndex = activeId.findRev("__"); + TQString activeId = (*m_itemList.begin())->id(); + int discardIndex = activeId.tqfindRev("__"); if ( discardIndex != -1 ) activeId.truncate(discardIndex); const ItemList::iterator end = m_itemList.end(); @@ -177,8 +177,8 @@ void ItemGroup::updateAreSameStatus() { if (*it) { - QString id = (*it)->id(); - discardIndex = id.findRev("__"); + TQString id = (*it)->id(); + discardIndex = id.tqfindRev("__"); if ( discardIndex != -1 ) id.truncate(discardIndex); if ( id != activeId ) { |