• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdepimlibs-4.14.10 API Reference
  • KDE Home
  • Contact Us
 

Kontact Plugin Interface Library

  • kontactinterface
plugin.h
1/*
2 This file is part of the KDE Kontact Plugin Interface Library.
3
4 Copyright (c) 2001 Matthias Hoelzer-Kluepfel <mhk@kde.org>
5 Copyright (c) 2002-2003 Daniel Molkentin <molkentin@kde.org>
6 Copyright (c) 2003 Cornelius Schumacher <schumacher@kde.org>
7
8 This library is free software; you can redistribute it and/or
9 modify it under the terms of the GNU Library General Public
10 License as published by the Free Software Foundation; either
11 version 2 of the License, or (at your option) any later version.
12
13 This library is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 Library General Public License for more details.
17
18 You should have received a copy of the GNU Library General Public License
19 along with this library; see the file COPYING.LIB. If not, write to
20 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
21 Boston, MA 02110-1301, USA.
22*/
23
24#ifndef KONTACTINTERFACE_PLUGIN_H
25#define KONTACTINTERFACE_PLUGIN_H
26
27#include "kontactinterface_export.h"
28
29#include <kpluginfactory.h>
30#include <kxmlguiclient.h>
31
32#include <QtCore/QList>
33#include <QtCore/QObject>
34
35class KAboutData;
36class KAction;
37class KConfig;
38class KConfigGroup;
39class QDropEvent;
40class QMimeData;
41class QStringList;
42class QWidget;
43namespace KParts {
44 class ReadOnlyPart;
45}
46
50#define EXPORT_KONTACT_PLUGIN( pluginclass, pluginname ) \
51class Instance \
52{ \
53 public: \
54 static QObject *createInstance( QWidget *, QObject *parent, const QVariantList &list ) \
55 { return new pluginclass( static_cast<KontactInterface::Core*>( parent ), list ); } \
56}; \
57K_PLUGIN_FACTORY( KontactPluginFactory, registerPlugin< pluginclass > \
58 ( QString(), Instance::createInstance ); ) \
59K_EXPORT_PLUGIN( KontactPluginFactory( "kontact_" #pluginname "plugin" ) )
60
64#define KONTACT_PLUGIN_VERSION 9
65
66namespace KontactInterface {
67
68class Core;
69class Summary;
70
77class KONTACTINTERFACE_EXPORT Plugin : public QObject, virtual public KXMLGUIClient
78{
79 Q_OBJECT
80
81 public:
92 Plugin( Core *core, QObject *parent, const char *appName, const char *pluginName = 0 );
93
97 virtual ~Plugin();
98
102 void setIdentifier( const QString &identifier );
103
107 QString identifier() const;
108
112 void setTitle( const QString &title );
113
117 QString title() const;
118
122 void setIcon( const QString &icon );
123
127 QString icon() const;
128
132 void setExecutableName( const QString &name );
133
137 QString executableName() const;
138
142 void setPartLibraryName( const QByteArray &name );
143
149 virtual bool createDBUSInterface( const QString &serviceType );
150
156 virtual bool isRunningStandalone() const;
157
163 virtual void bringToForeground();
164
169 virtual const KAboutData *aboutData() const;
170
176 KParts::ReadOnlyPart *part();
177
183 virtual QString tipFile() const;
184
189 virtual void select();
190
196 void aboutToSelect();
197
202 virtual void configUpdated();
203
210 virtual Summary *createSummaryWidget( QWidget *parent );
211
215 virtual bool showInSideBar() const;
216
221 void setShowInSideBar( bool hasPart );
222
229 virtual bool queryClose() const;
230
234 QString registerClient();
235
240 virtual int weight() const;
241
246 void insertNewAction( KAction *action );
247
252 void insertSyncAction( KAction *action );
253
257 QList<KAction*> newActions() const;
258
262 QList<KAction*> syncActions() const;
263
267 virtual QStringList invisibleToolbarActions() const;
268
272 virtual bool canDecodeMimeData( const QMimeData *data ) const;
273
277 virtual void processDropEvent( QDropEvent * );
278
282 virtual void readProperties( const KConfigGroup & );
283
287 virtual void saveProperties( KConfigGroup & );
288
292 Core *core() const;
293
297 void setDisabled( bool value );
298
302 bool disabled() const;
303
307 virtual void shortcutChanged();
308
309 public Q_SLOTS:
315 void slotConfigUpdated();
316
317 protected:
322 virtual KParts::ReadOnlyPart *createPart() = 0;
323
327 KParts::ReadOnlyPart *loadPart();
328
332 virtual void virtual_hook( int id, void *data );
333
334 private:
335 //@cond PRIVATE
336 class Private;
337 Private *const d;
338
339 Q_PRIVATE_SLOT( d, void partDestroyed() )
340 //@endcond
341};
342
343}
344
345#endif
KontactInterface::Core
The abstract interface that represents the Kontact core.
Definition core.h:40
KontactInterface::Plugin
Base class for all Plugins in Kontact.
Definition plugin.h:78
KontactInterface::Plugin::createPart
virtual KParts::ReadOnlyPart * createPart()=0
Reimplement and return the part here.
KontactInterface::Summary
Base class for summary widgets in Kontact.
Definition summary.h:42
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Wed Jan 24 2024 00:00:00 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

Kontact Plugin Interface Library

Skip menu "Kontact Plugin Interface Library"
  • Main Page
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • Related Pages

kdepimlibs-4.14.10 API Reference

Skip menu "kdepimlibs-4.14.10 API Reference"
  • akonadi
  •   contact
  •   kmime
  •   socialutils
  • kabc
  • kalarmcal
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  •   nntp
  • kldap
  • kmbox
  • kmime
  • kontactinterface
  • kpimidentities
  • kpimtextedit
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • microblog
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal