From 47d455dd55be855e4cc691c32f687f723d9247ee 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/kdegraphics@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kview/modules/template/kviewtemplate.cpp | 43 ++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 kview/modules/template/kviewtemplate.cpp (limited to 'kview/modules/template/kviewtemplate.cpp') 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 + +#include +/*#include */ +#include +#include +#include + +typedef KGenericFactory 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( 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" -- cgit v1.2.1