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 /languages/lib/designer_integration/qtdesignerintegration.cpp | |
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 'languages/lib/designer_integration/qtdesignerintegration.cpp')
-rw-r--r-- | languages/lib/designer_integration/qtdesignerintegration.cpp | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/languages/lib/designer_integration/qtdesignerintegration.cpp b/languages/lib/designer_integration/qtdesignerintegration.cpp index c3215c1e..f66b1b61 100644 --- a/languages/lib/designer_integration/qtdesignerintegration.cpp +++ b/languages/lib/designer_integration/qtdesignerintegration.cpp @@ -19,9 +19,9 @@ ***************************************************************************/ #include "qtdesignerintegration.h" -#include <qpair.h> -#include <qregexp.h> -#include <qfileinfo.h> +#include <tqpair.h> +#include <tqregexp.h> +#include <tqfileinfo.h> #include <klocale.h> #include <kdebug.h> @@ -49,7 +49,7 @@ QtDesignerIntegration::~QtDesignerIntegration() delete m_impl; } -void QtDesignerIntegration::addFunction(const QString& formName, KInterfaceDesigner::Function function) +void QtDesignerIntegration::addFunction(const TQString& formName, KInterfaceDesigner::Function function) { kdDebug() << "QtDesignerIntegration::addFunction: form: " << formName << ", function: " << function.function << endl; @@ -67,21 +67,21 @@ void QtDesignerIntegration::addFunction(const QString& formName, KInterfaceDesig addFunctionToClass(function, klass); } -void QtDesignerIntegration::editFunction(const QString& formName, KInterfaceDesigner::Function oldFunction, KInterfaceDesigner::Function function) +void QtDesignerIntegration::editFunction(const TQString& formName, KInterfaceDesigner::Function oldFunction, KInterfaceDesigner::Function function) { kdDebug() << "QtDesignerIntegration::editFunction: form: " << formName << ", old function: " << oldFunction.function << ", function: " << function.function << endl; } -void QtDesignerIntegration::removeFunction(const QString& formName, KInterfaceDesigner::Function function) +void QtDesignerIntegration::removeFunction(const TQString& formName, KInterfaceDesigner::Function function) { kdDebug() << "QtDesignerIntegration::removeFunction: form: " << formName << ", function: " << function.function << endl; } -bool QtDesignerIntegration::selectImplementation(const QString &formName) +bool QtDesignerIntegration::selectImplementation(const TQString &formName) { - QFileInfo fi(formName); + TQFileInfo fi(formName); if (!fi.exists()) return false; @@ -93,38 +93,38 @@ bool QtDesignerIntegration::selectImplementation(const QString &formName) return false; } -void QtDesignerIntegration::loadSettings(QDomDocument dom, QString path) +void QtDesignerIntegration::loadSettings(TQDomDocument dom, TQString path) { - QDomElement el = DomUtil::elementByPath(dom, path + "/qtdesigner"); + TQDomElement el = DomUtil::elementByPath(dom, path + "/qtdesigner"); if (el.isNull()) return; - QDomNodeList impls = el.elementsByTagName("implementation"); + TQDomNodeList impls = el.elementsByTagName("implementation"); for (uint i = 0; i < impls.count(); ++i) { - QDomElement el = impls.item(i).toElement(); + TQDomElement el = impls.item(i).toElement(); if (el.isNull()) continue; - QString implementationPath = Relative::File(m_part->project()->projectDirectory(), + TQString implementationPath = Relative::File(m_part->project()->projectDirectory(), el.attribute("implementationpath"), true).urlPath(); FileDom file = m_part->codeModel()->fileByName(implementationPath); if (!file) continue; ClassList cllist = file->classByName(el.attribute("class")); - QString uiPath = Relative::File(m_part->project()->projectDirectory(), + TQString uiPath = Relative::File(m_part->project()->projectDirectory(), el.attribute("path"), true).urlPath(); if (cllist.count() > 0) m_implementations[uiPath] = cllist.first(); } } -void QtDesignerIntegration::saveSettings(QDomDocument dom, QString path) +void QtDesignerIntegration::saveSettings(TQDomDocument dom, TQString path) { kdDebug() << "QtDesignerIntegration::saveSettings" << endl; - QDomElement el = DomUtil::createElementByPath(dom, path + "/qtdesigner"); - for (QMap<QString, ClassDom>::const_iterator it = m_implementations.begin(); + TQDomElement el = DomUtil::createElementByPath(dom, path + "/qtdesigner"); + for (TQMap<TQString, ClassDom>::const_iterator it = m_implementations.begin(); it != m_implementations.end(); ++it) { - QDomElement il = dom.createElement("implementation"); + TQDomElement il = dom.createElement("implementation"); el.appendChild(il); il.setAttribute("path", Relative::File(m_part->project()->projectDirectory(), it.key()).rurl()); @@ -134,11 +134,11 @@ void QtDesignerIntegration::saveSettings(QDomDocument dom, QString path) } } -void QtDesignerIntegration::openFunction(const QString &formName, const QString &functionName) +void QtDesignerIntegration::openFunction(const TQString &formName, const TQString &functionName) { kdDebug() << "QtDesignerIntegration::openFunction, formName = " << formName << ", functionName = " << functionName << endl; - QString fn = functionName; + TQString fn = functionName; if (fn.find("(") > 0) fn.remove(fn.find("("), fn.length()); @@ -147,7 +147,7 @@ void QtDesignerIntegration::openFunction(const QString &formName, const QString int line = -1, col = -1; - QString impl = m_implementations[formName]->fileName(); + TQString impl = m_implementations[formName]->fileName(); processImplementationName(impl); if (m_part->codeModel()->hasFile(impl)) @@ -177,17 +177,17 @@ void QtDesignerIntegration::openFunction(const QString &formName, const QString m_part->partController()->editDocument(KURL(impl), line, col); } -void QtDesignerIntegration::processImplementationName(QString &// name +void QtDesignerIntegration::processImplementationName(TQString &// name ) { } -void QtDesignerIntegration::openSource(const QString &formName) +void QtDesignerIntegration::openSource(const TQString &formName) { if (!m_implementations.contains(formName)) if (!selectImplementation(formName)) return; - QString impl = m_implementations[formName]->fileName(); + TQString impl = m_implementations[formName]->fileName(); processImplementationName(impl); m_part->partController()->editDocument(KURL(impl), -1, -1); } |