summaryrefslogtreecommitdiffstats
path: root/languages/cpp/app_templates/kofficepart
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/cpp/app_templates/kofficepart
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/cpp/app_templates/kofficepart')
-rw-r--r--languages/cpp/app_templates/kofficepart/kopart_factory.cpp10
-rw-r--r--languages/cpp/app_templates/kofficepart/kopart_factory.h5
-rw-r--r--languages/cpp/app_templates/kofficepart/kopart_part.cpp14
-rw-r--r--languages/cpp/app_templates/kofficepart/kopart_part.h7
-rw-r--r--languages/cpp/app_templates/kofficepart/kopart_view.cpp4
-rw-r--r--languages/cpp/app_templates/kofficepart/kopart_view.h3
-rw-r--r--languages/cpp/app_templates/kofficepart/src-Makefile.am2
7 files changed, 24 insertions, 21 deletions
diff --git a/languages/cpp/app_templates/kofficepart/kopart_factory.cpp b/languages/cpp/app_templates/kofficepart/kopart_factory.cpp
index 86287a3f..034e2fb3 100644
--- a/languages/cpp/app_templates/kofficepart/kopart_factory.cpp
+++ b/languages/cpp/app_templates/kofficepart/kopart_factory.cpp
@@ -23,8 +23,8 @@ extern "C"
KInstance* %{APPNAME}Factory::s_global = 0L;
KAboutData* %{APPNAME}Factory::s_aboutData = 0L;
-%{APPNAME}Factory::%{APPNAME}Factory( TQObject* parent, const char* name )
- : KoFactory( parent, name )
+%{APPNAME}Factory::%{APPNAME}Factory( TQObject* tqparent, const char* name )
+ : KoFactory( tqparent, name )
{
global();
}
@@ -37,14 +37,14 @@ KAboutData* %{APPNAME}Factory::s_aboutData = 0L;
s_global = 0L;
}
-KParts::Part* %{APPNAME}Factory::createPartObject( TQWidget *parentWidget, const char *widgetName, TQObject* parent, const char* name, const char* classname, const TQStringList & )
+KParts::Part* %{APPNAME}Factory::createPartObject( TQWidget *tqparentWidget, const char *widgetName, TQObject* tqparent, const char* name, const char* classname, const TQStringList & )
{
// If classname is "KoDocument", our host is a koffice application
// otherwise, the host wants us as a simple part, so switch to readonly and single view.
bool bWantKoDocument = ( strcmp( classname, "KoDocument" ) == 0 );
- // parentWidget and widgetName are used by KoDocument for the "readonly+singleView" case.
- %{APPNAME}Part *part = new %{APPNAME}Part( parentWidget, widgetName, parent, name, !bWantKoDocument );
+ // tqparentWidget and widgetName are used by KoDocument for the "readonly+singleView" case.
+ %{APPNAME}Part *part = new %{APPNAME}Part( tqparentWidget, widgetName, tqparent, name, !bWantKoDocument );
if ( !bWantKoDocument )
part->setReadWrite( false );
diff --git a/languages/cpp/app_templates/kofficepart/kopart_factory.h b/languages/cpp/app_templates/kofficepart/kopart_factory.h
index 58061af3..149b4b50 100644
--- a/languages/cpp/app_templates/kofficepart/kopart_factory.h
+++ b/languages/cpp/app_templates/kofficepart/kopart_factory.h
@@ -14,11 +14,12 @@ class KAboutData;
class %{APPNAME}Factory : public KoFactory
{
Q_OBJECT
+ TQ_OBJECT
public:
- %{APPNAME}Factory( TQObject* parent = 0, const char* name = 0 );
+ %{APPNAME}Factory( TQObject* tqparent = 0, const char* name = 0 );
~%{APPNAME}Factory();
- virtual KParts::Part *createPartObject( TQWidget *parentWidget = 0, const char *widgetName = 0, TQObject *parent = 0, const char *name = 0, const char *classname = "KoDocument", const TQStringList &args = TQStringList() );
+ virtual KParts::Part *createPartObject( TQWidget *tqparentWidget = 0, const char *widgetName = 0, TQObject *tqparent = 0, const char *name = 0, const char *classname = "KoDocument", const TQStringList &args = TQStringList() );
static KInstance* global();
diff --git a/languages/cpp/app_templates/kofficepart/kopart_part.cpp b/languages/cpp/app_templates/kofficepart/kopart_part.cpp
index c12b5fd7..389fb431 100644
--- a/languages/cpp/app_templates/kofficepart/kopart_part.cpp
+++ b/languages/cpp/app_templates/kofficepart/kopart_part.cpp
@@ -8,20 +8,20 @@
#include <tqpainter.h>
-%{APPNAME}Part::%{APPNAME}Part( TQWidget *parentWidget, const char *widgetName, TQObject* parent, const char* name, bool singleViewMode )
- : KoDocument( parentWidget, widgetName, parent, name, singleViewMode )
+%{APPNAME}Part::%{APPNAME}Part( TQWidget *tqparentWidget, const char *widgetName, TQObject* tqparent, const char* name, bool singleViewMode )
+ : KoDocument( tqparentWidget, widgetName, tqparent, name, singleViewMode )
{
}
-bool %{APPNAME}Part::initDoc( InitDocFlags flags, TQWidget* parentWidget )
+bool %{APPNAME}Part::initDoc( InitDocFlags flags, TQWidget* tqparentWidget )
{
// If nothing is loaded, do initialize here
return TRUE;
}
-KoView* %{APPNAME}Part::createViewInstance( TQWidget* parent, const char* name )
+KoView* %{APPNAME}Part::createViewInstance( TQWidget* tqparent, const char* name )
{
- return new %{APPNAME}View( this, parent, name );
+ return new %{APPNAME}View( this, tqparent, name );
}
bool %{APPNAME}Part::loadOasis( const TQDomDocument & doc, KoOasisStyles& oasisStyles, const TQDomDocument & settings, KoStore* store )
@@ -32,13 +32,13 @@ bool %{APPNAME}Part::loadOasis( const TQDomDocument & doc, KoOasisStyles& oasisS
bool %{APPNAME}Part::loadXML( TQIODevice *, const TQDomDocument & )
{
- /// @todo load the document from the QDomDocument
+ /// @todo load the document from the TQDomDocument
return true;
}
TQDomDocument %{APPNAME}Part::saveXML()
{
- /// @todo save the document into a QDomDocument
+ /// @todo save the document into a TQDomDocument
return TQDomDocument();
}
diff --git a/languages/cpp/app_templates/kofficepart/kopart_part.h b/languages/cpp/app_templates/kofficepart/kopart_part.h
index 95ebb3f6..0ec011ae 100644
--- a/languages/cpp/app_templates/kofficepart/kopart_part.h
+++ b/languages/cpp/app_templates/kofficepart/kopart_part.h
@@ -11,12 +11,13 @@
class %{APPNAME}Part : public KoDocument
{
Q_OBJECT
+ TQ_OBJECT
public:
- %{APPNAME}Part( TQWidget *parentWidget = 0, const char *widgetName = 0, TQObject* parent = 0, const char* name = 0, bool singleViewMode = false );
+ %{APPNAME}Part( TQWidget *tqparentWidget = 0, const char *widgetName = 0, TQObject* tqparent = 0, const char* name = 0, bool singleViewMode = false );
virtual void paintContent( TQPainter& painter, const TQRect& rect, bool transparent = FALSE, double zoomX = 1.0, double zoomY = 1.0 );
- virtual bool initDoc( InitDocFlags flags, TQWidget* parentWidget = 0 );
+ virtual bool initDoc( InitDocFlags flags, TQWidget* tqparentWidget = 0 );
virtual bool loadOasis( const TQDomDocument & doc, KoOasisStyles& oasisStyles, const TQDomDocument & settings, KoStore* store );
virtual bool loadXML( TQIODevice *, const TQDomDocument & );
@@ -24,7 +25,7 @@ public:
virtual bool saveOasis( KoStore* store, KoXmlWriter* manifestWriter );
protected:
- virtual KoView* createViewInstance( TQWidget* parent, const char* name );
+ virtual KoView* createViewInstance( TQWidget* tqparent, const char* name );
};
#endif
diff --git a/languages/cpp/app_templates/kofficepart/kopart_view.cpp b/languages/cpp/app_templates/kofficepart/kopart_view.cpp
index f32707a8..240251f9 100644
--- a/languages/cpp/app_templates/kofficepart/kopart_view.cpp
+++ b/languages/cpp/app_templates/kofficepart/kopart_view.cpp
@@ -13,8 +13,8 @@
#include <klocale.h>
#include <kdebug.h>
-%{APPNAME}View::%{APPNAME}View( %{APPNAME}Part* part, TQWidget* parent, const char* name )
- : KoView( part, parent, name )
+%{APPNAME}View::%{APPNAME}View( %{APPNAME}Part* part, TQWidget* tqparent, const char* name )
+ : KoView( part, tqparent, name )
{
setInstance( %{APPNAME}Factory::global() );
setXMLFile( "%{APPNAMELC}.rc" );
diff --git a/languages/cpp/app_templates/kofficepart/kopart_view.h b/languages/cpp/app_templates/kofficepart/kopart_view.h
index 63f5127b..bcaac2e1 100644
--- a/languages/cpp/app_templates/kofficepart/kopart_view.h
+++ b/languages/cpp/app_templates/kofficepart/kopart_view.h
@@ -16,8 +16,9 @@ class %{APPNAME}Part;
class %{APPNAME}View : public KoView
{
Q_OBJECT
+ TQ_OBJECT
public:
- %{APPNAME}View( %{APPNAME}Part* part, TQWidget* parent = 0, const char* name = 0 );
+ %{APPNAME}View( %{APPNAME}Part* part, TQWidget* tqparent = 0, const char* name = 0 );
protected slots:
void cut();
diff --git a/languages/cpp/app_templates/kofficepart/src-Makefile.am b/languages/cpp/app_templates/kofficepart/src-Makefile.am
index 19d38267..a0f702f6 100644
--- a/languages/cpp/app_templates/kofficepart/src-Makefile.am
+++ b/languages/cpp/app_templates/kofficepart/src-Makefile.am
@@ -37,5 +37,5 @@ rc_DATA = %{APPNAMELC}.rc
rcdir = $(kde_datadir)/%{APPNAMELC}
messages: rc.cpp
- $(EXTRACTRC) `find . -name \*.ui -o -name \*.rc` > rc.cpp
+ $(EXTRACTRC) `tqfind . -name \*.ui -o -name \*.rc` > rc.cpp
$(XGETTEXT) *.cpp %{APPNAMELC}_aboutdata.h -o $(podir)/%{APPNAMELC}.pot