karbon
VDocument Class Reference
#include <vdocument.h>
Inheritance diagram for VDocument:

Detailed Description
All non-visual, static doc info is in here.The karbon part uses this class. Filters can use this class as well instead of the visually oriented karbon part.
Definition at line 52 of file vdocument.h.
Public Types | |
enum | VSelectionMode { ActiveLayer, VisibleLayers, SelectedLayers, AllLayers } |
enum | { STYLE_GRAPHICAUTO = 20, STYLE_LINEAR_GRADIENT, STYLE_RADIAL_GRADIENT, STYLE_STROKE } |
Public Member Functions | |
VDocument () | |
VDocument (const VDocument &document) | |
virtual | ~VDocument () |
virtual void | draw (VPainter *painter, const KoRect *rect) const |
void | drawPage (VPainter *painter, const KoPageLayout &pl, bool drawPageMargins) const |
double | width () const |
double | height () const |
void | setWidth (double width) |
void | setHeight (double height) |
KoUnit::Unit | unit () const |
void | setUnit (KoUnit::Unit unit) |
bool | canRaiseLayer (VLayer *layer) |
bool | canLowerLayer (VLayer *layer) |
void | raiseLayer (VLayer *layer) |
void | lowerLayer (VLayer *layer) |
int | layerPos (VLayer *layer) |
void | insertLayer (VLayer *layer) |
void | removeLayer (VLayer *layer) |
void | setActiveLayer (VLayer *layer) |
VLayer * | activeLayer () const |
const VLayerList & | layers () const |
QDomDocument | saveXML () const |
virtual void | saveOasis (KoStore *store, KoXmlWriter *docWriter, KoGenStyles &mainStyles) const |
bool | loadXML (const QDomElement &doc) |
virtual bool | loadOasis (const QDomElement &element, KoOasisLoadingContext &context) |
virtual void | save (QDomElement &element) const |
virtual void | load (const QDomElement &element) |
void | loadDocumentContent (const QDomElement &doc) |
virtual VDocument * | clone () const |
virtual void | accept (VVisitor &visitor) |
VSelection * | selection () const |
VSelectionMode | selectionMode () |
void | setSelectionMode (VSelectionMode mode) |
void | append (VObject *object) |
QString | objectName (const VObject *obj) const |
void | setObjectName (const VObject *obj, const QString name) |
bool | saveAsPath () const |
void | saveAsPath (bool b) |
KarbonGridData & | grid () |
Member Enumeration Documentation
|
The different selection modes.
Definition at line 56 of file vdocument.h. |
Constructor & Destructor Documentation
|
Constructs a new document.
Definition at line 36 of file vdocument.cc. |
|
Copy constructor.
Definition at line 53 of file vdocument.cc. |
|
Destroys the document and all of the layers.
Definition at line 60 of file vdocument.cc. |
Member Function Documentation
|
Accept a VVisitor.
Reimplemented from VObject. Definition at line 313 of file vdocument.cc. |
|
Returns a pointer to the active layer.
Definition at line 212 of file vdocument.h. |
|
Appends a new object to the active layer.
Definition at line 200 of file vdocument.cc. |
|
Checks if specified layer can be lowered. A layer can be lowered if there is more than one layer and the specified layer is not already at the bottom.
Definition at line 158 of file vdocument.cc. |
|
Checks if specified layer can be raised. A layer can be raised if there is more than one layer and the specified layer is not already at the top.
Definition at line 152 of file vdocument.cc. |
|
Create an exact copy of this object.
Implements VObject. Definition at line 255 of file vdocument.cc. |
|
Draw the object to a painting device.
Reimplemented from VObject. Definition at line 125 of file vdocument.cc. |
|
Draw the document frame to a painting device.
Definition at line 66 of file vdocument.cc. |
|
Returns the document's grid.
Definition at line 289 of file vdocument.h. |
|
Returns document height.
Definition at line 104 of file vdocument.h. |
|
Inserts a new layer. The layer is appended at the end, on top of all other layers, and is activated.
Definition at line 136 of file vdocument.cc. |
|
Returns the position of the specified layer.
Definition at line 187 of file vdocument.cc. |
|
Returns the list of layers.
Definition at line 217 of file vdocument.h. |
|
Load this object's state from xml and initialize this object accordingly.
Reimplemented from VObject. Definition at line 261 of file vdocument.cc. |
|
Load this object's state from OpenDocument and initialize this object accordingly.
Reimplemented from VObject. Definition at line 307 of file vdocument.cc. |
|
Lowers the layer.
Definition at line 176 of file vdocument.cc. |
|
Returns custom name of specified object.
Definition at line 319 of file vdocument.cc. |
|
Raises the layer.
Definition at line 165 of file vdocument.cc. |
|
Removes the layer. If there is no layer left, a new layer is created, inserted and activated.
Definition at line 144 of file vdocument.cc. |
|
Save this object's state to xml.
Reimplemented from VObject. Definition at line 234 of file vdocument.cc. |
|
Returns a pointer to the selection.
Definition at line 238 of file vdocument.h. |
|
Returns the selection mode.
Definition at line 246 of file vdocument.h. |
|
Sets the active layer. The specified layer is set active, if it is found in the layer list.
Definition at line 193 of file vdocument.cc. |
|
Sets document height.
Definition at line 118 of file vdocument.h. |
|
Sets custom name of specified object. By default all object have generic names like path, rectangle or text that is defined within the object's class.
Definition at line 279 of file vdocument.h. |
|
Sets the selection mode.
Definition at line 253 of file vdocument.h. |
|
Sets document unit.
Definition at line 133 of file vdocument.h. |
|
Sets document width.
Definition at line 111 of file vdocument.h. |
|
Returns document unit.
Definition at line 125 of file vdocument.h. |
|
Returns document width.
Definition at line 97 of file vdocument.h. |
The documentation for this class was generated from the following files: