diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2014-05-25 15:37:31 +0900 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2014-05-25 15:37:31 +0900 |
commit | 6392f5a9dfce2bf83617d49bb7f332181ec6004e (patch) | |
tree | ab69e390f7962b7e7dda1a3a64f035c61c751cf4 /languages/cpp/app_templates/kdedcop | |
parent | aba2788b428dc53243407902e9ccbb20b97a69fd (diff) | |
download | tdevelop-6392f5a9dfce2bf83617d49bb7f332181ec6004e.tar.gz tdevelop-6392f5a9dfce2bf83617d49bb7f332181ec6004e.zip |
Revert "Finish renaming tdevelop components"
This reverts commit 722ce1efbac31c61b1d4b13f7e075c9f311e3e73.
Diffstat (limited to 'languages/cpp/app_templates/kdedcop')
-rw-r--r-- | languages/cpp/app_templates/kdedcop/CMakeLists.txt | 27 | ||||
-rw-r--r-- | languages/cpp/app_templates/kdedcop/Makefile.am | 18 | ||||
-rw-r--r-- | languages/cpp/app_templates/kdedcop/app.cpp | 21 | ||||
-rw-r--r-- | languages/cpp/app_templates/kdedcop/app.h | 37 | ||||
-rw-r--r-- | languages/cpp/app_templates/kdedcop/app.tdevelop | 116 | ||||
-rw-r--r-- | languages/cpp/app_templates/kdedcop/app_iface.h | 19 | ||||
-rw-r--r-- | languages/cpp/app_templates/kdedcop/kdedcop.kdevtemplate | 227 | ||||
-rw-r--r-- | languages/cpp/app_templates/kdedcop/kdedcop.png | bin | 0 -> 2127 bytes | |||
-rw-r--r-- | languages/cpp/app_templates/kdedcop/main.cpp | 52 | ||||
-rw-r--r-- | languages/cpp/app_templates/kdedcop/mainclass.cpp | 31 | ||||
-rw-r--r-- | languages/cpp/app_templates/kdedcop/mainclass.h | 32 | ||||
-rw-r--r-- | languages/cpp/app_templates/kdedcop/src-Makefile.am | 23 | ||||
-rw-r--r-- | languages/cpp/app_templates/kdedcop/subdirs | 3 |
13 files changed, 606 insertions, 0 deletions
diff --git a/languages/cpp/app_templates/kdedcop/CMakeLists.txt b/languages/cpp/app_templates/kdedcop/CMakeLists.txt new file mode 100644 index 00000000..0b7e9a3f --- /dev/null +++ b/languages/cpp/app_templates/kdedcop/CMakeLists.txt @@ -0,0 +1,27 @@ +################################################# +# +# (C) 2010-2011 Serghei Amelian +# serghei (DOT) amelian (AT) gmail.com +# +# Improvements and feedback are welcome +# +# This file is released under GPL >= 2 +# +################################################# + +add_custom_target( kdedcop.tar.gz ALL + COMMAND tar zcf kdedcop.tar.gz -C ${CMAKE_CURRENT_SOURCE_DIR} + app.cpp app.h app_iface.h app.tdevelop main.cpp + mainclass.cpp mainclass.h kdedcop.png src-Makefile.am + subdirs +) + + +install( FILES + ${CMAKE_CURRENT_BINARY_DIR}/kdedcop.tar.gz kdedcop.png + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) + + +install( FILES + kdedcop.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/cpp/app_templates/kdedcop/Makefile.am b/languages/cpp/app_templates/kdedcop/Makefile.am new file mode 100644 index 00000000..21c39778 --- /dev/null +++ b/languages/cpp/app_templates/kdedcop/Makefile.am @@ -0,0 +1,18 @@ +dataFiles = app.cpp app.h app_iface.h app.tdevelop 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..5c2fa627 --- /dev/null +++ b/languages/cpp/app_templates/kdedcop/app.cpp @@ -0,0 +1,21 @@ +%{CPP_TEMPLATE} + +#include "%{APPNAMELC}.h" + +#include <tqlabel.h> + +#include <tdemainwindow.h> +#include <tdelocale.h> + +%{APPNAME}::%{APPNAME}() + : TDEMainWindow( 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..814fccad --- /dev/null +++ b/languages/cpp/app_templates/kdedcop/app.h @@ -0,0 +1,37 @@ +%{H_TEMPLATE} + +#ifndef _%{APPNAMEUC}_H_ +#define _%{APPNAMEUC}_H_ + +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + +#include <tdemainwindow.h> + +#include "mainclass.h" + +/** + * @short Application Main Window + * @author %{AUTHOR} <%{EMAIL}> + * @version 0.1 + */ +class %{APPNAME} : public TDEMainWindow +{ + 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.tdevelop b/languages/cpp/app_templates/kdedcop/app.tdevelop new file mode 100644 index 00000000..991381c5 --- /dev/null +++ b/languages/cpp/app_templates/kdedcop/app.tdevelop @@ -0,0 +1,116 @@ +<?xml version="1.0"?> +<tdevelop> + <general> + <author>%{AUTHOR}</author> + <email>%{EMAIL}</email> + <version>%{VERSION}</version> + <projectmanagement>KDevTDEAutoProject</projectmanagement> + <primarylanguage>C++</primarylanguage> + <keywords> + <keyword>C++</keyword> + <keyword>Code</keyword> + <keyword>Qt</keyword> + <keyword>TDE</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> +</tdevelop> 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..7049c712 --- /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 TQString strVal() const = 0; + virtual int intVal() const = 0; + + virtual void setIntVal( int num ) = 0; + virtual void setStrVal( const TQString &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..ff6a91c1 --- /dev/null +++ b/languages/cpp/app_templates/kdedcop/kdedcop.kdevtemplate @@ -0,0 +1,227 @@ +# TDE 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++/TDE +Comment=Generates a basic TDE 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 TDE. Aquest és un idoni punt de partida per a un servidor DCOP que no requereixi d'una IGU. +Comment[da]=Genererer en basal TDE DCOP-server. Dette er et ideelt startpunkt for en DCOP-server der ikke kræver en GUI-grænseflade. +Comment[de]=Erstellt einen einfachen TDE-DCOP-Server. Dies ist ein idealer Ausgangspunkt für einen DCOP-Server, der keine Benutzeroberfläche erfordert. +Comment[el]=Δημιουργεί ένα βασικό εξυπηρετητή TDE DCOP. Αυτό είναι ένα ιδανικό σημείο αρχής για έναν εξυπηρετητή DCOP ο οποίος δε χρειάζεται ένα γραφικό περιβάλλον. +Comment[es]=Genera un servidor básico DCOP para TDE. Es un punto de comienzo ideal para un servidor DCOP que no requiera una interfaz gráfica. +Comment[et]=Lihtsa TDE 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]=یک کارساز پایۀ TDE DCOP تولید میکند. این یک نقطۀ شروع دلخواه برای یک کارساز DCOP است، که نیازی به یک واسط ونک ندارد. +Comment[fr]=Génère un serveur DCOP TDE 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 TDE. Este é un punto de comezo ideal para un servidor DCOP que non require unha interface GUI. +Comment[hu]=Létrehoz egy egyszerű TDE 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 TDE. È un punto di partenza ideale per un server DCOP che non richiede un'interfaccia GUI. +Comment[ja]=基本的な TDE 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]=आधारभूत TDE DCOP सर्भर उत्पन्न गर्दछ । यो DCOP सर्भरका लागि उपयुक्त सुरुआत बिन्दु हो जसलाई जी यू आई इन्टरफेस आवश्यक पर्दैन । +Comment[nl]=Genereert een basis TDE DCOP-server. Dit is een ideaal startpunt voor een DCOP-server die geen GUI-interface vereist. +Comment[pl]=Generuje prosty serwer TDE DCOP. Dobry punkt startu dla serwera DCOP, który nie potrzebuje interfejsu graficznego. +Comment[pt]=Gera um servidor básico de DCOP para o TDE. 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 TDE. 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ý TDE DCOP server. Toto je ideálny štartovací bod pre DCOP server, ktorý nepotrebuje GUI rozhranie. +Comment[sl]=Ustvari osnovni strežnik DCOP za TDE. To je idealno začetno mesto za strežnik DCOP, ki ne potrebuje grafičnega vmesnika. +Comment[sr]=Прави основан TDE DCOP сервер. Ово је идеална почетна тачка за DCOP сервер који не захтева GUI. +Comment[sr@Latn]=Pravi osnovan TDE DCOP server. Ovo je idealna početna tačka za DCOP server koji ne zahteva GUI. +Comment[sv]=Skapar en grundläggande TDE 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 TDE DCOP sunucusu yaratır. Bu grafik arayüz gerektirmeyen bir DCOP sunucusuna başlamak için uygun bir noktadır. +Comment[zh_CN]=生成简单的 TDE DCOP 服务器。这是不需要图形界面的 DCOP 服务器的良好开端。 +Comment[zh_TW]=產生一個基本的 TDE DCOP 伺服器。這個是開發一個不需使用者介面的 DCOP 伺服器的一個好起點。 +FileTemplates=h,CStyle,cpp,CStyle +ShowFilesAfterGeneration=%{dest}/src/main.cpp +Archive=kdedcop.tar.gz + +[ADMIN] +Type=include +File=%{tdevelop}/template-common/admin.kdevtemplate + +[GNU] +Type=include +File=%{tdevelop}/template-common/gnu.kdevtemplate + +[MKDIR_DOCBOOK1] +Type=mkdir +Dir=%{dest}/doc + +[MKDIR_DOCBOOK2] +Type=mkdir +Dir=%{dest}/doc/en + +[FILE1] +Type=install +Source=%{tdevelop}/template-common/kde-doc-Makefile.am +Dest=%{dest}/doc/Makefile.am + +[FILE2] +Type=install +Source=%{tdevelop}/template-common/kde-doc-en-Makefile.am +Dest=%{dest}/doc/en/Makefile.am + +[FILE3] +Type=install +EscapeXML=true +Source=%{tdevelop}/template-common/tde-index.docbook +Dest=%{dest}/doc/en/index.docbook + +[FILE4] +Type=install +EscapeXML=true +Source=%{src}/app.tdevelop +Dest=%{dest}/%{APPNAMELC}.tdevelop + +[FILE5] +Type=install +Source=%{tdevelop}/template-common/kde-Makefile.am +Dest=%{dest}/Makefile.am + +[FILE6] +Type=install +Source=%{tdevelop}/template-common/kde-Makefile.cvs +Dest=%{dest}/Makefile.cvs + +[FILE7] +Type=install +Source=%{tdevelop}/template-common/tde-configure.in.in +Dest=%{dest}/configure.in.in + +[MkDir3] +Type=mkdir +Dir=%{dest}/src + +[FILE8] +Type=install +Source=%{tdevelop}/template-common/tde-app.desktop +Dest=%{dest}/src/%{APPNAMELC}.desktop + +[FILE9] +Type=install +Source=%{tdevelop}/template-common/kde-app.lsm +Dest=%{dest}/src/%{APPNAMELC}.lsm + +[FILE10] +Type=install +Source=%{tdevelop}/template-common/hi16-app-app.png +Dest=%{dest}/src/hi16-app-%{APPNAMELC}.png +Process=false + +[FILE11] +Type=install +Source=%{tdevelop}/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=%{tdevelop}/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 Binary files differnew file mode 100644 index 00000000..1d25362b --- /dev/null +++ b/languages/cpp/app_templates/kdedcop/kdedcop.png diff --git a/languages/cpp/app_templates/kdedcop/main.cpp b/languages/cpp/app_templates/kdedcop/main.cpp new file mode 100644 index 00000000..283ab5cf --- /dev/null +++ b/languages/cpp/app_templates/kdedcop/main.cpp @@ -0,0 +1,52 @@ +%{CPP_TEMPLATE} + +#include "%{APPNAMELC}.h" +#include <tdeapplication.h> +#include <tdeaboutdata.h> +#include <tdecmdlineargs.h> +#include <tdelocale.h> + +static const char description[] = + I18N_NOOP("A TDE KPart Application"); + +static const char version[] = "0.1"; + +static TDECmdLineOptions options[] = +{ +// { "+[URL]", I18N_NOOP( "Document to open" ), 0 }, + TDECmdLineLastOption +}; + +int main(int argc, char **argv) +{ + TDEAboutData about("%{APPNAMELC}", I18N_NOOP("%{APPNAME}"), version, description, + TDEAboutData::License_%{LICENSE}, "(C) %{YEAR} %{AUTHOR}", 0, 0, "%{EMAIL}"); + about.addAuthor( "%{AUTHOR}", 0, "%{EMAIL}" ); + TDECmdLineArgs::init(argc, argv, &about); + TDECmdLineArgs::addCmdLineOptions( options ); + TDEApplication app; + %{APPNAME} *mainWin = 0; + + if (app.isRestored()) + { + RESTORE(%{APPNAME}); + } + else + { + // no session.. just start up normally + TDECmdLineArgs *args = TDECmdLineArgs::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..a5e0d6a5 --- /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 TQString & str) { + m_strValue = str; +} + +void MainClass::setIntVal(int val) { + m_intValue = val; +} + +TQString 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..13504f82 --- /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 TQString &); + virtual void setIntVal(int); + virtual TQString strVal() const; + virtual int intVal() const; + +private: + TQString 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..19ddf2fb --- /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 TDE +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) $(LIB_QT) $(LIB_TDECORE) $(LIB_TDEUI) $(LIB_TDEPARTS) +%{APPNAMELC}_LDADD = $(LIB_TDEUI) 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 |