QCAD
Open Source 2D CAD
RExporter Class Referenceabstract

Abstract base class for exporters. More...

#include <RExporter.h>

Inheritance diagram for RExporter:
RArcExporter RFileExporter RGraphicsScene RPainterPathExporter RShapesExporter RDxfExporter RGraphicsSceneQt

Public Member Functions

virtual void endEntity ()
 
virtual void endExport ()
 Called at the end of a completed export. More...
 
virtual void exportArc (const RArc &arc, double offset=RNANDOUBLE)
 
virtual void exportArcSegment (const RArc &arc, bool allowForZeroLength=false)
 
virtual void exportBlock (RBlock &)
 
virtual void exportBlock (RBlock::Id blockId)
 
virtual void exportBlocks ()
 
virtual void exportBoundingBoxPaths (const QList< RPainterPath > &paths)
 
virtual void exportBox (const RBox &box)
 Exports the surfaces of the given box. More...
 
virtual void exportCircle (const RCircle &circle)
 Exports a circle with the current attributes. More...
 
virtual void exportClipRectangle (const RBox &clipRectangle, bool forceSelected=false)
 
virtual void exportCurrentEntity (bool preview=false, bool forceSelected=false)
 The default implementation calls the REntity::exportEntity() function of the entity. More...
 
virtual bool exportDocument ()
 Exports the visual representation of all objects (including entities) of the document. More...
 
virtual void exportDocumentSetting (const QString &key, const QVariant &value, const QString &dictionaryName="QCAD_OBJECTS")
 
virtual bool exportDocumentSettings ()
 
virtual void exportEllipse (const REllipse &ellipse, double offset=RNANDOUBLE)
 Exports an ellipse with the current attributes. More...
 
virtual void exportEndTransform ()
 
virtual void exportEntities (bool allBlocks=true, bool undone=false)
 
virtual void exportEntities (const RBox &box)
 Exports the visual representation of all entities that are completely or partly inside the given area. More...
 
virtual void exportEntities (QSet< REntity::Id > &entityIds, bool allBlocks=true)
 Calls exportEntity() for all given entities. More...
 
virtual void exportEntity (REntity &entity, bool preview=false, bool allBlocks=true, bool forceSelected=false)
 Exports the given entity as part of a block definition to be reused by block references. More...
 
virtual void exportEntity (REntity::Id entityId, bool allBlocks=true, bool forceSelected=false)
 Calls exportEntity(REntity*) for the entity with the given ID. More...
 
virtual void exportExplodable (const RExplodable &explodable, double offset=RNANDOUBLE)
 
virtual void exportImage (const RImageData &image, bool forceSelected=false)
 
virtual void exportIntListWithName (const QString &dictionaryName, const QString &name, const QString &listName, QList< int64_t > &values)
 
virtual void exportLayer (RLayer &)
 
virtual void exportLayer (RLayer::Id layerId)
 
virtual void exportLayers ()
 
virtual void exportLayerState (RLayerState &)
 
virtual void exportLayerStates ()
 
virtual double exportLine (const RLine &line, double offset=RNANDOUBLE)
 Exports a line with the current attributes. More...
 
virtual void exportLineSegment (const RLine &line, double angle=RNANDOUBLE)=0
 Exports a line segment (a line without pattern). More...
 
virtual void exportLinetype (RLinetype &)
 
virtual void exportLinetypes ()
 
virtual bool exportLinetypeShape (QList< RPainterPath > &pps, const RLine &line, double total, double length, double angle, const RVector &cursor)
 
virtual void exportPainterPaths (const QList< RPainterPath > &paths, double angle, const RVector &pos)
 
virtual void exportPainterPaths (const QList< RPainterPath > &paths, double z=0.0)
 
virtual void exportPainterPathSource (const RPainterPathSource &pathSource, double z=0.0)
 
virtual void exportPoint (const RPoint &point)=0
 Exports a point with the current attributes. More...
 
virtual void exportPolyline (const RPolyline &polyline, bool polylineGen=true, double offset=RNANDOUBLE)
 
virtual void exportQuad (const RVector &p1, const RVector &p2, const RVector &p3, const RVector &p4)
 Exports a quadrilateral with the current attributes. More...
 
virtual void exportRay (const RRay &ray)=0
 Exports an infinite ray. More...
 
virtual void exportRectangle (const RVector &p1, const RVector &p2)
 Exports a rectangle with the current attributes. More...
 
virtual void exportShape (QSharedPointer< RShape > shape)
 Exports the given shapes as part of the geometry of the current entity. More...
 
virtual void exportShapes (const QList< QSharedPointer< RShape > > &shapes)
 Exports the given shapes as part of the geometry of the current entity. More...
 
virtual void exportShapeSegment (QSharedPointer< RShape > shape, double angle)
 
virtual void exportSpline (const RSpline &spline, double offset=RNANDOUBLE)
 
virtual void exportSplineSegment (const RSpline &spline)
 
virtual QList< RPainterPathexportText (const RTextBasedData &text, bool forceSelected=false)
 
virtual void exportThickPolyline (const RPolyline &polyline)
 
virtual void exportTransform (const RTransform &t)
 
virtual void exportTriangle (const RTriangle &triangle)=0
 Exports a triangle with the current attributes. More...
 
virtual void exportVerticalQuad (const RVector &p1, const RVector &p2, double height)
 Exports a vertical quadrilateral with the two given base points and the given height. More...
 
virtual void exportView (RView &)
 
virtual void exportView (RView::Id viewId)
 
virtual void exportViews ()
 
virtual void exportXLine (const RXLine &xLine)=0
 Exports an infinite line. More...
 
virtual REntitygetBlockRefOrEntity ()
 
virtual REntity::Id getBlockRefOrEntityId ()
 
virtual QStack< REntity * > getBlockRefViewportStack () const
 
virtual QBrush getBrush ()
 
virtual QBrush getBrush (const RPainterPath &path)
 
bool getClipping () const
 
virtual RColor getColor (bool resolve)
 
virtual RColor getColor (const RColor &unresolvedColor)
 
virtual REntitygetCurrentBlockRef () const
 
virtual double getCurrentPixelSizeHint () const
 
virtual RViewportEntitygetCurrentViewport () const
 
RDocumentgetDocument () const
 \nonscriptoverwritable More...
 
bool getDraftMode () const
 
virtual REntitygetEntity ()
 
virtual const REntitygetEntity () const
 
virtual QSharedPointer< RLayergetEntityLayer (REntity &entity)
 
QStack< REntity * > getEntityStack ()
 
QString getErrorMessage () const
 
virtual RLinetypePattern getLinetypePattern ()
 
virtual double getLineTypePatternScale (const RLinetypePattern &p) const
 
virtual QPen getPen ()
 
virtual QPen getPen (const RPainterPath &path)
 
double getPixelSizeHint () const
 
bool getPixelUnit () const
 
bool getPixelWidth () const
 
RS::ProjectionRenderingHint getProjectionRenderingHint ()
 
virtual bool getScreenBasedLinetypes () const
 
bool getTwoColorSelectedMode () const
 
virtual bool isEntitySelected ()
 
virtual bool isPatternContinuous (const RLinetypePattern &p)
 
virtual bool isTextRenderedAsText ()
 Override to force text rendering mode. More...
 
virtual bool isVisible (REntity &entity)
 
bool isVisualExporter () const
 
void popEntity ()
 
void pushEntity (REntity *e)
 
 RExporter ()
 
 RExporter (RDocument &document, RMessageHandler *messageHandler=NULL, RProgressHandler *progressHandler=NULL)
 
void setBlockSource (RDocument *bs)
 
virtual void setBrush (const QBrush &brush)
 
virtual void setBrushStyle (Qt::BrushStyle brushStyle)
 
void setClipping (bool on)
 
virtual void setColor (const RColor &color)
 
virtual void setColor (float r, float g, float b, float a=1.0f)
 Sets the current export color in RGB and Alpha. More...
 
virtual void setDashPattern (const QVector< qreal > &dashes)
 
void setDraftMode (bool on)
 
virtual void setEntityAttributes (bool forceSelected=false)
 
void setLayerSource (RDocument *ls)
 
virtual void setLinetypeId (RLinetype::Id ltId)
 
virtual void setLinetypePattern (const RLinetypePattern &ltPattern)
 
virtual void setLineweight (RLineweight::Lineweight weight)
 
virtual void setPen (const QPen &pen)
 Sets the current pen (currentPen). More...
 
void setPixelSizeHint (double v)
 
void setPixelUnit (bool on)
 
void setPixelWidth (bool on)
 
void setProjectionRenderingHint (RS::ProjectionRenderingHint p)
 Sets a rendering hint for the current projection used for exports. More...
 
void setScreenBasedLinetypes (bool on)
 
virtual void setStyle (Qt::PenStyle penStyle)
 
void setTwoColorSelectedMode (bool on)
 
void setVisualExporter (bool on)
 
virtual void startEntity (bool)
 
virtual void startExport ()
 Called to start a new, complete export. More...
 
void toggleDraftMode ()
 
void toggleScreenBasedLinetypes ()
 
virtual void unexportEntity (REntity::Id entityId)
 This is called for entities for which an export was requested but which cannot be instantiated because they either do not exist (anymore) in the DB or they are currently undone. More...
 
virtual ~RExporter ()
 

Protected Attributes

QStack< REntity * > blockRefViewportStack
 
QStack< double > blockScales
 
RDocumentblockSource
 
bool clipping
 
QBrush currentBrush
 
RLayercurrentLayer
 
RLinetypePattern currentLinetypePattern
 
QPen currentPen
 
RDocumentdocument
 
bool draftMode
 
QStack< REntity * > entityStack
 
QString errorMessage
 
RDocumentlayerSource
 
Qt::PenCapStyle penCapStyle
 
double pixelSizeHint
 
bool pixelUnit
 
bool pixelWidth
 
bool screenBasedLinetypes
 
QTransform transform
 
bool twoColorSelectedMode
 
bool visualExporter
 

Private Member Functions

void init ()
 

Private Attributes

RS::ProjectionRenderingHint projectionRenderingHint
 

Detailed Description

Abstract base class for exporters.

Exporters export documents into files, views, etc.

Scriptable:\nThis class is available in script environments.\n

Constructor & Destructor Documentation

◆ RExporter() [1/2]

RExporter::RExporter ( )

◆ RExporter() [2/2]

RExporter::RExporter ( RDocument document,
RMessageHandler messageHandler = NULL,
RProgressHandler progressHandler = NULL 
)

◆ ~RExporter()

RExporter::~RExporter ( )
virtual

Member Function Documentation

◆ endEntity()

virtual void RExporter::endEntity ( )
inlinevirtual

◆ endExport()

void RExporter::endExport ( )
virtual

Called at the end of a completed export.

The default implementation notifies listeners.

◆ exportArc()

void RExporter::exportArc ( const RArc arc,
double  offset = RNANDOUBLE 
)
virtual

Reimplemented in RGraphicsSceneQt.

◆ exportArcSegment()

void RExporter::exportArcSegment ( const RArc arc,
bool  allowForZeroLength = false 
)
virtual

Reimplemented in RDxfExporter, and RGraphicsSceneQt.

◆ exportBlock() [1/2]

virtual void RExporter::exportBlock ( RBlock )
inlinevirtual

◆ exportBlock() [2/2]

void RExporter::exportBlock ( RBlock::Id  blockId)
virtual

◆ exportBlocks()

void RExporter::exportBlocks ( )
virtual

◆ exportBoundingBoxPaths()

void RExporter::exportBoundingBoxPaths ( const QList< RPainterPath > &  paths)
virtual

◆ exportBox()

void RExporter::exportBox ( const RBox box)
virtual

Exports the surfaces of the given box.

This is a convenience function that exports 12 triangles but may also be re-implemented to do something else.

◆ exportCircle()

void RExporter::exportCircle ( const RCircle circle)
virtual

Exports a circle with the current attributes.

The default implementation calls exportArc with a full circle arc.

◆ exportClipRectangle()

void RExporter::exportClipRectangle ( const RBox clipRectangle,
bool  forceSelected = false 
)
virtual

Reimplemented in RGraphicsSceneQt.

◆ exportCurrentEntity()

void RExporter::exportCurrentEntity ( bool  preview = false,
bool  forceSelected = false 
)
virtual

The default implementation calls the REntity::exportEntity() function of the entity.

This method may use the currentEntity stack to access the entity that is currently being exported. Exporters can choose to reimplement this function to export an entity in a target platform specific manner (e.g. to optimize things for a specific platform).

Reimplemented in RGraphicsScene.

◆ exportDocument()

bool RExporter::exportDocument ( )
virtual

Exports the visual representation of all objects (including entities) of the document.

◆ exportDocumentSetting()

void RExporter::exportDocumentSetting ( const QString &  key,
const QVariant &  value,
const QString &  dictionaryName = "QCAD_OBJECTS" 
)
virtual

◆ exportDocumentSettings()

bool RExporter::exportDocumentSettings ( )
virtual

Reimplemented in RGraphicsScene.

◆ exportEllipse()

void RExporter::exportEllipse ( const REllipse ellipse,
double  offset = RNANDOUBLE 
)
virtual

Exports an ellipse with the current attributes.

Todo:
switch from line based interpolation to arcs.

◆ exportEndTransform()

void RExporter::exportEndTransform ( )
virtual

Reimplemented in RGraphicsSceneQt.

◆ exportEntities() [1/3]

void RExporter::exportEntities ( bool  allBlocks = true,
bool  undone = false 
)
virtual

◆ exportEntities() [2/3]

void RExporter::exportEntities ( const RBox box)
virtual

Exports the visual representation of all entities that are completely or partly inside the given area.

◆ exportEntities() [3/3]

void RExporter::exportEntities ( QSet< REntity::Id > &  entityIds,
bool  allBlocks = true 
)
virtual

Calls exportEntity() for all given entities.

◆ exportEntity() [1/2]

void RExporter::exportEntity ( REntity entity,
bool  preview = false,
bool  allBlocks = true,
bool  forceSelected = false 
)
virtual

Exports the given entity as part of a block definition to be reused by block references.

This is called for entities which have no attributes ByBlock. Sets the current entity to the given entity and calls exportEntity(). Note that entity is a temporary clone.

\forceSelected Force selection, used to export entities as part of a selected block reference.

◆ exportEntity() [2/2]

void RExporter::exportEntity ( REntity::Id  entityId,
bool  allBlocks = true,
bool  forceSelected = false 
)
virtual

Calls exportEntity(REntity*) for the entity with the given ID.

◆ exportExplodable()

void RExporter::exportExplodable ( const RExplodable explodable,
double  offset = RNANDOUBLE 
)
virtual
Non-Scriptable:\nThis function is not available in script environments.\n

◆ exportImage()

void RExporter::exportImage ( const RImageData image,
bool  forceSelected = false 
)
virtual

Reimplemented in RGraphicsSceneQt.

◆ exportIntListWithName()

void RExporter::exportIntListWithName ( const QString &  dictionaryName,
const QString &  name,
const QString &  listName,
QList< int64_t > &  values 
)
virtual

◆ exportLayer() [1/2]

virtual void RExporter::exportLayer ( RLayer )
inlinevirtual

◆ exportLayer() [2/2]

void RExporter::exportLayer ( RLayer::Id  layerId)
virtual

◆ exportLayers()

void RExporter::exportLayers ( )
virtual

◆ exportLayerState()

virtual void RExporter::exportLayerState ( RLayerState )
inlinevirtual

◆ exportLayerStates()

void RExporter::exportLayerStates ( )
virtual

◆ exportLine()

double RExporter::exportLine ( const RLine line,
double  offset = RNANDOUBLE 
)
virtual

Exports a line with the current attributes.

Reimplemented in RGraphicsSceneQt.

◆ exportLineSegment()

virtual void RExporter::exportLineSegment ( const RLine line,
double  angle = RNANDOUBLE 
)
pure virtual

Exports a line segment (a line without pattern).

This is called from the standard implementation of exportLine for every dash in a dashed line.

Implemented in RDxfExporter, RGraphicsSceneQt, RPainterPathExporter, RShapesExporter, and RArcExporter.

◆ exportLinetype()

virtual void RExporter::exportLinetype ( RLinetype )
inlinevirtual

◆ exportLinetypes()

void RExporter::exportLinetypes ( )
virtual

◆ exportLinetypeShape()

bool RExporter::exportLinetypeShape ( QList< RPainterPath > &  pps,
const RLine line,
double  total,
double  length,
double  angle,
const RVector cursor 
)
virtual
Non-Scriptable:\nThis function is not available in script environments.\n

◆ exportPainterPaths() [1/2]

void RExporter::exportPainterPaths ( const QList< RPainterPath > &  paths,
double  angle,
const RVector pos 
)
virtual

Reimplemented in RShapesExporter, and RArcExporter.

◆ exportPainterPaths() [2/2]

void RExporter::exportPainterPaths ( const QList< RPainterPath > &  paths,
double  z = 0.0 
)
virtual

◆ exportPainterPathSource()

void RExporter::exportPainterPathSource ( const RPainterPathSource pathSource,
double  z = 0.0 
)
virtual
Non-Scriptable:\nThis function is not available in script environments.\n

◆ exportPoint()

virtual void RExporter::exportPoint ( const RPoint point)
pure virtual

Exports a point with the current attributes.

Implemented in RDxfExporter, RGraphicsSceneQt, RPainterPathExporter, RShapesExporter, and RArcExporter.

◆ exportPolyline()

void RExporter::exportPolyline ( const RPolyline polyline,
bool  polylineGen = true,
double  offset = RNANDOUBLE 
)
virtual
Parameters
polylineGenTrue: use pattern along whole polyline, False: pattern per segment.

Reimplemented in RGraphicsSceneQt.

◆ exportQuad()

void RExporter::exportQuad ( const RVector p1,
const RVector p2,
const RVector p3,
const RVector p4 
)
virtual

Exports a quadrilateral with the current attributes.

This is a convenience function that exports two triangles but may also be re-implemented to do something else.

◆ exportRay()

virtual void RExporter::exportRay ( const RRay ray)
pure virtual

Exports an infinite ray.

Used for rays.

Implemented in RDxfExporter, RGraphicsSceneQt, RPainterPathExporter, RShapesExporter, and RArcExporter.

◆ exportRectangle()

void RExporter::exportRectangle ( const RVector p1,
const RVector p2 
)
virtual

Exports a rectangle with the current attributes.

This is a convenience function that exports two triangles but may also be re-implemented to do something else.

Reimplemented in RGraphicsSceneQt.

◆ exportShape()

void RExporter::exportShape ( QSharedPointer< RShape shape)
virtual

Exports the given shapes as part of the geometry of the current entity.

◆ exportShapes()

void RExporter::exportShapes ( const QList< QSharedPointer< RShape > > &  shapes)
virtual

Exports the given shapes as part of the geometry of the current entity.

Todo:
support more shapes.

◆ exportShapeSegment()

void RExporter::exportShapeSegment ( QSharedPointer< RShape shape,
double  angle 
)
virtual

◆ exportSpline()

void RExporter::exportSpline ( const RSpline spline,
double  offset = RNANDOUBLE 
)
virtual

Reimplemented in RGraphicsSceneQt.

◆ exportSplineSegment()

void RExporter::exportSplineSegment ( const RSpline spline)
virtual

◆ exportText()

QList< RPainterPath > RExporter::exportText ( const RTextBasedData text,
bool  forceSelected = false 
)
virtual

Reimplemented in RGraphicsSceneQt.

◆ exportThickPolyline()

virtual void RExporter::exportThickPolyline ( const RPolyline polyline)
inlinevirtual

Reimplemented in RGraphicsSceneQt.

◆ exportTransform()

void RExporter::exportTransform ( const RTransform t)
virtual

Reimplemented in RGraphicsSceneQt.

◆ exportTriangle()

virtual void RExporter::exportTriangle ( const RTriangle triangle)
pure virtual

Exports a triangle with the current attributes.

Implemented in RDxfExporter, RGraphicsSceneQt, RPainterPathExporter, RShapesExporter, and RArcExporter.

◆ exportVerticalQuad()

void RExporter::exportVerticalQuad ( const RVector p1,
const RVector p2,
double  height 
)
virtual

Exports a vertical quadrilateral with the two given base points and the given height.

◆ exportView() [1/2]

virtual void RExporter::exportView ( RView )
inlinevirtual

◆ exportView() [2/2]

void RExporter::exportView ( RView::Id  viewId)
virtual

◆ exportViews()

void RExporter::exportViews ( )
virtual

◆ exportXLine()

virtual void RExporter::exportXLine ( const RXLine xLine)
pure virtual

Exports an infinite line.

Used for xlines (construction lines).

Implemented in RDxfExporter, RGraphicsSceneQt, RPainterPathExporter, RShapesExporter, and RArcExporter.

◆ getBlockRefOrEntity()

REntity * RExporter::getBlockRefOrEntity ( )
virtual
Returns
Block reference that is currently being exported or if no block reference is being exported, the current entity that is being exported.

◆ getBlockRefOrEntityId()

REntity::Id RExporter::getBlockRefOrEntityId ( )
virtual

◆ getBlockRefViewportStack()

QStack< REntity * > RExporter::getBlockRefViewportStack ( ) const
virtual

◆ getBrush() [1/2]

QBrush RExporter::getBrush ( )
virtual

◆ getBrush() [2/2]

QBrush RExporter::getBrush ( const RPainterPath path)
virtual

◆ getClipping()

bool RExporter::getClipping ( ) const

◆ getColor() [1/2]

RColor RExporter::getColor ( bool  resolve)
virtual

◆ getColor() [2/2]

RColor RExporter::getColor ( const RColor unresolvedColor)
virtual

◆ getCurrentBlockRef()

REntity * RExporter::getCurrentBlockRef ( ) const
virtual

◆ getCurrentPixelSizeHint()

double RExporter::getCurrentPixelSizeHint ( ) const
virtual
Returns
pixel size hint in context of current block.

◆ getCurrentViewport()

RViewportEntity * RExporter::getCurrentViewport ( ) const
virtual

◆ getDocument()

RDocument & RExporter::getDocument ( ) const

\nonscriptoverwritable

Returns
The document that is currently being exported.

◆ getDraftMode()

bool RExporter::getDraftMode ( ) const
inline

◆ getEntity() [1/2]

REntity * RExporter::getEntity ( )
virtual
Returns
Pointer to the entity that is currently being exported.

◆ getEntity() [2/2]

const REntity * RExporter::getEntity ( ) const
virtual
Non-Scriptable:\nThis function is not available in script environments.\n
Returns
Pointer to the entity that is currently being exported.

◆ getEntityLayer()

QSharedPointer< RLayer > RExporter::getEntityLayer ( REntity entity)
virtual

◆ getEntityStack()

QStack< REntity * > RExporter::getEntityStack ( )

◆ getErrorMessage()

QString RExporter::getErrorMessage ( ) const

◆ getLinetypePattern()

RLinetypePattern RExporter::getLinetypePattern ( )
virtual

Reimplemented in RShapesExporter, and RArcExporter.

◆ getLineTypePatternScale()

double RExporter::getLineTypePatternScale ( const RLinetypePattern p) const
virtual

◆ getPen() [1/2]

QPen RExporter::getPen ( )
virtual
Returns
Current pen.

◆ getPen() [2/2]

QPen RExporter::getPen ( const RPainterPath path)
virtual

◆ getPixelSizeHint()

double RExporter::getPixelSizeHint ( ) const
inline

◆ getPixelUnit()

bool RExporter::getPixelUnit ( ) const
inline

◆ getPixelWidth()

bool RExporter::getPixelWidth ( ) const
inline

◆ getProjectionRenderingHint()

RS::ProjectionRenderingHint RExporter::getProjectionRenderingHint ( )
Returns
The current projection for exports.

◆ getScreenBasedLinetypes()

virtual bool RExporter::getScreenBasedLinetypes ( ) const
inlinevirtual

Reimplemented in RGraphicsSceneQt.

◆ getTwoColorSelectedMode()

bool RExporter::getTwoColorSelectedMode ( ) const
inline

◆ init()

void RExporter::init ( )
private

◆ isEntitySelected()

bool RExporter::isEntitySelected ( )
virtual
Returns
True if there is a current entity and it is selected, false otherwise.

◆ isPatternContinuous()

bool RExporter::isPatternContinuous ( const RLinetypePattern p)
virtual

◆ isTextRenderedAsText()

virtual bool RExporter::isTextRenderedAsText ( )
inlinevirtual

Override to force text rendering mode.

◆ isVisible()

bool RExporter::isVisible ( REntity entity)
virtual

◆ isVisualExporter()

bool RExporter::isVisualExporter ( ) const
inline
Returns
True if this exporter exports only visible entities (on visible layers).

◆ popEntity()

void RExporter::popEntity ( )

◆ pushEntity()

void RExporter::pushEntity ( REntity e)

◆ setBlockSource()

void RExporter::setBlockSource ( RDocument bs)

◆ setBrush()

void RExporter::setBrush ( const QBrush &  brush)
virtual

◆ setBrushStyle()

void RExporter::setBrushStyle ( Qt::BrushStyle  brushStyle)
virtual

◆ setClipping()

void RExporter::setClipping ( bool  on)
Returns
Clip rectangle due to current viewport being exported.

◆ setColor() [1/2]

void RExporter::setColor ( const RColor color)
virtual

◆ setColor() [2/2]

void RExporter::setColor ( float  r,
float  g,
float  b,
float  a = 1.0f 
)
virtual

Sets the current export color in RGB and Alpha.

All components are in the range of 0.0 <= component <= 1.0. If isColorFixed is true, this function does nothing.

◆ setDashPattern()

void RExporter::setDashPattern ( const QVector< qreal > &  dashes)
virtual

◆ setDraftMode()

void RExporter::setDraftMode ( bool  on)

◆ setEntityAttributes()

void RExporter::setEntityAttributes ( bool  forceSelected = false)
virtual

◆ setLayerSource()

void RExporter::setLayerSource ( RDocument ls)

◆ setLinetypeId()

void RExporter::setLinetypeId ( RLinetype::Id  ltId)
virtual

◆ setLinetypePattern()

void RExporter::setLinetypePattern ( const RLinetypePattern ltPattern)
virtual

◆ setLineweight()

void RExporter::setLineweight ( RLineweight::Lineweight  weight)
virtual

◆ setPen()

void RExporter::setPen ( const QPen &  pen)
virtual

Sets the current pen (currentPen).

◆ setPixelSizeHint()

void RExporter::setPixelSizeHint ( double  v)
inline

◆ setPixelUnit()

void RExporter::setPixelUnit ( bool  on)
inline

◆ setPixelWidth()

void RExporter::setPixelWidth ( bool  on)
inline

◆ setProjectionRenderingHint()

void RExporter::setProjectionRenderingHint ( RS::ProjectionRenderingHint  p)

Sets a rendering hint for the current projection used for exports.

This is a rendering hint for the exporting entity to decide how its geometry should be rendered. For example a wall with a window exports itself differently when viewed from top than when viewed from the front or side. Note that the rendering difference is not only in the projection in a mathematical sense, but also in what edges are exported, how they are visualized and what types of shapes are exported (lines and arcs or triangles).

This rendering hint may also be used to determine what grid is appropriate to display for exporters that export to a graphics scene.

The mathematical projection is defined separately by setProjection().

◆ setScreenBasedLinetypes()

void RExporter::setScreenBasedLinetypes ( bool  on)

◆ setStyle()

void RExporter::setStyle ( Qt::PenStyle  penStyle)
virtual

◆ setTwoColorSelectedMode()

void RExporter::setTwoColorSelectedMode ( bool  on)
inline

◆ setVisualExporter()

void RExporter::setVisualExporter ( bool  on)
inline

◆ startEntity()

virtual void RExporter::startEntity ( bool  )
inlinevirtual

Reimplemented in RGraphicsSceneQt.

◆ startExport()

void RExporter::startExport ( )
virtual

Called to start a new, complete export.

Implementors can for example clear any stored exported entities or caches. The default implementation does nothing.

◆ toggleDraftMode()

void RExporter::toggleDraftMode ( )
inline

◆ toggleScreenBasedLinetypes()

void RExporter::toggleScreenBasedLinetypes ( )
inline

◆ unexportEntity()

void RExporter::unexportEntity ( REntity::Id  entityId)
virtual

This is called for entities for which an export was requested but which cannot be instantiated because they either do not exist (anymore) in the DB or they are currently undone.

Reimplemented in RGraphicsScene, and RGraphicsSceneQt.

Member Data Documentation

◆ blockRefViewportStack

QStack<REntity*> RExporter::blockRefViewportStack
protected

◆ blockScales

QStack<double> RExporter::blockScales
protected

◆ blockSource

RDocument* RExporter::blockSource
protected

◆ clipping

bool RExporter::clipping
protected

◆ currentBrush

QBrush RExporter::currentBrush
protected

◆ currentLayer

RLayer* RExporter::currentLayer
protected

◆ currentLinetypePattern

RLinetypePattern RExporter::currentLinetypePattern
protected

◆ currentPen

QPen RExporter::currentPen
protected

◆ document

RDocument* RExporter::document
protected

◆ draftMode

bool RExporter::draftMode
protected

◆ entityStack

QStack<REntity*> RExporter::entityStack
protected

◆ errorMessage

QString RExporter::errorMessage
protected

◆ layerSource

RDocument* RExporter::layerSource
protected

◆ penCapStyle

Qt::PenCapStyle RExporter::penCapStyle
protected

◆ pixelSizeHint

double RExporter::pixelSizeHint
protected

◆ pixelUnit

bool RExporter::pixelUnit
protected

◆ pixelWidth

bool RExporter::pixelWidth
protected

◆ projectionRenderingHint

RS::ProjectionRenderingHint RExporter::projectionRenderingHint
private

◆ screenBasedLinetypes

bool RExporter::screenBasedLinetypes
protected

◆ transform

QTransform RExporter::transform
protected

◆ twoColorSelectedMode

bool RExporter::twoColorSelectedMode
protected

◆ visualExporter

bool RExporter::visualExporter
protected

The documentation for this class was generated from the following files: