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

sublime

Sublime::Document

Sublime::Document Class Reference

#include <document.h>

Inheritance diagram for Sublime::Document:

Inheritance graph
[legend]

List of all members.


Detailed Description

Abstract base class for all Sublime documents.

Subclass from Document and implement createViewWidget() method to return a new widget for a view.

Definition at line 41 of file document.h.


Signals

void aboutToDelete (Sublime::Document *doc)
void titleChanged (Sublime::Document *doc)
void viewNumberChanged (Sublime::Document *doc)

Public Member Functions

Controller * controller () const
View * createView ()
 Document (const QString &title, Controller *controller)
virtual QString documentSpecifier () const =0
virtual QString documentType () const =0
void setTitle (const QString &newTitle)
QString title () const
const QList< View * > & views () const

Protected Member Functions

virtual QWidget * createViewWidget (QWidget *parent=0)=0
virtual View * newView (Document *doc)

Constructor & Destructor Documentation

Sublime::Document::Document ( const QString &  title,
Controller *  controller 
)

Creates a document and adds it to a controller.

Definition at line 55 of file document.cpp.


Member Function Documentation

void Sublime::Document::aboutToDelete ( Sublime::Document *  doc  )  [signal]

Emitted when the document is about to be deleted but is still in valid state.

Controller * Sublime::Document::controller (  )  const

Returns:
the controller for this document.

Definition at line 69 of file document.cpp.

View * Sublime::Document::createView (  ) 

Returns:
the new view for this document.

Note:
it will not create a widget, just return a view object.

Definition at line 74 of file document.cpp.

virtual QWidget* Sublime::Document::createViewWidget ( QWidget *  parent = 0  )  [protected, pure virtual]

Reimplement this to create and return the new widget to display this document in the view.

This method is used by View class when it is asked for its widget.

Implemented in Sublime::ToolDocument, and Sublime::UrlDocument.

virtual QString Sublime::Document::documentSpecifier (  )  const [pure virtual]

Returns:
the specifics of this document which can be written to config.

Implemented in Sublime::ToolDocument, and Sublime::UrlDocument.

virtual QString Sublime::Document::documentType (  )  const [pure virtual]

Returns:
the type of document which can be written to config.

Implemented in Sublime::ToolDocument, and Sublime::UrlDocument.

View * Sublime::Document::newView ( Document *  doc  )  [protected, virtual]

Creates and returns the new view.

Reimplement in subclasses to instantiate views of derived from Sublime::View classes.

Definition at line 98 of file document.cpp.

void Sublime::Document::setTitle ( const QString &  newTitle  ) 

Set the document title.

Definition at line 92 of file document.cpp.

QString Sublime::Document::title (  )  const

Returns:
the document title.

Definition at line 87 of file document.cpp.

void Sublime::Document::titleChanged ( Sublime::Document *  doc  )  [signal]

Emitted when the document's title is changed.

void Sublime::Document::viewNumberChanged ( Sublime::Document *  doc  )  [signal]

Emitted when the view is added or deleted.

Use Document::views to find out which views and how many of them are still there.

const QList< View * > & Sublime::Document::views (  )  const

Returns:
the list of all views in all areas for this document.

Definition at line 82 of file document.cpp.


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

sublime

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

KDevelop Platform Libraries

Skip menu "KDevelop Platform Libraries"
  • interfaces
  • language
  •   duchain
  •   editor
  • outputview
  • 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