summaryrefslogtreecommitdiffstats
path: root/languages/cpp/app_templates/opiemenu
diff options
context:
space:
mode:
Diffstat (limited to 'languages/cpp/app_templates/opiemenu')
-rw-r--r--languages/cpp/app_templates/opiemenu/.kdev_ignore0
-rw-r--r--languages/cpp/app_templates/opiemenu/Example.pngbin0 -> 1262 bytes
-rw-r--r--languages/cpp/app_templates/opiemenu/Makefile.am18
-rw-r--r--languages/cpp/app_templates/opiemenu/app.kdevelop158
-rw-r--r--languages/cpp/app_templates/opiemenu/app.pro38
-rw-r--r--languages/cpp/app_templates/opiemenu/opiemenu.kdevtemplate132
-rw-r--r--languages/cpp/app_templates/opiemenu/opiemenu.pngbin0 -> 483 bytes
-rw-r--r--languages/cpp/app_templates/opiemenu/simpleimpl.cpp78
-rw-r--r--languages/cpp/app_templates/opiemenu/simpleimpl.h32
9 files changed, 456 insertions, 0 deletions
diff --git a/languages/cpp/app_templates/opiemenu/.kdev_ignore b/languages/cpp/app_templates/opiemenu/.kdev_ignore
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/languages/cpp/app_templates/opiemenu/.kdev_ignore
diff --git a/languages/cpp/app_templates/opiemenu/Example.png b/languages/cpp/app_templates/opiemenu/Example.png
new file mode 100644
index 00000000..f63d0bc7
--- /dev/null
+++ b/languages/cpp/app_templates/opiemenu/Example.png
Binary files differ
diff --git a/languages/cpp/app_templates/opiemenu/Makefile.am b/languages/cpp/app_templates/opiemenu/Makefile.am
new file mode 100644
index 00000000..c44b3f96
--- /dev/null
+++ b/languages/cpp/app_templates/opiemenu/Makefile.am
@@ -0,0 +1,18 @@
+dataFiles = Makefile.am Example.png app.kdevelop app.pro \
+ simpleimpl.cpp simpleimpl.h
+
+templateName = opiemenu
+
+### 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/opiemenu/app.kdevelop b/languages/cpp/app_templates/opiemenu/app.kdevelop
new file mode 100644
index 00000000..eee2c55a
--- /dev/null
+++ b/languages/cpp/app_templates/opiemenu/app.kdevelop
@@ -0,0 +1,158 @@
+<?xml version="1.0"?>
+<kdevelop>
+ <general>
+ <author>%{AUTHOR}</author>
+ <email>%{EMAIL}</email>
+ <version>%{VERSION}</version>
+ <projectmanagement>KDevTrollProject</projectmanagement>
+ <primarylanguage>C++</primarylanguage>
+ <keywords>
+ <keyword>Qt</keyword>
+ <keyword>C++</keyword>
+ <keyword>Code</keyword>
+ </keywords>
+ <ignoreparts/>
+ </general>
+ <kdevfileview>
+ <groups>
+ <group pattern="*.cpp;*.cxx;*.h" name="Sources" />
+ <group pattern="*.ui" name="User Interface" />
+ <group pattern="*.png" name="Icons" />
+ <group pattern="*" name="Others" />
+ </groups>
+ <tree>
+ <hidenonprojectfiles>false</hidenonprojectfiles>
+ <hidepatterns>*.o,*.lo,CVS</hidepatterns>
+ </tree>
+ </kdevfileview>
+ <kdevdoctreeview>
+ <ignoretocs>
+ <toc>gtk</toc>
+ <toc>gnustep</toc>
+ <toc>python</toc>
+ <toc>php</toc>
+ <toc>perl</toc>
+ <toc>w3c-dom-level2-html</toc>
+ <toc>kdev3api</toc>
+ <toc>sdl</toc>
+ <toc>w3c-svg</toc>
+ <toc>w3c-uaag10</toc>
+ </ignoretocs>
+ <ignoreqt_xml>
+ <toc>Guide to the Qt Translation Tools</toc>
+ <toc>qmake User Guide</toc>
+ <toc>Qt Assistant Manual</toc>
+ <toc>Qt Designer Manual</toc>
+ <toc>Qt Referrence Documentation</toc>
+ </ignoreqt_xml>
+ <ignoredevhelp>
+ <toc>bonobo-activation</toc>
+ <toc>gconf</toc>
+ <toc>gtksourceview</toc>
+ <toc>libbonobo</toc>
+ <toc>libbonoboui</toc>
+ </ignoredevhelp>
+ </kdevdoctreeview>
+ <kdevdebugger>
+ <general>
+ <dbgshell></dbgshell>
+ <programargs>-qws</programargs>
+ <gdbpath/>
+ <breakonloadinglibs>true</breakonloadinglibs>
+ <separatetty>false</separatetty>
+ <floatingtoolbar>false</floatingtoolbar>
+ </general>
+ <display>
+ <staticmembers>false</staticmembers>
+ <demanglenames>true</demanglenames>
+ </display>
+ </kdevdebugger>
+ <kdevtrollproject>
+ <opie>
+ <quick_app>true</quick_app>
+ </opie>
+ <packaging>
+ <template>2</template>
+ <owner>
+ <package>%{APPNAMELC}</package>
+ <prio>0</prio>
+ <section>opie/applets</section>
+ <maintainer>%{AUTHOR} %{EMAIL}</maintainer>
+ <arch>arm</arch>
+ <depends>task-opie-minimal</depends>
+ <version>%{VERSION}</version>
+ <desc>Empty</desc>
+ </owner>
+ <scripts>
+ <post>#!/bin/sh
+if pidof -s qpe >/dev/null; then
+ /opt/QtPalmtop/bin/qcop QPE/TaskBar "reloadApplets()"
+else
+ exit 0
+fi
+</post>
+ <post_rem>#!/bin/sh
+if pidof -s qpe >/dev/null; then
+ /opt/QtPalmtop/bin/qcop QPE/TaskBar "reloadApplets()"
+else
+ exit 0
+fi
+</post_rem>
+ </scripts>
+ </packaging>
+ <general>
+ <activedir></activedir>
+ </general>
+ <run>
+ <mainprogram>./%{APPNAMELC}</mainprogram>
+ <programargs>-qws</programargs>
+ </run>
+ <envvars/>
+ </kdevtrollproject>
+ <kdevfilecreate>
+ <filetypes/>
+ <useglobaltypes>
+ <type ext="ui" />
+ <type ext="cpp" />
+ <type ext="h" />
+ </useglobaltypes>
+ </kdevfilecreate>
+ <cppsupportpart>
+ <codecompletion>
+ <codehinting outputview="1" enablech="0" selectview="0" />
+ </codecompletion>
+ <classstore>
+ <enablepcs>false</enablepcs>
+ <enablepp>false</enablepp>
+ <preparsing/>
+ </classstore>
+ <filetemplates>
+ <choosefiles>false</choosefiles>
+ <interfaceURL></interfaceURL>
+ <implementationURL></implementationURL>
+ <interfacesuffix>.h</interfacesuffix>
+ <implementationsuffix>.cpp</implementationsuffix>
+ <lowercasefilenames>true</lowercasefilenames>
+ </filetemplates>
+ </cppsupportpart>
+ <kdevclassview>
+ <folderhierarchy>true</folderhierarchy>
+ <depthoffolders>2</depthoffolders>
+ </kdevclassview>
+ <kdevcvs>
+ <cvsoptions>-f</cvsoptions>
+ <commitoptions></commitoptions>
+ <updateoptions>-dP</updateoptions>
+ <addoptions></addoptions>
+ <removeoptions>-f</removeoptions>
+ <diffoptions>-u3 -p</diffoptions>
+ <logoptions></logoptions>
+ <rshoptions></rshoptions>
+ </kdevcvs>
+ <kdevdocumentation>
+ <projectdoc>
+ <docsystem>Doxygen Documentation Collection</docsystem>
+ <docurl>%{APPNAMELC}.tag</docurl>
+ </projectdoc>
+ </kdevdocumentation>
+</kdevelop>
diff --git a/languages/cpp/app_templates/opiemenu/app.pro b/languages/cpp/app_templates/opiemenu/app.pro
new file mode 100644
index 00000000..71bc208c
--- /dev/null
+++ b/languages/cpp/app_templates/opiemenu/app.pro
@@ -0,0 +1,38 @@
+TEMPLATE = lib
+CONFIG = qt dll qtopia warn_on release zecke-libqpe zecke-libopie opie-menuapplet
+HEADERS = %{APPNAMELC}.h
+SOURCES = %{APPNAMELC}.cpp
+TARGET = %{APPNAMELC}
+
+
+QUICK_SPEC_FOO = $$(OPIE_BUILD_QUICK_APP)
+contains( TEMPLATE, quick-template ){
+ contains( QUICK_SPEC_FOO, quick-app-lib ){
+ message( "foo" )
+ system( rm $$TARGET )
+ system( ln -s $$(OPIEDIR)/bin/quicklauncher $$TARGET)
+ DEFINES += OPIE_APP_INTERFACE
+ TEMPLATE = lib
+ CONFIG += dll
+ }else{
+ LI = $$join( TARGET, "lib", "lib", ".so*" )
+ system( rm $$LI )
+ TEMPLATE = app
+ }
+}
+
+
+QMAKE_LIBDIR= $$(OPIEDIR)/lib
+OPIE-SPEC=6
+
+zecke-libqpe {
+ INCLUDEPATH += $$(OPIEDIR)/include
+ LIBS += -lqpe
+ DEPENDPATH += $$(OPIEDIR)/include
+}
+
+zecke-libopie {
+ INCLUDEPATH += $$(OPIEDIR)/include
+ DEPENDPATH += $$(OPIEDIR)/include
+ LIBS += -lopie
+}
diff --git a/languages/cpp/app_templates/opiemenu/opiemenu.kdevtemplate b/languages/cpp/app_templates/opiemenu/opiemenu.kdevtemplate
new file mode 100644
index 00000000..b32b13ed
--- /dev/null
+++ b/languages/cpp/app_templates/opiemenu/opiemenu.kdevtemplate
@@ -0,0 +1,132 @@
+# KDE Config File
+[General]
+Name=Opie Menu Applet
+Name[ca]=Una miniaplicació de menú per a Opie
+Name[da]=Opie menu-applet
+Name[de]=Opie-Menü-Miniprogramm (Applet)
+Name[el]=Μικροεφαρμογή μενού Opie
+Name[es]=Applet de menú para Opie
+Name[et]=Opie menüüaplett
+Name[eu]=Opie-ren menu applet-a
+Name[fa]=برنامک گزینگان Opie
+Name[fr]=Applet de menu Opie
+Name[ga]=Feidhmchláirín Roghchláir Opie
+Name[gl]=Applet de menú Opie
+Name[hu]=Opie-s menü-kisalkalmazás
+Name[it]=Applet di menu Opie
+Name[ja]=Opie メニューアプレット
+Name[nds]=Menü-Lüttprogramm för Opie
+Name[ne]=ओपिइ मेनु एप्लेट
+Name[nl]=Opie-menuapplet
+Name[pl]=Aplet menu Opie
+Name[pt]='Applet' do Menu do Opie
+Name[pt_BR]='Applet' do Menu do Opie
+Name[ru]=Аплет меню Opie
+Name[sk]=Opie menu pplet
+Name[sr]=Opie аплет менија
+Name[sr@Latn]=Opie aplet menija
+Name[sv]=Opie-menyminiprogram
+Name[tr]=Opie Menü Küçük Uygulaması
+Name[zh_CN]=Opie 菜单小程序
+Name[zh_TW]=Opie 選單小程式
+Icon=qmakeapp.png
+Category=C++/Embedded
+Comment=Generate an Opie menu applet.
+Comment[ca]=Genera una miniaplicació de menú per a Opie.
+Comment[da]=Generér en Opie menu-applet.
+Comment[de]=Erstellt ein Opie-Menü-Miniprogramm (Applet).
+Comment[el]=Δημιουργία μίας μικροεφαρμογής μενού Opie.
+Comment[es]=Genera un applet de menú para Opie.
+Comment[et]=Opie menüüapleti loomine.
+Comment[eu]=Sortu Opie-ren menu applet bat.
+Comment[fa]=یک برنامک گزینگان Opie تولید می‌کند.
+Comment[fr]=Génère un applet de menu Opie.
+Comment[gl]=Xera un applet de menu para Opie.
+Comment[hu]=Létrehoz egy Opie-s menü-kisalkalmazást.
+Comment[it]=Genera un'applet di menu Opie.
+Comment[ja]=Opie メニューアプレットを作成
+Comment[nds]=Stellt en Menü-Lüttprogramm för Opie op.
+Comment[ne]=ओपिइ मेनु एप्लेट उत्पन्न गर्नुहोस्
+Comment[nl]=Genereert een Opie-menuapplet.
+Comment[pl]=Generuje aplet menu Opie
+Comment[pt]=Gera uma 'applet' do menu do Opie.
+Comment[pt_BR]=Gera uma 'applet' do menu do Opie.
+Comment[ru]=Создание аплета меню Opie.
+Comment[sk]=Vygeneruje Opie menu applet.
+Comment[sr]=Прави Opie аплет менија.
+Comment[sr@Latn]=Pravi Opie aplet menija.
+Comment[sv]=Skapa ett Opie-menyminiprogram.
+Comment[tr]=Bir Opie menü küçük uygulaması yarat
+Comment[zh_CN]=生成一个 Opie 菜单小程序。
+Comment[zh_TW]=產生一個 Opie 選單小程式
+FileTemplates=h,CStyle,cpp,CStyle
+ShowFilesAfterGeneration=%{dest}/%{APPNAMELC}.cpp
+Archive=opiemenu.tar.gz
+
+[FILE1]
+Type=install
+EscapeXML=true
+Source=%{src}/app.kdevelop
+Dest=%{dest}/%{APPNAMELC}.kdevelop
+
+[MkDir0]
+Type=mkdir
+Dir=%{dest}/pics
+
+[MkDir1]
+Type=mkdir
+Dir=%{dest}/pics/%{APPNAMELC}
+
+[FILE2]
+Type=install
+Source=%{src}/Example.png
+Dest=%{dest}/pics/%{APPNAMELC}/%{APPNAMELC}.png
+Process=false
+
+[FILE3]
+Type=install
+Source=%{src}/app.pro
+Dest=%{dest}/%{APPNAMELC}.pro
+
+[FILE4]
+Type=install
+Source=%{src}/simpleimpl.cpp
+Dest=%{dest}/%{APPNAMELC}.cpp
+
+[FILE5]
+Type=install
+Source=%{src}/simpleimpl.h
+Dest=%{dest}/%{APPNAMELC}.h
+
+[MSG]
+Type=message
+Comment=An opie menu applet was created in %{dest}
+Comment[ca]=Una miniaplicació de menú per a Opie ha estat creat en %{dest}
+Comment[da]=En opie menu-applet blev oprettet i %{dest}
+Comment[de]=Ein Opie-Menü-Miniprogramm (Applet) wurde in %{dest} erstellt.
+Comment[el]=Μία μικροεφαρμογή μενού opie δημιουργήθηκε στο %{dest}
+Comment[es]=Un applet de menú para Opie ha sido creado en %{dest}
+Comment[et]=Opie menüüaplett loodi asukohta %{dest}
+Comment[eu]= Opie-ren menu applet bat sortu da hemen: %{dest}
+Comment[fa]=یک برنامک گزینگان opie در %{dest} ایجاد شد
+Comment[fr]=Un applet de menu Opie a été créé dans %{dest}
+Comment[ga]=Cruthaíodh feidhmchláirín roghchláir opie i %{dest}
+Comment[gl]=Creouse un applet de menu para opie en %{dest}
+Comment[hu]=Létrejött egy Opie-s menü-kisalkalmazás itt: %{dest}
+Comment[it]=È stata creata un'applet di menu Opie in %{dest}
+Comment[ja]=Opie メニューアプレットを %{dest} に作成しました
+Comment[nds]=In %{dest} wöör en Menü-Lüttprogramm för Opie opstellt
+Comment[ne]=ओपिइ मेनु एप्लेट %{dest} मा सिर्जना गरियो
+Comment[nl]=Een Opie-menuapplet is aangemaakt in %{dest}
+Comment[pl]=Aplet menu Opie został utworzony w %{dest}
+Comment[pt]=Foi criada uma 'applet' do menu do Opie em %{dest}
+Comment[pt_BR]=Foi criada uma 'applet' do menu do Opie em %{dest}
+Comment[ru]=Аплет меню Opie создан в %{dest}
+Comment[sk]=Opie menu applet bol vytvorený v %{dest}
+Comment[sr]=Opie аплет менија направљен је у %{dest}
+Comment[sr@Latn]=Opie aplet menija napravljen je u %{dest}
+Comment[sv]=Ett Opie-menyprogram skapades i %{dest}
+Comment[tr]=Bir opie menü küçük uygulaması %{dest} içinde yaratıldı.
+Comment[zh_CN]=在 %{dest} 中创建了一个 opie 菜单小程序
+Comment[zh_TW]=一個 Opie 選單小程式已建立於 %{dest}
+
diff --git a/languages/cpp/app_templates/opiemenu/opiemenu.png b/languages/cpp/app_templates/opiemenu/opiemenu.png
new file mode 100644
index 00000000..840a953c
--- /dev/null
+++ b/languages/cpp/app_templates/opiemenu/opiemenu.png
Binary files differ
diff --git a/languages/cpp/app_templates/opiemenu/simpleimpl.cpp b/languages/cpp/app_templates/opiemenu/simpleimpl.cpp
new file mode 100644
index 00000000..95245661
--- /dev/null
+++ b/languages/cpp/app_templates/opiemenu/simpleimpl.cpp
@@ -0,0 +1,78 @@
+#include "%{APPNAMELC}.h"
+
+#include <qpe/applnk.h>
+#include <qpe/resource.h>
+
+/* QT */
+#include <qiconset.h>
+#include <qpopupmenu.h>
+#include <qmessagebox.h>
+
+
+%{APPNAME}::%{APPNAME}()
+ :QObject( 0, "%{APPNAME}" )
+{
+}
+
+%{APPNAME}::~%{APPNAME} ( )
+{}
+
+int %{APPNAME}::position() const
+{
+ return 3;
+}
+
+QString %{APPNAME}::name() const
+{
+ return tr( "MenuApplet Example Name" );
+}
+
+QString %{APPNAME}::text() const
+{
+ return tr( "Click the white rabbit" );
+}
+
+
+QIconSet %{APPNAME}::icon() const
+{
+ QPixmap pix;
+ QImage img = Resource::loadImage( "Tux" );
+ if ( !img.isNull() )
+ pix.convertFromImage( img.smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) );
+ return pix;
+}
+
+QPopupMenu* %{APPNAME}::popup(QWidget*) const
+{
+ /* no subdir */
+ return 0;
+}
+
+void %{APPNAME}::activated()
+{
+ QMessageBox::information(0,tr("No white rabbit found"),
+ tr("<qt>No white rabbit was seen near Opie."
+ "Only the beautiful OpieZilla is available"
+ "for your pleassure</qt>"));
+}
+
+
+QRESULT %{APPNAME}::queryInterface( const QUuid &uuid, QUnknownInterface **iface )
+{
+ *iface = 0;
+ if ( uuid == IID_QUnknown )
+ *iface = this;
+ else if ( uuid == IID_MenuApplet )
+ *iface = this;
+ else
+ return QS_FALSE;
+
+ if ( *iface )
+ (*iface)->addRef();
+ return QS_OK;
+}
+
+Q_EXPORT_INTERFACE()
+{
+ Q_CREATE_INSTANCE( %{APPNAME} )
+}
diff --git a/languages/cpp/app_templates/opiemenu/simpleimpl.h b/languages/cpp/app_templates/opiemenu/simpleimpl.h
new file mode 100644
index 00000000..3961e3c4
--- /dev/null
+++ b/languages/cpp/app_templates/opiemenu/simpleimpl.h
@@ -0,0 +1,32 @@
+#ifndef %{APPNAME}_MENU_APPLET_H
+#define %{APPNAME}_MENU_APPLET_H
+
+#include <qpe/menuappletinterface.h>
+
+#include <qobject.h>
+
+class %{APPNAME} : public QObject, public MenuAppletInterface
+{
+
+ Q_OBJECT
+
+public:
+ %{APPNAME} ( );
+ virtual ~%{APPNAME} ( );
+
+ QRESULT queryInterface( const QUuid&, QUnknownInterface** );
+ Q_REFCOUNT
+
+ virtual int position() const;
+
+ virtual QString name ( ) const;
+ virtual QIconSet icon ( ) const;
+ virtual QString text ( ) const;
+ /* virtual QString tr( const char* ) const;
+ virtual QString tr( const char*, const char* ) const;
+ */
+ virtual QPopupMenu *popup ( QWidget *parent ) const;
+ virtual void activated ( );
+};
+
+#endif