• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdelibs-4.14.38 API Reference
  • KDE Home
  • Contact Us
 

KTextEditor

  • interfaces
  • ktexteditor
containerinterface.h
Go to the documentation of this file.
1/* This file is part of the KDE libraries
2 Copyright (C) 2007 Philippe Fremy (phil at freehackers dot org)
3 Copyright (C) 2008 Joseph Wenninger (jowenn@kde.org)
4
5
6 This library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Library General Public
8 License version 2 as published by the Free Software Foundation.
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#ifndef KDELIBS_KTEXTEDITOR_CONTAINER_INTERFACE_H
22#define KDELIBS_KTEXTEDITOR_CONTAINER_INTERFACE_H
23
24#include <ktexteditor/ktexteditor_export.h>
25
26#include <QtCore/QObject>
27
28namespace KTextEditor
29{
30
31class Document;
32class View;
33
34
65class KTEXTEDITOR_EXPORT ContainerInterface
66{
67 public:
71 ContainerInterface();
72
74 virtual ~ContainerInterface();
75
84 virtual void setContainer( QObject * container ) = 0;
85
114 virtual QObject * container() = 0;
115}; // class ContainerInterface
116
166class KTEXTEDITOR_EXPORT MdiContainer
167{
168 public:
169
171 MdiContainer();
172
174 virtual ~MdiContainer();
175
181 virtual void setActiveView( View * view )=0;
182
190 virtual View * activeView()=0;
191
212 virtual Document * createDocument()=0;
213
229 virtual bool closeDocument( Document * doc )=0;
230
248 virtual View * createView( Document * doc )=0;
249
260 virtual bool closeView( View * view )=0;
261}; // class MdiContainer
262
263
269class KTEXTEDITOR_EXPORT ViewBarContainer
270{
271 public:
272 enum Position{LeftBar=0,TopBar=1,RightBar=2,BottomBar=3};
274 ViewBarContainer();
275
277 virtual ~ViewBarContainer();
278
283 virtual QWidget* getViewBarParent(View *view,enum Position position)=0;
284
289 virtual void addViewBarToLayout(View *view,QWidget *bar,enum Position position)=0;
290
293 virtual void showViewBarForView(View *view,enum Position position)=0;
294 virtual void hideViewBarForView(View *view,enum Position position)=0;
295
301 virtual void deleteViewBarForView(View *view,enum Position position)=0;
302
303};
304
305} // namespace KTextEditor
306
307Q_DECLARE_INTERFACE(KTextEditor::ContainerInterface, "org.kde.KTextEditor.ContainerInterface")
308Q_DECLARE_INTERFACE(KTextEditor::MdiContainer, "org.kde.KTextEditor.MdiContainer")
309Q_DECLARE_INTERFACE(KTextEditor::ViewBarContainer, "org.kde.KTextEditor.ViewBarContainer")
310#endif // KDELIBS_KTEXTEDITOR_CONTAINER_EXTENSION_H
KTextEditor::ContainerInterface
Class that allows the kpart host to provide some extensions.
Definition: containerinterface.h:66
KTextEditor::ContainerInterface::setContainer
virtual void setContainer(QObject *container)=0
Set the KTextEditor container.
KTextEditor::ContainerInterface::container
virtual QObject * container()=0
Fetch the container extension.
KTextEditor::Document
A KParts derived class representing a text document.
Definition: document.h:112
KTextEditor::MdiContainer
A container for MDI-capable kpart hosts.
Definition: containerinterface.h:167
KTextEditor::MdiContainer::setActiveView
virtual void setActiveView(View *view)=0
Set the view requested by the part as the active view.
KTextEditor::MdiContainer::closeView
virtual bool closeView(View *view)=0
Closes the View view .
KTextEditor::MdiContainer::activeView
virtual View * activeView()=0
Get the current activew view.
KTextEditor::MdiContainer::closeDocument
virtual bool closeDocument(Document *doc)=0
Closes of document doc .
KTextEditor::MdiContainer::createDocument
virtual Document * createDocument()=0
Create a new Document and return it to the kpart.
KTextEditor::MdiContainer::createView
virtual View * createView(Document *doc)=0
Creates a new View and return it to the kpart.
KTextEditor::ViewBarContainer
An application providing a centralized place for horizontal view bar containers (eg search bars) has ...
Definition: containerinterface.h:270
KTextEditor::ViewBarContainer::showViewBarForView
virtual void showViewBarForView(View *view, enum Position position)=0
show hide a view bar.
KTextEditor::ViewBarContainer::Position
Position
Definition: containerinterface.h:272
KTextEditor::ViewBarContainer::addViewBarToLayout
virtual void addViewBarToLayout(View *view, QWidget *bar, enum Position position)=0
It is advisable to store only QPointers to the bar and its children in the caller after this point.
KTextEditor::ViewBarContainer::getViewBarParent
virtual QWidget * getViewBarParent(View *view, enum Position position)=0
At this point the views parent window has to be already set, so this has to be called after any repar...
KTextEditor::ViewBarContainer::deleteViewBarForView
virtual void deleteViewBarForView(View *view, enum Position position)=0
The view should not delete the bar by itself, but tell the container to delete the bar.
KTextEditor::ViewBarContainer::hideViewBarForView
virtual void hideViewBarForView(View *view, enum Position position)=0
KTextEditor::View
A text widget with KXMLGUIClient that represents a Document.
Definition: view.h:146
QObject
QWidget
ktexteditor_export.h
KTextEditor
Namespace for the KDE Text Editor Interfaces.
Definition: annotationinterface.h:31
org
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 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

kdelibs-4.14.38 API Reference

Skip menu "kdelibs-4.14.38 API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
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