summaryrefslogtreecommitdiffstats
path: root/kview/modules/README
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commit47d455dd55be855e4cc691c32f687f723d9247ee (patch)
tree52e236aaa2576bdb3840ebede26619692fed6d7d /kview/modules/README
downloadtdegraphics-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/README')
-rw-r--r--kview/modules/README52
1 files changed, 52 insertions, 0 deletions
diff --git a/kview/modules/README b/kview/modules/README
new file mode 100644
index 00000000..74c229c0
--- /dev/null
+++ b/kview/modules/README
@@ -0,0 +1,52 @@
+How to write a plugin for KView
+===============================
+
+There are two different kinds of plugins for KView that you may write: KPart
+plugins for KView or the KView KPart (KViewViewer).
+
+
+Writing the Plugin
+==================
+
+You have to derive your plugin from KParts::Plugin and install the rc file under
+the directory "data" (KDEDIR/share/apps/ usually)+"instancename/kpartplugins/"
+(where instancename can be either kview or kviewviewer). If you install it under
+kviewviewer the plugin will be loaded for the KPart (meaning it get's loaded in
+e.g. Konqueror). If you install it under kview it only get's loaded when
+starting the KView application.
+
+The parent that is passed on to your plugin will be a KImageViewer::Viewer
+interface (which is also a KParts::ReadWritePart) if you make it a KViewViewer
+plugin, else you'll be passed a pointer to KView (take a look at the template
+plugin to see how to get to the KImageViewer::Viewer interface).
+
+
+Plugin Desktop file
+===================
+
+Now you need to write a .desktop file for your plugin, containing the name,
+a comment, author, email and plugin name.
+
+Here's a start:
+------------------------------------------------------------------------------
+[Desktop Entry]
+Name=Coolplugin
+Comment=This is a very cool plugin doing foo and bar
+Type=Plugin
+
+[X-KDE Plugin Info]
+Author=Matthias Kretz
+Email=kretz@kde.org
+PluginName=kviewcool
+Version=1.0
+------------------------------------------------------------------------------
+
+The "PluginName" entry needs to be the same as the name attribut in your .rc
+file (<kpartplugin name="kviewcool" library="kview_coolplugin">).
+
+
+Examples
+========
+
+There are a few modules already in the original KView sources. Just take a look
+at kdegraphics/kview/modules/*.