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

kate/kate/interfaces/kate

  • Kate
  • DocumentManager
Signals | Public Member Functions | List of all members
Kate::DocumentManager Class Reference

#include <documentmanager.h>

Inheritance diagram for Kate::DocumentManager:
Inheritance graph
[legend]

Signals

void aboutToDeleteDocuments (const QList< KTextEditor::Document * > &)
 
void aboutToLoadDocuments ()
 
void documentCreated (KTextEditor::Document *document)
 
void documentDeleted (KTextEditor::Document *document)
 
void documentsDeleted (const QList< KTextEditor::Document * > &documents)
 
void documentsLoaded (const QList< KTextEditor::Document * > &)
 
void documentWillBeDeleted (KTextEditor::Document *document)
 

Public Member Functions

 DocumentManager (void *documentManager)
 
virtual ~DocumentManager ()
 
bool closeDocument (KTextEditor::Document *document)
 
bool closeDocumentList (QList< KTextEditor::Document * > documents)
 
const QList
< KTextEditor::Document * > & 
documents () const
 
KTextEditor::Document * findUrl (const KUrl &url) const
 
KTextEditor::Document * openUrl (const KUrl &url, const QString &encoding=QString())
 
- Public Member Functions inherited from QObject
 QObject (QObject *parent)
 
 QObject (QObject *parent, const char *name)
 
virtual  ~QObject ()
 
bool blockSignals (bool block)
 
QObject * child (const char *objName, const char *inheritsClass, bool recursiveSearch) const
 
const QObjectList & children () const
 
const char * className () const
 
bool connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const
 
void deleteLater ()
 
void destroyed (QObject *obj)
 
bool disconnect (const QObject *receiver, const char *method)
 
bool disconnect (const char *signal, const QObject *receiver, const char *method)
 
void dumpObjectInfo ()
 
void dumpObjectTree ()
 
QList< QByteArray > dynamicPropertyNames () const
 
virtual bool event (QEvent *e)
 
virtual bool eventFilter (QObject *watched, QEvent *event)
 
T findChild (const QString &name) const
 
QList< T > findChildren (const QRegExp &regExp) const
 
QList< T > findChildren (const QString &name) const
 
bool inherits (const char *className) const
 
void insertChild (QObject *object)
 
void installEventFilter (QObject *filterObj)
 
bool isA (const char *className) const
 
bool isWidgetType () const
 
void killTimer (int id)
 
virtual const QMetaObject * metaObject () const
 
void moveToThread (QThread *targetThread)
 
const char * name () const
 
const char * name (const char *defaultName) const
 
QString objectName () const
 
QObject * parent () const
 
QVariant property (const char *name) const
 
void removeChild (QObject *object)
 
void removeEventFilter (QObject *obj)
 
void setName (const char *name)
 
void setObjectName (const QString &name)
 
void setParent (QObject *parent)
 
bool setProperty (const char *name, const QVariant &value)
 
bool signalsBlocked () const
 
int startTimer (int interval)
 
QThread * thread () const
 

Additional Inherited Members

- Static Public Member Functions inherited from QObject
bool connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
 
bool connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type)
 
bool disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method)
 
bool disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method)
 
QString tr (const char *sourceText, const char *disambiguation, int n)
 
QString trUtf8 (const char *sourceText, const char *disambiguation, int n)
 
- Protected Member Functions inherited from QObject
bool checkConnectArgs (const char *signal, const QObject *object, const char *method)
 
virtual void childEvent (QChildEvent *event)
 
virtual void connectNotify (const char *signal)
 
virtual void customEvent (QEvent *event)
 
virtual void disconnectNotify (const char *signal)
 
int receivers (const char *signal) const
 
QObject * sender () const
 
int senderSignalIndex () const
 
virtual void timerEvent (QTimerEvent *event)
 
- Static Protected Member Functions inherited from QObject
QByteArray normalizeSignalSlot (const char *signalSlot)
 
- Properties inherited from QObject
 objectName
 

Detailed Description

Interface for the document manager.

This interface provides access to Kate's document manager. The document manager manages all documents. Use document() get a given document, activeDocument() to retrieve the active document. Check with isOpen() whether an URL is opened and use findDocument() to get it. To get the number of managed documents use documents().

Open new documents with openUrl() and close a document with closeDocument() or closeAllDocuments(). Several signals are provided, documentChanged() is emitted whenever the document's content changed, documentCreated() when a new document was created and documentDeleted() when a document was closed.

To access the document manager use the global accessor function documentManager() or Application::documentManager(). You should never have to create an instance of this class yourself.

Author
Christoph Cullmann <cullm.nosp@m.ann@.nosp@m.kde.o.nosp@m.rg>

Definition at line 54 of file documentmanager.h.

Constructor & Destructor Documentation

Kate::DocumentManager::DocumentManager ( void *  documentManager)

Construtor.

The constructor is internally used by the Kate application, so it is of no interest for plugin developers. Plugin developers should use the global accessor pluginManager() instead.

Parameters
documentManagerinternal usage

Definition at line 44 of file documentmanager.cpp.

Kate::DocumentManager::~DocumentManager ( )
virtual

Virtual destructor.

Definition at line 50 of file documentmanager.cpp.

Member Function Documentation

void Kate::DocumentManager::aboutToDeleteDocuments ( const QList< KTextEditor::Document * > &  )
signal

signal which documents are going to be deleted soon

note that the batch can be interupted in the middle and only some of the documents may be actually deleted. See signal.

void Kate::DocumentManager::aboutToLoadDocuments ( )
signal

will be loading a bunch of documents, you can step back for a while

bool Kate::DocumentManager::closeDocument ( KTextEditor::Document *  document)

Close the given document.

Parameters
documentthe document to be closed
Returns
true on success, otherwise false

Definition at line 70 of file documentmanager.cpp.

bool Kate::DocumentManager::closeDocumentList ( QList< KTextEditor::Document * >  documents)

Close a list of documents.

If any of them are modified, show a "save modified" dialog.

Parameters
documentslist of documents to be closed
Returns
true on success, otherwise false

Definition at line 75 of file documentmanager.cpp.

void Kate::DocumentManager::documentCreated ( KTextEditor::Document *  document)
signal

This signal is emitted when the document was created.

void Kate::DocumentManager::documentDeleted ( KTextEditor::Document *  document)
signal

This signal is emitted when the document has been deleted.

Warning !!! DO NOT ACCESS THE DATA REFERENCED BY THE POINTER, IT IS ALREADY INVALID Use the pointer only to remove mappings in hash or maps

const QList< KTextEditor::Document * > & Kate::DocumentManager::documents ( ) const

Get a list of all documents.

Returns
all documents

Definition at line 55 of file documentmanager.cpp.

void Kate::DocumentManager::documentsDeleted ( const QList< KTextEditor::Document * > &  documents)
signal

the batch closing signal for the documents that weren't deleted after all

void Kate::DocumentManager::documentsLoaded ( const QList< KTextEditor::Document * > &  )
signal

bunch of documents have been loaded, you can come back

void Kate::DocumentManager::documentWillBeDeleted ( KTextEditor::Document *  document)
signal

This signal is emitted before a document which should be closed is deleted The document is still accessible and usable, but it will be deleted after this signal was send.

KTextEditor::Document * Kate::DocumentManager::findUrl ( const KUrl &  url) const

Get the document with the URL url.

if multiple documents match the searched url, return the first found one...

Parameters
urlthe document's URL
Returns
the document with the given url or NULL, if no such document is in the document manager's internal list.

Definition at line 60 of file documentmanager.cpp.

KTextEditor::Document * Kate::DocumentManager::openUrl ( const KUrl &  url,
const QString &  encoding = QString() 
)

Open the document url with the given encoding.

if the url is empty, a new empty document will be created

Parameters
urlthe document's url
encodingthe preferred encoding. If encoding is QString() the encoding will be guessed or the default encoding will be used.
Returns
a pointer to the created document

Definition at line 65 of file documentmanager.cpp.


The documentation for this class was generated from the following files:
  • documentmanager.h
  • documentmanager.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Sat May 9 2020 03:56:44 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kate/kate/interfaces/kate

Skip menu "kate/kate/interfaces/kate"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • 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