summaryrefslogtreecommitdiffstats
path: root/languages/lib/designer_integration
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-14 16:45:05 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-14 16:45:05 +0000
commit48d4a26399959121f33d2bc3bfe51c7827b654fc (patch)
tree5ae5e6e00d3ba330b7b8be9bc097154b6bc739e8 /languages/lib/designer_integration
parent7e701ace6592d09e1f2c0cf28c7d6d872d78f4f5 (diff)
downloadtdevelop-48d4a26399959121f33d2bc3bfe51c7827b654fc.tar.gz
tdevelop-48d4a26399959121f33d2bc3bfe51c7827b654fc.zip
TQt4 port kdevelop
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1236710 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'languages/lib/designer_integration')
-rw-r--r--languages/lib/designer_integration/implementationwidget.cpp32
-rw-r--r--languages/lib/designer_integration/implementationwidget.h7
-rw-r--r--languages/lib/designer_integration/implementationwidgetbase.ui36
-rw-r--r--languages/lib/designer_integration/qtdesignerintegration.cpp42
-rw-r--r--languages/lib/designer_integration/qtdesignerintegration.h15
5 files changed, 67 insertions, 65 deletions
diff --git a/languages/lib/designer_integration/implementationwidget.cpp b/languages/lib/designer_integration/implementationwidget.cpp
index c961657b..6198f9bc 100644
--- a/languages/lib/designer_integration/implementationwidget.cpp
+++ b/languages/lib/designer_integration/implementationwidget.cpp
@@ -40,10 +40,10 @@
namespace ImplUtils{
class ClassItem: public KListViewItem{
public:
- ClassItem(KListViewItem *parent, ClassDom dom)
- :KListViewItem(parent, dom->name(), dom->fileName()), m_dom(dom) { setOpen(true); }
- ClassItem(KListView *parent, ClassDom dom)
- :KListViewItem(parent, dom->name(), dom->fileName()), m_dom(dom) { setOpen(true); }
+ ClassItem(KListViewItem *tqparent, ClassDom dom)
+ :KListViewItem(tqparent, dom->name(), dom->fileName()), m_dom(dom) { setOpen(true); }
+ ClassItem(KListView *tqparent, ClassDom dom)
+ :KListViewItem(tqparent, dom->name(), dom->fileName()), m_dom(dom) { setOpen(true); }
ClassDom dom() const { return m_dom; }
private:
ClassDom m_dom;
@@ -51,18 +51,18 @@ private:
class NamespaceItem: public KListViewItem{
public:
- NamespaceItem(KListViewItem *parent, NamespaceDom dom)
- :KListViewItem(parent, dom->name(), dom->fileName()), m_dom(dom) { setOpen(true); }
- NamespaceItem(KListView *parent, NamespaceDom dom)
- :KListViewItem(parent, dom->name(), dom->fileName()), m_dom(dom) { setOpen(true); }
+ NamespaceItem(KListViewItem *tqparent, NamespaceDom dom)
+ :KListViewItem(tqparent, dom->name(), dom->fileName()), m_dom(dom) { setOpen(true); }
+ NamespaceItem(KListView *tqparent, NamespaceDom dom)
+ :KListViewItem(tqparent, dom->name(), dom->fileName()), m_dom(dom) { setOpen(true); }
NamespaceDom dom() const { return m_dom; }
private:
NamespaceDom m_dom;
};
}
-ImplementationWidget::ImplementationWidget(KDevLanguageSupport *part, TQWidget* parent, const char* name, bool modal)
- :CreateImplemenationWidgetBase(parent, name, modal), m_part(part)
+ImplementationWidget::ImplementationWidget(KDevLanguageSupport *part, TQWidget* tqparent, const char* name, bool modal)
+ :CreateImplemenationWidgetBase(tqparent, name, modal), m_part(part)
{
}
@@ -77,28 +77,28 @@ void ImplementationWidget::init(const TQString &formName)
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));
+ setCaption(i18n("Create or Select Implementation Class for: %1").tqarg(m_baseClassName));
KListViewItem *item = new KListViewItem(classView, i18n("Namespaces &amp;&amp; Classes"));
item->setOpen(true);
processNamespaces(m_part->codeModel()->globalNamespace(), item);
}
-void ImplementationWidget::processNamespaces(NamespaceDom dom, KListViewItem *parent)
+void ImplementationWidget::processNamespaces(NamespaceDom dom, KListViewItem *tqparent)
{
const NamespaceList nslist = dom->namespaceList();
for (NamespaceList::const_iterator it = nslist.begin(); it != nslist.end(); ++it)
- processNamespaces(*it, new ImplUtils::NamespaceItem(parent, *it));
+ processNamespaces(*it, new ImplUtils::NamespaceItem(tqparent, *it));
const ClassList cllist = dom->classList();
for (ClassList::ConstIterator it = cllist.begin(); it != cllist.end(); ++it)
- processClasses(*it, new ImplUtils::ClassItem(parent, *it));
+ processClasses(*it, new ImplUtils::ClassItem(tqparent, *it));
}
-void ImplementationWidget::processClasses(ClassDom dom, KListViewItem *parent)
+void ImplementationWidget::processClasses(ClassDom dom, KListViewItem *tqparent)
{
const ClassList cllist = dom->classList();
for (ClassList::ConstIterator it = cllist.begin(); it != cllist.end(); ++it)
- processClasses(*it, new ImplUtils::ClassItem(parent, *it));
+ processClasses(*it, new ImplUtils::ClassItem(tqparent, *it));
}
ImplementationWidget::~ImplementationWidget()
diff --git a/languages/lib/designer_integration/implementationwidget.h b/languages/lib/designer_integration/implementationwidget.h
index b639b0e8..91f93228 100644
--- a/languages/lib/designer_integration/implementationwidget.h
+++ b/languages/lib/designer_integration/implementationwidget.h
@@ -40,8 +40,9 @@ Subclasses of this class should reimplement only pure virtual functions in the c
class ImplementationWidget : public CreateImplemenationWidgetBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- ImplementationWidget(KDevLanguageSupport *part, TQWidget* parent = 0, const char* name = 0, bool modal = false);
+ ImplementationWidget(KDevLanguageSupport *part, TQWidget* tqparent = 0, const char* name = 0, bool modal = false);
virtual ~ImplementationWidget();
/*$PUBLIC_FUNCTIONS$*/
@@ -60,8 +61,8 @@ protected:
the number of classes being displayed as possible implementation classes.*/
void init(const TQString &formName);
- void processNamespaces(NamespaceDom dom, KListViewItem *parent);
- void processClasses(ClassDom dom, KListViewItem *parent);
+ void processNamespaces(NamespaceDom dom, KListViewItem *tqparent);
+ void processClasses(ClassDom dom, KListViewItem *tqparent);
/**Creates a class and adds it to a project. No need to reimplement.*/
bool createClass();
diff --git a/languages/lib/designer_integration/implementationwidgetbase.ui b/languages/lib/designer_integration/implementationwidgetbase.ui
index 1a39d39e..fece6815 100644
--- a/languages/lib/designer_integration/implementationwidgetbase.ui
+++ b/languages/lib/designer_integration/implementationwidgetbase.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.2" stdsetdef="1">
<class>CreateImplemenationWidgetBase</class>
-<widget class="QDialog">
+<widget class="TQDialog">
<property name="name">
<cstring>CreateImplemenationWidgetBase</cstring>
</property>
@@ -19,9 +19,9 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLayoutWidget" row="1" column="0">
+ <widget class="TQLayoutWidget" row="1" column="0">
<property name="name">
- <cstring>layout4</cstring>
+ <cstring>tqlayout4</cstring>
</property>
<hbox>
<property name="name">
@@ -37,14 +37,14 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>okButton</cstring>
</property>
@@ -63,7 +63,7 @@
<bool>true</bool>
</property>
</widget>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>cancelButton</cstring>
</property>
@@ -81,7 +81,7 @@
</widget>
</hbox>
</widget>
- <widget class="QButtonGroup" row="0" column="0">
+ <widget class="TQButtonGroup" row="0" column="0">
<property name="name">
<cstring>buttonGroup1</cstring>
</property>
@@ -92,7 +92,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QRadioButton" row="0" column="0">
+ <widget class="TQRadioButton" row="0" column="0">
<property name="name">
<cstring>createButton</cstring>
</property>
@@ -133,15 +133,15 @@
<bool>false</bool>
</property>
</widget>
- <widget class="QLayoutWidget" row="1" column="0">
+ <widget class="TQLayoutWidget" row="1" column="0">
<property name="name">
- <cstring>layout2</cstring>
+ <cstring>tqlayout2</cstring>
</property>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>classNameLabel</cstring>
</property>
@@ -159,7 +159,7 @@
</widget>
</vbox>
</widget>
- <widget class="QRadioButton" row="3" column="0">
+ <widget class="TQRadioButton" row="3" column="0">
<property name="name">
<cstring>useButton</cstring>
</property>
@@ -167,15 +167,15 @@
<string>Use &amp;existing class</string>
</property>
</widget>
- <widget class="QLayoutWidget" row="2" column="0">
+ <widget class="TQLayoutWidget" row="2" column="0">
<property name="name">
- <cstring>layout2_2</cstring>
+ <cstring>tqlayout2_2</cstring>
</property>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>fileNameLabel</cstring>
</property>
@@ -257,10 +257,10 @@
<tabstop>okButton</tabstop>
<tabstop>cancelButton</tabstop>
</tabstops>
-<slots>
+<Q_SLOTS>
<slot access="protected">classNameChanged(const QString &amp;)</slot>
-</slots>
-<layoutdefaults spacing="6" margin="11"/>
+</Q_SLOTS>
+<tqlayoutdefaults spacing="6" margin="11"/>
<includehints>
<includehint>klistview.h</includehint>
</includehints>
diff --git a/languages/lib/designer_integration/qtdesignerintegration.cpp b/languages/lib/designer_integration/qtdesignerintegration.cpp
index f66b1b61..f46bd422 100644
--- a/languages/lib/designer_integration/qtdesignerintegration.cpp
+++ b/languages/lib/designer_integration/qtdesignerintegration.cpp
@@ -38,48 +38,48 @@
#include "codemodel_utils.h"
#include "implementationwidget.h"
-QtDesignerIntegration::QtDesignerIntegration(KDevLanguageSupport *part, ImplementationWidget *impl, bool classHasDefinitions, const char* name)
+TQtDesignerIntegration::TQtDesignerIntegration(KDevLanguageSupport *part, ImplementationWidget *impl, bool classHasDefinitions, const char* name)
:KDevDesignerIntegration(part, name), m_part(part), m_impl(impl),
m_classHasDefinitions(classHasDefinitions)
{
}
-QtDesignerIntegration::~QtDesignerIntegration()
+TQtDesignerIntegration::~TQtDesignerIntegration()
{
delete m_impl;
}
-void QtDesignerIntegration::addFunction(const TQString& formName, KInterfaceDesigner::Function function)
+void TQtDesignerIntegration::addFunction(const TQString& formName, KInterfaceDesigner::Function function)
{
- kdDebug() << "QtDesignerIntegration::addFunction: form: " << formName << ", function: " << function.function << endl;
+ kdDebug() << "TQtDesignerIntegration::addFunction: form: " << formName << ", function: " << function.function << endl;
- if (!m_implementations.contains(formName))
+ if (!m_implementations.tqcontains(formName))
if (!selectImplementation(formName))
return;
ClassDom klass = m_implementations[formName];
if (!klass)
{
- KMessageBox::error(0, i18n("Cannot find implementation class for form: %1").arg(formName));
+ KMessageBox::error(0, i18n("Cannot find implementation class for form: %1").tqarg(formName));
return;
}
addFunctionToClass(function, klass);
}
-void QtDesignerIntegration::editFunction(const TQString& formName, KInterfaceDesigner::Function oldFunction, KInterfaceDesigner::Function function)
+void TQtDesignerIntegration::editFunction(const TQString& formName, KInterfaceDesigner::Function oldFunction, KInterfaceDesigner::Function function)
{
- kdDebug() << "QtDesignerIntegration::editFunction: form: " << formName
+ kdDebug() << "TQtDesignerIntegration::editFunction: form: " << formName
<< ", old function: " << oldFunction.function
<< ", function: " << function.function << endl;
}
-void QtDesignerIntegration::removeFunction(const TQString& formName, KInterfaceDesigner::Function function)
+void TQtDesignerIntegration::removeFunction(const TQString& formName, KInterfaceDesigner::Function function)
{
- kdDebug() << "QtDesignerIntegration::removeFunction: form: " << formName << ", function: " << function.function << endl;
+ kdDebug() << "TQtDesignerIntegration::removeFunction: form: " << formName << ", function: " << function.function << endl;
}
-bool QtDesignerIntegration::selectImplementation(const TQString &formName)
+bool TQtDesignerIntegration::selectImplementation(const TQString &formName)
{
TQFileInfo fi(formName);
if (!fi.exists())
@@ -93,7 +93,7 @@ bool QtDesignerIntegration::selectImplementation(const TQString &formName)
return false;
}
-void QtDesignerIntegration::loadSettings(TQDomDocument dom, TQString path)
+void TQtDesignerIntegration::loadSettings(TQDomDocument dom, TQString path)
{
TQDomElement el = DomUtil::elementByPath(dom, path + "/qtdesigner");
if (el.isNull())
@@ -117,9 +117,9 @@ void QtDesignerIntegration::loadSettings(TQDomDocument dom, TQString path)
}
}
-void QtDesignerIntegration::saveSettings(TQDomDocument dom, TQString path)
+void TQtDesignerIntegration::saveSettings(TQDomDocument dom, TQString path)
{
- kdDebug() << "QtDesignerIntegration::saveSettings" << endl;
+ kdDebug() << "TQtDesignerIntegration::saveSettings" << endl;
TQDomElement el = DomUtil::createElementByPath(dom, path + "/qtdesigner");
for (TQMap<TQString, ClassDom>::const_iterator it = m_implementations.begin();
it != m_implementations.end(); ++it)
@@ -134,13 +134,13 @@ void QtDesignerIntegration::saveSettings(TQDomDocument dom, TQString path)
}
}
-void QtDesignerIntegration::openFunction(const TQString &formName, const TQString &functionName)
+void TQtDesignerIntegration::openFunction(const TQString &formName, const TQString &functionName)
{
- kdDebug() << "QtDesignerIntegration::openFunction, formName = " << formName
+ kdDebug() << "TQtDesignerIntegration::openFunction, formName = " << formName
<< ", functionName = " << functionName << endl;
TQString fn = functionName;
- if (fn.find("(") > 0)
- fn.remove(fn.find("("), fn.length());
+ if (fn.tqfind("(") > 0)
+ fn.remove(fn.tqfind("("), fn.length());
if (!m_implementations[formName])
return;
@@ -177,14 +177,14 @@ void QtDesignerIntegration::openFunction(const TQString &formName, const TQStrin
m_part->partController()->editDocument(KURL(impl), line, col);
}
-void QtDesignerIntegration::processImplementationName(TQString &// name
+void TQtDesignerIntegration::processImplementationName(TQString &// name
)
{
}
-void QtDesignerIntegration::openSource(const TQString &formName)
+void TQtDesignerIntegration::openSource(const TQString &formName)
{
- if (!m_implementations.contains(formName))
+ if (!m_implementations.tqcontains(formName))
if (!selectImplementation(formName))
return;
TQString impl = m_implementations[formName]->fileName();
diff --git a/languages/lib/designer_integration/qtdesignerintegration.h b/languages/lib/designer_integration/qtdesignerintegration.h
index a31310eb..9a750fbd 100644
--- a/languages/lib/designer_integration/qtdesignerintegration.h
+++ b/languages/lib/designer_integration/qtdesignerintegration.h
@@ -17,8 +17,8 @@
* Free Software Foundation, Inc., *
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
-#ifndef QTDESIGNERINTEGRATION_H
-#define QTDESIGNERINTEGRATION_H
+#ifndef TQTDESIGNERINTEGRATION_H
+#define TQTDESIGNERINTEGRATION_H
#include <tqmap.h>
@@ -29,19 +29,20 @@ class KDevLanguageSupport;
class ImplementationWidget;
/**
-Qt Designer integration base class.
+TQt Designer integration base class.
Contains language-independent implementation part of a @ref KDevDesignerIntegration interface.
Ready to use in KDevelop language support plugins.
Subclasses of this class should reimplement only pure virtual functions in the common case.
*/
-class QtDesignerIntegration : public KDevDesignerIntegration
+class TQtDesignerIntegration : public KDevDesignerIntegration
{
Q_OBJECT
+ TQ_OBJECT
public:
- QtDesignerIntegration(KDevLanguageSupport *part, ImplementationWidget *impl,
+ TQtDesignerIntegration(KDevLanguageSupport *part, ImplementationWidget *impl,
bool classHasDefinitions, const char* name = 0);
- virtual ~QtDesignerIntegration();
+ virtual ~TQtDesignerIntegration();
public slots:
virtual void addFunction(const TQString& formName, KInterfaceDesigner::Function function);
@@ -65,7 +66,7 @@ protected:
separate files for interface and implementation parts of a class. For example,
C++ language support plugin will do:
@code
- name.replace(".h", ".cpp");
+ name.tqreplace(".h", ".cpp");
@endcode*/
virtual void processImplementationName(TQString &name);