From 114a878c64ce6f8223cfd22d76a20eb16d177e5e Mon Sep 17 00:00:00 2001 From: toma Date: Wed, 25 Nov 2009 17:56:58 +0000 Subject: 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 --- languages/cpp/app_templates/khello/.kdev_ignore | 0 languages/cpp/app_templates/khello/Makefile.am | 18 ++ languages/cpp/app_templates/khello/app.cpp | 23 +++ languages/cpp/app_templates/khello/app.desktop | 40 ++++ languages/cpp/app_templates/khello/app.h | 32 +++ languages/cpp/app_templates/khello/app.kdevelop | 115 +++++++++++ languages/cpp/app_templates/khello/appui.rc | 8 + .../cpp/app_templates/khello/khello.kdevtemplate | 220 +++++++++++++++++++++ languages/cpp/app_templates/khello/khello.png | Bin 0 -> 3573 bytes languages/cpp/app_templates/khello/main.cpp | 51 +++++ languages/cpp/app_templates/khello/src-Makefile.am | 35 ++++ languages/cpp/app_templates/khello/subdirs | 3 + 12 files changed, 545 insertions(+) create mode 100644 languages/cpp/app_templates/khello/.kdev_ignore create mode 100644 languages/cpp/app_templates/khello/Makefile.am create mode 100644 languages/cpp/app_templates/khello/app.cpp create mode 100644 languages/cpp/app_templates/khello/app.desktop create mode 100644 languages/cpp/app_templates/khello/app.h create mode 100644 languages/cpp/app_templates/khello/app.kdevelop create mode 100644 languages/cpp/app_templates/khello/appui.rc create mode 100644 languages/cpp/app_templates/khello/khello.kdevtemplate create mode 100644 languages/cpp/app_templates/khello/khello.png create mode 100644 languages/cpp/app_templates/khello/main.cpp create mode 100644 languages/cpp/app_templates/khello/src-Makefile.am create mode 100644 languages/cpp/app_templates/khello/subdirs (limited to 'languages/cpp/app_templates/khello') diff --git a/languages/cpp/app_templates/khello/.kdev_ignore b/languages/cpp/app_templates/khello/.kdev_ignore new file mode 100644 index 00000000..e69de29b diff --git a/languages/cpp/app_templates/khello/Makefile.am b/languages/cpp/app_templates/khello/Makefile.am new file mode 100644 index 00000000..6f788f99 --- /dev/null +++ b/languages/cpp/app_templates/khello/Makefile.am @@ -0,0 +1,18 @@ +# all khello data files +dataFiles = src-Makefile.am app.cpp app.h main.cpp appui.rc app.kdevelop \ + subdirs app.desktop khello.png +templateName = khello + +### 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 diff --git a/languages/cpp/app_templates/khello/app.cpp b/languages/cpp/app_templates/khello/app.cpp new file mode 100644 index 00000000..44332685 --- /dev/null +++ b/languages/cpp/app_templates/khello/app.cpp @@ -0,0 +1,23 @@ +%{CPP_TEMPLATE} + +#include "%{APPNAMELC}.h" + +#include + +#include +#include + +%{APPNAME}::%{APPNAME}() + : KMainWindow( 0, "%{APPNAME}" ) +{ + // set the shell's ui resource file + setXMLFile("%{APPNAMELC}ui.rc"); + + new QLabel( "Hello World", this, "hello label" ); +} + +%{APPNAME}::~%{APPNAME}() +{ +} + +#include "%{APPNAMELC}.moc" diff --git a/languages/cpp/app_templates/khello/app.desktop b/languages/cpp/app_templates/khello/app.desktop new file mode 100644 index 00000000..8b36e6e0 --- /dev/null +++ b/languages/cpp/app_templates/khello/app.desktop @@ -0,0 +1,40 @@ +[Desktop Entry] +Name=%{APPNAME} +Exec=%{APPNAMELC} +Icon=%{APPNAMELC} +Type=Application +Comment=A simple KDE Application +Comment[br]=Ur meziant eeun evit KDE +Comment[ca]=Una simple aplicació per al KDE +Comment[da]=Et simpelt KDE program +Comment[de]=Eine einfache KDE-Anwendung +Comment[el]=Μια απλή εφαρμογή του KDE +Comment[es]=Una aplicación de KDE sencilla +Comment[et]=Lihtne KDE rakendus +Comment[eu]=KDE aplikazio simple bat +Comment[fa]=یک کاربرد سادۀ KDE +Comment[fr]=Une application simple pour KDE +Comment[ga]=Feidhmchlár Simplí KDE +Comment[gl]=Unha aplicación KDE sinxela +Comment[hi]=एक सादा केडीई अनुप्रयोग +Comment[hu]=Egyszerű KDE-alkalmazás +Comment[is]=Einfalt KDE forrit +Comment[it]=Una semplice applicazione KDE +Comment[ja]=簡単な KDE アプリケーション +Comment[nds]=En eenfach KDE-Programm +Comment[ne]=एउटा साधारण केडीई अनुप्रयोग +Comment[nl]=Een eenvoudige KDE-toepassing +Comment[pl]=Prosty program KDE +Comment[pt]=Uma aplicação simples do KDE +Comment[pt_BR]=Um simples Aplicativo do KDE +Comment[ru]=Простое приложение KDE +Comment[sk]=Jednoduchá KDE aplikácia +Comment[sl]=Preprost program za KDE +Comment[sr]=Једноставан KDE програм +Comment[sr@Latn]=Jednostavan KDE program +Comment[sv]=Ett enkelt KDE-program +Comment[ta]=ஒரு சாதாரண கெடிஇ பயன்பாடு +Comment[tg]=Гузориши оддиKDE +Comment[tr]=Basit bir KDE Uygulaması +Comment[zh_CN]=一个简单的 KDE 应用程序 +Comment[zh_TW]=簡單的 KDE 應用程式 diff --git a/languages/cpp/app_templates/khello/app.h b/languages/cpp/app_templates/khello/app.h new file mode 100644 index 00000000..678df7a3 --- /dev/null +++ b/languages/cpp/app_templates/khello/app.h @@ -0,0 +1,32 @@ +%{H_TEMPLATE} + +#ifndef _%{APPNAMEUC}_H_ +#define _%{APPNAMEUC}_H_ + +#ifdef HAVE_CONFIG_H +#include +#endif + +#include + +/** + * @short Application Main Window + * @author %{AUTHOR} <%{EMAIL}> + * @version %{VERSION} + */ +class %{APPNAME} : public KMainWindow +{ + Q_OBJECT +public: + /** + * Default Constructor + */ + %{APPNAME}(); + + /** + * Default Destructor + */ + virtual ~%{APPNAME}(); +}; + +#endif // _%{APPNAMEUC}_H_ diff --git a/languages/cpp/app_templates/khello/app.kdevelop b/languages/cpp/app_templates/khello/app.kdevelop new file mode 100644 index 00000000..7e6cf8da --- /dev/null +++ b/languages/cpp/app_templates/khello/app.kdevelop @@ -0,0 +1,115 @@ + + + + %{AUTHOR} + %{EMAIL} + %{VERSION} + KDevKDEAutoProject + C++ + + C++ + Code + Qt + KDE + + + + + 3 + true + 3 + EmbeddedKDevDesigner + + + + + + src/%{APPNAMELC} + debug + + + src/%{APPNAMELC} + + + + optimized + kdevgccoptions + kdevgppoptions + kdevg77options + -O2 -g0 + + + --enable-debug=full + debug + kdevgccoptions + kdevgppoptions + kdevg77options + -O0 -g3 + + + + + + + + + + + + + + + ada + ada_bugs_gcc + bash + bash_bugs + clanlib + w3c-dom-level2-html + fortran_bugs_gcc + gnome1 + gnustep + gtk + gtk_bugs + haskell + haskell_bugs_ghc + java_bugs_gcc + java_bugs_sun + pascal_bugs_fp + php + php_bugs + perl + perl_bugs + python + python_bugs + ruby + ruby_bugs + sdl + w3c-svg + sw + w3c-uaag10 + wxwidgets_bugs + + + qmake User Guide + + + + + libtool + + + + + + + + + + + + + Doxygen Documentation Collection + %{APPNAMELC}.tag + + + diff --git a/languages/cpp/app_templates/khello/appui.rc b/languages/cpp/app_templates/khello/appui.rc new file mode 100644 index 00000000..ceb4f14e --- /dev/null +++ b/languages/cpp/app_templates/khello/appui.rc @@ -0,0 +1,8 @@ + + + + C&ustom + + + + diff --git a/languages/cpp/app_templates/khello/khello.kdevtemplate b/languages/cpp/app_templates/khello/khello.kdevtemplate new file mode 100644 index 00000000..e401fa5d --- /dev/null +++ b/languages/cpp/app_templates/khello/khello.kdevtemplate @@ -0,0 +1,220 @@ +# KDE Config File +[General] +Name=Simple KDE Application +Name[ca]=Una simple aplicació per al KDE +Name[da]=Et simpelt KDE program +Name[de]=Einfache KDE-Anwendung +Name[el]=Απλή εφαρμογή του KDE +Name[es]=Aplicación de KDE sencilla +Name[et]=Lihtne KDE rakendus +Name[eu]=KDE aplikazio simple bat +Name[fa]=کاربرد سادۀ KDE +Name[fr]=Application KDE simple +Name[ga]=Feidhmchlár Simplí KDE +Name[gl]=Aplicación KDE sinxela +Name[hu]=Egyszerű KDE-s alkalmazás +Name[it]=Una semplice applicazione KDE +Name[ja]=簡単な KDE アプリケーション +Name[nds]=Eenfach KDE-Programm +Name[ne]=साधारण केडीई अनुप्रयोग +Name[nl]=Eenvoudige KDE-toepassing +Name[pl]=Prosty program dla KDE +Name[pt]=Aplicação Simples do KDE +Name[pt_BR]=Aplicação Simples do KDE +Name[ru]=Простое приложение KDE +Name[sk]=Jednoduchá KDE aplikácia +Name[sl]=Preprost program za KDE +Name[sr]=Једноставан KDE програм +Name[sr@Latn]=Jednostavan KDE program +Name[sv]=Enkelt KDE-program +Name[tr]=Basit KDE Uygulaması +Name[zh_CN]=简单的 KDE 应用程序 +Name[zh_TW]=簡單的 KDE 應用程式 +Category=C++/KDE +Icon=khello.png +Comment=Generates a simple KDE application with one widget. +Comment[ca]=Genera una simple aplicació per al KDE amb un estri. +Comment[da]=Genererer et simpelt KDE program men en kontrol +Comment[de]=Erstellt eine einfache KDE-Anwendung mit einem Oberflächenelement +Comment[el]=Δημιουργεί μια απλή εφαρμογή KDE με ένα γραφικό συστατικό. +Comment[es]=Genera una sencilla aplicación para KDE con una ventana. +Comment[et]=Lihtsa KDE rakenduse loomine ühe vidinaga. +Comment[eu]=Trepeta bakarra duen KDE aplikazio simple bat sortzen du. +Comment[fa]=یک کاربرد سادۀ KDE با یک عنصر تولید می‌کند. +Comment[fr]=Génère une application KDE simple comprenant un seul élément graphique (widget). +Comment[ga]=Cruthaíonn sé seo feidhmchlár simplí KDE le giuirléid amháin. +Comment[gl]=Xera unha aplicación KDE sinxela con un compoñente. +Comment[hu]=Létrehoz egy egyszerű KDE-s alkalmazást, egy grafikus elemmel. +Comment[it]=Genera una semplice applicazione KDE senza elementi grafici. +Comment[ja]=ウィジェットを一つ含んだ簡単な KDE アプリケーションを作成します。 +Comment[nds]=Stellt en eenfach KDE-Programm mit een Element op. +Comment[ne]=एउटा विगेटसँग साधारण केडीई अनुप्रयोग उत्पन्न गर्दछ । +Comment[nl]=Genereert een eenvoudige KDE-toepassing met één widget. +Comment[pl]=Generuje prosty program dla KDE z jednym widgetem. +Comment[pt]=Gera uma aplicação simples para o KDE com uma janela. +Comment[pt_BR]=Gera uma aplicação simples para o KDE com uma janela. +Comment[ru]=Создание простого приложения KDE с одним окном. +Comment[sk]=Vygeneruje jednoduchú KDE aplikáciu s jedným oknom. +Comment[sl]=Ustvari preprost program za KDE z enim gradnikom. +Comment[sr]=Прави једноставан KDE програм са једном контролом. +Comment[sr@Latn]=Pravi jednostavan KDE program sa jednom kontrolom. +Comment[sv]=Skapar ett enkelt KDE-program med en grafisk komponent. +Comment[tr]=Tek parçacıklı basit bir KDE uygulaması yaratır. +Comment[zh_CN]=生成只有一个部件的 KDE 应用程序。 +Comment[zh_TW]=產生一個簡單的 KDE 應用程式,內含一個元件 +FileTemplates=h,CStyle,cpp,CStyle +ShowFilesAfterGeneration=%{dest}/src/%{APPNAMELC}.cpp +Archive=khello.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.cvs +Dest=%{dest}/Makefile.cvs + +[FILE6] +Type=install +Source=%{kdevelop}/template-common/kde-Makefile.am +Dest=%{dest}/Makefile.am + +[FILE7] +Type=install +Source=%{kdevelop}/template-common/kde-configure.in.in +Dest=%{dest}/configure.in.in + +[MkDir3] +Type=mkdir +Dir=%{dest}/po + +[FILE8] +Type=install +Source=%{kdevelop}/template-common/kde-po-Makefile.am +Dest=%{dest}/po/Makefile.am + +[FILE9] +Type=install +Source=%{src}/subdirs +Dest=%{dest}/subdirs + +[MkDir4] +Type=mkdir +Dir=%{dest}/src + +[FILE10] +Type=install +Source=%{kdevelop}/template-common/kde-app.lsm +Dest=%{dest}/src/%{APPNAMELC}.lsm + +[FILE11] +Type=install +Source=%{kdevelop}/template-common/hi16-app-app.png +Dest=%{dest}/src/hi16-app-%{APPNAMELC}.png +Process=false + +[FILE12] +Type=install +Source=%{kdevelop}/template-common/hi32-app-app.png +Dest=%{dest}/src/hi32-app-%{APPNAMELC}.png +Process=false + +[FILE13] +Type=install +Source=%{src}/src-Makefile.am +Dest=%{dest}/src/Makefile.am + +[FILE14] +Type=install +Source=%{src}/app.cpp +Dest=%{dest}/src/%{APPNAMELC}.cpp + +[FILE15] +Type=install +Source=%{src}/app.h +Dest=%{dest}/src/%{APPNAMELC}.h + +[FILE16] +Type=install +Source=%{src}/main.cpp +Dest=%{dest}/src/main.cpp + +[FILE17] +Type=install +EscapeXML=true +Source=%{src}/appui.rc +Dest=%{dest}/src/%{APPNAMELC}ui.rc + +[FILE18] +Type=install +Source=%{src}/app.desktop +Dest=%{dest}/src/%{APPNAMELC}.desktop + +[MSG] +Type=message +Comment=A KDE Hello world program was created in %{dest} +Comment[ca]=Un programa de Hello world per al KDE ha estat creat en %{dest} +Comment[da]=Et KDE Goddag verden program blev oprettet i %{dest} +Comment[de]=Ein KDE-"Hello World"-Programm wurde in %{dest} erstellt. +Comment[el]=Ένα πρόγραμμα Γεια σου Κόσμε του KDE δημιουργήθηκε στο %{dest} +Comment[es]=Un programa «Hola mundo» para KDE ha sido creado en %{dest} +Comment[et]=KDE "Tere, maailm" programm loodi asukohta %{dest} +Comment[eu]=KDE-ren "Kaixo mundua" programa bat sortu da hemen: %{dest} +Comment[fa]=یک برنامۀ KDE Hello world در %{dest} ایجاد شد +Comment[fr]=Un programme KDE « Bonjour monde » a été créé dans %{dest} +Comment[ga]=Cruthaíodh ríomhchlár "Hello World" KDE i %{dest} +Comment[gl]=Creouse un programa KDE Ola mundo en %{dest} +Comment[hu]=Létrejött egy KDE Hello world program itt: %{dest} +Comment[it]=È stato creato un semplice programma KDE di "Hello world" in %{dest} +Comment[ja]=KDE Hello world プログラムを %{dest} に作成しました +Comment[nds]=In %{dest} wöör en "Moin Welt"-Programm för KDE opstellt +Comment[ne]=केडीई हेल्लो वोल्ड कार्यक्रम %{dest} मा सिर्जना गरियो +Comment[nl]=Een KDE Hello World-programma is aangemaakt in %{dest} +Comment[pl]=Program 'Witaj świecie' dla KDE został utworzony w %{dest} +Comment[pt]=Foi criado um programa Olá Mundo do KDE em %{dest} +Comment[pt_BR]=Foi criado um programa Olá Mundo do KDE em %{dest} +Comment[ru]=Приложение KDE Hello world создано в %{dest} +Comment[sk]=KDE Ahoj svet program bol vytvorený v %{dest} +Comment[sl]=Program Hello World za KDE je bil ustvarjen v %{dest} +Comment[sr]=KDE „Здраво свете“ програм направљен је у %{dest} +Comment[sr@Latn]=KDE „Zdravo svete“ program napravljen je u %{dest} +Comment[sv]=Ett KDE Hello world-program skapades i %{dest} +Comment[tr]=Bir KDE Merhaba Dünya programı %{dest} içinde yaratıldı. +Comment[zh_CN]=在 %{dest} 中创建了 KDE Hello world 程序 +Comment[zh_TW]=一個 KDE Hello World 程式已建立於 %{dest} + diff --git a/languages/cpp/app_templates/khello/khello.png b/languages/cpp/app_templates/khello/khello.png new file mode 100644 index 00000000..9fe493f5 Binary files /dev/null and b/languages/cpp/app_templates/khello/khello.png differ diff --git a/languages/cpp/app_templates/khello/main.cpp b/languages/cpp/app_templates/khello/main.cpp new file mode 100644 index 00000000..da7c5335 --- /dev/null +++ b/languages/cpp/app_templates/khello/main.cpp @@ -0,0 +1,51 @@ +%{CPP_TEMPLATE} + +#include "%{APPNAMELC}.h" +#include +#include +#include +#include + +static const char description[] = + I18N_NOOP("A KDE KPart Application"); + +static const char version[] = "%{VERSION}"; + +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(); + } + + // mainWin has WDestructiveClose flag by default, so it will delete itself. + return app.exec(); +} + diff --git a/languages/cpp/app_templates/khello/src-Makefile.am b/languages/cpp/app_templates/khello/src-Makefile.am new file mode 100644 index 00000000..d9ac7c7a --- /dev/null +++ b/languages/cpp/app_templates/khello/src-Makefile.am @@ -0,0 +1,35 @@ +# 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 + +KDE_ICON = AUTO + +######################################################################### +# APPLICATION SECTION +######################################################################### +# 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}_LDFLAGS = $(KDE_RPATH) $(all_libraries) +%{APPNAMELC}_LDADD = $(LIB_KDEUI) + +# this is where the desktop file will go +shelldesktopdir = $(kde_appsdir)/Utilities +shelldesktop_DATA = %{APPNAMELC}.desktop + +# this is where the shell's XML-GUI resource file goes +shellrcdir = $(kde_datadir)/%{APPNAMELC} +shellrc_DATA = %{APPNAMELC}ui.rc + diff --git a/languages/cpp/app_templates/khello/subdirs b/languages/cpp/app_templates/khello/subdirs new file mode 100644 index 00000000..0e678106 --- /dev/null +++ b/languages/cpp/app_templates/khello/subdirs @@ -0,0 +1,3 @@ +doc +po +src -- cgit v1.2.1