• 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
editor.h
Go to the documentation of this file.
1 /* This file is part of the KDE libraries
2  * Copyright (C) 2005 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 #ifndef KDELIBS_KTEXTEDITOR_EDITOR_H
21 #define KDELIBS_KTEXTEDITOR_EDITOR_H
22 
23 #include <ktexteditor/ktexteditor_export.h>
24 // our main baseclass of the KTextEditor::Editor
25 #include <QtCore/QObject>
26 
27 #include <kicon.h>
28 
29 class KAboutData;
30 class KConfig;
31 
32 namespace KTextEditor
33 {
34 
35 class Document;
36 class ConfigPage;
37 
102 class KTEXTEDITOR_EXPORT Editor : public QObject
103 {
104  Q_OBJECT
105 
106  public:
113  Editor ( QObject *parent );
114 
118  virtual ~Editor ();
119 
123  public:
131  void setSimpleMode (bool on);
132 
138  bool simpleMode () const;
139 
140  /*
141  * Methods to create and manage the documents.
142  */
143  public:
150  virtual Document *createDocument ( QObject *parent ) = 0;
151 
157  virtual const QList<Document*> &documents () = 0;
158 
159  /*
160  * General Information about this editor.
161  */
162  public:
167  virtual const KAboutData *aboutData () const = 0;
168 
174  const QString &defaultEncoding () const;
175 
176  protected:
183  void setDefaultEncoding (const QString &defaultEncoding);
184 
185  /*
186  * Configuration management.
187  */
188  public:
198  virtual void readConfig (KConfig *config = 0) = 0;
199 
209  virtual void writeConfig (KConfig *config = 0) = 0;
210 
217  virtual bool configDialogSupported () const = 0;
218 
230  virtual void configDialog (QWidget *parent) = 0;
231 
239  virtual int configPages () const = 0;
240 
249  virtual ConfigPage *configPage (int number, QWidget *parent) = 0;
250 
258  virtual QString configPageName (int number) const = 0;
259 
271  virtual QString configPageFullName (int number) const = 0;
272 
279  virtual KIcon configPageIcon (int number) const = 0;
280 
281  Q_SIGNALS:
289  void documentCreated (KTextEditor::Editor *editor,
290  KTextEditor::Document *document);
291 
292  private:
293  class EditorPrivate* const d;
294 };
295 
296 
305 KTEXTEDITOR_EXPORT Editor *editor ( const char *libname );
306 
307 }
308 
309 #endif
310 
311 // kate: space-indent on; indent-width 2; replace-tabs on;
QWidget
KTextEditor::editor
KTEXTEDITOR_EXPORT Editor * editor(const char *libname)
Helper function for the EditorChooser.
Definition: ktexteditor.cpp:174
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
QString
QList
KTextEditor::ConfigPage
Config page interface for the Editor.
Definition: configpage.h:46
KTextEditor::Editor
Accessor interface for Editor part.
Definition: editor.h:102
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