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

Kontact Plugin Interface Library

  • sources
  • kde-4.14
  • kdepimlibs
  • 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 
35 class KAboutData;
36 class KAction;
37 class KConfig;
38 class KConfigGroup;
39 class QDropEvent;
40 class QMimeData;
41 class QStringList;
42 class QWidget;
43 namespace KParts {
44  class ReadOnlyPart;
45 }
46 
50 #define EXPORT_KONTACT_PLUGIN( pluginclass, pluginname ) \
51 class 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 }; \
57 K_PLUGIN_FACTORY( KontactPluginFactory, registerPlugin< pluginclass > \
58  ( QString(), Instance::createInstance ); ) \
59 K_EXPORT_PLUGIN( KontactPluginFactory( "kontact_" #pluginname "plugin" ) )
60 
64 #define KONTACT_PLUGIN_VERSION 9
65 
66 namespace KontactInterface {
67 
68 class Core;
69 class Summary;
70 
77 class 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
QWidget
QByteArray
QMimeData
KontactInterface::Summary
Base class for summary widgets in Kontact.
Definition: summary.h:41
QObject
QDropEvent
QString
QList
QStringList
KontactInterface::Plugin
Base class for all Plugins in Kontact.
Definition: plugin.h:77
KontactInterface::Core
The abstract interface that represents the Kontact core.
Definition: core.h:39
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:37:55 by doxygen 1.8.7 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 API Reference

Skip menu "kdepimlibs 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

Search



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