summaryrefslogtreecommitdiffstats
path: root/languages/cpp/app_templates/kdedcop
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commit114a878c64ce6f8223cfd22d76a20eb16d177e5e (patch)
treeacaf47eb0fa12142d3896416a69e74cbf5a72242 /languages/cpp/app_templates/kdedcop
downloadtdevelop-114a878c64ce6f8223cfd22d76a20eb16d177e5e.tar.gz
tdevelop-114a878c64ce6f8223cfd22d76a20eb16d177e5e.zip
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'languages/cpp/app_templates/kdedcop')
-rw-r--r--languages/cpp/app_templates/kdedcop/.kdev_ignore0
-rw-r--r--languages/cpp/app_templates/kdedcop/Makefile.am18
-rw-r--r--languages/cpp/app_templates/kdedcop/app.cpp21
-rw-r--r--languages/cpp/app_templates/kdedcop/app.h36
-rw-r--r--languages/cpp/app_templates/kdedcop/app.kdevelop116
-rw-r--r--languages/cpp/app_templates/kdedcop/app_iface.h19
-rw-r--r--languages/cpp/app_templates/kdedcop/kdedcop.kdevtemplate227
-rw-r--r--languages/cpp/app_templates/kdedcop/kdedcop.pngbin0 -> 2127 bytes
-rw-r--r--languages/cpp/app_templates/kdedcop/main.cpp52
-rw-r--r--languages/cpp/app_templates/kdedcop/mainclass.cpp31
-rw-r--r--languages/cpp/app_templates/kdedcop/mainclass.h32
-rw-r--r--languages/cpp/app_templates/kdedcop/src-Makefile.am23
-rw-r--r--languages/cpp/app_templates/kdedcop/subdirs3
13 files changed, 578 insertions, 0 deletions
diff --git a/languages/cpp/app_templates/kdedcop/.kdev_ignore b/languages/cpp/app_templates/kdedcop/.kdev_ignore
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/languages/cpp/app_templates/kdedcop/.kdev_ignore
diff --git a/languages/cpp/app_templates/kdedcop/Makefile.am b/languages/cpp/app_templates/kdedcop/Makefile.am
new file mode 100644
index 00000000..87697fcd
--- /dev/null
+++ b/languages/cpp/app_templates/kdedcop/Makefile.am
@@ -0,0 +1,18 @@
+dataFiles = app.cpp app.h app_iface.h app.kdevelop main.cpp mainclass.cpp \
+ mainclass.h kdedcop.png src-Makefile.am subdirs
+
+templateName = kdedcop
+
+### no need to change below:
+template_DATA = $(templateName).kdevtemplate
+templatedir = ${appwizarddatadir}/templates
+
+appwizarddatadir = ${kde_datadir}/kdevappwizard
+$(templateName).tar.gz: ${dataFiles}
+ $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles}
+ $(GZIP_COMMAND) -f9 $(templateName).tar
+
+archivedir = ${appwizarddatadir}
+archive_DATA = $(templateName).tar.gz ${templateName}.png
+
+CLEANFILES = *.tar.gz \ No newline at end of file
diff --git a/languages/cpp/app_templates/kdedcop/app.cpp b/languages/cpp/app_templates/kdedcop/app.cpp
new file mode 100644
index 00000000..e295253a
--- /dev/null
+++ b/languages/cpp/app_templates/kdedcop/app.cpp
@@ -0,0 +1,21 @@
+%{CPP_TEMPLATE}
+
+#include "%{APPNAMELC}.h"
+
+#include <qlabel.h>
+
+#include <kmainwindow.h>
+#include <klocale.h>
+
+%{APPNAME}::%{APPNAME}()
+ : KMainWindow( 0, "%{APPNAME}" )
+{
+ m_mainClass = new MainClass();
+}
+
+%{APPNAME}::~%{APPNAME}()
+{
+ if (m_mainClass) delete m_mainClass;
+}
+
+#include "%{APPNAMELC}.moc"
diff --git a/languages/cpp/app_templates/kdedcop/app.h b/languages/cpp/app_templates/kdedcop/app.h
new file mode 100644
index 00000000..b908b62c
--- /dev/null
+++ b/languages/cpp/app_templates/kdedcop/app.h
@@ -0,0 +1,36 @@
+%{H_TEMPLATE}
+
+#ifndef _%{APPNAMEUC}_H_
+#define _%{APPNAMEUC}_H_
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <kmainwindow.h>
+
+#include "mainclass.h"
+
+/**
+ * @short Application Main Window
+ * @author %{AUTHOR} <%{EMAIL}>
+ * @version 0.1
+ */
+class %{APPNAME} : public KMainWindow
+{
+ Q_OBJECT
+public:
+ /**
+ * Default Constructor
+ */
+ %{APPNAME}();
+
+ /**
+ * Default Destructor
+ */
+ virtual ~%{APPNAME}();
+private:
+ MainClass *m_mainClass;
+};
+
+#endif // _%{APPNAMEUC}_H_
diff --git a/languages/cpp/app_templates/kdedcop/app.kdevelop b/languages/cpp/app_templates/kdedcop/app.kdevelop
new file mode 100644
index 00000000..496a3838
--- /dev/null
+++ b/languages/cpp/app_templates/kdedcop/app.kdevelop
@@ -0,0 +1,116 @@
+<?xml version="1.0"?>
+<kdevelop>
+ <general>
+ <author>%{AUTHOR}</author>
+ <email>%{EMAIL}</email>
+ <version>%{VERSION}</version>
+ <projectmanagement>KDevKDEAutoProject</projectmanagement>
+ <primarylanguage>C++</primarylanguage>
+ <keywords>
+ <keyword>C++</keyword>
+ <keyword>Code</keyword>
+ <keyword>Qt</keyword>
+ <keyword>KDE</keyword>
+ <keyword>DCOP</keyword>
+ </keywords>
+ </general>
+ <kdevcppsupport>
+ <qt>
+ <version>3</version>
+ <used>true</used>
+ <includestyle>3</includestyle>
+ <designerintegration>EmbeddedKDevDesigner</designerintegration>
+ </qt>
+ </kdevcppsupport>
+
+ <kdevautoproject>
+ <general>
+ <activetarget>src/%{APPNAMELC}</activetarget>
+ <useconfiguration>debug</useconfiguration>
+ </general>
+ <run>
+ <mainprogram>src/%{APPNAMELC}</mainprogram>
+ </run>
+ <configurations>
+ <optimized>
+ <builddir>optimized</builddir>
+ <ccompiler>kdevgccoptions</ccompiler>
+ <cxxcompiler>kdevgppoptions</cxxcompiler>
+ <f77compiler>kdevg77options</f77compiler>
+ <cxxflags>-O2 -g0</cxxflags>
+ </optimized>
+ <debug>
+ <configargs>--enable-debug=full</configargs>
+ <builddir>debug</builddir>
+ <ccompiler>kdevgccoptions</ccompiler>
+ <cxxcompiler>kdevgppoptions</cxxcompiler>
+ <f77compiler>kdevg77options</f77compiler>
+ <cxxflags>-O0 -g3</cxxflags>
+ </debug>
+ </configurations>
+ </kdevautoproject>
+ <kdevfileview>
+ <groups>
+ <group pattern="*.cpp;*.cxx;*.h" name="Sources" />
+ <group pattern="*.ui" name="User Interface" />
+ <group pattern="*.png" name="Icons" />
+ <group pattern="*.po;*.ts" name="Translations" />
+ <group pattern="*" name="Others" />
+ </groups>
+ </kdevfileview>
+ <kdevdoctreeview>
+ <ignoretocs>
+ <toc>ada</toc>
+ <toc>ada_bugs_gcc</toc>
+ <toc>bash</toc>
+ <toc>bash_bugs</toc>
+ <toc>clanlib</toc>
+ <toc>w3c-dom-level2-html</toc>
+ <toc>fortran_bugs_gcc</toc>
+ <toc>gnome1</toc>
+ <toc>gnustep</toc>
+ <toc>gtk</toc>
+ <toc>gtk_bugs</toc>
+ <toc>haskell</toc>
+ <toc>haskell_bugs_ghc</toc>
+ <toc>java_bugs_gcc</toc>
+ <toc>java_bugs_sun</toc>
+ <toc>pascal_bugs_fp</toc>
+ <toc>php</toc>
+ <toc>php_bugs</toc>
+ <toc>perl</toc>
+ <toc>perl_bugs</toc>
+ <toc>python</toc>
+ <toc>python_bugs</toc>
+ <toc>ruby</toc>
+ <toc>ruby_bugs</toc>
+ <toc>sdl</toc>
+ <toc>w3c-svg</toc>
+ <toc>sw</toc>
+ <toc>w3c-uaag10</toc>
+ <toc>wxwidgets_bugs</toc>
+ </ignoretocs>
+ <ignoreqt_xml>
+ <toc>qmake User Guide</toc>
+ </ignoreqt_xml>
+ </kdevdoctreeview>
+ <kdevdebugger>
+ <general>
+ <dbgshell>libtool</dbgshell>
+ </general>
+ </kdevdebugger>
+ <kdevfilecreate>
+ <filetypes/>
+ <useglobaltypes>
+ <type ext="ui" />
+ <type ext="cpp" />
+ <type ext="h" />
+ </useglobaltypes>
+ </kdevfilecreate>
+ <kdevdocumentation>
+ <projectdoc>
+ <docsystem>Doxygen Documentation Collection</docsystem>
+ <docurl>%{APPNAMELC}.tag</docurl>
+ </projectdoc>
+ </kdevdocumentation>
+</kdevelop>
diff --git a/languages/cpp/app_templates/kdedcop/app_iface.h b/languages/cpp/app_templates/kdedcop/app_iface.h
new file mode 100644
index 00000000..57bfb059
--- /dev/null
+++ b/languages/cpp/app_templates/kdedcop/app_iface.h
@@ -0,0 +1,19 @@
+%{H_TEMPLATE}
+
+#include <dcopobject.h>
+
+class DCOPDemoIface : virtual public DCOPObject
+{
+ K_DCOP
+ k_dcop:
+
+
+ // Here you should place your DCOP interface.
+ // Below are four example methods.
+ virtual QString strVal() const = 0;
+ virtual int intVal() const = 0;
+
+ virtual void setIntVal( int num ) = 0;
+ virtual void setStrVal( const QString &str ) = 0;
+
+};
diff --git a/languages/cpp/app_templates/kdedcop/kdedcop.kdevtemplate b/languages/cpp/app_templates/kdedcop/kdedcop.kdevtemplate
new file mode 100644
index 00000000..99f6e28d
--- /dev/null
+++ b/languages/cpp/app_templates/kdedcop/kdedcop.kdevtemplate
@@ -0,0 +1,227 @@
+# KDE Config File
+[General]
+Name=Simple DCOP server
+Name[ca]=Simple servidor DCOP
+Name[da]=Simpel DCOP-server
+Name[de]=Einfacher DCOP-Server
+Name[el]=Απλός εξυπηρετητής DCOP
+Name[es]=Sencillo servidor DCOP
+Name[et]=Lihtne DCOP-server
+Name[eu]=DCOP zerbitzari sinple bat
+Name[fa]=کارساز سادۀ DCOP
+Name[fr]=Serveur DCOP simple
+Name[ga]=Freastalaí simplí DCOP
+Name[gl]=Servidor sinxelo DCOP
+Name[hu]=Egyszerű DCOP-kiszolgáló
+Name[it]=Semplice server DCOP
+Name[ja]=簡単な DCOP サーバ
+Name[nds]=Eenfach DCOP-Server
+Name[ne]=साधारण DCOP सर्भर
+Name[nl]=Eenvoudige DCOP-server
+Name[pl]=Prosty serwer DCOP
+Name[pt]=Servidor de DCOP simples
+Name[pt_BR]=Servidor de DCOP simples
+Name[ru]=Сервер DCOP
+Name[sk]=Jednoduchý DCOP server
+Name[sl]=Preprost strežnik DCOP
+Name[sr]=Једноставан DCOP сервер
+Name[sr@Latn]=Jednostavan DCOP server
+Name[sv]=Enkel DCOP-server
+Name[tr]=Basit DCOP Sunucusu
+Name[zh_CN]=简单的 DCOP 服务器
+Name[zh_TW]=簡單的 DCOP 伺服器
+Icon=kdedcop.png
+Category=C++/KDE
+Comment=Generates a basic KDE DCOP server. This is an ideal starting point for a DCOP server that does not require a GUI interface.
+Comment[ca]=Genera un servidor bàsic DCOP per al KDE. Aquest és un idoni punt de partida per a un servidor DCOP que no requereixi d'una IGU.
+Comment[da]=Genererer en basal KDE DCOP-server. Dette er et ideelt startpunkt for en DCOP-server der ikke kræver en GUI-grænseflade.
+Comment[de]=Erstellt einen einfachen KDE-DCOP-Server. Dies ist ein idealer Ausgangspunkt für einen DCOP-Server, der keine Benutzeroberfläche erfordert.
+Comment[el]=Δημιουργεί ένα βασικό εξυπηρετητή KDE DCOP. Αυτό είναι ένα ιδανικό σημείο αρχής για έναν εξυπηρετητή DCOP ο οποίος δε χρειάζεται ένα γραφικό περιβάλλον.
+Comment[es]=Genera un servidor básico DCOP para KDE. Es un punto de comienzo ideal para un servidor DCOP que no requiera una interfaz gráfica.
+Comment[et]=Lihtsa KDE DCOP-serveri loomine. See on ideaalne algus DCOP-serverile, mis ei eelda graafilist kasutajaliidest.
+Comment[eu]=DCOP zerbitzari sinple bat sortzen du. Hau GUI interfazerik behar ez duen DCOP zerbitzari baterako hasierako puntu aparta da.
+Comment[fa]=یک کارساز پایۀ KDE DCOP تولید می‌کند. این یک نقطۀ شروع دلخواه برای یک کارساز DCOP است، که نیازی به یک واسط ونک ندارد.
+Comment[fr]=Génère un serveur DCOP KDE de base. C'est un bon point de départ pour un serveur DCOP qui ne requiert pas d'interface graphique.
+Comment[gl]=Xera un servidor básico DCOP para KDE. Este é un punto de comezo ideal para un servidor DCOP que non require unha interface GUI.
+Comment[hu]=Létrehoz egy egyszerű KDE DCOP-os kiszolgálót. Jó kiindulópont grafikus felület nélküli DCOP-kiszolgáló készítéséhez.
+Comment[it]=Genera un semplice server DCOP per KDE. È un punto di partenza ideale per un server DCOP che non richiede un'interfaccia GUI.
+Comment[ja]=基本的な KDE DCOP サーバを作成します。GUI を必要としない DCOP サーバの理想的な開始点です。
+Comment[nds]=Stellt en eenfach DCOP-Server op. Dat is en goot Anfang för en DCOP-Server ahn Böversiet.
+Comment[ne]=आधारभूत KDE DCOP सर्भर उत्पन्न गर्दछ । यो DCOP सर्भरका लागि उपयुक्त सुरुआत बिन्दु हो जसलाई जी यू आई इन्टरफेस आवश्यक पर्दैन ।
+Comment[nl]=Genereert een basis KDE DCOP-server. Dit is een ideaal startpunt voor een DCOP-server die geen GUI-interface vereist.
+Comment[pl]=Generuje prosty serwer KDE DCOP. Dobry punkt startu dla serwera DCOP, który nie potrzebuje interfejsu graficznego.
+Comment[pt]=Gera um servidor básico de DCOP para o KDE. Este é um ponto de partida ideal para um servidor de DCOP que não necessite de uma interface gráfica.
+Comment[pt_BR]=Gera um servidor básico de DCOP para o KDE. Este é um ponto de partida ideal para um servidor de DCOP que não necessite de uma interface gráfica.
+Comment[ru]=Создание простого сервера DCOP. Идеальная стартовая точка для разработки сервера DCOP без графического интерфейса.
+Comment[sk]=Vygeneruje základný KDE DCOP server. Toto je ideálny štartovací bod pre DCOP server, ktorý nepotrebuje GUI rozhranie.
+Comment[sl]=Ustvari osnovni strežnik DCOP za KDE. To je idealno začetno mesto za strežnik DCOP, ki ne potrebuje grafičnega vmesnika.
+Comment[sr]=Прави основан KDE DCOP сервер. Ово је идеална почетна тачка за DCOP сервер који не захтева GUI.
+Comment[sr@Latn]=Pravi osnovan KDE DCOP server. Ovo je idealna početna tačka za DCOP server koji ne zahteva GUI.
+Comment[sv]=Skapar en grundläggande KDE DCOP-server. Detta är en idealisk utgångspunkt för en DCOP-server som inte kräver ett grafiskt användargränssnitt.
+Comment[tr]=Basit bir KDE DCOP sunucusu yaratır. Bu grafik arayüz gerektirmeyen bir DCOP sunucusuna başlamak için uygun bir noktadır.
+Comment[zh_CN]=生成简单的 KDE DCOP 服务器。这是不需要图形界面的 DCOP 服务器的良好开端。
+Comment[zh_TW]=產生一個基本的 KDE DCOP 伺服器。這個是開發一個不需使用者介面的 DCOP 伺服器的一個好起點。
+FileTemplates=h,CStyle,cpp,CStyle
+ShowFilesAfterGeneration=%{dest}/src/main.cpp
+Archive=kdedcop.tar.gz
+
+[ADMIN]
+Type=include
+File=%{kdevelop}/template-common/admin.kdevtemplate
+
+[GNU]
+Type=include
+File=%{kdevelop}/template-common/gnu.kdevtemplate
+
+[MKDIR_DOCBOOK1]
+Type=mkdir
+Dir=%{dest}/doc
+
+[MKDIR_DOCBOOK2]
+Type=mkdir
+Dir=%{dest}/doc/en
+
+[FILE1]
+Type=install
+Source=%{kdevelop}/template-common/kde-doc-Makefile.am
+Dest=%{dest}/doc/Makefile.am
+
+[FILE2]
+Type=install
+Source=%{kdevelop}/template-common/kde-doc-en-Makefile.am
+Dest=%{dest}/doc/en/Makefile.am
+
+[FILE3]
+Type=install
+EscapeXML=true
+Source=%{kdevelop}/template-common/kde-index.docbook
+Dest=%{dest}/doc/en/index.docbook
+
+[FILE4]
+Type=install
+EscapeXML=true
+Source=%{src}/app.kdevelop
+Dest=%{dest}/%{APPNAMELC}.kdevelop
+
+[FILE5]
+Type=install
+Source=%{kdevelop}/template-common/kde-Makefile.am
+Dest=%{dest}/Makefile.am
+
+[FILE6]
+Type=install
+Source=%{kdevelop}/template-common/kde-Makefile.cvs
+Dest=%{dest}/Makefile.cvs
+
+[FILE7]
+Type=install
+Source=%{kdevelop}/template-common/kde-configure.in.in
+Dest=%{dest}/configure.in.in
+
+[MkDir3]
+Type=mkdir
+Dir=%{dest}/src
+
+[FILE8]
+Type=install
+Source=%{kdevelop}/template-common/kde-app.desktop
+Dest=%{dest}/src/%{APPNAMELC}.desktop
+
+[FILE9]
+Type=install
+Source=%{kdevelop}/template-common/kde-app.lsm
+Dest=%{dest}/src/%{APPNAMELC}.lsm
+
+[FILE10]
+Type=install
+Source=%{kdevelop}/template-common/hi16-app-app.png
+Dest=%{dest}/src/hi16-app-%{APPNAMELC}.png
+Process=false
+
+[FILE11]
+Type=install
+Source=%{kdevelop}/template-common/hi32-app-app.png
+Dest=%{dest}/src/hi32-app-%{APPNAMELC}.png
+Process=false
+
+[MkDir4]
+Type=mkdir
+Dir=%{dest}/po
+
+[FILE12]
+Type=install
+Source=%{kdevelop}/template-common/kde-po-Makefile.am
+Dest=%{dest}/po/Makefile.am
+
+[FILE13]
+Type=install
+Source=%{src}/subdirs
+Dest=%{dest}/subdirs
+
+[FILE14]
+Type=install
+Source=%{src}/src-Makefile.am
+Dest=%{dest}/src/Makefile.am
+
+[FILE15]
+Type=install
+Source=%{src}/app.cpp
+Dest=%{dest}/src/%{APPNAMELC}.cpp
+
+[FILE16]
+Type=install
+Source=%{src}/app.h
+Dest=%{dest}/src/%{APPNAMELC}.h
+
+[FILE17]
+Type=install
+Source=%{src}/mainclass.cpp
+Dest=%{dest}/src/mainclass.cpp
+
+[FILE18]
+Type=install
+Source=%{src}/mainclass.h
+Dest=%{dest}/src/mainclass.h
+
+[FILE19]
+Type=install
+Source=%{src}/app_iface.h
+Dest=%{dest}/src/%{APPNAMELC}_iface.h
+
+[FILE20]
+Type=install
+Source=%{src}/main.cpp
+Dest=%{dest}/src/main.cpp
+
+[MSG]
+Type=message
+Comment=A simple DCOP server was created in %{dest}
+Comment[ca]=Un simple servidor DCOP ha estat creat en %{dest}
+Comment[da]=En simpel DCOP-server blev oprettet i %{dest}
+Comment[de]=Ein einfacher DCOP-Server wurde in %{dest} erstellt.
+Comment[el]=Ένας απλός εξυπηρετητής DCOP δημιουργήθηκε στο %{dest}
+Comment[es]=Un sencillo servidor DCOP ha sido creado en %{dest}
+Comment[et]=Lihtne DCOP-server loodi asukohta %{dest}
+Comment[eu]=DCOP zerbitzari sinple bat sortu da hemen: %{dest}
+Comment[fa]=یک کارساز سادۀ DCOP در %{dest} ایجاد شد
+Comment[fr]=Un serveur DCOP simple a été créé dans %{dest}
+Comment[ga]=Cruthaíodh freastalaí simplí DCOP i %{dest}
+Comment[gl]=Creouse un servidor DCOP sinxelo en %{dest}
+Comment[hu]=Létrejött egy egyszerű DCOP-kiszolgáló itt: %{dest}
+Comment[it]=È stato creato un semplice server DCOP in %{dest}
+Comment[ja]=簡単な DCOP サーバを %{dest} に作成しました
+Comment[nds]=In %{dest} wöör en eenfach DCOP-Server opstellt
+Comment[ne]=साधारण DCOP सर्भर %{dest} मा सिर्जना गरियो
+Comment[nl]=Een eenvoudige DCOP-server is aangemaakt in %{dest}
+Comment[pl]=Prosty serwer DCOP został utworzony w %{dest}
+Comment[pt]=Foi criado um servidor de DCOP simples em %{dest}
+Comment[pt_BR]=Foi criado um servidor de DCOP simples em %{dest}
+Comment[ru]=Простой сервер DCOP создан в %{dest}
+Comment[sk]=Jednoduchý DCOP server bol vytvorený v %{dest}
+Comment[sl]=Preprost strežnik DCOP je bil ustvarjen v %{dest}
+Comment[sr]=Једноставан DCOP сервер направљен је у %{dest}
+Comment[sr@Latn]=Jednostavan DCOP server napravljen je u %{dest}
+Comment[sv]=En enkel DCOP-server skapades i %{dest}
+Comment[tr]=Basit bir DCOP sunucusu %{dest} içinde yaratıldı.
+Comment[zh_CN]=在 %{dest} 中创建了简单的 DCOP 服务器
+Comment[zh_TW]=一個簡單的 DCOP 伺服器已建立於 %{dest}
diff --git a/languages/cpp/app_templates/kdedcop/kdedcop.png b/languages/cpp/app_templates/kdedcop/kdedcop.png
new file mode 100644
index 00000000..1d25362b
--- /dev/null
+++ b/languages/cpp/app_templates/kdedcop/kdedcop.png
Binary files differ
diff --git a/languages/cpp/app_templates/kdedcop/main.cpp b/languages/cpp/app_templates/kdedcop/main.cpp
new file mode 100644
index 00000000..5bfcf8ae
--- /dev/null
+++ b/languages/cpp/app_templates/kdedcop/main.cpp
@@ -0,0 +1,52 @@
+%{CPP_TEMPLATE}
+
+#include "%{APPNAMELC}.h"
+#include <kapplication.h>
+#include <kaboutdata.h>
+#include <kcmdlineargs.h>
+#include <klocale.h>
+
+static const char description[] =
+ I18N_NOOP("A KDE KPart Application");
+
+static const char version[] = "0.1";
+
+static KCmdLineOptions options[] =
+{
+// { "+[URL]", I18N_NOOP( "Document to open" ), 0 },
+ KCmdLineLastOption
+};
+
+int main(int argc, char **argv)
+{
+ KAboutData about("%{APPNAMELC}", I18N_NOOP("%{APPNAME}"), version, description,
+ KAboutData::License_%{LICENSE}, "(C) %{YEAR} %{AUTHOR}", 0, 0, "%{EMAIL}");
+ about.addAuthor( "%{AUTHOR}", 0, "%{EMAIL}" );
+ KCmdLineArgs::init(argc, argv, &about);
+ KCmdLineArgs::addCmdLineOptions( options );
+ KApplication app;
+ %{APPNAME} *mainWin = 0;
+
+ if (app.isRestored())
+ {
+ RESTORE(%{APPNAME});
+ }
+ else
+ {
+ // no session.. just start up normally
+ KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
+
+ /// @todo do something with the command line args here
+
+ mainWin = new %{APPNAME}();
+ app.setMainWidget( mainWin );
+ mainWin->show();
+
+ args->clear();
+ }
+
+ int ret = app.exec();
+
+ delete mainWin;
+ return ret;
+}
diff --git a/languages/cpp/app_templates/kdedcop/mainclass.cpp b/languages/cpp/app_templates/kdedcop/mainclass.cpp
new file mode 100644
index 00000000..8f334114
--- /dev/null
+++ b/languages/cpp/app_templates/kdedcop/mainclass.cpp
@@ -0,0 +1,31 @@
+%{CPP_TEMPLATE}
+
+#include "mainclass.h"
+
+
+MainClass::MainClass()
+ : DCOPDemoIface(),
+ DCOPObject("mainclass"), /* this is the object name DCOP will expose */
+ m_intValue(0)
+{
+}
+
+MainClass::~MainClass()
+{
+}
+
+void MainClass::setStrVal(const QString & str) {
+ m_strValue = str;
+}
+
+void MainClass::setIntVal(int val) {
+ m_intValue = val;
+}
+
+QString MainClass::strVal() const {
+ return m_strValue;
+}
+
+int MainClass::intVal() const {
+ return m_intValue;
+}
diff --git a/languages/cpp/app_templates/kdedcop/mainclass.h b/languages/cpp/app_templates/kdedcop/mainclass.h
new file mode 100644
index 00000000..ca37f2ad
--- /dev/null
+++ b/languages/cpp/app_templates/kdedcop/mainclass.h
@@ -0,0 +1,32 @@
+%{H_TEMPLATE}
+
+#ifndef MAINCLASS_H
+#define MAINCLASS_H
+
+#include "%{APPNAMELC}_iface.h"
+
+/**
+ *
+ * @author %{AUTHOR}
+ **/
+class MainClass : virtual public DCOPDemoIface
+{
+public:
+ MainClass();
+
+ ~MainClass();
+
+
+ // Here is the implementation of the example DCOP interface methods.
+ virtual void setStrVal(const QString &);
+ virtual void setIntVal(int);
+ virtual QString strVal() const;
+ virtual int intVal() const;
+
+private:
+ QString m_strValue;
+ int m_intValue;
+
+};
+
+#endif
diff --git a/languages/cpp/app_templates/kdedcop/src-Makefile.am b/languages/cpp/app_templates/kdedcop/src-Makefile.am
new file mode 100644
index 00000000..dc26ec93
--- /dev/null
+++ b/languages/cpp/app_templates/kdedcop/src-Makefile.am
@@ -0,0 +1,23 @@
+## Makefile.am for %{APPNAMELC}
+
+# set the include path for X, qt and KDE
+INCLUDES = $(all_includes)
+
+# these are the headers for your project
+noinst_HEADERS = %{APPNAMELC}.h
+
+# let automoc handle all of the meta source files (moc)
+METASOURCES = AUTO
+
+messages: rc.cpp
+ $(EXTRACTRC) `find . -name \*.ui -o -name \*.rc` > rc.cpp
+ $(XGETTEXT) *.cpp -o $(podir)/%{APPNAMELC}.pot
+
+# this is the program that gets installed. it's name is used for all
+# of the other Makefile.am variables
+bin_PROGRAMS = %{APPNAMELC}
+
+# the application source, library search path, and link libraries
+%{APPNAMELC}_SOURCES = main.cpp %{APPNAMELC}.cpp %{APPNAMELC}_iface.skel mainclass.cpp
+%{APPNAMELC}_LDFLAGS = $(KDE_RPATH) $(all_libraries)
+%{APPNAMELC}_LDADD = $(LIB_KDEUI)
diff --git a/languages/cpp/app_templates/kdedcop/subdirs b/languages/cpp/app_templates/kdedcop/subdirs
new file mode 100644
index 00000000..0e678106
--- /dev/null
+++ b/languages/cpp/app_templates/kdedcop/subdirs
@@ -0,0 +1,3 @@
+doc
+po
+src