• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdepimlibs-4.10.5 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 
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 
148  virtual bool createDBUSInterface( const QString &serviceType );
149 
155  virtual bool isRunningStandalone() const;
156 
162  virtual void bringToForeground();
163 
168  virtual const KAboutData *aboutData() const;
169 
175  KParts::ReadOnlyPart *part();
176 
182  virtual QString tipFile() const;
183 
188  virtual void select();
189 
195  void aboutToSelect();
196 
201  virtual void configUpdated();
202 
209  virtual Summary *createSummaryWidget( QWidget *parent );
210 
214  virtual bool showInSideBar() const;
215 
219  void setShowInSideBar( bool hasPart );
220 
227  virtual bool queryClose() const;
228 
232  QString registerClient();
233 
238  virtual int weight() const;
239 
243  void insertNewAction( KAction *action );
244 
248  void insertSyncAction( KAction *action );
249 
253  QList<KAction*> newActions() const;
254 
258  QList<KAction*> syncActions() const;
259 
263  virtual QStringList invisibleToolbarActions() const;
264 
268  virtual bool canDecodeMimeData( const QMimeData *data ) const;
269 
273  virtual void processDropEvent( QDropEvent * );
274 
278  virtual void readProperties( const KConfigGroup & );
279 
283  virtual void saveProperties( KConfigGroup & );
284 
288  Core *core() const;
289 
293  void setDisabled( bool value );
294 
298  bool disabled() const;
299 
300  public Q_SLOTS:
306  void slotConfigUpdated();
307 
308  protected:
313  virtual KParts::ReadOnlyPart *createPart() = 0;
314 
318  KParts::ReadOnlyPart *loadPart();
319 
323  virtual void virtual_hook( int id, void *data );
324 
325  private:
326  //@cond PRIVATE
327  class Private;
328  Private *const d;
329 
330  Q_PRIVATE_SLOT( d, void partDestroyed() )
331  //@endcond
332 };
333 
334 }
335 
336 #endif
This file is part of the KDE documentation.
Documentation copyright © 1996-2013 The KDE developers.
Generated on Sat Jul 13 2013 01:27:09 by doxygen 1.8.3.1 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.10.5 API Reference

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