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

KTextEditor

  • kde-4.14
  • applications
  • kate
  • ktexteditor
plugin.h
Go to the documentation of this file.
1 /* This file is part of the KDE libraries
2  Copyright (C) 2001 Christoph Cullmann <cullmann@kde.org>
3  Copyright (C) 2005 Dominik Haumann (dhdev@gmx.de) (documentation)
4 
5  This library is free software; you can redistribute it and/or
6  modify it under the terms of the GNU Library General Public
7  License as published by the Free Software Foundation; either
8  version 2 of the License, or (at your option) any later version.
9 
10  This library is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  Library General Public License for more details.
14 
15  You should have received a copy of the GNU Library General Public License
16  along with this library; see the file COPYING.LIB. If not, write to
17  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18  Boston, MA 02110-1301, USA.
19 */
20 
21 
22 #ifndef KDELIBS_KTEXTEDITOR_PLUGIN_H
23 #define KDELIBS_KTEXTEDITOR_PLUGIN_H
24 
25 #include <QtCore/QObject>
26 
27 #include <ktexteditor/ktexteditor_export.h>
28 #include <kservice.h>
29 
30 class KConfig;
31 
32 namespace KTextEditor
33 {
34 
35 class Document;
36 class View;
37 
107 class KTEXTEDITOR_EXPORT Plugin : public QObject
108 {
109  Q_OBJECT
110 
111  public:
118  Plugin ( QObject *parent );
119 
123  virtual ~Plugin ();
124 
125  /*
126  * Following methodes allow the plugin to react on view and document
127  * creation.
128  */
129  public:
141  virtual void addDocument (Document *document) { Q_UNUSED(document); }
142 
154  virtual void removeDocument (Document *document) { Q_UNUSED(document); }
155 
175  virtual void addView (View *view) { Q_UNUSED(view); }
176 
187  virtual void removeView (View *view) { Q_UNUSED(view); }
188 
189  private:
190  class PluginPrivate* const d;
191 };
192 
205 #ifndef KDE_NO_DEPRECATED
206 KTEXTEDITOR_EXPORT_DEPRECATED Plugin *createPlugin ( KService::Ptr service, QObject *parent );
207 #endif
208 
209 }
210 
211 #endif
212 
213 // kate: space-indent on; indent-width 2; replace-tabs on;
KTextEditor::createPlugin
KTEXTEDITOR_EXPORT_DEPRECATED Plugin * createPlugin(KService::Ptr service, QObject *parent)
Create a plugin represented by service with parent object parent.
Definition: ktexteditor.cpp:148
ktexteditor_export.h
KTextEditor::Document
A KParts derived class representing a text document.
Definition: document.h:111
QObject
KTEXTEDITOR_EXPORT
#define KTEXTEDITOR_EXPORT
Definition: ktexteditor_export.h:35
KTextEditor::Plugin::removeView
virtual void removeView(View *view)
This method is called whenever the plugin should remove its GUI from view.
Definition: plugin.h:187
KTextEditor::Plugin::addDocument
virtual void addDocument(Document *document)
Add a new document to the plugin.
Definition: plugin.h:141
KTextEditor::Plugin::addView
virtual void addView(View *view)
This method is called whenever the plugin should add its GUI to view.
Definition: plugin.h:175
KTextEditor::Plugin
KTextEditor Plugin interface.
Definition: plugin.h:107
KTEXTEDITOR_EXPORT_DEPRECATED
#define KTEXTEDITOR_EXPORT_DEPRECATED
Definition: ktexteditor_export.h:41
KTextEditor::View
A text widget with KXMLGUIClient that represents a Document.
Definition: view.h:145
KTextEditor::Plugin::removeDocument
virtual void removeDocument(Document *document)
Remove the document from the plugin.
Definition: plugin.h:154
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Sat May 9 2020 03:56:48 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KTextEditor

Skip menu "KTextEditor"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Modules
  • Related Pages

applications API Reference

Skip menu "applications API Reference"
  •   kate
  •       kate
  •   KTextEditor
  •   Kate
  • Konsole

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