kdevelop/kdevplatform/interfaces
#include <idocumentcontroller.h>

Public Types | |
enum | DocumentActivation { DefaultMode = 0, DoNotActivate = 1, DoNotCreateView = 2, DoNotFocus = 4, DoNotAddToRecentOpen = 8 } |
Public Slots | |
virtual bool | closeAllDocuments ()=0 |
KDevelop::IDocument * | openDocument (const QUrl &url, const KTextEditor::Cursor &cursor, DocumentActivationParams activationParams={}, const QString &encoding={}) |
virtual KDevelop::IDocument * | openDocument (const QUrl &url, const KTextEditor::Range &range=KTextEditor::Range::invalid(), DocumentActivationParams activationParams={}, const QString &encoding={}, IDocument *buddy=nullptr)=0 |
virtual bool | openDocument (IDocument *doc, const KTextEditor::Range &range=KTextEditor::Range::invalid(), DocumentActivationParams activationParams={}, IDocument *buddy=nullptr)=0 |
virtual KDevelop::IDocument * | openDocument (const QUrl &url, const QString &prefName)=0 |
Signals | |
void | documentActivated (KDevelop::IDocument *document) |
void | documentClosed (KDevelop::IDocument *document) |
void | documentContentChanged (KDevelop::IDocument *document) |
void | documentJumpPerformed (KDevelop::IDocument *newDocument, KTextEditor::Cursor newCursor, KDevelop::IDocument *previousDocument, KTextEditor::Cursor previousCursor) |
void | documentLoaded (KDevelop::IDocument *document) |
void | documentLoadedPrepare (KDevelop::IDocument *document) |
void | documentOpened (KDevelop::IDocument *document) |
void | documentSaved (KDevelop::IDocument *document) |
void | documentStateChanged (KDevelop::IDocument *document) |
void | documentUrlChanged (KDevelop::IDocument *document) |
void | textDocumentCreated (KDevelop::IDocument *document) |
Public Member Functions | |
IDocumentController (QObject *parent) | |
virtual void | activateDocument (KDevelop::IDocument *document, const KTextEditor::Range &range=KTextEditor::Range::invalid())=0 |
virtual KDevelop::IDocument * | activeDocument () const =0 |
virtual KTextEditor::View * | activeTextDocumentView () const =0 |
virtual KDevelop::IDocument * | documentForUrl (const QUrl &url) const =0 |
virtual IDocumentFactory * | factory (const QString &mime) const =0 |
virtual KDevelop::IDocument * | openDocumentFromText (const QString &data)=0 |
virtual QList < KDevelop::IDocument * > | openDocuments () const =0 |
virtual void | registerDocumentForMimetype (const QString &, KDevelop::IDocumentFactory *)=0 |
virtual bool | saveAllDocuments (KDevelop::IDocument::DocumentSaveMode mode=KDevelop::IDocument::Default)=0 |
virtual bool | saveAllDocumentsForWindow (KParts::MainWindow *mw, IDocument::DocumentSaveMode mode, bool currentAreaOnly=false)=0 |
virtual bool | saveSomeDocuments (const QList< IDocument * > &list, KDevelop::IDocument::DocumentSaveMode mode=KDevelop::IDocument::Default)=0 |
![]() | |
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 ®Exp) 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 | |
![]() | |
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) |
![]() | |
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) |
![]() | |
QByteArray | normalizeSignalSlot (const char *signalSlot) |
![]() | |
objectName | |
Detailed Description
Allows to access the open documents and also open new ones.
Definition at line 52 of file idocumentcontroller.h.
Member Enumeration Documentation
Definition at line 55 of file idocumentcontroller.h.
Constructor & Destructor Documentation
|
explicit |
Definition at line 23 of file idocumentcontroller.cpp.
Member Function Documentation
|
pure virtual |
|
pure virtual |
Returns the currently active or focused document.
- Returns
- The active document.
|
pure virtual |
- Returns
- the KTextEditor::View of the current document, in case it is a text document
|
pure virtualslot |
|
signal |
Emitted when the document has been activated.
|
signal |
Emitted when a document has been closed.
|
signal |
This is emitted when the document content changed.
|
pure virtual |
Finds the first document object corresponding to a given url.
- Parameters
-
url The Url of the document.
- Returns
- The corresponding document, or null if not found.
|
signal |
Emitted whenever the active cursor jumps from one document+cursor to another, as e.g.
caused by a call to openDocument(..).
This is also emitted when a document is only activated. Then previousDocument is zero.
|
signal |
Emitted when a document has been loaded.
NOTE: No views exist for the document at the time this signal is emitted.
|
signal |
Emitted when a document has been loaded, but before documentLoaded(..) is emitted.
This allows parts of kdevplatform to prepare data-structures that can be used by other parts during documentLoaded(..).
|
signal |
Emitted when a document has been opened.
NOTE: The document may not be loaded from disk/network at this point. NOTE: No views exist for the document at the time this signal is emitted.
|
signal |
Emitted when a document has been saved.
|
signal |
This is emitted when the document state(the relationship between the file in the editor and the file stored on disk) changes.
|
signal |
Emitted when a document url has changed.
|
pure virtual |
|
slot |
Opens a new or existing document.
- Parameters
-
url The full Url of the document to open. cursor The location information, if applicable. activationParams Indicates whether to fully activate the document. encoding the encoding for the document, the name must be accepted by QTextCodec, if an empty encoding name is given, the document should fallback to its own default encoding, e.g. the system encoding or the global user settings
Definition at line 28 of file idocumentcontroller.cpp.
|
pure virtualslot |
Opens a new or existing document.
- Parameters
-
url The full Url of the document to open. range The range of text to select, if applicable. activationParams Indicates whether to fully activate the document encoding the encoding for the document, the name must be accepted by QTextCodec, if an empty encoding name is given, the document should fallback to its own default encoding, e.g. the system encoding or the global user settings buddy Optional buddy document. If 0, the registered IBuddyDocumentFinder for the URL's mimetype will be queried to find a fitting buddy. If a buddy was found (or passed) url
will be opened next to its buddy.
- Returns
- The opened document
|
pure virtualslot |
Opens a document from the IDocument instance.
- Parameters
-
doc The IDocument to add range The location information, if applicable. activationParams Indicates whether to fully activate the document. buddy Optional buddy document. If 0, the registered IBuddyDocumentFinder for the Documents mimetype will be queried to find a fitting buddy. If a buddy was found (or passed) url
will be opened next to its buddy.
|
pure virtualslot |
Opens a new or existing document.
- Parameters
-
url The full Url of the document to open. prefName The name of the preferred KPart to open that document
|
pure virtual |
Opens a text document containing the data
text.
|
pure virtual |
- Returns
- The list of all open documents
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
signal |
Emitted when a text document has been loaded, and the text document created.
NOTE: no views exist for the document at the time this signal is emitted.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2019 The KDE developers.
Generated on Sun Dec 15 2019 03:46:51 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.