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/opietoday/.kdev_ignore | 0 languages/cpp/app_templates/opietoday/Example.png | Bin 0 -> 1262 bytes languages/cpp/app_templates/opietoday/Makefile.am | 19 +++ languages/cpp/app_templates/opietoday/app.kdevelop | 143 +++++++++++++++++++ languages/cpp/app_templates/opietoday/app.pro | 38 ++++++ .../cpp/app_templates/opietoday/exampleplugin.cpp | 60 ++++++++ .../cpp/app_templates/opietoday/exampleplugin.h | 34 +++++ .../app_templates/opietoday/examplepluginimpl.cpp | 30 ++++ .../app_templates/opietoday/examplepluginimpl.h | 23 ++++ .../opietoday/examplepluginwidget.cpp | 55 ++++++++ .../app_templates/opietoday/examplepluginwidget.h | 28 ++++ .../app_templates/opietoday/opietoday.kdevtemplate | 151 +++++++++++++++++++++ .../cpp/app_templates/opietoday/opietoday.png | Bin 0 -> 483 bytes 13 files changed, 581 insertions(+) create mode 100644 languages/cpp/app_templates/opietoday/.kdev_ignore create mode 100644 languages/cpp/app_templates/opietoday/Example.png create mode 100644 languages/cpp/app_templates/opietoday/Makefile.am create mode 100644 languages/cpp/app_templates/opietoday/app.kdevelop create mode 100644 languages/cpp/app_templates/opietoday/app.pro create mode 100644 languages/cpp/app_templates/opietoday/exampleplugin.cpp create mode 100644 languages/cpp/app_templates/opietoday/exampleplugin.h create mode 100644 languages/cpp/app_templates/opietoday/examplepluginimpl.cpp create mode 100644 languages/cpp/app_templates/opietoday/examplepluginimpl.h create mode 100644 languages/cpp/app_templates/opietoday/examplepluginwidget.cpp create mode 100644 languages/cpp/app_templates/opietoday/examplepluginwidget.h create mode 100644 languages/cpp/app_templates/opietoday/opietoday.kdevtemplate create mode 100644 languages/cpp/app_templates/opietoday/opietoday.png (limited to 'languages/cpp/app_templates/opietoday') diff --git a/languages/cpp/app_templates/opietoday/.kdev_ignore b/languages/cpp/app_templates/opietoday/.kdev_ignore new file mode 100644 index 00000000..e69de29b diff --git a/languages/cpp/app_templates/opietoday/Example.png b/languages/cpp/app_templates/opietoday/Example.png new file mode 100644 index 00000000..f63d0bc7 Binary files /dev/null and b/languages/cpp/app_templates/opietoday/Example.png differ diff --git a/languages/cpp/app_templates/opietoday/Makefile.am b/languages/cpp/app_templates/opietoday/Makefile.am new file mode 100644 index 00000000..8854404d --- /dev/null +++ b/languages/cpp/app_templates/opietoday/Makefile.am @@ -0,0 +1,19 @@ +dataFiles = Makefile.am Example.png app.kdevelop app.pro exampleplugin.cpp \ + examplepluginimpl.cpp examplepluginwidget.cpp exampleplugin.h \ + examplepluginimpl.h examplepluginwidget.h + +templateName = opietoday + +### 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/opietoday/app.kdevelop b/languages/cpp/app_templates/opietoday/app.kdevelop new file mode 100644 index 00000000..f6e57207 --- /dev/null +++ b/languages/cpp/app_templates/opietoday/app.kdevelop @@ -0,0 +1,143 @@ + + + + %{AUTHOR} + %{EMAIL} + %{VERSION} + KDevTrollProject + C++ + + Qt + C++ + Code + + + + + + + + + + + + false + *.o,*.lo,CVS + + + + + gtk + gnustep + python + php + perl + w3c-dom-level2-html + kdev3api + sdl + w3c-svg + w3c-uaag10 + + + Guide to the Qt Translation Tools + qmake User Guide + Qt Assistant Manual + Qt Designer Manual + Qt Referrence Documentation + + + bonobo-activation + gconf + gtksourceview + libbonobo + libbonoboui + + + + + + -qws + + true + false + false + + + false + true + + + + + false + + + + plugins/today + + %{APPNAMELC} + 0 +
opie/plugins
+ %{AUTHOR} %{EMAIL} + arm + opie-today + %{VERSION} + Empty +
+
+ + + + + + -qws + + +
+ + + + + + + + + + + + + + false + false + + + + false + + + .h + .cpp + true + + + + true + 2 + + + -f + + -dP + + -f + -u3 -p + + + + + + Doxygen Documentation Collection + %{APPNAMELC}.tag + + +
diff --git a/languages/cpp/app_templates/opietoday/app.pro b/languages/cpp/app_templates/opietoday/app.pro new file mode 100644 index 00000000..152dc6f6 --- /dev/null +++ b/languages/cpp/app_templates/opietoday/app.pro @@ -0,0 +1,38 @@ +TEMPLATE = lib +CONFIG = qt dll qtopia warn_on release zecke-libqpe zecke-libopie opie-todayplugin +HEADERS = %{APPNAMELC}.h %{APPNAMELC}widget.h %{APPNAMELC}impl.h +SOURCES = %{APPNAMELC}.cpp %{APPNAMELC}widget.cpp %{APPNAMELC}impl.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/opietoday/exampleplugin.cpp b/languages/cpp/app_templates/opietoday/exampleplugin.cpp new file mode 100644 index 00000000..3d32b274 --- /dev/null +++ b/languages/cpp/app_templates/opietoday/exampleplugin.cpp @@ -0,0 +1,60 @@ + +#include "%{APPNAMELC}.h" + +%{APPNAME}::%{APPNAME}() { + m_widget = 0l; +} + +%{APPNAME}::~%{APPNAME}() { + delete (%{APPNAME}Widget*)m_widget; +} + +QString %{APPNAME}::pluginName() const { + return QObject::tr( "%{APPNAME}" ); +} + +double %{APPNAME}::versionNumber() const { + return 0.1; +} + +// this sets the image that will be shown on the left side of the plugin +QString %{APPNAME}::pixmapNameWidget() const { + return QString::fromLatin1("%{APPNAMELC}/%{APPNAMELC}"); +} + +QWidget* %{APPNAME}::widget( QWidget * wid ) { + if(!m_widget) { + m_widget = new %{APPNAME}Widget( wid, "%{APPNAME}" ); + } + return m_widget; +} + + +// that would be the icon of the config widget in todays config view +QString %{APPNAME}::pixmapNameConfig() const { + return 0l; +} + +// No config widget yet, look at the datebook plugin for an example of that +TodayConfigWidget* %{APPNAME}::configWidget( QWidget* /*parent*/ ) { + return 0l; +} + +// add the binary name of the app to launch here +QString %{APPNAME}::appName() const { + return QString::null; +} + +// if the plugin should be excluded form the refresh cycles that can be set in the today app +bool %{APPNAME}::excludeFromRefresh() const { + return false; +} + +void %{APPNAME}::refresh() { + if ( m_widget ) { + m_widget->refresh(); + } +} + +void %{APPNAME}::reinitialize() { +} diff --git a/languages/cpp/app_templates/opietoday/exampleplugin.h b/languages/cpp/app_templates/opietoday/exampleplugin.h new file mode 100644 index 00000000..b321f434 --- /dev/null +++ b/languages/cpp/app_templates/opietoday/exampleplugin.h @@ -0,0 +1,34 @@ +#ifndef %{APPNAME}_PLUGIN_H +#define %{APPNAME}_PLUGIN_H + +#include +#include + +#include +#include + +#include "%{APPNAMELC}widget.h" + +// implementation of the today plugin interface +class %{APPNAME} : public TodayPluginObject { + +public: + %{APPNAME}(); + ~%{APPNAME}(); + + QString pluginName() const; + double versionNumber() const; + QString pixmapNameWidget() const; + QWidget* widget(QWidget *); + QString pixmapNameConfig() const; + TodayConfigWidget* configWidget(QWidget *); + QString appName() const; + bool excludeFromRefresh() const; + void refresh(); + void reinitialize(); + + private: + QGuardedPtr<%{APPNAME}Widget> m_widget; +}; + +#endif diff --git a/languages/cpp/app_templates/opietoday/examplepluginimpl.cpp b/languages/cpp/app_templates/opietoday/examplepluginimpl.cpp new file mode 100644 index 00000000..3a9481f1 --- /dev/null +++ b/languages/cpp/app_templates/opietoday/examplepluginimpl.cpp @@ -0,0 +1,30 @@ +#include "%{APPNAMELC}.h" +#include "%{APPNAMELC}impl.h" + +%{APPNAME}Impl::%{APPNAME}Impl() { + examplePlugin = new %{APPNAME}(); +} + +%{APPNAME}Impl::~%{APPNAME}Impl() { + delete examplePlugin; +} + + +TodayPluginObject* %{APPNAME}Impl::guiPart() { + return examplePlugin; +} + +QRESULT %{APPNAME}Impl::queryInterface( const QUuid & uuid, QUnknownInterface **iface ) { + *iface = 0; + if ( ( uuid == IID_QUnknown ) || ( uuid == IID_TodayPluginInterface ) ) { + *iface = this, (*iface)->addRef(); + }else + return QS_FALSE; + + return QS_OK; + +} + +Q_EXPORT_INTERFACE() { + Q_CREATE_INSTANCE( %{APPNAME}Impl ); +} diff --git a/languages/cpp/app_templates/opietoday/examplepluginimpl.h b/languages/cpp/app_templates/opietoday/examplepluginimpl.h new file mode 100644 index 00000000..ccb7c3b3 --- /dev/null +++ b/languages/cpp/app_templates/opietoday/examplepluginimpl.h @@ -0,0 +1,23 @@ +#ifndef %{APPNAME}_PLUGIN_IMPL_H +#define %{APPNAME}_PLUGIN_IMPL_H + +#include + +class %{APPNAME}; + +class %{APPNAME}Impl : public TodayPluginInterface{ + +public: + %{APPNAME}Impl(); + virtual ~%{APPNAME}Impl(); + + QRESULT queryInterface( const QUuid &, QUnknownInterface** ); + Q_REFCOUNT + + virtual TodayPluginObject *guiPart(); + +private: + %{APPNAME} *examplePlugin; +}; + +#endif diff --git a/languages/cpp/app_templates/opietoday/examplepluginwidget.cpp b/languages/cpp/app_templates/opietoday/examplepluginwidget.cpp new file mode 100644 index 00000000..b0cb0dcc --- /dev/null +++ b/languages/cpp/app_templates/opietoday/examplepluginwidget.cpp @@ -0,0 +1,55 @@ +#include +#include + +#include "%{APPNAMELC}widget.h" + +%{APPNAME}Widget::%{APPNAME}Widget( QWidget *parent, const char* name) + : QWidget(parent, name ) { + + m_exampleLabel = 0l; + m_layout = 0l; + + if ( m_exampleLabel ) { + delete m_exampleLabel; + } + + // since here a OClickableLabel is used, the plugin part will be clickable, and the actions + // that should be triggered when clicked are defined in slotClicked() + // of course also normal widgets can be used. + m_exampleLabel = new OClickableLabel( this ); + connect( m_exampleLabel, SIGNAL( clicked() ), this, SLOT( slotClicked() ) ); + + if ( m_layout ) { + delete m_layout; + } + m_layout = new QHBoxLayout( this ); + m_layout->setAutoAdd( true ); + + readConfig(); + getInfo(); +} + + +%{APPNAME}Widget::~%{APPNAME}Widget() { + delete m_exampleLabel; + delete m_layout; +} + + +void %{APPNAME}Widget::readConfig() { +// we dont have any config entries in this plugin +// normally this method is used after today config was used +} + + +void %{APPNAME}Widget::refresh() { + +} + +void %{APPNAME}Widget::getInfo() { + m_exampleLabel->setText( tr("%{APPNAME} text") ); +} + +void %{APPNAME}Widget::slotClicked() { + getInfo(); +} diff --git a/languages/cpp/app_templates/opietoday/examplepluginwidget.h b/languages/cpp/app_templates/opietoday/examplepluginwidget.h new file mode 100644 index 00000000..26a72128 --- /dev/null +++ b/languages/cpp/app_templates/opietoday/examplepluginwidget.h @@ -0,0 +1,28 @@ +#ifndef %{APPNAME}_PLUGIN_WIDGET_H +#define %{APPNAME}_PLUGIN_WIDGET_H + +#include + +#include + +class %{APPNAME}Widget : public QWidget { + + Q_OBJECT + +public: + %{APPNAME}Widget( QWidget *parent, const char *name ); + ~%{APPNAME}Widget(); + + void refresh(); + +private slots: + void slotClicked(); + +private: + OClickableLabel* m_exampleLabel; + QHBoxLayout* m_layout; + void readConfig(); + void getInfo(); +}; + +#endif diff --git a/languages/cpp/app_templates/opietoday/opietoday.kdevtemplate b/languages/cpp/app_templates/opietoday/opietoday.kdevtemplate new file mode 100644 index 00000000..25d8f42d --- /dev/null +++ b/languages/cpp/app_templates/opietoday/opietoday.kdevtemplate @@ -0,0 +1,151 @@ +# KDE Config File +[General] +Name=Opie Today Plugin +Name[ca]=Connector de tasques pendents per a Opie +Name[da]=Opie Today-plugin +Name[de]=Opie-Today-Modul +Name[el]=Πρόσθετο Σήμερα του Opie +Name[es]=Complemento de tareas pendientes para Opie +Name[et]=Opie Today plugin +Name[eu]=Opie-ren gaur-plugina +Name[fa]=وصلۀ Opie Today +Name[fr]=Module externe Opie « Today » +Name[ga]=Breiseán Inniu Opie +Name[gl]=Extensión 'today' para Opie +Name[hu]=Opie Today-modul +Name[it]=Plugin today di Opie +Name[ja]=Opie Today プラグイン +Name[nds]=Moduul för Opie-Today +Name[ne]=ओपिइ टुडे प्लगइन +Name[nl]=Opie Today-plugin +Name[pl]=Wtyczka Opie Dzisiaj +Name[pt]='Plugin' de Dados de Hoje do Opie +Name[pt_BR]='Plugin' de Dados de Hoje do Opie +Name[ru]=Модуль задач Opie +Name[sk]=Opie dnešný modul +Name[sr]=Прикључак за Opie данас +Name[sr@Latn]=Priključak za Opie danas +Name[sv]=Opie Idag-insticksprogram +Name[tr]=Opie Bugün Eklentisi +Name[zh_CN]=Opie 今日插件 +Name[zh_TW]=Opie 今天外掛程式 +Icon=qmakeapp.png +Category=C++/Embedded +Comment=Generate an Opie today plugin. +Comment[ca]=Genera un connector de tasques pendents per a Opie. +Comment[da]=Generér et Opie today-plugin. +Comment[de]=Erstellt ein Opie-Today-Modul +Comment[el]=Δημιουργία ενός πρόσθετου Σήμερα του Opie. +Comment[es]=Genera un complemento de tareas pendientes para Opie. +Comment[et]=Opie Today plugina loomine. +Comment[eu]=Sortu Opie-ren gaur plugin bat. +Comment[fa]=یک وصلۀ Opie today تولید می‌کند. +Comment[fr]=Génère un module externe Opie « Today ». +Comment[gl]=Xera unha extensión 'today' para Opie +Comment[hu]=Létrehoz egy Opie Today-modult. +Comment[it]=Genera un plugin today di Opie. +Comment[ja]=Opie today プラグインを作成 +Comment[nds]=Stellt en Moduul för Opie-Today op. +Comment[ne]=ओपिइ टुडे प्लगइन उत्पन्न गर्नुहोस् +Comment[nl]=Genereert een Opie today-plugin. +Comment[pl]=Generuje wtyczkę Opie "Dzisiaj". +Comment[pt]=Gera um 'plugin' para dados de hoje do Opie. +Comment[pt_BR]=Gera um 'plugin' para dados de hoje do Opie. +Comment[ru]=Создание модуля задач Opie. +Comment[sk]=Vygeneruje Opie dnešný modul. +Comment[sr]=Прави прикључак за Opie данас. +Comment[sr@Latn]=Pravi priključak za Opie danas. +Comment[sv]=Skapar ett Opie Idag-insticksprogram. +Comment[tr]=Bir Opie bugün eklentisi yarat +Comment[zh_CN]=生成一个 Opie 今日插件。 +Comment[zh_TW]=產生一個 Opie 今天外掛程式 +FileTemplates=h,CStyle,cpp,CStyle +ShowFilesAfterGeneration=%{dest}/%{APPNAMELC}.cpp +Archive=opietoday.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}/exampleplugin.cpp +Dest=%{dest}/%{APPNAMELC}.cpp + +[FILE5] +Type=install +Source=%{src}/examplepluginwidget.cpp +Dest=%{dest}/%{APPNAMELC}widget.cpp + +[FILE6] +Type=install +Source=%{src}/examplepluginimpl.cpp +Dest=%{dest}/%{APPNAMELC}impl.cpp + +[FILE7] +Type=install +Source=%{src}/exampleplugin.h +Dest=%{dest}/%{APPNAMELC}.h + +[FILE8] +Type=install +Source=%{src}/examplepluginwidget.h +Dest=%{dest}/%{APPNAMELC}widget.h + +[FILE9] +Type=install +Source=%{src}/examplepluginimpl.h +Dest=%{dest}/%{APPNAMELC}impl.h + +[MSG] +Type=message +Comment=An opie today plugin was created in %{dest} +Comment[ca]=Un connector de tasques pendents per a Opie ha estat creat en %{dest} +Comment[da]=Et opie today-plugin blev oprettet i %{dest} +Comment[de]=Ein Opie-Today-Modul wurde in %{dest} erstellt. +Comment[el]=Ένα πρόσθετο Σήμερα του opie δημιουργήθηκε στο %{dest} +Comment[es]=Un complemento de tareas pendientes para Opie ha sido creado en %{dest} +Comment[et]=Opie Today plugin loodi asukohta %{dest} +Comment[eu]=Opie-ren gaur plugin bat sortu da hemen %{dest} +Comment[fa]=یک وصلۀ opie today در %{dest} ایجاد شد +Comment[fr]=Un module externe Opie « Today » a été créé dans %{dest} +Comment[ga]=Cruthaíodh breiseán inniu opie i %{dest} +Comment[gl]=Creouse unha extensión 'today' para opie en %{dest} +Comment[hu]=Létrejött egy Opie Today-modul itt: %{dest} +Comment[it]=È stato creato un plugin today di Opie in %{dest} +Comment[ja]=Opie today プラグインを %{dest} に作成しました +Comment[nds]=In %{dest} wöör en Moduul för Opie-Today opstellt +Comment[ne]=ओपिइ टुडे प्लगइन %{dest} मा सिर्जना गरियो +Comment[nl]=Een Opie today-plugins is aangemaakt in %{dest} +Comment[pl]=Wtyczka Opie Dzisiaj została utworzona w %{dest} +Comment[pt]=Foi criado um 'plugin' para dados de hoje do Opie em %{dest} +Comment[pt_BR]=Foi criado um 'plugin' para dados de hoje do Opie em %{dest} +Comment[ru]=Модуль задач Opie создан в %{dest} +Comment[sk]=Opie dnešný modul bol vytvorený v %{dest} +Comment[sr]=Прикључак за opie данас направљен је у %{dest} +Comment[sr@Latn]=Priključak za opie danas napravljen je u %{dest} +Comment[sv]=Ett Opie Idag-insticksprogram skapades i %{dest} +Comment[tr]=Bir Opie bugün eklentisi %{dest} içinde yaratıldı. +Comment[zh_CN]=在 %{dest} 中创建了一个 opie 今日插件 +Comment[zh_TW]=一個 Opie 今天外掛程式已建立於 %{dest} diff --git a/languages/cpp/app_templates/opietoday/opietoday.png b/languages/cpp/app_templates/opietoday/opietoday.png new file mode 100644 index 00000000..840a953c Binary files /dev/null and b/languages/cpp/app_templates/opietoday/opietoday.png differ -- cgit v1.2.1