diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:56:07 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:56:07 +0000 |
commit | d6f8bbb45b267065a6907e71ff9c98bb6d161241 (patch) | |
tree | d109539636691d7b03036ca1c0ed29dbae6577cf /kdevdesigner/plugins | |
parent | 3331a47a9cad24795c7440ee8107143ce444ef34 (diff) | |
download | tdevelop-d6f8bbb45b267065a6907e71ff9c98bb6d161241.tar.gz tdevelop-d6f8bbb45b267065a6907e71ff9c98bb6d161241.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1157658 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kdevdesigner/plugins')
-rw-r--r-- | kdevdesigner/plugins/languageinterfaceimpl.cpp | 74 | ||||
-rw-r--r-- | kdevdesigner/plugins/languageinterfaceimpl.h | 62 |
2 files changed, 68 insertions, 68 deletions
diff --git a/kdevdesigner/plugins/languageinterfaceimpl.cpp b/kdevdesigner/plugins/languageinterfaceimpl.cpp index 37077922..53ce2ba8 100644 --- a/kdevdesigner/plugins/languageinterfaceimpl.cpp +++ b/kdevdesigner/plugins/languageinterfaceimpl.cpp @@ -26,11 +26,11 @@ **********************************************************************/ #include "languageinterfaceimpl.h" -#include <qobject.h> +#include <tqobject.h> #include "../interfaces/designerinterface.h" -#include <qfile.h> +#include <tqfile.h> //#include "yyreg.h" -#include <qmetaobject.h> +#include <tqmetaobject.h> LanguageInterfaceImpl::LanguageInterfaceImpl( QUnknownInterface *outer ) : parent( outer ), ref( 0 ) @@ -74,15 +74,15 @@ QRESULT LanguageInterfaceImpl::queryInterface( const QUuid &uuid, QUnknownInterf class NormalizeObject : public QObject { public: - NormalizeObject() : QObject() {} - static QCString normalizeSignalSlot( const char *signalSlot ) { return QObject::normalizeSignalSlot( signalSlot ); } + NormalizeObject() : TQObject() {} + static TQCString normalizeSignalSlot( const char *signalSlot ) { return TQObject::normalizeSignalSlot( signalSlot ); } }; -void LanguageInterfaceImpl::functions( const QString &code, QValueList<Function> *functionMap ) const +void LanguageInterfaceImpl::functions( const TQString &code, TQValueList<Function> *functionMap ) const { -/* QValueList<CppFunction> l; +/* TQValueList<CppFunction> l; extractCppFunctions( code, &l ); - for ( QValueList<CppFunction>::Iterator it = l.begin(); it != l.end(); ++it ) { + for ( TQValueList<CppFunction>::Iterator it = l.begin(); it != l.end(); ++it ) { Function func; func.name = (*it).prototype(); func.name.remove( 0, (*it).returnType().length() ); @@ -97,30 +97,30 @@ void LanguageInterfaceImpl::functions( const QString &code, QValueList<Function> }*/ } -QString LanguageInterfaceImpl::createFunctionStart( const QString &className, const QString &func, - const QString &returnType, - const QString & ) +TQString LanguageInterfaceImpl::createFunctionStart( const TQString &className, const TQString &func, + const TQString &returnType, + const TQString & ) { return returnType + " " + className + "::" + func; } -QStringList LanguageInterfaceImpl::definitions() const +TQStringList LanguageInterfaceImpl::definitions() const { - QStringList lst; + TQStringList lst; lst << "Includes (in Implementation)" << "Includes (in Declaration)" << "Forward Declarations" << "Signals"; return lst; } -QStringList LanguageInterfaceImpl::definitionEntries( const QString &definition, QUnknownInterface *designerIface ) const +TQStringList LanguageInterfaceImpl::definitionEntries( const TQString &definition, QUnknownInterface *designerIface ) const { DesignerInterface *iface = 0; designerIface->queryInterface( IID_Designer, (QUnknownInterface**) &iface ); if ( !iface ) - return QStringList(); + return TQStringList(); DesignerFormWindow *fw = iface->currentForm(); if ( !fw ) - return QStringList(); - QStringList lst; + return TQStringList(); + TQStringList lst; if ( definition == "Includes (in Implementation)" ) { lst = fw->implementationIncludes(); } else if ( definition == "Includes (in Declaration)" ) { @@ -134,7 +134,7 @@ QStringList LanguageInterfaceImpl::definitionEntries( const QString &definition, return lst; } -void LanguageInterfaceImpl::setDefinitionEntries( const QString &definition, const QStringList &entries, QUnknownInterface *designerIface ) +void LanguageInterfaceImpl::setDefinitionEntries( const TQString &definition, const TQStringList &entries, QUnknownInterface *designerIface ) { DesignerInterface *iface = 0; designerIface->queryInterface( IID_Designer, (QUnknownInterface**) &iface ); @@ -155,7 +155,7 @@ void LanguageInterfaceImpl::setDefinitionEntries( const QString &definition, con iface->release(); } -QString LanguageInterfaceImpl::createEmptyFunction() +TQString LanguageInterfaceImpl::createEmptyFunction() { return "{\n\n}\n"; } @@ -169,28 +169,28 @@ bool LanguageInterfaceImpl::supports( Support s ) const return FALSE; } -QStringList LanguageInterfaceImpl::fileFilterList() const +TQStringList LanguageInterfaceImpl::fileFilterList() const { - QStringList f; + TQStringList f; f << "C++ Files (*.cpp *.C *.cxx *.c++ *.ocl *.c *.h *.H *.hpp *.hxx)"; return f; } -QStringList LanguageInterfaceImpl::fileExtensionList() const +TQStringList LanguageInterfaceImpl::fileExtensionList() const { - QStringList f; + TQStringList f; f << "cpp" << "ocl" << "C" << "cxx" << "c++" << "c" <<"h" << "H" << "hpp" << "hxx"; return f; } -QString LanguageInterfaceImpl::projectKeyForExtension( const QString &extension ) const +TQString LanguageInterfaceImpl::projectKeyForExtension( const TQString &extension ) const { if ( extension[ 0 ] == 'c' || extension[ 0 ] == 'C' ) return "SOURCES"; return "HEADERS"; } -void LanguageInterfaceImpl::sourceProjectKeys( QStringList &keys ) const +void LanguageInterfaceImpl::sourceProjectKeys( TQStringList &keys ) const { keys << "HEADERS" << "SOURCES"; } @@ -199,38 +199,38 @@ void LanguageInterfaceImpl::sourceProjectKeys( QStringList &keys ) const { public: CheckObject() {} - bool checkConnectArgs( const char *signal, const char *member ) { return QObject::checkConnectArgs( signal, 0, member ); } + bool checkConnectArgs( const char *signal, const char *member ) { return TQObject::checkConnectArgs( signal, 0, member ); } }; -bool LanguageInterfaceImpl::canConnect( const QString &signal, const QString &slot ) +bool LanguageInterfaceImpl::canConnect( const TQString &signal, const TQString &slot ) { CheckObject o; return o.checkConnectArgs( signal.latin1(), slot.latin1() ); } -void LanguageInterfaceImpl::loadFormCode( const QString &, const QString &filename, - QValueList<Function> &functions, - QStringList &, - QValueList<Connection> & ) +void LanguageInterfaceImpl::loadFormCode( const TQString &, const TQString &filename, + TQValueList<Function> &functions, + TQStringList &, + TQValueList<Connection> & ) { - QFile f( filename ); + TQFile f( filename ); if ( !f.open( IO_ReadOnly ) ) return; - QTextStream ts( &f ); - QString code( ts.read() ); + TQTextStream ts( &f ); + TQString code( ts.read() ); this->functions( code, &functions ); } -void LanguageInterfaceImpl::preferedExtensions( QMap<QString, QString> &extensionMap ) const +void LanguageInterfaceImpl::preferedExtensions( TQMap<TQString, TQString> &extensionMap ) const { extensionMap.insert( "cpp", "C++ Source File" ); extensionMap.insert( "h", "C++ Header File" ); } -QStrList LanguageInterfaceImpl::signalNames( QObject *obj ) const +TQStrList LanguageInterfaceImpl::signalNames( TQObject *obj ) const { - QStrList sigs; + TQStrList sigs; sigs = obj->metaObject()->signalNames( TRUE ); sigs.remove( "destroyed()" ); return sigs; diff --git a/kdevdesigner/plugins/languageinterfaceimpl.h b/kdevdesigner/plugins/languageinterfaceimpl.h index d8cb9cf2..2dd73465 100644 --- a/kdevdesigner/plugins/languageinterfaceimpl.h +++ b/kdevdesigner/plugins/languageinterfaceimpl.h @@ -40,39 +40,39 @@ public: QRESULT queryInterface( const QUuid&, QUnknownInterface** ); - void functions( const QString &code, QValueList<Function> *funcs ) const; - void connections( const QString &, QValueList<Connection> * ) const {}; - QString createFunctionStart( const QString &className, const QString &func, - const QString &returnType, const QString &access ); - QStringList definitions() const; - QStringList definitionEntries( const QString &definition, QUnknownInterface *designerIface ) const; - void setDefinitionEntries( const QString &definition, const QStringList &entries, QUnknownInterface *designerIface ); - QString createArguments( const QString & ) { return QString::null; } - QString createEmptyFunction(); + void functions( const TQString &code, TQValueList<Function> *funcs ) const; + void connections( const TQString &, TQValueList<Connection> * ) const {}; + TQString createFunctionStart( const TQString &className, const TQString &func, + const TQString &returnType, const TQString &access ); + TQStringList definitions() const; + TQStringList definitionEntries( const TQString &definition, QUnknownInterface *designerIface ) const; + void setDefinitionEntries( const TQString &definition, const TQStringList &entries, QUnknownInterface *designerIface ); + TQString createArguments( const TQString & ) { return TQString::null; } + TQString createEmptyFunction(); bool supports( Support s ) const; - QStringList fileFilterList() const; - QStringList fileExtensionList() const; - void preferedExtensions( QMap<QString, QString> &extensionMap ) const; - void sourceProjectKeys( QStringList &keys ) const; - QString projectKeyForExtension( const QString &extension ) const; - QString cleanSignature( const QString &sig ) { return sig; } // #### implement me - void loadFormCode( const QString &, const QString &, - QValueList<Function> &, - QStringList &, - QValueList<Connection> & ); - QString formCodeExtension() const { return ".h"; } - bool canConnect( const QString &signal, const QString &slot ); - void compressProject( const QString &, const QString &, bool ) {} - QString uncompressProject( const QString &, const QString & ) { return QString::null; } - QString aboutText() const { return ""; } + TQStringList fileFilterList() const; + TQStringList fileExtensionList() const; + void preferedExtensions( TQMap<TQString, TQString> &extensionMap ) const; + void sourceProjectKeys( TQStringList &keys ) const; + TQString projectKeyForExtension( const TQString &extension ) const; + TQString cleanSignature( const TQString &sig ) { return sig; } // #### implement me + void loadFormCode( const TQString &, const TQString &, + TQValueList<Function> &, + TQStringList &, + TQValueList<Connection> & ); + TQString formCodeExtension() const { return ".h"; } + bool canConnect( const TQString &signal, const TQString &slot ); + void compressProject( const TQString &, const TQString &, bool ) {} + TQString uncompressProject( const TQString &, const TQString & ) { return TQString::null; } + TQString aboutText() const { return ""; } - void addConnection( const QString &, const QString &, - const QString &, const QString &, - QString * ) {} - void removeConnection( const QString &, const QString &, - const QString &, const QString &, - QString * ) {} - QStrList signalNames( QObject *obj ) const; + void addConnection( const TQString &, const TQString &, + const TQString &, const TQString &, + TQString * ) {} + void removeConnection( const TQString &, const TQString &, + const TQString &, const TQString &, + TQString * ) {} + TQStrList signalNames( TQObject *obj ) const; private: QUnknownInterface *parent; |