diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:54:04 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:54:04 +0000 |
commit | dc6b8e72fed2586239e3514819238c520636c9d9 (patch) | |
tree | 88b200df0a0b7fab9d6f147596173556f1ed9a13 /kommander/editor/metadatabase.cpp | |
parent | 6927d4436e54551917f600b706a8d6109e49de1c (diff) | |
download | tdewebdev-dc6b8e72fed2586239e3514819238c520636c9d9.tar.gz tdewebdev-dc6b8e72fed2586239e3514819238c520636c9d9.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdewebdev@1157656 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kommander/editor/metadatabase.cpp')
-rw-r--r-- | kommander/editor/metadatabase.cpp | 362 |
1 files changed, 181 insertions, 181 deletions
diff --git a/kommander/editor/metadatabase.cpp b/kommander/editor/metadatabase.cpp index b902f2f4..84072865 100644 --- a/kommander/editor/metadatabase.cpp +++ b/kommander/editor/metadatabase.cpp @@ -24,21 +24,21 @@ #include "widgetdatabase.h" #include "formfile.h" -#include <qapplication.h> -#include <qobject.h> -#include <qlayout.h> -#include <qptrdict.h> -#include <qobjectlist.h> -#include <qstrlist.h> -#include <qmetaobject.h> -#include <qwidgetlist.h> -#include <qmainwindow.h> -#include <qregexp.h> +#include <tqapplication.h> +#include <tqobject.h> +#include <tqlayout.h> +#include <tqptrdict.h> +#include <tqobjectlist.h> +#include <tqstrlist.h> +#include <tqmetaobject.h> +#include <tqwidgetlist.h> +#include <tqmainwindow.h> +#include <tqregexp.h> #include <private/qpluginmanager_p.h> -#include <qdatetime.h> -#include <qfile.h> -#include <qfileinfo.h> -#include <qtextstream.h> +#include <tqdatetime.h> +#include <tqfile.h> +#include <tqfileinfo.h> +#include <tqtextstream.h> #include <stdlib.h> @@ -46,33 +46,33 @@ class MetaDataBaseRecord { public: - QObject *object; - QStringList changedProperties; - QMap<QString,QVariant> fakeProperties; - QMap<QString, QString> propertyComments; + TQObject *object; + TQStringList changedProperties; + TQMap<TQString,TQVariant> fakeProperties; + TQMap<TQString, TQString> propertyComments; int spacing, margin; - QValueList<MetaDataBase::Connection> connections; - QValueList<MetaDataBase::Slot> slotList; - QValueList<MetaDataBase::Include> includes; - QStringList forwards, variables, sigs; - QWidgetList tabOrder; + TQValueList<MetaDataBase::Connection> connections; + TQValueList<MetaDataBase::Slot> slotList; + TQValueList<MetaDataBase::Include> includes; + TQStringList forwards, variables, sigs; + TQWidgetList tabOrder; MetaDataBase::MetaInfo metaInfo; - QCursor cursor; - QMap<int, QString> pixmapArguments; - QMap<int, QString> pixmapKeys; - QMap<QString, QString> columnFields; - QMap<QString, QStringList> eventFunctions; - QMap<QString, QString> functionBodies; - QMap<QString, QString> functionComments; - QValueList<int> breakPoints; - QString exportMacro; + TQCursor cursor; + TQMap<int, TQString> pixmapArguments; + TQMap<int, TQString> pixmapKeys; + TQMap<TQString, TQString> columnFields; + TQMap<TQString, TQStringList> eventFunctions; + TQMap<TQString, TQString> functionBodies; + TQMap<TQString, TQString> functionComments; + TQValueList<int> breakPoints; + TQString exportMacro; }; -static QPtrDict<MetaDataBaseRecord> *db = 0; -static QPtrList<MetaDataBase::CustomWidget> *cWidgets = 0; +static TQPtrDict<MetaDataBaseRecord> *db = 0; +static TQPtrList<MetaDataBase::CustomWidget> *cWidgets = 0; static bool doUpdate = true; -static QStringList langList; -static QStringList editorLangList; +static TQStringList langList; +static TQStringList editorLangList; /*! \class MetaDataBase metadatabase.h @@ -90,9 +90,9 @@ MetaDataBase::MetaDataBase() inline void setupDataBase() { if ( !db || !cWidgets ) { - db = new QPtrDict<MetaDataBaseRecord>( 1481 ); + db = new TQPtrDict<MetaDataBaseRecord>( 1481 ); db->setAutoDelete( true ); - cWidgets = new QPtrList<MetaDataBase::CustomWidget>; + cWidgets = new TQPtrList<MetaDataBase::CustomWidget>; cWidgets->setAutoDelete( true ); } } @@ -105,7 +105,7 @@ void MetaDataBase::clearDataBase() cWidgets = 0; } -void MetaDataBase::addEntry( QObject *o ) +void MetaDataBase::addEntry( TQObject *o ) { if ( !o ) return; @@ -120,13 +120,13 @@ void MetaDataBase::addEntry( QObject *o ) WidgetFactory::initChangedProperties( o ); } -void MetaDataBase::removeEntry( QObject *o ) +void MetaDataBase::removeEntry( TQObject *o ) { setupDataBase(); db->remove( o ); } -void MetaDataBase::setPropertyChanged( QObject *o, const QString &property, bool changed ) +void MetaDataBase::setPropertyChanged( TQObject *o, const TQString &property, bool changed ) { setupDataBase(); MetaDataBaseRecord *r = db->find( (void*)o ); @@ -163,7 +163,7 @@ void MetaDataBase::setPropertyChanged( QObject *o, const QString &property, bool } } -bool MetaDataBase::isPropertyChanged( QObject *o, const QString &property ) +bool MetaDataBase::isPropertyChanged( TQObject *o, const TQString &property ) { setupDataBase(); MetaDataBaseRecord *r = db->find( (void*)o ); @@ -176,21 +176,21 @@ bool MetaDataBase::isPropertyChanged( QObject *o, const QString &property ) return r->changedProperties.findIndex( property ) != -1; } -QStringList MetaDataBase::changedProperties( QObject *o ) +TQStringList MetaDataBase::changedProperties( TQObject *o ) { setupDataBase(); MetaDataBaseRecord *r = db->find( (void*)o ); if ( !r ) { qWarning( "No entry for %p (%s, %s) found in MetaDataBase", o, o->name(), o->className() ); - return QStringList(); + return TQStringList(); } - QStringList lst( r->changedProperties ); + TQStringList lst( r->changedProperties ); return lst; } -void MetaDataBase::setPropertyComment( QObject *o, const QString &property, const QString &comment ) +void MetaDataBase::setPropertyComment( TQObject *o, const TQString &property, const TQString &comment ) { setupDataBase(); MetaDataBaseRecord *r = db->find( (void*)o ); @@ -203,20 +203,20 @@ void MetaDataBase::setPropertyComment( QObject *o, const QString &property, cons r->propertyComments.insert( property, comment ); } -QString MetaDataBase::propertyComment( QObject *o, const QString &property ) +TQString MetaDataBase::propertyComment( TQObject *o, const TQString &property ) { setupDataBase(); MetaDataBaseRecord *r = db->find( (void*)o ); if ( !r ) { qWarning( "No entry for %p (%s, %s) found in MetaDataBase", o, o->name(), o->className() ); - return QString::null; + return TQString::null; } return *r->propertyComments.find( property ); } -void MetaDataBase::setFakeProperty( QObject *o, const QString &property, const QVariant& value ) +void MetaDataBase::setFakeProperty( TQObject *o, const TQString &property, const TQVariant& value ) { setupDataBase(); MetaDataBaseRecord *r = db->find( (void*)o ); @@ -228,23 +228,23 @@ void MetaDataBase::setFakeProperty( QObject *o, const QString &property, const Q r->fakeProperties[property] = value; } -QVariant MetaDataBase::fakeProperty( QObject * o, const QString &property) +TQVariant MetaDataBase::fakeProperty( TQObject * o, const TQString &property) { setupDataBase(); MetaDataBaseRecord *r = db->find( (void*)o ); if ( !r ) { qWarning( "No entry for %p (%s, %s) found in MetaDataBase", o, o->name(), o->className() ); - return QVariant(); + return TQVariant(); } - QMap<QString, QVariant>::Iterator it = r->fakeProperties.find( property ); + TQMap<TQString, TQVariant>::Iterator it = r->fakeProperties.find( property ); if ( it != r->fakeProperties.end() ) return r->fakeProperties[property]; return WidgetFactory::defaultValue( o, property ); } -QMap<QString,QVariant>* MetaDataBase::fakeProperties( QObject* o ) +TQMap<TQString,TQVariant>* MetaDataBase::fakeProperties( TQObject* o ) { setupDataBase(); MetaDataBaseRecord *r = db->find( (void*)o ); @@ -256,7 +256,7 @@ QMap<QString,QVariant>* MetaDataBase::fakeProperties( QObject* o ) return &r->fakeProperties; } -void MetaDataBase::setSpacing( QObject *o, int spacing ) +void MetaDataBase::setSpacing( TQObject *o, int spacing ) { if ( !o ) return; @@ -269,19 +269,19 @@ void MetaDataBase::setSpacing( QObject *o, int spacing ) } r->spacing = spacing; - QLayout * layout = 0; - WidgetFactory::layoutType( (QWidget*)o, layout ); + TQLayout * layout = 0; + WidgetFactory::layoutType( (TQWidget*)o, layout ); if ( layout ) layout->setSpacing( spacing ); } -int MetaDataBase::spacing( QObject *o ) +int MetaDataBase::spacing( TQObject *o ) { if ( !o ) return -1; setupDataBase(); - if ( o->inherits( "QMainWindow" ) ) - o = ( (QMainWindow*)o )->centralWidget(); + if ( o->inherits( "TQMainWindow" ) ) + o = ( (TQMainWindow*)o )->centralWidget(); MetaDataBaseRecord *r = db->find( (void*)o ); if ( !r || !o->isWidgetType() ) { qWarning( "No entry for %p (%s, %s) found in MetaDataBase", @@ -292,7 +292,7 @@ int MetaDataBase::spacing( QObject *o ) return r->spacing; } -void MetaDataBase::setMargin( QObject *o, int margin ) +void MetaDataBase::setMargin( TQObject *o, int margin ) { if ( !o ) return; @@ -305,21 +305,21 @@ void MetaDataBase::setMargin( QObject *o, int margin ) } r->margin = margin; - QLayout * layout = 0; - WidgetFactory::layoutType( (QWidget*)o, layout ); + TQLayout * layout = 0; + WidgetFactory::layoutType( (TQWidget*)o, layout ); if ( margin < 1 ) margin = 1; if ( layout ) layout->setMargin( margin ); } -int MetaDataBase::margin( QObject *o ) +int MetaDataBase::margin( TQObject *o ) { if ( !o ) return -1; setupDataBase(); - if ( o->inherits( "QMainWindow" ) ) - o = ( (QMainWindow*)o )->centralWidget(); + if ( o->inherits( "TQMainWindow" ) ) + o = ( (TQMainWindow*)o )->centralWidget(); MetaDataBaseRecord *r = db->find( (void*)o ); if ( !r || !o->isWidgetType() ) { qWarning( "No entry for %p (%s, %s) found in MetaDataBase", @@ -330,8 +330,8 @@ int MetaDataBase::margin( QObject *o ) return r->margin; } -void MetaDataBase::addConnection( QObject *o, QObject *sender, const QCString &signal, - QObject *receiver, const QCString &slot ) +void MetaDataBase::addConnection( TQObject *o, TQObject *sender, const TQCString &signal, + TQObject *receiver, const TQCString &slot ) { setupDataBase(); MetaDataBaseRecord *r = db->find( (void*)o ); @@ -348,8 +348,8 @@ void MetaDataBase::addConnection( QObject *o, QObject *sender, const QCString &s r->connections.append( conn ); } -void MetaDataBase::removeConnection( QObject *o, QObject *sender, const QCString &signal, - QObject *receiver, const QCString &slot ) +void MetaDataBase::removeConnection( TQObject *o, TQObject *sender, const TQCString &signal, + TQObject *receiver, const TQCString &slot ) { setupDataBase(); MetaDataBaseRecord *r = db->find( (void*)o ); @@ -359,7 +359,7 @@ void MetaDataBase::removeConnection( QObject *o, QObject *sender, const QCString return; } - for ( QValueList<Connection>::Iterator it = r->connections.begin(); it != r->connections.end(); ++it ) { + for ( TQValueList<Connection>::Iterator it = r->connections.begin(); it != r->connections.end(); ++it ) { Connection conn = *it; if ( conn.sender == sender && conn.signal == signal && @@ -371,31 +371,31 @@ void MetaDataBase::removeConnection( QObject *o, QObject *sender, const QCString } } -QValueList<MetaDataBase::Connection> MetaDataBase::connections( QObject *o ) +TQValueList<MetaDataBase::Connection> MetaDataBase::connections( TQObject *o ) { setupDataBase(); MetaDataBaseRecord *r = db->find( (void*)o ); if ( !r ) { qWarning( "No entry for %p (%s, %s) found in MetaDataBase", o, o->name(), o->className() ); - return QValueList<Connection>(); + return TQValueList<Connection>(); } return r->connections; } -QValueList<MetaDataBase::Connection> MetaDataBase::connections( QObject *o, QObject *sender, - QObject *receiver ) +TQValueList<MetaDataBase::Connection> MetaDataBase::connections( TQObject *o, TQObject *sender, + TQObject *receiver ) { setupDataBase(); MetaDataBaseRecord *r = db->find( (void*)o ); if ( !r ) { qWarning( "No entry for %p (%s, %s) found in MetaDataBase", o, o->name(), o->className() ); - return QValueList<Connection>(); + return TQValueList<Connection>(); } - QValueList<Connection>::Iterator it = r->connections.begin(); - QValueList<Connection> ret; - QValueList<Connection>::Iterator conn; + TQValueList<Connection>::Iterator it = r->connections.begin(); + TQValueList<Connection> ret; + TQValueList<Connection>::Iterator conn; while ( ( conn = it ) != r->connections.end() ) { ++it; if ( (*conn).sender == sender && @@ -406,18 +406,18 @@ QValueList<MetaDataBase::Connection> MetaDataBase::connections( QObject *o, QObj return ret; } -QValueList<MetaDataBase::Connection> MetaDataBase::connections( QObject *o, QObject *object ) +TQValueList<MetaDataBase::Connection> MetaDataBase::connections( TQObject *o, TQObject *object ) { setupDataBase(); MetaDataBaseRecord *r = db->find( (void*)o ); if ( !r ) { qWarning( "No entry for %p (%s, %s) found in MetaDataBase", o, o->name(), o->className() ); - return QValueList<Connection>(); + return TQValueList<Connection>(); } - QValueList<Connection>::Iterator it = r->connections.begin(); - QValueList<Connection> ret; - QValueList<Connection>::Iterator conn; + TQValueList<Connection>::Iterator it = r->connections.begin(); + TQValueList<Connection> ret; + TQValueList<Connection>::Iterator conn; while ( ( conn = it ) != r->connections.end() ) { ++it; if ( (*conn).sender == object || @@ -427,7 +427,7 @@ QValueList<MetaDataBase::Connection> MetaDataBase::connections( QObject *o, QObj return ret; } -void MetaDataBase::doConnections( QObject *o ) +void MetaDataBase::doConnections( TQObject *o ) { setupDataBase(); MetaDataBaseRecord *r = db->find( (void*)o ); @@ -437,9 +437,9 @@ void MetaDataBase::doConnections( QObject *o ) return; } - QObject *sender = 0, *receiver = 0; - QObjectList *l = 0; - QValueList<Connection>::Iterator it = r->connections.begin(); + TQObject *sender = 0, *receiver = 0; + TQObjectList *l = 0; + TQValueList<Connection>::Iterator it = r->connections.begin(); for ( ; it != r->connections.end(); ++it ) { Connection conn = *it; if ( qstrcmp( conn.sender->name(), o->name() ) == 0 ) { @@ -464,25 +464,25 @@ void MetaDataBase::doConnections( QObject *o ) receiver = l->first(); delete l; } - QString s = "2""%1"; + TQString s = "2""%1"; s = s.arg( conn.signal ); - QString s2 = "1""%1"; + TQString s2 = "1""%1"; s2 = s2.arg( conn.slot ); - QStrList signalList = sender->metaObject()->signalNames( true ); - QStrList slotList = receiver->metaObject()->slotNames( true ); + TQStrList signalList = sender->metaObject()->signalNames( true ); + TQStrList slotList = receiver->metaObject()->slotNames( true ); // avoid warnings if ( signalList.find( conn.signal ) == -1 || slotList.find( conn.slot ) == -1 ) continue; - QObject::connect( sender, s, receiver, s2 ); + TQObject::connect( sender, s, receiver, s2 ); } } -void MetaDataBase::addSlot( QObject *o, const QCString &slot, const QString& specifier, - const QString &access, const QString &language, const QString &returnType ) +void MetaDataBase::addSlot( TQObject *o, const TQCString &slot, const TQString& specifier, + const TQString &access, const TQString &language, const TQString &returnType ) { setupDataBase(); MetaDataBaseRecord *r = db->find( (void*)o ); @@ -498,7 +498,7 @@ void MetaDataBase::addSlot( QObject *o, const QCString &slot, const QString& spe s.access = access; s.language = language; s.returnType = returnType; - QValueList<MetaDataBase::Slot>::Iterator it = r->slotList.find( s ); + TQValueList<MetaDataBase::Slot>::Iterator it = r->slotList.find( s ); if ( it != r->slotList.end() ) r->slotList.remove( it ); r->slotList.append( s ); @@ -507,7 +507,7 @@ void MetaDataBase::addSlot( QObject *o, const QCString &slot, const QString& spe #endif } -void MetaDataBase::setSlotList( QObject *o, const QValueList<Slot> &slotList ) +void MetaDataBase::setSlotList( TQObject *o, const TQValueList<Slot> &slotList ) { setupDataBase(); MetaDataBaseRecord *r = db->find( (void*)o ); @@ -519,8 +519,8 @@ void MetaDataBase::setSlotList( QObject *o, const QValueList<Slot> &slotList ) r->slotList = slotList; } -void MetaDataBase::removeSlot( QObject *o, const QCString &slot, const QString& specifier, - const QString &access, const QString &language, const QString &returnType ) +void MetaDataBase::removeSlot( TQObject *o, const TQCString &slot, const TQString& specifier, + const TQString &access, const TQString &language, const TQString &returnType ) { setupDataBase(); MetaDataBaseRecord *r = db->find( (void*)o ); @@ -530,7 +530,7 @@ void MetaDataBase::removeSlot( QObject *o, const QCString &slot, const QString& return; } - for ( QValueList<Slot>::Iterator it = r->slotList.begin(); it != r->slotList.end(); ++it ) { + for ( TQValueList<Slot>::Iterator it = r->slotList.begin(); it != r->slotList.end(); ++it ) { Slot s = *it; if ( s.slot == slot && s.specifier == specifier && @@ -543,7 +543,7 @@ void MetaDataBase::removeSlot( QObject *o, const QCString &slot, const QString& } } -void MetaDataBase::removeSlot( QObject *o, const QString &slot ) +void MetaDataBase::removeSlot( TQObject *o, const TQString &slot ) { setupDataBase(); MetaDataBaseRecord *r = db->find( (void*)o ); @@ -553,7 +553,7 @@ void MetaDataBase::removeSlot( QObject *o, const QString &slot ) return; } - for ( QValueList<Slot>::Iterator it = r->slotList.begin(); it != r->slotList.end(); ++it ) { + for ( TQValueList<Slot>::Iterator it = r->slotList.begin(); it != r->slotList.end(); ++it ) { Slot s = *it; if ( normalizeSlot( s.slot ) == normalizeSlot( slot ) ) { r->slotList.remove( it ); @@ -562,20 +562,20 @@ void MetaDataBase::removeSlot( QObject *o, const QString &slot ) } } -QValueList<MetaDataBase::Slot> MetaDataBase::slotList( QObject *o ) +TQValueList<MetaDataBase::Slot> MetaDataBase::slotList( TQObject *o ) { setupDataBase(); MetaDataBaseRecord *r = db->find( (void*)o ); if ( !r ) { qWarning( "No entry for %p (%s, %s) found in MetaDataBase", o, o->name(), o->className() ); - return QValueList<Slot>(); + return TQValueList<Slot>(); } return r->slotList; } -bool MetaDataBase::isSlotUsed( QObject *o, const QCString &slot ) +bool MetaDataBase::isSlotUsed( TQObject *o, const TQCString &slot ) { setupDataBase(); MetaDataBaseRecord *r = db->find( (void*)o ); @@ -585,15 +585,15 @@ bool MetaDataBase::isSlotUsed( QObject *o, const QCString &slot ) return false; } - QValueList<Connection> conns = connections( o ); - for ( QValueList<Connection>::Iterator it = conns.begin(); it != conns.end(); ++it ) { + TQValueList<Connection> conns = connections( o ); + for ( TQValueList<Connection>::Iterator it = conns.begin(); it != conns.end(); ++it ) { if ( (*it).slot == slot ) return true; } return false; } -void MetaDataBase::changeSlot( QObject *o, const QCString &slot, const QCString &newName ) +void MetaDataBase::changeSlot( TQObject *o, const TQCString &slot, const TQCString &newName ) { setupDataBase(); MetaDataBaseRecord *r = db->find( (void*)o ); @@ -603,7 +603,7 @@ void MetaDataBase::changeSlot( QObject *o, const QCString &slot, const QCString return; } - for ( QValueList<Slot>::Iterator it = r->slotList.begin(); it != r->slotList.end(); ++it ) { + for ( TQValueList<Slot>::Iterator it = r->slotList.begin(); it != r->slotList.end(); ++it ) { Slot s = *it; if ( normalizeSlot( s.slot ) == normalizeSlot( slot ) ) { (*it).slot = newName; @@ -612,9 +612,9 @@ void MetaDataBase::changeSlot( QObject *o, const QCString &slot, const QCString } } -void MetaDataBase::changeSlotAttributes( QObject *o, const QCString &slot, - const QString& specifier, const QString &access, - const QString &language, const QString &returnType ) +void MetaDataBase::changeSlotAttributes( TQObject *o, const TQCString &slot, + const TQString& specifier, const TQString &access, + const TQString &language, const TQString &returnType ) { setupDataBase(); MetaDataBaseRecord *r = db->find( (void*)o ); @@ -624,7 +624,7 @@ void MetaDataBase::changeSlotAttributes( QObject *o, const QCString &slot, return; } - for ( QValueList<Slot>::Iterator it = r->slotList.begin(); it != r->slotList.end(); ++it ) { + for ( TQValueList<Slot>::Iterator it = r->slotList.begin(); it != r->slotList.end(); ++it ) { Slot s = *it; if ( normalizeSlot( s.slot ) == normalizeSlot( slot ) ) { (*it).specifier = specifier; @@ -636,7 +636,7 @@ void MetaDataBase::changeSlotAttributes( QObject *o, const QCString &slot, } } -bool MetaDataBase::hasSlot( QObject *o, const QCString &slot, bool onlyCustom ) +bool MetaDataBase::hasSlot( TQObject *o, const TQCString &slot, bool onlyCustom ) { setupDataBase(); MetaDataBaseRecord *r = db->find( (void*)o ); @@ -647,7 +647,7 @@ bool MetaDataBase::hasSlot( QObject *o, const QCString &slot, bool onlyCustom ) } if ( !onlyCustom ) { - QStrList slotList = o->metaObject()->slotNames( true ); + TQStrList slotList = o->metaObject()->slotNames( true ); if ( slotList.find( slot ) != -1 ) return true; @@ -660,8 +660,8 @@ bool MetaDataBase::hasSlot( QObject *o, const QCString &slot, bool onlyCustom ) if ( o->inherits( "CustomWidget" ) ) { MetaDataBase::CustomWidget *w = ( (::CustomWidget*)o )->customWidget(); - for ( QValueList<Slot>::Iterator it = w->lstSlots.begin(); it != w->lstSlots.end(); ++it ) { - QCString s = (*it).slot; + for ( TQValueList<Slot>::Iterator it = w->lstSlots.begin(); it != w->lstSlots.end(); ++it ) { + TQCString s = (*it).slot; if ( !s.data() ) continue; if ( s == slot ) @@ -670,7 +670,7 @@ bool MetaDataBase::hasSlot( QObject *o, const QCString &slot, bool onlyCustom ) } } - for ( QValueList<Slot>::Iterator it = r->slotList.begin(); it != r->slotList.end(); ++it ) { + for ( TQValueList<Slot>::Iterator it = r->slotList.begin(); it != r->slotList.end(); ++it ) { Slot s = *it; if ( normalizeSlot( s.slot ) == normalizeSlot( slot ) ) return true; @@ -679,26 +679,26 @@ bool MetaDataBase::hasSlot( QObject *o, const QCString &slot, bool onlyCustom ) return false; } -QString MetaDataBase::languageOfSlot( QObject *o, const QCString &slot ) +TQString MetaDataBase::languageOfSlot( TQObject *o, const TQCString &slot ) { setupDataBase(); MetaDataBaseRecord *r = db->find( (void*)o ); if ( !r ) { qWarning( "No entry for %p (%s, %s) found in MetaDataBase", o, o->name(), o->className() ); - return QString::null; + return TQString::null; } - QString sl = slot; + TQString sl = slot; sl = normalizeSlot( sl ); - for ( QValueList<Slot>::Iterator it = r->slotList.begin(); it != r->slotList.end(); ++it ) { + for ( TQValueList<Slot>::Iterator it = r->slotList.begin(); it != r->slotList.end(); ++it ) { Slot s = *it; - QString sl2 = s.slot; + TQString sl2 = s.slot; sl2 = normalizeSlot( sl2 ); if ( sl == sl2 ) return s.language; } - return QString::null; + return TQString::null; } bool MetaDataBase::addCustomWidget( CustomWidget *wid ) @@ -707,15 +707,15 @@ bool MetaDataBase::addCustomWidget( CustomWidget *wid ) for ( CustomWidget *w = cWidgets->first(); w; w = cWidgets->next() ) { if ( *wid == *w ) { - for ( QValueList<QCString>::ConstIterator it = wid->lstSignals.begin(); it != wid->lstSignals.end(); ++it ) { + for ( TQValueList<TQCString>::ConstIterator it = wid->lstSignals.begin(); it != wid->lstSignals.end(); ++it ) { if ( !w->hasSignal( *it ) ) w->lstSignals.append( *it ); } - for ( QValueList<Slot>::ConstIterator it2 = wid->lstSlots.begin(); it2 != wid->lstSlots.end(); ++it2 ) { + for ( TQValueList<Slot>::ConstIterator it2 = wid->lstSlots.begin(); it2 != wid->lstSlots.end(); ++it2 ) { if ( !w->hasSlot( MetaDataBase::normalizeSlot( (*it2).slot ).latin1() ) ) w->lstSlots.append( *it2 ); } - for ( QValueList<Property>::ConstIterator it3 = wid->lstProperties.begin(); it3 != wid->lstProperties.end(); ++it3 ) { + for ( TQValueList<Property>::ConstIterator it3 = wid->lstProperties.begin(); it3 != wid->lstProperties.end(); ++it3 ) { if ( !w->hasProperty( (*it3).property ) ) w->lstProperties.append( *it3 ); } @@ -729,7 +729,7 @@ bool MetaDataBase::addCustomWidget( CustomWidget *wid ) r->name = wid->className; r->group = WidgetDatabase::widgetGroup( "Custom" ); r->toolTip = wid->className; - r->iconSet = new QIconSet( *wid->pixmap, *wid->pixmap ); + r->iconSet = new TQIconSet( *wid->pixmap, *wid->pixmap ); r->isContainer = wid->isContainer; wid->id = WidgetDatabase::addCustomWidget( r ); cWidgets->append( wid ); @@ -741,7 +741,7 @@ void MetaDataBase::removeCustomWidget( CustomWidget *w ) cWidgets->removeRef( w ); } -QPtrList<MetaDataBase::CustomWidget> *MetaDataBase::customWidgets() +TQPtrList<MetaDataBase::CustomWidget> *MetaDataBase::customWidgets() { setupDataBase(); return cWidgets; @@ -767,7 +767,7 @@ bool MetaDataBase::isWidgetNameUsed( CustomWidget *wid ) return false; } -bool MetaDataBase::hasCustomWidget( const QString &className ) +bool MetaDataBase::hasCustomWidget( const TQString &className ) { for ( CustomWidget *w = cWidgets->first(); w; w = cWidgets->next() ) { if ( w->className == className ) @@ -776,7 +776,7 @@ bool MetaDataBase::hasCustomWidget( const QString &className ) return false; } -void MetaDataBase::setTabOrder( QWidget *w, const QWidgetList &order ) +void MetaDataBase::setTabOrder( TQWidget *w, const TQWidgetList &order ) { setupDataBase(); MetaDataBaseRecord *r = db->find( (void*) w ); @@ -789,20 +789,20 @@ void MetaDataBase::setTabOrder( QWidget *w, const QWidgetList &order ) r->tabOrder = order; } -QWidgetList MetaDataBase::tabOrder( QWidget *w ) +TQWidgetList MetaDataBase::tabOrder( TQWidget *w ) { setupDataBase(); MetaDataBaseRecord *r = db->find( (void*) w ); if ( !r ) { qWarning( "No entry for %p (%s, %s) found in MetaDataBase", w, w->name(), w->className() ); - return QWidgetList(); + return TQWidgetList(); } return r->tabOrder; } -void MetaDataBase::setIncludes( QObject *o, const QValueList<Include> &incs ) +void MetaDataBase::setIncludes( TQObject *o, const TQValueList<Include> &incs ) { setupDataBase(); MetaDataBaseRecord *r = db->find( (void*)o ); @@ -815,20 +815,20 @@ void MetaDataBase::setIncludes( QObject *o, const QValueList<Include> &incs ) r->includes = incs; } -QValueList<MetaDataBase::Include> MetaDataBase::includes( QObject *o ) +TQValueList<MetaDataBase::Include> MetaDataBase::includes( TQObject *o ) { setupDataBase(); MetaDataBaseRecord *r = db->find( (void*)o ); if ( !r ) { qWarning( "No entry for %p (%s, %s) found in MetaDataBase", o, o->name(), o->className() ); - return QValueList<Include>(); + return TQValueList<Include>(); } return r->includes; } -void MetaDataBase::setForwards( QObject *o, const QStringList &fwds ) +void MetaDataBase::setForwards( TQObject *o, const TQStringList &fwds ) { setupDataBase(); MetaDataBaseRecord *r = db->find( (void*)o ); @@ -841,20 +841,20 @@ void MetaDataBase::setForwards( QObject *o, const QStringList &fwds ) r->forwards = fwds; } -QStringList MetaDataBase::forwards( QObject *o ) +TQStringList MetaDataBase::forwards( TQObject *o ) { setupDataBase(); MetaDataBaseRecord *r = db->find( (void*)o ); if ( !r ) { qWarning( "No entry for %p (%s, %s) found in MetaDataBase", o, o->name(), o->className() ); - return QStringList(); + return TQStringList(); } return r->forwards; } -void MetaDataBase::setSignalList( QObject *o, const QStringList &sigs ) +void MetaDataBase::setSignalList( TQObject *o, const TQStringList &sigs ) { setupDataBase(); MetaDataBaseRecord *r = db->find( (void*)o ); @@ -866,8 +866,8 @@ void MetaDataBase::setSignalList( QObject *o, const QStringList &sigs ) r->sigs.clear(); - for ( QStringList::ConstIterator it = sigs.begin(); it != sigs.end(); ++it ) { - QString s = (*it).simplifyWhiteSpace(); + for ( TQStringList::ConstIterator it = sigs.begin(); it != sigs.end(); ++it ) { + TQString s = (*it).simplifyWhiteSpace(); bool hasSemicolon = s.endsWith( ";" ); if ( hasSemicolon ) s = s.left( s.length() - 1 ); @@ -887,20 +887,20 @@ void MetaDataBase::setSignalList( QObject *o, const QStringList &sigs ) } } -QStringList MetaDataBase::signalList( QObject *o ) +TQStringList MetaDataBase::signalList( TQObject *o ) { setupDataBase(); MetaDataBaseRecord *r = db->find( (void*)o ); if ( !r ) { qWarning( "No entry for %p (%s, %s) found in MetaDataBase", o, o->name(), o->className() ); - return QStringList(); + return TQStringList(); } return r->sigs; } -void MetaDataBase::setMetaInfo( QObject *o, MetaInfo mi ) +void MetaDataBase::setMetaInfo( TQObject *o, MetaInfo mi ) { setupDataBase(); MetaDataBaseRecord *r = db->find( (void*)o ); @@ -913,7 +913,7 @@ void MetaDataBase::setMetaInfo( QObject *o, MetaInfo mi ) r->metaInfo = mi; } -MetaDataBase::MetaInfo MetaDataBase::metaInfo( QObject *o ) +MetaDataBase::MetaInfo MetaDataBase::metaInfo( TQObject *o ) { setupDataBase(); MetaDataBaseRecord *r = db->find( (void*)o ); @@ -934,10 +934,10 @@ MetaDataBase::CustomWidget::CustomWidget() className = "MyCustomWidget"; includeFile = "mywidget.h"; includePolicy = Local; - sizeHint = QSize( -1, -1 ); - pixmap = new QPixmap( PixmapChooser::loadPixmap( "customwidget.xpm" ) ); + sizeHint = TQSize( -1, -1 ); + pixmap = new TQPixmap( PixmapChooser::loadPixmap( "customwidget.xpm" ) ); id = -1; - sizePolicy = QSizePolicy( QSizePolicy::Preferred, QSizePolicy::Preferred ); + sizePolicy = TQSizePolicy( TQSizePolicy::Preferred, TQSizePolicy::Preferred ); isContainer = false; } @@ -948,14 +948,14 @@ MetaDataBase::CustomWidget::CustomWidget( const CustomWidget &w ) includePolicy = w.includePolicy; sizeHint = w.sizeHint; if ( w.pixmap ) - pixmap = new QPixmap( *w.pixmap ); + pixmap = new TQPixmap( *w.pixmap ); else pixmap = 0; id = w.id; isContainer = w.isContainer; } -void MetaDataBase::setCursor( QWidget *w, const QCursor &c ) +void MetaDataBase::setCursor( TQWidget *w, const TQCursor &c ) { setupDataBase(); MetaDataBaseRecord *r = db->find( (void*)w ); @@ -968,7 +968,7 @@ void MetaDataBase::setCursor( QWidget *w, const QCursor &c ) r->cursor = c; } -QCursor MetaDataBase::cursor( QWidget *w ) +TQCursor MetaDataBase::cursor( TQWidget *w ) { setupDataBase(); MetaDataBaseRecord *r = db->find( (void*)w ); @@ -993,7 +993,7 @@ MetaDataBase::CustomWidget &MetaDataBase::CustomWidget::operator=( const CustomW includePolicy = w.includePolicy; sizeHint = w.sizeHint; if ( w.pixmap ) - pixmap = new QPixmap( *w.pixmap ); + pixmap = new TQPixmap( *w.pixmap ); else pixmap = 0; lstSignals = w.lstSignals; @@ -1004,45 +1004,45 @@ MetaDataBase::CustomWidget &MetaDataBase::CustomWidget::operator=( const CustomW return *this; } -bool MetaDataBase::CustomWidget::hasSignal( const QCString &signal ) const +bool MetaDataBase::CustomWidget::hasSignal( const TQCString &signal ) const { - QStrList sigList = QWidget::staticMetaObject()->signalNames( true ); + TQStrList sigList = TQWidget::staticMetaObject()->signalNames( true ); if ( sigList.find( signal ) != -1 ) return true; - for ( QValueList<QCString>::ConstIterator it = lstSignals.begin(); it != lstSignals.end(); ++it ) { + for ( TQValueList<TQCString>::ConstIterator it = lstSignals.begin(); it != lstSignals.end(); ++it ) { if ( normalizeSlot( *it ) == normalizeSlot( signal ) ) return true; } return false; } -bool MetaDataBase::CustomWidget::hasSlot( const QCString &slot ) const +bool MetaDataBase::CustomWidget::hasSlot( const TQCString &slot ) const { - QStrList slotList = QWidget::staticMetaObject()->slotNames( true ); + TQStrList slotList = TQWidget::staticMetaObject()->slotNames( true ); if ( slotList.find( normalizeSlot( slot ) ) != -1 ) return true; - for ( QValueList<MetaDataBase::Slot>::ConstIterator it = lstSlots.begin(); it != lstSlots.end(); ++it ) { + for ( TQValueList<MetaDataBase::Slot>::ConstIterator it = lstSlots.begin(); it != lstSlots.end(); ++it ) { if ( normalizeSlot( (*it).slot ) == normalizeSlot( slot ) ) return true; } return false; } -bool MetaDataBase::CustomWidget::hasProperty( const QCString &prop ) const +bool MetaDataBase::CustomWidget::hasProperty( const TQCString &prop ) const { - QStrList propList = QWidget::staticMetaObject()->propertyNames( true ); + TQStrList propList = TQWidget::staticMetaObject()->propertyNames( true ); if ( propList.find( prop ) != -1 ) return true; - for ( QValueList<MetaDataBase::Property>::ConstIterator it = lstProperties.begin(); it != lstProperties.end(); ++it ) { + for ( TQValueList<MetaDataBase::Property>::ConstIterator it = lstProperties.begin(); it != lstProperties.end(); ++it ) { if ( (*it).property == prop ) return true; } return false; } -void MetaDataBase::setPixmapArgument( QObject *o, int pixmap, const QString &arg ) +void MetaDataBase::setPixmapArgument( TQObject *o, int pixmap, const TQString &arg ) { if ( !o ) return; @@ -1058,22 +1058,22 @@ void MetaDataBase::setPixmapArgument( QObject *o, int pixmap, const QString &arg r->pixmapArguments.insert( pixmap, arg ); } -QString MetaDataBase::pixmapArgument( QObject *o, int pixmap ) +TQString MetaDataBase::pixmapArgument( TQObject *o, int pixmap ) { if ( !o ) - return QString::null; + return TQString::null; setupDataBase(); MetaDataBaseRecord *r = db->find( (void*)o ); if ( !r ) { qWarning( "No entry for %p (%s, %s) found in MetaDataBase", o, o->name(), o->className() ); - return QString::null; + return TQString::null; } return *r->pixmapArguments.find( pixmap ); } -void MetaDataBase::clearPixmapArguments( QObject *o ) +void MetaDataBase::clearPixmapArguments( TQObject *o ) { if ( !o ) return; @@ -1089,7 +1089,7 @@ void MetaDataBase::clearPixmapArguments( QObject *o ) } -void MetaDataBase::setPixmapKey( QObject *o, int pixmap, const QString &arg ) +void MetaDataBase::setPixmapKey( TQObject *o, int pixmap, const TQString &arg ) { if ( !o ) return; @@ -1105,22 +1105,22 @@ void MetaDataBase::setPixmapKey( QObject *o, int pixmap, const QString &arg ) r->pixmapKeys.insert( pixmap, arg ); } -QString MetaDataBase::pixmapKey( QObject *o, int pixmap ) +TQString MetaDataBase::pixmapKey( TQObject *o, int pixmap ) { if ( !o ) - return QString::null; + return TQString::null; setupDataBase(); MetaDataBaseRecord *r = db->find( (void*)o ); if ( !r ) { qWarning( "No entry for %p (%s, %s) found in MetaDataBase", o, o->name(), o->className() ); - return QString::null; + return TQString::null; } return *r->pixmapKeys.find( pixmap ); } -void MetaDataBase::clearPixmapKeys( QObject *o ) +void MetaDataBase::clearPixmapKeys( TQObject *o ) { if ( !o ) return; @@ -1137,7 +1137,7 @@ void MetaDataBase::clearPixmapKeys( QObject *o ) -void MetaDataBase::setColumnFields( QObject *o, const QMap<QString, QString> &columnFields ) +void MetaDataBase::setColumnFields( TQObject *o, const TQMap<TQString, TQString> &columnFields ) { if ( !o ) return; @@ -1152,37 +1152,37 @@ void MetaDataBase::setColumnFields( QObject *o, const QMap<QString, QString> &co r->columnFields = columnFields; } -QMap<QString, QString> MetaDataBase::columnFields( QObject *o ) +TQMap<TQString, TQString> MetaDataBase::columnFields( TQObject *o ) { if ( !o ) - return QMap<QString, QString>(); + return TQMap<TQString, TQString>(); setupDataBase(); MetaDataBaseRecord *r = db->find( (void*)o ); if ( !r ) { qWarning( "No entry for %p (%s, %s) found in MetaDataBase", o, o->name(), o->className() ); - return QMap<QString, QString>(); + return TQMap<TQString, TQString>(); } return r->columnFields; } -QString MetaDataBase::normalizeSlot( const QString &s ) +TQString MetaDataBase::normalizeSlot( const TQString &s ) { return Parser::cleanArgs( s ); } -void MetaDataBase::clear( QObject *o ) +void MetaDataBase::clear( TQObject *o ) { if ( !o ) return; setupDataBase(); db->remove( (void*)o ); - for ( QPtrDictIterator<QWidget> it( *( (FormWindow*)o )->widgets() ); it.current(); ++it ) + for ( TQPtrDictIterator<TQWidget> it( *( (FormWindow*)o )->widgets() ); it.current(); ++it ) db->remove( (void*)it.current() ); } -void MetaDataBase::setExportMacro( QObject *o, const QString ¯o ) +void MetaDataBase::setExportMacro( TQObject *o, const TQString ¯o ) { if ( !o ) return; @@ -1197,7 +1197,7 @@ void MetaDataBase::setExportMacro( QObject *o, const QString ¯o ) r->exportMacro = macro; } -QString MetaDataBase::exportMacro( QObject *o ) +TQString MetaDataBase::exportMacro( TQObject *o ) { if ( !o ) return ""; @@ -1212,7 +1212,7 @@ QString MetaDataBase::exportMacro( QObject *o ) return r->exportMacro; } -bool MetaDataBase::hasObject( QObject *o ) +bool MetaDataBase::hasObject( TQObject *o ) { return !!db->find( o ); } |