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

kdevplatform/interfaces

  • sources
  • kfour-appscomplete
  • kdevelop
  • kdevplatform
  • interfaces
iplugin.h
Go to the documentation of this file.
1 /* This file is part of the KDE project
2  Copyright 1999-2001 Bernd Gehrmann <[email protected]>
3  Copyright 2004,2007 Alexander Dymo <[email protected]>
4  Copyright 2006 Adam Treat <[email protected]>
5  Copyright 2007 Andreas Pakulat <[email protected]>
6 
7  This library is free software; you can redistribute it and/or
8  modify it under the terms of the GNU Library General Public
9  License as published by the Free Software Foundation; either
10  version 2 of the License, or (at your option) any later version.
11 
12  This library is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  Library General Public License for more details.
16 
17  You should have received a copy of the GNU Library General Public License
18  along with this library; see the file COPYING.LIB. If not, write to
19  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
20  Boston, MA 02110-1301, USA.
21 */
22 
23 #ifndef KDEVPLATFORM_IPLUGIN_H
24 #define KDEVPLATFORM_IPLUGIN_H
25 
26 #include <QObject>
27 
28 #include <KXMLGUIClient>
29 
30 #include "interfacesexport.h"
31 
32 namespace Sublime {
33 class MainWindow;
34 }
35 
36 namespace KDevelop
37 {
38 
39 class ICore;
40 class ConfigPage;
41 class Context;
42 class ContextMenuExtension;
43 struct ProjectConfigOptions;
44 class IPluginPrivate;
45 
131 class KDEVPLATFORMINTERFACES_EXPORT IPlugin: public QObject, public KXMLGUIClient
132 {
133  Q_OBJECT
134 
135 public:
140  IPlugin(const QString &componentName, QObject *parent);
141 
143  ~IPlugin() override;
144 
148  virtual void unload();
149 
153  ICore *core() const;
154 
160  template<class Extension>
161  inline Extension* extension()
162  {
163  return qobject_cast<Extension*>(this);
164  }
165 
173  virtual ContextMenuExtension contextMenuExtension(KDevelop::Context* context, QWidget* parent);
174 
187  virtual KXMLGUIClient* createGUIForMainWindow( Sublime::MainWindow* window );
188 
198  virtual void createActionsForMainWindow( Sublime::MainWindow* window, QString& xmlFile, KActionCollection& actions );
199 
205  bool hasError() const;
206 
210  QString errorDescription() const;
211 
216  void setErrorDescription(QString const& description);
217 
229  virtual ConfigPage* configPage(int number, QWidget *parent);
230 
236  virtual int configPages() const;
237 
243  virtual int perProjectConfigPages() const;
244 
257  virtual ConfigPage* perProjectConfigPage(int number, const KDevelop::ProjectConfigOptions& options, QWidget* parent);
258 
259 protected:
263  virtual void initializeGuiState();
264 
265 private:
266  const QScopedPointer<class IPluginPrivate> d_ptr;
267  Q_DECLARE_PRIVATE(IPlugin)
268  friend class IPluginPrivate;
269 };
270 
271 }
272 
273 #endif
QWidget
KDevelop::Context
Base class for every context.
Definition: context.h:91
Sublime
Definition: idocument.h:36
QObject
QString
KDevelop::ContextMenuExtension
For documentation on how to use this class,.
Definition: contextmenuextension.h:39
QScopedPointer< class IPluginPrivate >
KDevelop::ICore
ICore is the container class for all the various objects in use by KDevelop.
Definition: icore.h:70
KDevelop::IPlugin
The base class for all KDevelop plugins.
Definition: iplugin.h:131
KDevelop
The KDevelop namespace contains all classes provided by the KDevelop platform libraries.
Definition: configpage.cpp:26
KDevelop::ConfigPage
Definition: configpage.h:35
KDevelop::IPlugin::extension
Extension * extension()
Convenience API to access an interface inherited by this plugin.
Definition: iplugin.h:161
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Sat Apr 10 2021 23:29:57 by doxygen 1.8.16 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kdevplatform/interfaces

Skip menu "kdevplatform/interfaces"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdevelop API Reference

Skip menu "kdevelop API Reference"
  • kdevplatform
  •   debugger
  •   documentation
  •   interfaces
  •   language
  •     assistant
  •     backgroundparser
  •     checks
  •     classmodel
  •     codecompletion
  •     codegen
  •     duchain
  •     editor
  •     highlighting
  •     interfaces
  •     util
  •   outputview
  •   project
  •   serialization
  •   shell
  •   sublime
  •   tests
  •   util
  •   vcs

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