diff options
author | Timothy Pearson <[email protected]> | 2013-01-27 01:06:29 -0600 |
---|---|---|
committer | Timothy Pearson <[email protected]> | 2013-01-27 01:06:29 -0600 |
commit | c0b24fe164924298d7e6ae33964b3c65fadbcba3 (patch) | |
tree | 2ba50375d78b077b266b224e4413150ef3e60a15 /languages/cpp/app_templates/tdeconfig35 | |
parent | 33d15e862e09fbcbb05e209f832414bd8a01291e (diff) | |
download | tdevelop-c0b24fe164924298d7e6ae33964b3c65fadbcba3.tar.gz tdevelop-c0b24fe164924298d7e6ae33964b3c65fadbcba3.zip |
Rename a number of libraries and executables to avoid conflicts with KDE4
Diffstat (limited to 'languages/cpp/app_templates/tdeconfig35')
23 files changed, 1176 insertions, 0 deletions
diff --git a/languages/cpp/app_templates/tdeconfig35/CMakeLists.txt b/languages/cpp/app_templates/tdeconfig35/CMakeLists.txt new file mode 100644 index 00000000..32dd830c --- /dev/null +++ b/languages/cpp/app_templates/tdeconfig35/CMakeLists.txt @@ -0,0 +1,28 @@ +################################################# +# +# (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( tdeconfig35.tar.gz ALL + COMMAND tar zcf tdeconfig35.tar.gz -C ${CMAKE_CURRENT_SOURCE_DIR} + src-Makefile.am app.cpp app.h main.cpp appui.rc + app.tdevelop subdirs app.desktop kxt35.png appview.h + appview.cpp appview_base.ui prefs-base.ui prefs.cpp prefs.h + app.kcfg settings.kcfgc README src-configure.in.in +) + + +install( FILES + ${CMAKE_CURRENT_BINARY_DIR}/tdeconfig35.tar.gz tdeconfig35.png + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) + + +install( FILES + tdeconfig35.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/cpp/app_templates/tdeconfig35/Makefile.am b/languages/cpp/app_templates/tdeconfig35/Makefile.am new file mode 100644 index 00000000..a172f05f --- /dev/null +++ b/languages/cpp/app_templates/tdeconfig35/Makefile.am @@ -0,0 +1,19 @@ +dataFiles = src-Makefile.am app.cpp app.h main.cpp appui.rc app.tdevelop \ + subdirs app.desktop kxt35.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= tdeconfig35 + +### 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/tdeconfig35/README b/languages/cpp/app_templates/tdeconfig35/README new file mode 100644 index 00000000..e35da710 --- /dev/null +++ b/languages/cpp/app_templates/tdeconfig35/README @@ -0,0 +1,90 @@ +----------------------------------------------- +Kde templates quickstart +Author: Thomas Nagy +Date: 2004-03-22 +----------------------------------------------- + +This README file explains you basic things for starting with +this application template. + +----------------------------------------------- +--NOTE--: you need tdelibs 3.5 and tdelibs headers 3.5 (devel package) in order to build this template. +Qt version might be 3.3.4 or 3.3.5 +----------------------------------------------- + +** 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 TDEConfig 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 : <myproject>.kcfg and a <settings>.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 tdegames source package and consult : +http://developer.kde.org/documentation/tutorials/tdeconfigxt/tdeconfigxt.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-tdeparts/ +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 +TDEDIR=/where_your_TDE3_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/tdeconfig35/app.cpp b/languages/cpp/app_templates/tdeconfig35/app.cpp new file mode 100644 index 00000000..d158e45f --- /dev/null +++ b/languages/cpp/app_templates/tdeconfig35/app.cpp @@ -0,0 +1,105 @@ +%{CPP_TEMPLATE} + +#include "%{APPNAMELC}.h" +#include "settings.h" +#include "prefs.h" + +#include <tqdragobject.h> + +#include <kaction.h> +#include <tdeconfigdialog.h> +#include <kglobal.h> +#include <klocale.h> +#include <kprinter.h> +#include <kstatusbar.h> + +%{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); + // and a status bar + statusBar()->show(); + // then, setup our actions + setupActions(); + + // 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, TQT_SIGNAL(signalChangeStatusbar(const TQString&)), + this, TQT_SLOT(changeStatusbar(const TQString&))); + connect(m_view, TQT_SIGNAL(signalChangeCaption(const TQString&)), + this, TQT_SLOT(changeCaption(const TQString&))); + +} + +%{APPNAMELC}::~%{APPNAMELC}() +{ +} + +void %{APPNAMELC}::setupActions() +{ + KStdAction::openNew(this, TQT_SLOT(fileNew()), actionCollection()); + KStdAction::quit(kapp, TQT_SLOT(quit()), actionCollection()); + + KStdAction::preferences(this, TQT_SLOT(optionsPreferences()), actionCollection()); + + // custom menu and menu item + KAction *custom = new KAction(i18n("Swi&tch Colors"), 0, + m_view, TQT_SLOT(switchColors()), + actionCollection(), "switch_action"); + + setupGUI(); +} + +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.) + setupGUI(); +} + +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 + TDEConfigDialog *dialog = new TDEConfigDialog(this, "settings", Settings::self(), KDialogBase::Swallow); + dialog->addPage(new Prefs(), i18n("General"), "package_settings"); + connect(dialog, TQT_SIGNAL(settingsChanged()), m_view, TQT_SLOT(settingsChanged())); + dialog->show(); +} + +void %{APPNAMELC}::changeCaption(const TQString& text) +{ + // display the text on the caption + setCaption(text); +} + +void %{APPNAMELC}::changeStatusbar(const TQString& text) +{ + // display the text on the statusbar + statusBar()->message(text); +} + +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(); +} + +#include "%{APPNAMELC}.moc" + diff --git a/languages/cpp/app_templates/tdeconfig35/app.desktop b/languages/cpp/app_templates/tdeconfig35/app.desktop new file mode 100644 index 00000000..5beccc5d --- /dev/null +++ b/languages/cpp/app_templates/tdeconfig35/app.desktop @@ -0,0 +1,40 @@ +[Desktop Entry] +Name=%{APPNAME} +Exec=%{APPNAMELC} +Icon=%{APPNAMELC} +Type=Application +Comment=A simple TDE Application +Comment[br]=Ur meziant eeun evit TDE +Comment[ca]=Una simple aplicació per al TDE +Comment[da]=Et simpelt TDE program +Comment[de]=Eine einfache TDE-Anwendung +Comment[el]=Μια απλή εφαρμογή του TDE +Comment[es]=Una aplicación de TDE sencilla +Comment[et]=Lihtne TDE rakendus +Comment[eu]=TDE aplikazio simple bat +Comment[fa]=یک کاربرد سادۀ TDE +Comment[fr]=Une application simple pour TDE +Comment[ga]=Feidhmchlár Simplí TDE +Comment[gl]=Unha aplicación TDE sinxela +Comment[hi]=एक सादा केडीई अनुप्रयोग +Comment[hu]=Egyszerű TDE-alkalmazás +Comment[is]=Einfalt TDE forrit +Comment[it]=Una semplice applicazione TDE +Comment[ja]=簡単な TDE アプリケーション +Comment[nds]=En eenfach TDE-Programm +Comment[ne]=एउटा साधारण केडीई अनुप्रयोग +Comment[nl]=Een eenvoudige TDE-toepassing +Comment[pl]=Prosty program TDE +Comment[pt]=Uma aplicação simples do TDE +Comment[pt_BR]=Um simples Aplicativo do TDE +Comment[ru]=Простое приложение TDE +Comment[sk]=Jednoduchá TDE aplikácia +Comment[sl]=Preprost program za TDE +Comment[sr]=Једноставан TDE програм +Comment[sr@Latn]=Jednostavan TDE program +Comment[sv]=Ett enkelt TDE-program +Comment[ta]=ஒரு சாதாரண கெடிஇ பயன்பாடு +Comment[tg]=Гузориши оддиTDE +Comment[tr]=Basit bir TDE Uygulaması +Comment[zh_CN]=一个简单的 TDE 应用程序 +Comment[zh_TW]=簡單的 TDE 應用程式 diff --git a/languages/cpp/app_templates/tdeconfig35/app.h b/languages/cpp/app_templates/tdeconfig35/app.h new file mode 100644 index 00000000..c1aac7e4 --- /dev/null +++ b/languages/cpp/app_templates/tdeconfig35/app.h @@ -0,0 +1,61 @@ +%{H_TEMPLATE} + +#ifndef _%{APPNAMEUC}_H_ +#define _%{APPNAMEUC}_H_ + +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + +#include <kapplication.h> +#include <kmainwindow.h> + +#include "%{APPNAMELC}view.h" + +class KPrinter; +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 optionsPreferences(); + void newToolbarConfig(); + + void changeStatusbar(const TQString& text); + void changeCaption(const TQString& text); + +private: + + void setupActions(); + +private: + %{APPNAMELC}View *m_view; + + KPrinter *m_printer; +}; + +#endif // _%{APPNAMEUC}_H_ + diff --git a/languages/cpp/app_templates/tdeconfig35/app.kcfg b/languages/cpp/app_templates/tdeconfig35/app.kcfg new file mode 100644 index 00000000..686f25f2 --- /dev/null +++ b/languages/cpp/app_templates/tdeconfig35/app.kcfg @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="UTF-8"?> +<kcfg xmlns="http://www.kde.org/standards/kcfg/1.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.kde.org/standards/kcfg/1.0 + http://www.kde.org/standards/kcfg/1.0/kcfg.xsd" > + <kcfgfile name="%{APPNAMELC}rc"/> + <group name="Preferences"> + <entry name="col_background" type="Color"> + <label>color of the background</label> + <default>black</default> + </entry> + <entry name="col_foreground" type="Color"> + <label>color of the foreground</label> + <default>yellow</default> + </entry> + <entry name="val_time" type="Int"> + <label>size of a ball</label> + <default>2</default> + </entry> + </group> +</kcfg> diff --git a/languages/cpp/app_templates/tdeconfig35/app.tdevelop b/languages/cpp/app_templates/tdeconfig35/app.tdevelop new file mode 100644 index 00000000..6a53f237 --- /dev/null +++ b/languages/cpp/app_templates/tdeconfig35/app.tdevelop @@ -0,0 +1,168 @@ +<?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> + </keywords> + <projectdirectory>.</projectdirectory> + <absoluteprojectpath>false</absoluteprojectpath> + <description/> + <ignoreparts/> + </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> + <terminal>false</terminal> + </run> + <make> + <envvars> + <envvar value="1" name="WANT_AUTOCONF_2_5" /> + <envvar value="1" name="WANT_AUTOMAKE_1_6" /> + </envvars> + <abortonerror>false</abortonerror> + <numberofjobs>1</numberofjobs> + <dontact>false</dontact> + <makebin/> + </make> + <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> + <tree> + <hidenonprojectfiles>false</hidenonprojectfiles> + <hidepatterns>*.o,*.lo,CVS</hidepatterns> + </tree> + </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> + <programargs/> + <gdbpath/> + <breakonloadinglibs>true</breakonloadinglibs> + <separatetty>false</separatetty> + <floatingtoolbar>false</floatingtoolbar> + <runappinappdirectory>true</runappinappdirectory> + </general> + <display> + <staticmembers>false</staticmembers> + <demanglenames>true</demanglenames> + </display> + </kdevdebugger> + <kdevfilecreate> + <filetypes/> + <useglobaltypes> + <type ext="ui" /> + <type ext="cpp" /> + <type ext="h" /> + </useglobaltypes> + </kdevfilecreate> + <kdevcvs> + <cvsoptions>-f</cvsoptions> + <commitoptions/> + <updateoptions>-dP</updateoptions> + <addoptions/> + <removeoptions>-f</removeoptions> + <diffoptions>-u3 -p</diffoptions> + <logoptions/> + <rshoptions/> + </kdevcvs> + <cppsupportpart> + <codecompletion/> + <filetemplates> + <choosefiles>false</choosefiles> + <interfaceURL/> + <implementationURL/> + <interfacesuffix>.h</interfacesuffix> + <implementationsuffix>.cpp</implementationsuffix> + <lowercasefilenames>true</lowercasefilenames> + </filetemplates> + </cppsupportpart> + <kdevclassview> + <folderhierarchy>true</folderhierarchy> + <depthoffolders>2</depthoffolders> + </kdevclassview> + <kdevdocumentation> + <projectdoc> + <docsystem>Doxygen Documentation Collection</docsystem> + <docurl>%{APPNAMELC}.tag</docurl> + </projectdoc> + </kdevdocumentation> +</tdevelop> diff --git a/languages/cpp/app_templates/tdeconfig35/appui.rc b/languages/cpp/app_templates/tdeconfig35/appui.rc new file mode 100644 index 00000000..06549878 --- /dev/null +++ b/languages/cpp/app_templates/tdeconfig35/appui.rc @@ -0,0 +1,8 @@ +<!DOCTYPE kpartgui SYSTEM "kpartgui.dtd"> +<kpartgui name="%{APPNAMELC}" version="1"> +<MenuBar> + <Menu name="move"><text>&Move</text> + <Action name="switch_action" /> + </Menu> +</MenuBar> +</kpartgui> diff --git a/languages/cpp/app_templates/tdeconfig35/appview.cpp b/languages/cpp/app_templates/tdeconfig35/appview.cpp new file mode 100644 index 00000000..30d627fe --- /dev/null +++ b/languages/cpp/app_templates/tdeconfig35/appview.cpp @@ -0,0 +1,41 @@ +%{CPP_TEMPLATE} + +#include "%{APPNAMELC}view.h" +#include "settings.h" + +#include <klocale.h> +#include <tqlabel.h> + +%{APPNAMELC}View::%{APPNAMELC}View(TQWidget *parent) + : %{APPNAMELC}view_base(parent) +{ + settingsChanged(); +} + +%{APPNAMELC}View::~%{APPNAMELC}View() +{ + +} + +void %{APPNAMELC}View::switchColors() +{ + // switch the foreground/background colors of the label + TQColor 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/tdeconfig35/appview.h b/languages/cpp/app_templates/tdeconfig35/appview.h new file mode 100644 index 00000000..a486ec43 --- /dev/null +++ b/languages/cpp/app_templates/tdeconfig35/appview.h @@ -0,0 +1,53 @@ +%{H_TEMPLATE} + +#ifndef _%{APPNAMEUC}VIEW_H_ +#define _%{APPNAMEUC}VIEW_H_ + +#include <tqwidget.h> + +#include "%{APPNAMELC}view_base.h" + +class TQPainter; +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(TQWidget *parent); + + /** + * Destructor + */ + virtual ~%{APPNAMELC}View(); + +signals: + /** + * Use this signal to change the content of the statusbar + */ + void signalChangeStatusbar(const TQString& text); + + /** + * Use this signal to change the content of the caption + */ + void signalChangeCaption(const TQString& text); + +private slots: + void switchColors(); + void settingsChanged(); +}; + +#endif // _%{APPNAMEUC}VIEW_H_ diff --git a/languages/cpp/app_templates/tdeconfig35/appview_base.ui b/languages/cpp/app_templates/tdeconfig35/appview_base.ui new file mode 100644 index 00000000..3ee8d513 --- /dev/null +++ b/languages/cpp/app_templates/tdeconfig35/appview_base.ui @@ -0,0 +1,33 @@ +<!DOCTYPE UI><UI version="3.2" stdsetdef="1"> +<class>%{APPNAMELC}view_base</class> +<widget class="TQWidget"> +<property name="name"> +<cstring>%{APPNAMELC}view_base</cstring> +</property> +<property name="geometry"> +<rect> +<x>0</x> +<y>0</y> +<width>268</width> +<height>164</height> +</rect> +</property> +<property name="caption"> +<string>%{APPNAMELC}_base</string> +</property> +<grid> +<property name="name"> +<cstring>unnamed</cstring> +</property> +<widget class="TQLabel" row="0" column="0"> +<property name="name"> +<cstring>sillyLabel</cstring> +</property> +<property name="text"> +<string>hello, world</string> +</property> +</widget> +</grid> +</widget> +<layoutdefaults spacing="6" margin="11"/> +</UI> diff --git a/languages/cpp/app_templates/tdeconfig35/kxt35.png b/languages/cpp/app_templates/tdeconfig35/kxt35.png Binary files differnew file mode 100644 index 00000000..a3866883 --- /dev/null +++ b/languages/cpp/app_templates/tdeconfig35/kxt35.png diff --git a/languages/cpp/app_templates/tdeconfig35/main.cpp b/languages/cpp/app_templates/tdeconfig35/main.cpp new file mode 100644 index 00000000..3c912936 --- /dev/null +++ b/languages/cpp/app_templates/tdeconfig35/main.cpp @@ -0,0 +1,57 @@ +%{CPP_TEMPLATE} + +#include "%{APPNAMELC}.h" +#include <kapplication.h> +#include <kaboutdata.h> +#include <kcmdlineargs.h> +#include <klocale.h> + +static const char description[] = + I18N_NOOP("A TDE Application"); + +static const char version[] = "%{VERSION}"; + +static KCmdLineOptions options[] = +{ + { "+[URL]", I18N_NOOP( "Document to open" ), 0 }, + KCmdLineLastOption +}; + +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; + + // see if we are starting with session management + if (app.isRestored()) + { + RESTORE(%{APPNAMELC}); + } + else + { + // no session.. just start up normally + TDECmdLineArgs *args = TDECmdLineArgs::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/tdeconfig35/prefs-base.ui b/languages/cpp/app_templates/tdeconfig35/prefs-base.ui new file mode 100644 index 00000000..03af967a --- /dev/null +++ b/languages/cpp/app_templates/tdeconfig35/prefs-base.ui @@ -0,0 +1,127 @@ +<!DOCTYPE UI><UI version="3.2" stdsetdef="1"> +<class>Prefs_base</class> +<widget class="TQWidget"> + <property name="name"> + <cstring>Prefs_base</cstring> + </property> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>282</width> + <height>156</height> + </rect> + </property> + <grid> + <property name="name"> + <cstring>unnamed</cstring> + </property> + <widget class="TQLabel" row="0" column="0"> + <property name="name"> + <cstring>textLabel2_2</cstring> + </property> + <property name="text"> + <string>Background color:</string> + </property> + </widget> + <widget class="KColorButton" row="0" column="1"> + <property name="name"> + <cstring>kcfg_col_background</cstring> + </property> + <property name="text"> + <string></string> + </property> + </widget> + <widget class="TQLabel" row="2" column="0"> + <property name="name"> + <cstring>textLabel1</cstring> + </property> + <property name="text"> + <string>Project age:</string> + </property> + </widget> + <widget class="TQLabel" row="1" column="0"> + <property name="name"> + <cstring>textLabel2</cstring> + </property> + <property name="text"> + <string>Foreground color:</string> + </property> + </widget> + <widget class="KColorButton" row="1" column="1"> + <property name="name"> + <cstring>kcfg_col_foreground</cstring> + </property> + <property name="text"> + <string></string> + </property> + </widget> + <spacer row="0" column="2"> + <property name="name"> + <cstring>spacer1</cstring> + </property> + <property name="orientation"> + <enum>Horizontal</enum> + </property> + <property name="sizeType"> + <enum>Expanding</enum> + </property> + <property name="sizeHint"> + <size> + <width>41</width> + <height>20</height> + </size> + </property> + </spacer> + <spacer row="1" column="2"> + <property name="name"> + <cstring>spacer2</cstring> + </property> + <property name="orientation"> + <enum>Horizontal</enum> + </property> + <property name="sizeType"> + <enum>Expanding</enum> + </property> + <property name="sizeHint"> + <size> + <width>41</width> + <height>20</height> + </size> + </property> + </spacer> + <widget class="TQSpinBox" row="2" column="1"> + <property name="name"> + <cstring>kcfg_val_time</cstring> + </property> + <property name="minValue"> + <number>1</number> + </property> + <property name="value"> + <number>2</number> + </property> + </widget> + <spacer row="2" column="2"> + <property name="name"> + <cstring>spacer3</cstring> + </property> + <property name="orientation"> + <enum>Horizontal</enum> + </property> + <property name="sizeType"> + <enum>Expanding</enum> + </property> + <property name="sizeHint"> + <size> + <width>41</width> + <height>20</height> + </size> + </property> + </spacer> + </grid> +</widget> +<layoutdefaults spacing="6" margin="11"/> +<includehints> + <includehint>kcolorbutton.h</includehint> +</includehints> +</UI> diff --git a/languages/cpp/app_templates/tdeconfig35/prefs.cpp b/languages/cpp/app_templates/tdeconfig35/prefs.cpp new file mode 100644 index 00000000..e7a46ddf --- /dev/null +++ b/languages/cpp/app_templates/tdeconfig35/prefs.cpp @@ -0,0 +1,12 @@ +%{CPP_TEMPLATE} + +#include "prefs.h" +#include <kdebug.h> + +Prefs::Prefs() + : Prefs_base() +{ +// debugging : +// kdWarning()<<"creating a pref dialog"<<endl; +} + diff --git a/languages/cpp/app_templates/tdeconfig35/prefs.h b/languages/cpp/app_templates/tdeconfig35/prefs.h new file mode 100644 index 00000000..9106fe59 --- /dev/null +++ b/languages/cpp/app_templates/tdeconfig35/prefs.h @@ -0,0 +1,11 @@ +%{H_TEMPLATE} + +#include "prefs-base.h" + + +class Prefs : public Prefs_base +{ + public: + Prefs(); +}; + diff --git a/languages/cpp/app_templates/tdeconfig35/settings.kcfgc b/languages/cpp/app_templates/tdeconfig35/settings.kcfgc new file mode 100644 index 00000000..402fad09 --- /dev/null +++ b/languages/cpp/app_templates/tdeconfig35/settings.kcfgc @@ -0,0 +1,6 @@ +# Code generation options for tdeconfig_compiler +File=%{APPNAMELC}.kcfg +ClassName=Settings +Singleton=true +Mutators=col_background,col_foreground +# will create the necessary code for setting those variables diff --git a/languages/cpp/app_templates/tdeconfig35/src-Makefile.am b/languages/cpp/app_templates/tdeconfig35/src-Makefile.am new file mode 100644 index 00000000..53cf2c75 --- /dev/null +++ b/languages/cpp/app_templates/tdeconfig35/src-Makefile.am @@ -0,0 +1,41 @@ +## Makefile.am for %{APPNAMELC} + +# this is the program that gets installed. it's name is used for all +# of the other Makefile.am variables +bin_PROGRAMS = %{APPNAMELC} + +# set the include path for X, qt and TDE +INCLUDES = $(all_includes) + +# let automoc handle all of the meta source files ((moc)) +METASOURCES = AUTO + +# the library search path. +%{APPNAMELC}_LDFLAGS = $(KDE_RPATH) $(all_libraries) + +# the libraries to link against. +%{APPNAMELC}_LDADD = $(LIB_KFILE) $(LIB_TDEPRINT) + +# which sources should be compiled for %{APPNAMELC} +%{APPNAMELC}_SOURCES = settings.kcfgc main.cpp %{APPNAMELC}.cpp %{APPNAMELC}view.cpp \ + %{APPNAMELC}view_base.ui prefs-base.ui prefs.cpp + +xdg_apps_DATA = %{APPNAMELC}.desktop +kde_kcfg_DATA = %{APPNAMELC}.kcfg + +# these are the headers for your project +noinst_HEADERS = %{APPNAMELC}.h %{APPNAMELC}view.h prefs.h + +messages: rc.cpp + $(EXTRACTRC) `find . -name \*.ui -o -name \*.rc` > 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/tdeconfig35/src-configure.in.in b/languages/cpp/app_templates/tdeconfig35/src-configure.in.in new file mode 100644 index 00000000..1f29bc08 --- /dev/null +++ b/languages/cpp/app_templates/tdeconfig35/src-configure.in.in @@ -0,0 +1,7 @@ + +#MIN_CONFIG(3.2.0) + +AM_INIT_AUTOMAKE(%{APPNAMELC}, %{VERSION}) +AC_C_BIGENDIAN +AC_CHECK_TDEMAXPATHLEN + diff --git a/languages/cpp/app_templates/tdeconfig35/subdirs b/languages/cpp/app_templates/tdeconfig35/subdirs new file mode 100644 index 00000000..0e678106 --- /dev/null +++ b/languages/cpp/app_templates/tdeconfig35/subdirs @@ -0,0 +1,3 @@ +doc +po +src diff --git a/languages/cpp/app_templates/tdeconfig35/tdeconfig35.kdevtemplate b/languages/cpp/app_templates/tdeconfig35/tdeconfig35.kdevtemplate new file mode 100644 index 00000000..60cb5238 --- /dev/null +++ b/languages/cpp/app_templates/tdeconfig35/tdeconfig35.kdevtemplate @@ -0,0 +1,245 @@ +# TDE Config File +[General] +Name=TDEConfig XT for TDE 3.5 +Name[ca]=TDEConfig XT per a TDE 3.5 +Name[de]=TDEConfigXT-Anwendung für TDE 3.5 +Name[el]=Εφαρμογή TDEConfig XT για το TDE 3.5 +Name[es]=TDEConfig XT para TDE 3.5 +Name[et]=TDEConfig XT TDE 3.5 jaoks +Name[fr]=Application TDEConfig XT pour TDE 3.5 +Name[hu]=TDEConfig XT a TDE 3.5-höz +Name[it]=TDEConfig XT per TDE 3.5 +Name[ja]=TDE 3.5 用 TDEConfig XT +Name[nds]=TDEConfig-XT-Programm för TDE 3.5 +Name[nl]=TDEConfig XT voor TDE 3.5 +Name[pl]=Program TDEConfig XT dla TDE 3.5 +Name[pt]=Aplicação do TDEConfig XT para o TDE 3.5 +Name[pt_BR]=Aplicação do TDEConfig XT para o TDE 3.5 +Name[ru]=Приложение TDE 3.5 с TDEConfig XT +Name[sk]=TDEConfig XT pre TDE 3.5 +Name[sr]=TDEConfig XT програм за TDE 3.5 +Name[sr@Latn]=TDEConfig XT program za TDE 3.5 +Name[sv]=TDEConfig XT för TDE 3.5 +Name[zh_TW]=TDE 3.5 的 TDEConfig XT 應用程式 +Category=C++/TDE +Icon=kxt.png +Comment=Generates a simple TDE application with one widget and a configuration dialog compatible with TDE 3.5 only +Comment[ca]=Genera una simple aplicació per al TDE amb un estri i un diàleg de configuració compatible només amb TDE 3.5. +Comment[da]=Genererer et simpelt TDE-program med en kontrol og en indstillingsdialog der kun er kompatibelt med TDE 3.5 +Comment[de]=Erstellt eine einfache TDE-Anwendung für TDE 3.5 mit einem Widget und einem Einstellungsdialog. +Comment[el]=Δημιουργεί μια απλή εφαρμογή TDE με ένα γραφικό συστατικό, ένα διάλογο ρύθμισης συμβατό μόνο με το TDE 3.5 +Comment[en_GB]=Generates a simple TDE application with one widget and a configuration dialogue compatible with TDE 3.5 only +Comment[es]=Genera una sencilla aplicación para TDE con un widget y un diálogo de configuración compatible solo con TDE 3.5 +Comment[et]=Lihtsa TDE rakenduse loomine ühe vidina ja vaid TDE 3.5-ga ühilduva seadistustedialoogiga. +Comment[fr]=Génère une application TDE simple comprenant un seul élément graphique et une boîte de dialogue de configuration compatible avec TDE 3.5 uniquement +Comment[hu]=Létrehoz egy egyszerű TDE-alkalmazást egy grafikus elemmel és egy beállítóablakkal, csak a TDE 3.5-tel kompatibilis +Comment[it]=Genera una semplice applicazione TDE con un elemento grafico e una finestra di configurazione compatibile solo con TDE 3.5 +Comment[ja]=一つのウィジェットと設定ダイアログを含む簡単な TDE アプリケーションを作成します (TDE 3.5 用) +Comment[nds]=Stellt en eenfach TDE-Programm mit een Element un en Instelldialoog op, de bloots mit TDE 3.5 kompatibel is. +Comment[nl]=Genereert een eenvoudige TDE-toepassing met één widget en een configuratiedialoog die alleen met TDE 3.5 compatible is +Comment[pl]=Generuje prosty program TDE z jednym widżetem i oknem konfiguracyjnym zgodnym z TDE 3.5 +Comment[pt]=Gera uma aplicação simples do TDE com uma janela principal e outra para configuração, apenas para o TDE 3.5 +Comment[pt_BR]=Gera uma aplicação simples do TDE com uma janela principal e outra para configuração, apenas para o TDE 3.5 +Comment[ru]=Создание простого приложения TDE с одним виджетом и диалогом конфигурации, совместимое только с TDE 3.5. +Comment[sk]=Vygeneruje jednoduchú TDE aplikáciu s jedným oknom a konfiguračným dialógom kompatibilnú len s TDE 3.5 +Comment[sr]=Прави једноставан TDE програм са једном контролом и дијалогом за подешавање, компатибилан само са TDE-ом 3.5 +Comment[sr@Latn]=Pravi jednostavan TDE program sa jednom kontrolom i dijalogom za podešavanje, kompatibilan samo sa TDE-om 3.5 +Comment[sv]=Skapar ett enkelt TDE-program med en grafisk komponent och en inställningsdialogruta, som bara fungerar med TDE 3.5 +Comment[zh_TW]=產生一個簡單的 TDE 3.5 上的應用程式,內含一個元件與一個設定對話框。 +FileTemplates=h,CStyle,cpp,CStyle +ShowFilesAfterGeneration=%{dest}/src/%{APPNAMELC}.cpp,%{dest}/README +Archive=tdeconfig35.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/kde-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 + +[FILE11] +Type=install +Source=%{tdevelop}/template-common/hi32-app-app.png +Dest=%{dest}/src/hi32-app-%{APPNAMELC}.png + +[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 +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}/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 TDE 3.5 TDEConfig XT application was created in %{dest} +Comment[ca]=Una aplicació TDEConfig XT per al TDE ha estat creada en %{dest} +Comment[da]=Et TDE 3.5 TDEConfig XT-program blev oprettet i %{dest} +Comment[de]=Eine TDEConfig-XT-Anwendung für TDE 3.5 wurde in %{dest} erstellt. +Comment[el]=Μια εφαρμογή TDEConfig XT του TDE 3.5 δημιουργήθηκε στο %{dest} +Comment[es]=Una aplicación TDEConfig XT para TDE 3.5 ha sido creada en %{dest} +Comment[et]=TDE 3.5 TDEConfig XT rakendus loodi asukohta %{dest} +Comment[fr]=Une application TDEConfig XT pour TDE 3.5 a été créée dans %{dest} +Comment[hu]=Létrejött egy TDEConfig XT-alapú TDE 3.5-alkalmazás itt: %{dest} +Comment[it]=È stata creata un'applicazione TDEConfig XT per TDE 3.5 in %{dest} +Comment[ja]=TDE 3.5 用 TDEConfig XT アプリケーションを %{dest} に作成しました +Comment[nds]=In %{dest} wöör en TDEConfig-XT-Programm för TDE 3.5 opstellt +Comment[nl]=Een TDE 3.5 TDEConfig XT-toepassing is aangemaakt in %{dest} +Comment[pl]=Program TDEConfig XT dla TDE 3.5 został utworzony w %{dest} +Comment[pt]=Foi criada uma aplicação do TDEConfig XT para o TDE 3.5 em %{dest} +Comment[pt_BR]=Foi criada uma aplicação do TDEConfig XT para o TDE 3.5 em %{dest} +Comment[ru]=Приложение TDE с TDEConfig XT создано в %{dest} +Comment[sk]=TDEConfig XT pre TDE 3.5 bola vytvorená v %{dest} +Comment[sr]=TDEConfig XT програм за TDE 3.5 направљен је у %{dest} +Comment[sr@Latn]=TDEConfig XT program za TDE 3.5 napravljen je u %{dest} +Comment[sv]=Ett TDE 3.5 TDEConfig XT-program skapades i %{dest} +Comment[zh_TW]=一個 TDE 3.5 上的 TDEConfig XT 應用程式已建立於 %{dest} diff --git a/languages/cpp/app_templates/tdeconfig35/tdeconfig35.png b/languages/cpp/app_templates/tdeconfig35/tdeconfig35.png Binary files differnew file mode 100644 index 00000000..a3866883 --- /dev/null +++ b/languages/cpp/app_templates/tdeconfig35/tdeconfig35.png |