• Skip to content
  • Skip to link menu
KDE 4.2 API Reference
  • KDE API Reference
  • KDevelop Platform Libraries
  • Sitemap
  • Contact Us
 

shell

KDevelop::DocumentController

KDevelop::DocumentController Class Reference

#include <documentcontroller.h>

Inherits IDocumentController.

List of all members.


Detailed Description

Interface to control open documents.

The document controller manages open documents in the IDE. Open documents are usually editors, GUI designers, html documentation etc.

Please note that this interface gives access to documents and not to their views. It is possible that more than 1 view is shown in KDevelop for a document.

Definition at line 54 of file documentcontroller.h.


Public Slots

virtual void closeAllDocuments ()
void closeAllOtherDocuments ()
virtual void closeDocument (const KUrl &url)
void fileClose ()
virtual Q_SCRIPTABLE IDocument * openDocument (const KUrl &url, const KTextEditor::Range &range=KTextEditor::Range::invalid(), DocumentActivationParams activationParams=0)
virtual Q_SCRIPTABLE IDocument * openDocumentFromText (const QString &data)
void reloadAllDocuments ()
void slotSaveAllDocuments ()

Public Member Functions

virtual void activateDocument (IDocument *document, const KTextEditor::Range &range=KTextEditor::Range::invalid())
virtual IDocument * activeDocument () const
void cleanup ()
 DocumentController (QObject *parent=0)
virtual IDocument * documentForUrl (const KUrl &url) const
QString documentType (Sublime::Document *document) const
virtual QStringList documentTypes () const
virtual QString encoding () const
void initialize ()
void notifyDocumentClosed (IDocument *doc)
virtual QList< IDocument * > openDocuments () const
virtual void registerDocumentForMimetype (const QString &, KDevelop::IDocumentFactory *)
virtual bool saveAllDocuments (IDocument::DocumentSaveMode mode)
bool saveAllDocumentsForWindow (MainWindow *mw, IDocument::DocumentSaveMode mode)
virtual void setEncoding (const QString &encoding)

Constructor & Destructor Documentation

KDevelop::DocumentController::DocumentController ( QObject *  parent = 0  ) 

Constructor.

Parameters:
parent The parent object.

Definition at line 148 of file documentcontroller.cpp.


Member Function Documentation

IDocument * KDevelop::DocumentController::activeDocument (  )  const [virtual]

Refers to the document currently active or focused.

Returns:
The active document.

Definition at line 663 of file documentcontroller.cpp.

IDocument * KDevelop::DocumentController::documentForUrl ( const KUrl &  url  )  const [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.

Definition at line 472 of file documentcontroller.cpp.

IDocument * KDevelop::DocumentController::openDocument ( const KUrl &  url,
const KTextEditor::Range &  range = KTextEditor::Range::invalid(),
DocumentActivationParams  activationParams = 0 
) [virtual, slot]

Opens a new or existing document.

Parameters:
url The full Url of the document to open. If it is empty, a dialog to choose the document will be opened.
range The location information, if applicable.
activate Indicates whether to fully activate the document.

Definition at line 268 of file documentcontroller.cpp.

QList< IDocument * > KDevelop::DocumentController::openDocuments (  )  const [virtual]

Returns:
The list of open documents

Definition at line 480 of file documentcontroller.cpp.

bool KDevelop::DocumentController::saveAllDocuments ( IDocument::DocumentSaveMode  mode  )  [virtual]

Request the document controller to save all documents.

If the mode is not IDocument::Silent, ask the user which documents to save. Returns false if the user cancels the save dialog.

Definition at line 507 of file documentcontroller.cpp.

void KDevelop::DocumentController::setEncoding ( const QString &  encoding  )  [virtual]

Call this before a call to editDocument to set the encoding of the document to be opened.

Parameters:
encoding The encoding to open as.

Definition at line 242 of file documentcontroller.cpp.


The documentation for this class was generated from the following files:
  • documentcontroller.h
  • documentcontroller.cpp

shell

Skip menu "shell"
  • Main Page
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Class Members
  • Related Pages

KDevelop Platform Libraries

Skip menu "KDevelop Platform Libraries"
  • interfaces
  • language
  •   codegen
  •   duchain
  •   editor
  • outputview
  •     interfaces
  • project
  • shell
  • sublime
  • util
  • vcs
Generated for KDevelop Platform Libraries by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal