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/kxt/.kdev_ignore | 0 languages/cpp/app_templates/kxt/Makefile.am | 19 ++ languages/cpp/app_templates/kxt/README | 86 +++++++ languages/cpp/app_templates/kxt/app.cpp | 154 ++++++++++++ languages/cpp/app_templates/kxt/app.desktop | 40 +++ languages/cpp/app_templates/kxt/app.h | 66 +++++ languages/cpp/app_templates/kxt/app.kcfg | 21 ++ languages/cpp/app_templates/kxt/app.kdevelop | 169 +++++++++++++ languages/cpp/app_templates/kxt/appui.rc | 8 + languages/cpp/app_templates/kxt/appview.cpp | 41 ++++ languages/cpp/app_templates/kxt/appview.h | 52 ++++ languages/cpp/app_templates/kxt/appview_base.ui | 33 +++ languages/cpp/app_templates/kxt/kxt.kdevtemplate | 269 +++++++++++++++++++++ languages/cpp/app_templates/kxt/kxt.png | Bin 0 -> 3947 bytes languages/cpp/app_templates/kxt/main.cpp | 57 +++++ languages/cpp/app_templates/kxt/prefs-base.ui | 127 ++++++++++ languages/cpp/app_templates/kxt/prefs.cpp | 12 + languages/cpp/app_templates/kxt/prefs.h | 11 + languages/cpp/app_templates/kxt/preview.png | Bin 0 -> 7712 bytes languages/cpp/app_templates/kxt/settings.kcfgc | 6 + languages/cpp/app_templates/kxt/src-Makefile.am | 41 ++++ .../cpp/app_templates/kxt/src-configure.in.in | 7 + languages/cpp/app_templates/kxt/subdirs | 3 + 23 files changed, 1222 insertions(+) create mode 100644 languages/cpp/app_templates/kxt/.kdev_ignore create mode 100644 languages/cpp/app_templates/kxt/Makefile.am create mode 100644 languages/cpp/app_templates/kxt/README create mode 100644 languages/cpp/app_templates/kxt/app.cpp create mode 100644 languages/cpp/app_templates/kxt/app.desktop create mode 100644 languages/cpp/app_templates/kxt/app.h create mode 100644 languages/cpp/app_templates/kxt/app.kcfg create mode 100644 languages/cpp/app_templates/kxt/app.kdevelop create mode 100644 languages/cpp/app_templates/kxt/appui.rc create mode 100644 languages/cpp/app_templates/kxt/appview.cpp create mode 100644 languages/cpp/app_templates/kxt/appview.h create mode 100644 languages/cpp/app_templates/kxt/appview_base.ui create mode 100644 languages/cpp/app_templates/kxt/kxt.kdevtemplate create mode 100644 languages/cpp/app_templates/kxt/kxt.png create mode 100644 languages/cpp/app_templates/kxt/main.cpp create mode 100644 languages/cpp/app_templates/kxt/prefs-base.ui create mode 100644 languages/cpp/app_templates/kxt/prefs.cpp create mode 100644 languages/cpp/app_templates/kxt/prefs.h create mode 100644 languages/cpp/app_templates/kxt/preview.png create mode 100644 languages/cpp/app_templates/kxt/settings.kcfgc create mode 100644 languages/cpp/app_templates/kxt/src-Makefile.am create mode 100644 languages/cpp/app_templates/kxt/src-configure.in.in create mode 100644 languages/cpp/app_templates/kxt/subdirs (limited to 'languages/cpp/app_templates/kxt') diff --git a/languages/cpp/app_templates/kxt/.kdev_ignore b/languages/cpp/app_templates/kxt/.kdev_ignore new file mode 100644 index 00000000..e69de29b diff --git a/languages/cpp/app_templates/kxt/Makefile.am b/languages/cpp/app_templates/kxt/Makefile.am new file mode 100644 index 00000000..07767961 --- /dev/null +++ b/languages/cpp/app_templates/kxt/Makefile.am @@ -0,0 +1,19 @@ +dataFiles = src-Makefile.am app.cpp app.h main.cpp appui.rc app.kdevelop \ + subdirs app.desktop preview.png appview.h appview.cpp appview_base.ui \ + prefs-base.ui prefs.cpp prefs.h app.kcfg settings.kcfgc README \ + src-configure.in.in +templateName= kxt + +### 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/kxt/README b/languages/cpp/app_templates/kxt/README new file mode 100644 index 00000000..74e23296 --- /dev/null +++ b/languages/cpp/app_templates/kxt/README @@ -0,0 +1,86 @@ +----------------------------------------------- +Kde templates quickstart +Author: Thomas Nagy +Date: 2004-03-22 +----------------------------------------------- + +This README file explains you basic things for starting with +this application template. + + +** Building and installing ** + +* Build the configure script by "make -f Makefile.cvs" + +* To clean, use "make clean", and to clean everything +(remove the makefiles, etc), use "make distclean" + +* To distribute your program, try "make dist". +This will make a compact tarball archive of your release with the +necessary scripts inside. + +* Modifying the auto-tools scripts +for automake scripts there is an excellent tutorial there : +http://developer.kde.org/documentation/other/makefile_am_howto.html + +* Simplify your life : install the project in your home directory for +testing purposes. +./configure --prefix=/home/user/dummyfolder/ +In the end when you finished the development you can +rm -rf /home/user/dummyfolder/ +without fear. + + +** Technologies ** + +* Build the menus of your application easily +kde applications now use an xml file (*ui.rc file) to build the menus. +This allow a great customization of the application. However, when +programming the menu is shown only after a "make install" + +For more details, consult : +http://devel-home.kde.org/~larrosa/tutorial/p9.html +http://developer.kde.org/documentation/tutorials/xmlui/preface.html + +* Use KConfig XT to create your configuration dialogs and make +them more maintainable. + +For that, you will need to write two simple configuration files +in the src directory : .kcfg and a .kcfgc +The configure.in.in will need to be modified : change the line #MIN_CONFIG(3.0.0) +into #MIN_CONFIG(3.2.0) + +Take an example on the many apps found in the kdegames source package and consult : +http://developer.kde.org/documentation/tutorials/kconfigxt/kconfigxt.html + +* With KParts, you can embed other kde components in your program, or make your program +embeddable in other apps. For example, the kmplayer kpart can be called to play videos +in your app. + +For more details, consult : +http://www-106.ibm.com/developerworks/library/l-kparts/ +http://developer.kde.org/documentation/tutorials/dot/writing-plugins.html +http://developer.kde.org/documentation/tutorials/developing-a-plugin-structure/index.html + +* With dcop, you can control your app from other applications +Make sure to include K_DCOP and a kdcop: section in your .h file +http://developer.kde.org/documentation/tutorials/dot/dcopiface/dcop-interface.html + + +** Documentation ** + +* For the translations : +1. Download a patched gettext which can be found at: + http://public.kde.planetmirror.com/pub/kde/devel/gettext-kde/ +2. Install that gettext in ~/bin/ +3. cd ~/yourproject, export PATH=~/bin:$PATH, export +KDEDIR=/where_your_KDE3_is +4. make -f admin/Makefile.common package-messages +5. make package-messages +6. Translate the po files (not the pot!!) with kbabel or xemacs + +* Do not forget to write the documentation for your kde app +edit the documentation template index.docbook in doc/ + + + diff --git a/languages/cpp/app_templates/kxt/app.cpp b/languages/cpp/app_templates/kxt/app.cpp new file mode 100644 index 00000000..6e2ce524 --- /dev/null +++ b/languages/cpp/app_templates/kxt/app.cpp @@ -0,0 +1,154 @@ +%{CPP_TEMPLATE} + +#include "%{APPNAMELC}.h" +#include "settings.h" +#include "prefs.h" + +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include +#include +#include + +%{APPNAMELC}::%{APPNAMELC}() + : KMainWindow( 0, "%{APPNAMELC}" ), + m_view(new %{APPNAMELC}View(this)), + m_printer(0) +{ + // accept dnd + setAcceptDrops(true); + + // tell the KMainWindow that this is indeed the main widget + setCentralWidget(m_view); + + // then, setup our actions + setupActions(); + + // and a status bar + statusBar()->show(); + + // apply the saved mainwindow settings, if any, and ask the mainwindow + // to automatically save settings if changed: window size, toolbar + // position, icon size, etc. + setAutoSaveSettings(); + + // allow the view to change the statusbar and caption + connect(m_view, SIGNAL(signalChangeStatusbar(const QString&)), + this, SLOT(changeStatusbar(const QString&))); + connect(m_view, SIGNAL(signalChangeCaption(const QString&)), + this, SLOT(changeCaption(const QString&))); + +} + +%{APPNAMELC}::~%{APPNAMELC}() +{ +} + +void %{APPNAMELC}::setupActions() +{ + KStdAction::openNew(this, SLOT(fileNew()), actionCollection()); + KStdAction::quit(kapp, SLOT(quit()), actionCollection()); + + m_toolbarAction = KStdAction::showToolbar(this, SLOT(optionsShowToolbar()), actionCollection()); + m_statusbarAction = KStdAction::showStatusbar(this, SLOT(optionsShowStatusbar()), actionCollection()); + + KStdAction::keyBindings(this, SLOT(optionsConfigureKeys()), actionCollection()); + KStdAction::configureToolbars(this, SLOT(optionsConfigureToolbars()), actionCollection()); + KStdAction::preferences(this, SLOT(optionsPreferences()), actionCollection()); + + // custom menu and menu item - the slot is in the class %{APPNAMELC}View + KAction *custom = new KAction(i18n("Swi&tch Colors"), 0, + m_view, SLOT(switchColors()), + actionCollection(), "switch_action"); + + createGUI(); +} + +void %{APPNAMELC}::fileNew() +{ + // this slot is called whenever the File->New menu is selected, + // the New shortcut is pressed (usually CTRL+N) or the New toolbar + // button is clicked + + // create a new window + (new %{APPNAMELC})->show(); +} + +void %{APPNAMELC}::optionsShowToolbar() +{ + // this is all very cut and paste code for showing/hiding the + // toolbar + if (m_toolbarAction->isChecked()) + toolBar()->show(); + else + toolBar()->hide(); +} + +void %{APPNAMELC}::optionsShowStatusbar() +{ + // show/hide the statusbar + if (m_statusbarAction->isChecked()) + statusBar()->show(); + else + statusBar()->hide(); +} + +void %{APPNAMELC}::optionsConfigureKeys() +{ + KKeyDialog::configure(actionCollection()); +} + +void %{APPNAMELC}::optionsConfigureToolbars() +{ + // use the standard toolbar editor + saveMainWindowSettings(KGlobal::config(), autoSaveGroup()); +} + +void %{APPNAMELC}::newToolbarConfig() +{ + // this slot is called when user clicks "Ok" or "Apply" in the toolbar editor. + // recreate our GUI, and re-apply the settings (e.g. "text under icons", etc.) + createGUI(); + + applyMainWindowSettings(KGlobal::config(), autoSaveGroup()); +} + +void %{APPNAMELC}::optionsPreferences() +{ + // The preference dialog is derived from prefs-base.ui which is subclassed into Prefs + // + // compare the names of the widgets in the .ui file + // to the names of the variables in the .kcfg file + KConfigDialog *dialog = new KConfigDialog(this, "settings", Settings::self(), KDialogBase::Swallow); + dialog->addPage(new Prefs(), i18n("General"), "package_settings"); + connect(dialog, SIGNAL(settingsChanged()), m_view, SLOT(settingsChanged())); + dialog->show(); +} + +void %{APPNAMELC}::changeStatusbar(const QString& text) +{ + // display the text on the statusbar + statusBar()->message(text, 2000); +} + +void %{APPNAMELC}::changeCaption(const QString& text) +{ + // display the text on the caption + setCaption(text); +} +#include "%{APPNAMELC}.moc" + diff --git a/languages/cpp/app_templates/kxt/app.desktop b/languages/cpp/app_templates/kxt/app.desktop new file mode 100644 index 00000000..8b36e6e0 --- /dev/null +++ b/languages/cpp/app_templates/kxt/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/kxt/app.h b/languages/cpp/app_templates/kxt/app.h new file mode 100644 index 00000000..22037de2 --- /dev/null +++ b/languages/cpp/app_templates/kxt/app.h @@ -0,0 +1,66 @@ +%{H_TEMPLATE} + +#ifndef _%{APPNAMEUC}_H_ +#define _%{APPNAMEUC}_H_ + +#ifdef HAVE_CONFIG_H +#include +#endif + +#include +#include + +#include "%{APPNAMELC}view.h" + +class KPrinter; +class KToggleAction; +class KURL; + +/** + * This class serves as the main window for %{APPNAME}. It handles the + * menus, toolbars, and status bars. + * + * @short Main window class + * @author %{AUTHOR} <%{EMAIL}> + * @version %{VERSION} + */ +class %{APPNAMELC} : public KMainWindow +{ + Q_OBJECT +public: + /** + * Default Constructor + */ + %{APPNAMELC}(); + + /** + * Default Destructor + */ + virtual ~%{APPNAMELC}(); + +private slots: + void fileNew(); + void optionsShowToolbar(); + void optionsShowStatusbar(); + void optionsConfigureKeys(); + void optionsConfigureToolbars(); + void optionsPreferences(); + void newToolbarConfig(); + + void changeStatusbar(const QString& text); + void changeCaption(const QString& text); + +private: + void setupAccel(); + void setupActions(); + +private: + %{APPNAMELC}View *m_view; + + KPrinter *m_printer; + KToggleAction *m_toolbarAction; + KToggleAction *m_statusbarAction; +}; + +#endif // _%{APPNAMEUC}_H_ + diff --git a/languages/cpp/app_templates/kxt/app.kcfg b/languages/cpp/app_templates/kxt/app.kcfg new file mode 100644 index 00000000..686f25f2 --- /dev/null +++ b/languages/cpp/app_templates/kxt/app.kcfg @@ -0,0 +1,21 @@ + + + + + + + black + + + + yellow + + + + 2 + + + diff --git a/languages/cpp/app_templates/kxt/app.kdevelop b/languages/cpp/app_templates/kxt/app.kdevelop new file mode 100644 index 00000000..e6a14fff --- /dev/null +++ b/languages/cpp/app_templates/kxt/app.kdevelop @@ -0,0 +1,169 @@ + + + + %{AUTHOR} + %{EMAIL} + %{VERSION} + KDevKDEAutoProject + C++ + + C++ + Code + Qt + KDE + + . + false + + + + + + 3 + true + 3 + EmbeddedKDevDesigner + + + + + + src/%{APPNAMELC} + debug + + + src/%{APPNAMELC} + false + + + + + + + false + 1 + false + + + + + optimized + kdevgccoptions + kdevgppoptions + kdevg77options + -O2 -g0 + + + --enable-debug=full + debug + kdevgccoptions + kdevgppoptions + kdevg77options + -O0 -g3 + + + + + + + + + + + + + false + *.o,*.lo,CVS + + + + + 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 + + + true + false + false + true + + + false + true + + + + + + + + + + + + -f + + -dP + + -f + -u3 -p + + + + + + + false + + + .h + .cpp + true + + + + true + 2 + + + + Doxygen Documentation Collection + %{APPNAMELC}.tag + + + diff --git a/languages/cpp/app_templates/kxt/appui.rc b/languages/cpp/app_templates/kxt/appui.rc new file mode 100644 index 00000000..06549878 --- /dev/null +++ b/languages/cpp/app_templates/kxt/appui.rc @@ -0,0 +1,8 @@ + + + + &Move + + + + diff --git a/languages/cpp/app_templates/kxt/appview.cpp b/languages/cpp/app_templates/kxt/appview.cpp new file mode 100644 index 00000000..35e23682 --- /dev/null +++ b/languages/cpp/app_templates/kxt/appview.cpp @@ -0,0 +1,41 @@ +%{CPP_TEMPLATE} + +#include "%{APPNAMELC}view.h" +#include "settings.h" + +#include +#include + +%{APPNAMELC}View::%{APPNAMELC}View(QWidget *parent) + : %{APPNAMELC}view_base(parent) +{ + settingsChanged(); +} + +%{APPNAMELC}View::~%{APPNAMELC}View() +{ + +} + +void %{APPNAMELC}View::switchColors() +{ + // switch the foreground/background colors of the label + QColor color = Settings::col_background(); + Settings::setCol_background( Settings::col_foreground() ); + Settings::setCol_foreground( color ); + + settingsChanged(); +} + +void %{APPNAMELC}View::settingsChanged() +{ + sillyLabel->setPaletteBackgroundColor( Settings::col_background() ); + sillyLabel->setPaletteForegroundColor( Settings::col_foreground() ); + + // i18n : internationalization + sillyLabel->setText( i18n("This project is %1 days old").arg(Settings::val_time()) ); + emit signalChangeStatusbar( i18n("Settings changed") ); +} + +#include "%{APPNAMELC}view.moc" + diff --git a/languages/cpp/app_templates/kxt/appview.h b/languages/cpp/app_templates/kxt/appview.h new file mode 100644 index 00000000..45a10de7 --- /dev/null +++ b/languages/cpp/app_templates/kxt/appview.h @@ -0,0 +1,52 @@ +%{H_TEMPLATE} + +#ifndef _%{APPNAMEUC}VIEW_H_ +#define _%{APPNAMEUC}VIEW_H_ + +#include + +#include "%{APPNAMELC}view_base.h" + +class QPainter; +class KURL; + +/** + * This is the main view class for %{APPNAME}. Most of the non-menu, + * non-toolbar, and non-statusbar (e.g., non frame) GUI code should go + * here. + * + * @short Main view + * @author %{AUTHOR} <%{EMAIL}> + * @version %{VERSION} + */ +class %{APPNAMELC}View : public %{APPNAMELC}view_base +{ + Q_OBJECT +public: + /** + * Default constructor + */ + %{APPNAMELC}View(QWidget *parent); + + /** + * Destructor + */ + virtual ~%{APPNAMELC}View(); + +signals: + /** + * Use this signal to change the content of the statusbar + */ + void signalChangeStatusbar(const QString& text); + + /** + * Use this signal to change the content of the caption + */ + void signalChangeCaption(const QString& text); + +private slots: + void switchColors(); + void settingsChanged(); +}; + +#endif // _%{APPNAMEUC}VIEW_H_ diff --git a/languages/cpp/app_templates/kxt/appview_base.ui b/languages/cpp/app_templates/kxt/appview_base.ui new file mode 100644 index 00000000..626d95df --- /dev/null +++ b/languages/cpp/app_templates/kxt/appview_base.ui @@ -0,0 +1,33 @@ + +%{APPNAMELC}view_base + + +%{APPNAMELC}view_base + + + +0 +0 +268 +164 + + + +%{APPNAMELC}_base + + + +unnamed + + + +sillyLabel + + +hello, world + + + + + + diff --git a/languages/cpp/app_templates/kxt/kxt.kdevtemplate b/languages/cpp/app_templates/kxt/kxt.kdevtemplate new file mode 100644 index 00000000..a7a23298 --- /dev/null +++ b/languages/cpp/app_templates/kxt/kxt.kdevtemplate @@ -0,0 +1,269 @@ +# KDE Config File +[General] +Name=KConfig XT application +Name[ca]=Aplicació KConfig XT +Name[da]=KConfig XT program +Name[de]=KConfigXT-Anwendung +Name[el]=Εφαρμογή KConfig XT +Name[es]=Aplicación KConfig XT +Name[et]=KConfig XT rakendus +Name[eu]=KConfig XT aplikazioa +Name[fa]=کاربرد KConfig XT +Name[fr]=Application KConfig XT +Name[ga]=Feidhmchlár XT KConfig +Name[gl]=Aplicación KConfig XT +Name[hu]=KConfig XT-alapú alkalmazás +Name[it]=Applicazione KConfig XT +Name[ja]=KConfig XT アプリケーション +Name[nds]=KConfig-XT-Programm +Name[ne]=KConfig XT अनुप्रयोग +Name[nl]=KConfig XT-toepassing +Name[pl]=Program KConfig XT +Name[pt]=Aplicação do KConfig XT +Name[pt_BR]=Aplicação do KConfig XT +Name[ru]=Приложение KDE с KConfig XT +Name[sk]=KConfig XT aplikácia +Name[sr]=KConfig XT програм +Name[sr@Latn]=KConfig XT program +Name[sv]=KConfig XT-program +Name[tr]=KConfig XT uygulaması +Name[zh_CN]=KConfig XT 应用程序 +Name[zh_TW]=KConfig XT 應用程式 +Category=C++/KDE +Icon=kxt.png +Comment=Generates a simple KDE application with one widget and a configuration dialog +Comment[ca]=Genera una simple aplicació per al KDE amb un estri i un diàleg de configuració +Comment[da]=Genererer et simpelt KDE-program med en kontrol og en indstillingsdialog +Comment[de]=Erstellt eine einfache KDE-Anwendung mit einem Widget und einem Einstellungsdialog. +Comment[el]=Δημιουργεί μια απλή εφαρμογή KDE με ένα γραφικό συστατικό, ένα διάλογο ρύθμισης +Comment[en_GB]=Generates a simple KDE application with one widget and a configuration dialogue +Comment[es]=Genera una sencilla aplicación para KDE con una ventana y un diálogo de configuración +Comment[et]=Lihtsa KDE rakenduse loomine ühe vidina ja seadistustedialoogiga. +Comment[eu]=Trepeta bat eta konfigurazio elkarrizketa-koadro bat duen KDE aplikazio sinple bat sortzen du +Comment[fa]=یک کاربرد سادۀ KDE، با یک عنصر و یک محاورۀ پیکربندی تولید می‌کند +Comment[fr]=Génère une application KDE simple comprenant un seul élément graphique (widget) et une boîte de dialogue de configuration +Comment[ga]=Cruthaíonn sé seo feidhmchlár simplí KDE le giuirléid amháin agus dialóg chumraíochta +Comment[gl]=Xera unha aplicación KDE sinxela cunha compoñente e un diálogo de configuración +Comment[hu]=Létrehoz egy egyszerű KDE-alkalmazást egy grafikus elemmel és egy beállítóablakkal +Comment[it]=Genera una semplice applicazione KDE con un elemento grafico e una finestra di configurazione +Comment[ja]=一つのウィジェットと設定ダイアログを含む簡単な KDE アプリケーションを作成します +Comment[nds]=Stellt en eenfach KDE-Programm mit een Element un en Instelldialoog op +Comment[ne]=एउटा विगेट र कन्फिगरेसन संवादसँग साधारण केडीई अनुप्रयोग उत्पन्न गर्दछ +Comment[nl]=Genereert een eenvoudige KDE-toepassing met één widget en een configuratiedialoog +Comment[pl]=Generuje prosty program KDE z jednym widgetem i oknem konfiguracyjnym +Comment[pt]=Gera uma aplicação simples do KDE com uma janela principal e outra para configuração +Comment[pt_BR]=Gera uma aplicação simples do KDE com uma janela principal e outra para configuração +Comment[ru]=Создание приложения KDE с окном конфигурации +Comment[sk]=Vygeneruje jednoduchú KDE aplikáciu s jedným oknom a konfiguračným dialógom +Comment[sr]=Прави једноставан KDE програм са једном контролом и дијалогом за подешавање +Comment[sr@Latn]=Pravi jednostavan KDE program sa jednom kontrolom i dijalogom za podešavanje +Comment[sv]=Skapar ett enkelt KDE-program med en grafisk komponent och en inställningsdialogruta +Comment[tr]=Bir parçacığı ve ayar penceresi olan 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=kxt.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 +EscapeXML=true +Source=%{src}/appview_base.ui +Dest=%{dest}/src/%{APPNAMELC}view_base.ui + +[FILE18] +Type=install +Source=%{src}/appview.cpp +Dest=%{dest}/src/%{APPNAMELC}view.cpp + +[FILE19] +Type=install +Source=%{src}/appview.h +Dest=%{dest}/src/%{APPNAMELC}view.h + +[FILE20] +Type=install +EscapeXML=true +Source=%{src}/prefs-base.ui +Dest=%{dest}/src/prefs-base.ui + +[FILE21] +Type=install +Source=%{src}/prefs.cpp +Dest=%{dest}/src/prefs.cpp + +[FILE22] +Type=install +Source=%{src}/prefs.h +Dest=%{dest}/src/prefs.h + +[FILE23] +Type=install +Source=%{src}/main.cpp +Dest=%{dest}/src/main.cpp + +[FILE24] +Type=install +EscapeXML=true +Source=%{src}/appui.rc +Dest=%{dest}/src/%{APPNAMELC}ui.rc + +[FILE25] +Type=install +Source=%{src}/README +Dest=%{dest}/src/README + +[FILE26] +Type=install +Source=%{src}/app.kcfg +Dest=%{dest}/src/%{APPNAMELC}.kcfg + +[FILE27] +Type=install +Source=%{src}/settings.kcfgc +Dest=%{dest}/src/settings.kcfgc + +[FILE28] +Type=install +Source=%{src}/src-configure.in.in +Dest=%{dest}/configure.in.in + +[MSG] +Type=message +Comment=A KConfig XT application was created in %{dest} +Comment[ca]=Una aplicació KConfig XT ha estat creada en %{dest} +Comment[da]=Et KConfig XT-program blev oprettet i %{dest} +Comment[de]=Eine KConfig-XT-Anwendung wurde in %{dest} erstellt +Comment[el]=Μια εφαρμογή KConfig XT δημιουργήθηκε στο %{dest} +Comment[es]=Una aplicación KConfig XT ha sido creada en %{dest} +Comment[et]=A KConfig XT rakendus loodi asukohta %{dest} +Comment[eu]=KConfig XT aplikazio bat sortu da hemen: %{dest} +Comment[fa]=یک کاربرد KConfig XT در %{dest} ایجاد شد +Comment[fr]=Une application KConfig XT a été créée dans %{dest} +Comment[ga]=Cruthaíodh feidhmchlár XT KConfig i %{dest} +Comment[gl]=Creouse unha aplicación KConfig XT en %{dest} +Comment[hu]=Létrejött egy KConfig XT-alapú alkalmazás itt: %{dest} +Comment[it]=È stata creata un'applicazione KConfig XT in %{dest} +Comment[ja]=KConfig XT アプリケーションを %{dest} に作成しました +Comment[nds]=In %{dest} wöör en KConfig-XT-Programm opstellt +Comment[ne]=KConfig XT अनुप्रयोग %{dest} मा सिर्जना गरियो +Comment[nl]=Een KConfig XT-toepassing is aangemaakt in %{dest} +Comment[pl]=Program KConfig XT został utworzony w %{dest} +Comment[pt]=Foi criada uma aplicação do KConfig XT em %{dest} +Comment[pt_BR]=Foi criada uma aplicação do KConfig XT em %{dest} +Comment[ru]=Приложение KDE с KConfig XT создано в %{dest} +Comment[sk]=KConfig XT aplikácia bola vytvorená v %{dest} +Comment[sr]=KConfig XT програм је направљен у %{dest} +Comment[sr@Latn]=KConfig XT program je napravljen u %{dest} +Comment[sv]=Ett KConfig XT-program skapades i %{dest} +Comment[tr]=Bir KConfig XT uygulaması %{dest} içinde yaratıldı. +Comment[zh_CN]=在 %{dest} 中创建了 KConfig XT 应用程序 +Comment[zh_TW]=一個 KConfig XT 應用程式已建立於 %{dest} diff --git a/languages/cpp/app_templates/kxt/kxt.png b/languages/cpp/app_templates/kxt/kxt.png new file mode 100644 index 00000000..5a4b6359 Binary files /dev/null and b/languages/cpp/app_templates/kxt/kxt.png differ diff --git a/languages/cpp/app_templates/kxt/main.cpp b/languages/cpp/app_templates/kxt/main.cpp new file mode 100644 index 00000000..66f038c9 --- /dev/null +++ b/languages/cpp/app_templates/kxt/main.cpp @@ -0,0 +1,57 @@ +%{CPP_TEMPLATE} + +#include "%{APPNAMELC}.h" +#include +#include +#include +#include + +static const char description[] = + I18N_NOOP("A KDE 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; + + // see if we are starting with session management + if (app.isRestored()) + { + RESTORE(%{APPNAMELC}); + } + else + { + // no session.. just start up normally + KCmdLineArgs *args = KCmdLineArgs::parsedArgs(); + if (args->count() == 0) + { + %{APPNAMELC} *widget = new %{APPNAMELC}; + widget->show(); + } + else + { + int i = 0; + for (; i < args->count(); i++) + { + %{APPNAMELC} *widget = new %{APPNAMELC}; + widget->show(); + } + } + args->clear(); + } + + return app.exec(); +} + diff --git a/languages/cpp/app_templates/kxt/prefs-base.ui b/languages/cpp/app_templates/kxt/prefs-base.ui new file mode 100644 index 00000000..5c0fc860 --- /dev/null +++ b/languages/cpp/app_templates/kxt/prefs-base.ui @@ -0,0 +1,127 @@ + +Prefs_base + + + Prefs_base + + + + 0 + 0 + 282 + 156 + + + + + unnamed + + + + textLabel2_2 + + + Background color: + + + + + kcfg_col_background + + + + + + + + textLabel1 + + + Project age: + + + + + textLabel2 + + + Foreground color: + + + + + kcfg_col_foreground + + + + + + + + spacer1 + + + Horizontal + + + Expanding + + + + 41 + 20 + + + + + + spacer2 + + + Horizontal + + + Expanding + + + + 41 + 20 + + + + + + kcfg_val_time + + + 1 + + + 2 + + + + + spacer3 + + + Horizontal + + + Expanding + + + + 41 + 20 + + + + + + + + kcolorbutton.h + + diff --git a/languages/cpp/app_templates/kxt/prefs.cpp b/languages/cpp/app_templates/kxt/prefs.cpp new file mode 100644 index 00000000..e7a46ddf --- /dev/null +++ b/languages/cpp/app_templates/kxt/prefs.cpp @@ -0,0 +1,12 @@ +%{CPP_TEMPLATE} + +#include "prefs.h" +#include + +Prefs::Prefs() + : Prefs_base() +{ +// debugging : +// kdWarning()<<"creating a pref dialog"< rc.cpp + $(XGETTEXT) *.cpp -o $(podir)/%{APPNAMELC}.pot + +KDE_ICON = AUTO + +# this is where the kdelnk file will go +kdelnkdir = $(kde_appsdir)/Utilities +kdelnk_DATA = %{APPNAMELC}.desktop + +# this is where the XML-GUI resource file goes +rcdir = $(kde_datadir)/%{APPNAMELC} +rc_DATA = %{APPNAMELC}ui.rc diff --git a/languages/cpp/app_templates/kxt/src-configure.in.in b/languages/cpp/app_templates/kxt/src-configure.in.in new file mode 100644 index 00000000..61d4a7fd --- /dev/null +++ b/languages/cpp/app_templates/kxt/src-configure.in.in @@ -0,0 +1,7 @@ + +#MIN_CONFIG(3.2.0) + +AM_INIT_AUTOMAKE(%{APPNAMELC}, %{VERSION}) +AC_C_BIGENDIAN +AC_CHECK_KDEMAXPATHLEN + diff --git a/languages/cpp/app_templates/kxt/subdirs b/languages/cpp/app_templates/kxt/subdirs new file mode 100644 index 00000000..0e678106 --- /dev/null +++ b/languages/cpp/app_templates/kxt/subdirs @@ -0,0 +1,3 @@ +doc +po +src -- cgit v1.2.1