32#include "karbon_grid_data.h"
33#include <koffice_export.h>
41typedef TQPtrList<VLayer> VLayerList;
42typedef TQPtrListIterator<VLayer> VLayerListIterator;
80 virtual void draw( VPainter* painter,
const KoRect* rect )
const;
90 void drawPage( VPainter *painter,
const KoPageLayout &pl,
bool drawPageMargins )
const;
97 double width()
const {
return m_width; }
104 double height()
const {
return m_height; }
145 bool canRaiseLayer(
VLayer* layer );
156 bool canLowerLayer(
VLayer* layer );
163 void raiseLayer(
VLayer* layer );
170 void lowerLayer(
VLayer* layer );
178 int layerPos(
VLayer* layer );
187 void insertLayer(
VLayer* layer );
196 void removeLayer(
VLayer* layer );
205 void setActiveLayer(
VLayer* layer );
217 const VLayerList&
layers()
const {
return m_layers; }
219 TQDomDocument saveXML()
const;
220 virtual void saveOasis( KoStore *store, KoXmlWriter *docWriter, KoGenStyles &mainStyles )
const;
221 enum { STYLE_GRAPHICAUTO = 20, STYLE_LINEAR_GRADIENT, STYLE_RADIAL_GRADIENT, STYLE_STROKE };
222 bool loadXML(
const TQDomElement& doc );
223 virtual bool loadOasis(
const TQDomElement &element, KoOasisLoadingContext &context );
224 virtual void save( TQDomElement& element )
const;
225 virtual void load(
const TQDomElement& element );
226 void loadDocumentContent(
const TQDomElement& doc );
228 virtual VDocument*
clone()
const;
230 virtual void accept( VVisitor& visitor );
239 {
return m_selection; }
260 void append(
VObject*
object );
268 TQString objectName(
const VObject *obj )
const;
281 bool saveAsPath()
const {
return m_saveAsPath; }
282 void saveAsPath(
bool b ) { m_saveAsPath = b; }
289 KarbonGridData &
grid() {
return m_gridData; }
311 VSelectionMode m_selectionMode;
318 TQMap<const VObject *, TQString> m_objectNames;
323 KarbonGridData m_gridData;
All non-visual, static doc info is in here.
void setObjectName(const VObject *obj, const TQString name)
Sets custom name of specified object.
void setHeight(double height)
Sets document height.
double width() const
Returns document width.
VDocument()
Constructs a new document.
KarbonGridData & grid()
Returns the document's grid.
void setSelectionMode(VSelectionMode mode)
Sets the selection mode.
VLayer * activeLayer() const
Returns a pointer to the active layer.
void setWidth(double width)
Sets document width.
VSelection * selection() const
Returns a pointer to the selection.
KoUnit::Unit unit() const
Returns document unit.
VSelectionMode
The different selection modes.
@ AllLayers
selection within all layers
@ ActiveLayer
selection within the active layer
@ VisibleLayers
selection within all visible layers
@ SelectedLayers
selection within all selected layers
const VLayerList & layers() const
Returns the list of layers.
void setUnit(KoUnit::Unit unit)
Sets document unit.
double height() const
Returns document height.
VSelectionMode selectionMode()
Returns the selection mode.
VLayer manages a set of vobjects.
The base class for all karbon objects.
VObject(VObject *parent, VState state=edit)
Constructs a new object that is child of parent and has the given state.
virtual VObject * clone() const =0
Create an exact copy of this object.
virtual void accept(VVisitor &)
Accept a VVisitor.
virtual void saveOasis(KoStore *store, KoXmlWriter *docWriter, KoGenStyles &mainStyles, int &index) const
Save this object's state to OpenDocument.
virtual TQString name() const
Returns the name of the object.
KoRect m_boundingBox
the object's bounding box
virtual void load(const TQDomElement &element)
Load this object's state from xml and initialize this object accordingly.
virtual void save(TQDomElement &element) const
Save this object's state to xml.
virtual bool loadOasis(const TQDomElement &element, KoOasisLoadingContext &context)
Load this object's state from OpenDocument and initialize this object accordingly.
virtual void draw(VPainter *painter, const KoRect *rect=0L) const
Draw the object to a painting device.
VSelection manages a set of selected vobjects.