diff options
author | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
---|---|---|
committer | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
commit | 47d455dd55be855e4cc691c32f687f723d9247ee (patch) | |
tree | 52e236aaa2576bdb3840ebede26619692fed6d7d /kview/modules/template | |
download | tdegraphics-47d455dd55be855e4cc691c32f687f723d9247ee.tar.gz tdegraphics-47d455dd55be855e4cc691c32f687f723d9247ee.zip |
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/kdegraphics@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kview/modules/template')
-rw-r--r-- | kview/modules/template/Makefile.am | 15 | ||||
-rw-r--r-- | kview/modules/template/kviewtemplate.cpp | 43 | ||||
-rw-r--r-- | kview/modules/template/kviewtemplate.desktop | 129 | ||||
-rw-r--r-- | kview/modules/template/kviewtemplate.h | 27 | ||||
-rw-r--r-- | kview/modules/template/kviewtemplate.rc | 11 |
5 files changed, 225 insertions, 0 deletions
diff --git a/kview/modules/template/Makefile.am b/kview/modules/template/Makefile.am new file mode 100644 index 00000000..29ddc94c --- /dev/null +++ b/kview/modules/template/Makefile.am @@ -0,0 +1,15 @@ +INCLUDES = -I$(top_srcdir)/kview $(all_includes) + +kde_module_LTLIBRARIES = kview_templateplugin.la + +kview_templateplugin_la_SOURCES = kviewtemplate.cpp +kview_templateplugin_la_LIBADD = $(LIB_KFILE) $(LIB_KPARTS) -lkdeprint +kview_templateplugin_la_LDFLAGS = $(all_libraries) -module $(KDE_PLUGIN) + +plugdir = $(kde_datadir)/kview/kpartplugins +plug_DATA = kviewtemplate.desktop kviewtemplate.rc + +METASOURCES = AUTO + +messages: rc.cpp + $(XGETTEXT) *.cpp *.h -o $(podir)/kviewtemplateplugin.pot diff --git a/kview/modules/template/kviewtemplate.cpp b/kview/modules/template/kviewtemplate.cpp new file mode 100644 index 00000000..c8c6dc9d --- /dev/null +++ b/kview/modules/template/kviewtemplate.cpp @@ -0,0 +1,43 @@ +/* This file is in the public domain */ + +// $Id$ + +#include "kviewtemplate.h" + +#include <qobjectlist.h> + +#include <kaction.h> +/*#include <klocale.h>*/ +#include <kgenericfactory.h> +#include <kdebug.h> +#include <kimageviewer/viewer.h> + +typedef KGenericFactory<KViewTemplate> KViewTemplateFactory; +K_EXPORT_COMPONENT_FACTORY( kview_templateplugin, KViewTemplateFactory( "kviewtemplateplugin" ) ) + +KViewTemplate::KViewTemplate( QObject* parent, const char* name, const QStringList & ) + : Plugin( parent, name ) +{ + QObjectList * viewerList = parent->queryList( 0, "KImageViewer Part", false, false ); + m_pViewer = static_cast<KImageViewer::Viewer *>( viewerList->getFirst() ); + delete viewerList; + if( m_pViewer ) + { + (void) new KAction( /*i18n(*/ "&Do Something" /*)*/, 0, 0, + this, SLOT( yourSlot() ), + actionCollection(), "plugin_template" ); + } + else + kdWarning( 4630 ) << "no KImageViewer interface found - the template plugin won't work" << endl; +} + +KViewTemplate::~KViewTemplate() +{ +} + +void KViewTemplate::yourSlot() +{ +} + +// vim:sw=4:ts=4:cindent +#include "kviewtemplate.moc" diff --git a/kview/modules/template/kviewtemplate.desktop b/kview/modules/template/kviewtemplate.desktop new file mode 100644 index 00000000..e1039d06 --- /dev/null +++ b/kview/modules/template/kviewtemplate.desktop @@ -0,0 +1,129 @@ +[Desktop Entry] +Icon=mypluginicon +Type=Service +ServiceTypes=KPluginInfo + +X-KDE-PluginInfo-Author=Your Name +X-KDE-PluginInfo-Email=Your@address +X-KDE-PluginInfo-Name=kviewtemplate +X-KDE-PluginInfo-Version=0.1 +X-KDE-PluginInfo-License=Public Domain +X-KDE-PluginInfo-EnabledByDefault=true + +Name=Template +Name[af]=Werkvoorbeeld +Name[ar]=قالب +Name[bg]=Шаблон +Name[br]=Patrom +Name[bs]=Šablon +Name[ca]=Plantilla +Name[cs]=Šablona +Name[cy]=Patrymlun +Name[da]=Skabelon +Name[de]=Vorlage +Name[el]=Πρότυπο +Name[eo]=Ŝablono +Name[es]=Plantilla +Name[et]=Mallid +Name[eu]=Txantiloia +Name[fa]=قالب +Name[fi]=Pohja +Name[fr]=Modèle +Name[ga]=Teimpléad +Name[gl]=Modelo +Name[he]=תבנית +Name[hi]=टैम्प्लेट +Name[hu]=Sablon +Name[is]=Snið +Name[it]=Modello +Name[ja]=テンプレート +Name[kk]=Үлгі +Name[km]=ពុម្ព +Name[lt]=Šablonas +Name[ms]=Templat +Name[nb]=Mal +Name[nds]=Vörlaag +Name[ne]=टेम्प्लेट +Name[nl]=Sjabloon +Name[nn]=Mal +Name[nso]=Papiso +Name[pl]=Wzorzec +Name[pt]=Modelo +Name[pt_BR]=Modelo +Name[ro]=Model +Name[ru]=Шаблон +Name[se]=Málle +Name[sk]=Šablóna +Name[sl]=Predloga +Name[sr]=Шаблон +Name[sr@Latn]=Šablon +Name[sv]=Mall +Name[ta]=வார்ப்புரு +Name[tg]=Қолиб +Name[tr]=Şablon +Name[uk]=Шаблон +Name[uz]=Namuna +Name[uz@cyrillic]=Намуна +Name[wa]=Modele +Name[zh_CN]=模板 +Name[zh_HK]=範本 +Name[zh_TW]=範本 +Name[zu]=i-template +Comment=A longer description of what the plugin does +Comment[af]='n langer beskrywing van wat die inplak doen +Comment[ar]=وصف أطول عن عمل البرنامج المساعد +Comment[bg]=Подробно описание на приставката +Comment[bs]=Duži opis onoga što dodatak radi +Comment[ca]=Una descripció més llarga del que fa l'endollat +Comment[cs]=Zde by měl být delší popis modulu +Comment[cy]=Disgrifiad hirach o beth mae'r ategyn yn ei wneud +Comment[da]=En længere beskrivelse af hvad dette plugin gør +Comment[de]=Hier sollte eine längere Beschreibung des Moduls stehen +Comment[el]=Μια μεγαλύτερη περιγραφή για το τι κάνει το πρόσθετο +Comment[eo]=Pli longa priskribo pri la kromaĵo +Comment[es]=Una descripción más completa de la función del plugin +Comment[et]=Pluginate tegevuse pikemad kirjeldused +Comment[eu]=Pluginak egiten duenaren azalpen luzeagoa +Comment[fa]=توصیفی طولانیتر از آنچه وصله انجام میدهد +Comment[fi]=Pidempi kuvaus, mitä liitännäinen tekee +Comment[fr]=Une plus longue description de ce que fait le module +Comment[gl]=Unha descrición máis longa do que pode facer a extensión +Comment[he]=תיאור מפורט יותר לגבי מה שהתוסף עושה +Comment[hi]=प्लगइन के बारे में लंबा वर्णन कि वह क्या करता है +Comment[hr]=Duži opis umetka +Comment[hu]=Ez a bővítőmodul részletesebb leírása +Comment[is]=hér ætti að vera smá lýsing á hvað þetta gerir +Comment[it]=Una descrizione più lunga di quello che fa il plugin +Comment[ja]=ここにより詳細なプラグインの記述をします +Comment[kk]=Плагин модульдің түсініктемесі +Comment[km]=សេចក្ដីពណ៌នាវែង អំពីមុខងាររបស់កម្មវិធីជំនួយ +Comment[lt]=Ilgesnis aprašymas, ką daro priedas +Comment[ms]=Huraian panjang tentang apa yang plugin lakukan +Comment[nb]=En lengre beskrivelse av hva modulen gjør +Comment[nds]=En länger Beschrieven vun't Könen vun dat Moduul +Comment[ne]=प्लगइनले गर्ने कामको बारेमा लामो वर्णन +Comment[nl]=Plaats hier een kleine omschrijving van uw plugin +Comment[nn]=Ei lengre skildring av kva modulen gjer +Comment[nso]=Thlaloso ye telele ya seo ya seo plugin ese dirago +Comment[pl]=Dłuższy opis tego, co wtyczka robi +Comment[pt]=Uma descrição mais extensa do que o 'plugin' faz +Comment[pt_BR]= Uma descrição maior do que um plugin faz +Comment[ro]=O descriere mai lungă a modulului +Comment[ru]=А здесь должно быть описание модуля +Comment[se]=Guhkkit čilgehus mii muitala maid lassemoduvla bargá +Comment[sk]=Tu by mal byť popis, čo modul robí +Comment[sl]=Daljši opis, kaj naredi ta vstavek +Comment[sr]=Дужи опис чему прикључак служи +Comment[sr@Latn]=Duži opis čemu priključak služi +Comment[sv]=En längre beskrivningen av vad insticksprogrammet gör +Comment[ta]= சொருகுப்பொருள் செய்த பணியின் நீண்ட வருணனை +Comment[tg]=Дар инҷо бояд тасвироти модул бошад +Comment[tr]=Eklentinin uzun açıklaması +Comment[uk]=Докладний опис можливостей втулку +Comment[ven]=Thalutshedzo khulwane ya ine plugin ya ita zwone +Comment[wa]=On discrijhaedje pus complet di çou k' est fwait på tchôke-divins +Comment[xh]=Inkcazelo ende echaza ukuba iplagi ezingaphakathi zenza ntoni na +Comment[zh_CN]=这里应该填写插件功能详细一点的描述 +Comment[zh_HK]=這個插件的功用的較長描述 +Comment[zh_TW]=關於這個外掛程式的所做所為的較長描述 +Comment[zu]=incazelo ende yokuthi i-plugin yenzani diff --git a/kview/modules/template/kviewtemplate.h b/kview/modules/template/kviewtemplate.h new file mode 100644 index 00000000..1d158b05 --- /dev/null +++ b/kview/modules/template/kviewtemplate.h @@ -0,0 +1,27 @@ +/* This file is in the public domain */ + +// $Id$ + +#ifndef __kviewtemplate_h +#define __kviewtemplate_h + +#include <kparts/plugin.h> + +namespace KImageViewer { class Viewer; } + +class KViewTemplate : public KParts::Plugin +{ + Q_OBJECT +public: + KViewTemplate( QObject* parent, const char* name, const QStringList & ); + virtual ~KViewTemplate(); + +private slots: + void yourSlot(); + +private: + KImageViewer::Viewer * m_pViewer; +}; + +// vim:sw=4:ts=4:cindent +#endif diff --git a/kview/modules/template/kviewtemplate.rc b/kview/modules/template/kviewtemplate.rc new file mode 100644 index 00000000..03d51f57 --- /dev/null +++ b/kview/modules/template/kviewtemplate.rc @@ -0,0 +1,11 @@ +<!DOCTYPE kpartgui> +<kpartplugin name="kviewtemplate" library="kview_templateplugin"> + <MenuBar> + <Menu name="tools"><Text>&Tools</Text> + <Action name="plugin_template"/> + </Menu> + </MenuBar> + <ToolBar name="extraToolBar"> + <Action name="plugin_template"/> + </ToolBar> +</kpartplugin> |