summaryrefslogtreecommitdiffstats
path: root/languages/lib/designer_integration
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:56:07 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:56:07 +0000
commitd6f8bbb45b267065a6907e71ff9c98bb6d161241 (patch)
treed109539636691d7b03036ca1c0ed29dbae6577cf /languages/lib/designer_integration
parent3331a47a9cad24795c7440ee8107143ce444ef34 (diff)
downloadtdevelop-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')
-rw-r--r--languages/lib/designer_integration/implementationwidget.cpp28
-rw-r--r--languages/lib/designer_integration/implementationwidget.h14
-rw-r--r--languages/lib/designer_integration/qtdesignerintegration.cpp48
-rw-r--r--languages/lib/designer_integration/qtdesignerintegration.h22
4 files changed, 56 insertions, 56 deletions
diff --git a/languages/lib/designer_integration/implementationwidget.cpp b/languages/lib/designer_integration/implementationwidget.cpp
index 5e958bfa..c961657b 100644
--- a/languages/lib/designer_integration/implementationwidget.cpp
+++ b/languages/lib/designer_integration/implementationwidget.cpp
@@ -19,13 +19,13 @@
***************************************************************************/
#include "implementationwidget.h"
-#include <qfileinfo.h>
-#include <qtextstream.h>
-#include <qfile.h>
-#include <qdir.h>
-#include <qregexp.h>
-#include <qdom.h>
-#include <qradiobutton.h>
+#include <tqfileinfo.h>
+#include <tqtextstream.h>
+#include <tqfile.h>
+#include <tqdir.h>
+#include <tqregexp.h>
+#include <tqdom.h>
+#include <tqradiobutton.h>
#include <klineedit.h>
#include <klocale.h>
@@ -61,12 +61,12 @@ private:
};
}
-ImplementationWidget::ImplementationWidget(KDevLanguageSupport *part, QWidget* parent, const char* name, bool modal)
+ImplementationWidget::ImplementationWidget(KDevLanguageSupport *part, TQWidget* parent, const char* name, bool modal)
:CreateImplemenationWidgetBase(parent, name, modal), m_part(part)
{
}
-void ImplementationWidget::init(const QString &formName)
+void ImplementationWidget::init(const TQString &formName)
{
m_formName = formName;
@@ -74,7 +74,7 @@ void ImplementationWidget::init(const QString &formName)
fileNameEdit->clear();
classNameEdit->clear();
- QDomDocument doc;
+ TQDomDocument doc;
DomUtil::openDOMFile(doc, m_formName);
m_baseClassName = DomUtil::elementByPathExt(doc, "class").text();
setCaption(i18n("Create or Select Implementation Class for: %1").arg(m_baseClassName));
@@ -106,7 +106,7 @@ ImplementationWidget::~ImplementationWidget()
}
/*$SPECIALIZATION$*/
-void ImplementationWidget::classNameChanged(const QString &text)
+void ImplementationWidget::classNameChanged(const TQString &text)
{
fileNameEdit->setText(text.lower());
}
@@ -134,7 +134,7 @@ void ImplementationWidget::accept()
return;
m_selectedClass = item->dom();
}
- QDialog::accept();
+ TQDialog::accept();
}
ClassDom ImplementationWidget::selectedClass()
@@ -148,10 +148,10 @@ bool ImplementationWidget::createClass()
return true;
}
-int ImplementationWidget::exec(const QString &formName)
+int ImplementationWidget::exec(const TQString &formName)
{
init(formName);
- return QDialog::exec();
+ return TQDialog::exec();
}
#include "implementationwidget.moc"
diff --git a/languages/lib/designer_integration/implementationwidget.h b/languages/lib/designer_integration/implementationwidget.h
index 0b7d784f..b639b0e8 100644
--- a/languages/lib/designer_integration/implementationwidget.h
+++ b/languages/lib/designer_integration/implementationwidget.h
@@ -41,7 +41,7 @@ class ImplementationWidget : public CreateImplemenationWidgetBase
{
Q_OBJECT
public:
- ImplementationWidget(KDevLanguageSupport *part, QWidget* parent = 0, const char* name = 0, bool modal = false);
+ ImplementationWidget(KDevLanguageSupport *part, TQWidget* parent = 0, const char* name = 0, bool modal = false);
virtual ~ImplementationWidget();
/*$PUBLIC_FUNCTIONS$*/
@@ -49,7 +49,7 @@ public:
ClassDom selectedClass();
/**Executes implementation widget for a form @p formName.*/
- int exec(const QString &formName);
+ int exec(const TQString &formName);
public slots:
/*$PUBLIC_SLOTS$*/
@@ -58,7 +58,7 @@ protected:
/*$PROTECTED_FUNCTIONS$*/
/**Sets up the dialog. No need to reimplement unless you want to restrict
the number of classes being displayed as possible implementation classes.*/
- void init(const QString &formName);
+ void init(const TQString &formName);
void processNamespaces(NamespaceDom dom, KListViewItem *parent);
void processClasses(ClassDom dom, KListViewItem *parent);
@@ -68,18 +68,18 @@ protected:
/**Reimplement to create actual files with the form implementation.
@return The list of absolute paths to a files created.*/
- virtual QStringList createClassFiles() = 0;
+ virtual TQStringList createClassFiles() = 0;
protected slots:
/*$PROTECTED_SLOTS$*/
- virtual void classNameChanged(const QString &text);
+ virtual void classNameChanged(const TQString &text);
virtual void accept();
protected:
KDevLanguageSupport *m_part;
ClassDom m_selectedClass;
- QString m_formName;
- QString m_baseClassName;
+ TQString m_formName;
+ TQString m_baseClassName;
};
#endif
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);
}
diff --git a/languages/lib/designer_integration/qtdesignerintegration.h b/languages/lib/designer_integration/qtdesignerintegration.h
index 3f2602f8..a31310eb 100644
--- a/languages/lib/designer_integration/qtdesignerintegration.h
+++ b/languages/lib/designer_integration/qtdesignerintegration.h
@@ -20,7 +20,7 @@
#ifndef QTDESIGNERINTEGRATION_H
#define QTDESIGNERINTEGRATION_H
-#include <qmap.h>
+#include <tqmap.h>
#include <codemodel.h>
#include "kdevdesignerintegration.h"
@@ -44,18 +44,18 @@ public:
virtual ~QtDesignerIntegration();
public slots:
- virtual void addFunction(const QString& formName, KInterfaceDesigner::Function function);
- virtual void editFunction(const QString& formName, KInterfaceDesigner::Function oldFunction, KInterfaceDesigner::Function function);
- virtual void removeFunction(const QString& formName, KInterfaceDesigner::Function function);
+ virtual void addFunction(const TQString& formName, KInterfaceDesigner::Function function);
+ virtual void editFunction(const TQString& formName, KInterfaceDesigner::Function oldFunction, KInterfaceDesigner::Function function);
+ virtual void removeFunction(const TQString& formName, KInterfaceDesigner::Function function);
- virtual void openFunction(const QString &formName, const QString &functionName);
+ virtual void openFunction(const TQString &formName, const TQString &functionName);
- virtual void openSource(const QString &formName);
+ virtual void openSource(const TQString &formName);
- virtual void saveSettings(QDomDocument dom, QString path);
- virtual void loadSettings(QDomDocument dom, QString path);
+ virtual void saveSettings(TQDomDocument dom, TQString path);
+ virtual void loadSettings(TQDomDocument dom, TQString path);
- bool selectImplementation(const QString &formName);
+ bool selectImplementation(const TQString &formName);
protected:
/**Reimplement this to add a function to a class. This means you need to modify
@@ -67,10 +67,10 @@ protected:
@code
name.replace(".h", ".cpp");
@endcode*/
- virtual void processImplementationName(QString &name);
+ virtual void processImplementationName(TQString &name);
//Form file - derived class name
- QMap<QString, ClassDom> m_implementations;
+ TQMap<TQString, ClassDom> m_implementations;
KDevLanguageSupport *m_part;
ImplementationWidget *m_impl;