QCAD
Open Source 2D CAD
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
RPainterPathExporter Class Reference

Copyright (c) 2011-2013 by Andrew Mustun. More...

#include <RPainterPathExporter.h>

Inheritance diagram for RPainterPathExporter:
RExporter

List of all members.

Public Member Functions

virtual void exportArcSegment (const RArc &arc)
virtual void exportLineSegment (const RLine &line, double angle=RNANDOUBLE)
 Copyright (c) 2011-2013 by Andrew Mustun.
virtual void exportPoint (const RPoint &point)
 Exports a point with the current attributes.
virtual void exportRay (const RRay &ray)
 Exports an infinite ray.
virtual void exportTriangle (const RTriangle &triangle)
 Exports a triangle with the current attributes.
virtual void exportXLine (const RXLine &xLine)
 Exports an infinite line.
RPainterPath getPainterPath ()
 RPainterPathExporter ()
void setExportZeroLinesAsPoints (bool on)
- Public Member Functions inherited from RExporter
virtual void endEntity ()
virtual void endExport ()
 Called at the end of a completed export.
virtual void exportArc (const RArc &arc, double offset=RNANDOUBLE)
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.
virtual void exportCircle (const RCircle &circle)
 Exports a circle with the current attributes.
virtual void exportCurrentEntity (bool preview=false, bool forceSelected=false)
 The default implementation calls the REntity::exportEntity() function of the entity.
virtual bool exportDocument ()
 Exports the visual representation of all objects (including entities) of the document.
virtual void exportDocumentSetting (const QString &, const QVariant &)
virtual bool exportDocumentSettings ()
virtual void exportEllipse (const REllipse &ellipse, double offset=RNANDOUBLE)
 Exports an ellipse with the current attributes.
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.
virtual void exportEntities (QSet< REntity::Id > &entityIds, bool allBlocks=true)
 Calls exportEntity() for all given entities.
virtual void exportEntity (REntity &e, bool preview=false, bool allBlocks=true, bool forceSelected=false)
 Sets the current entity to the given entity and calls exportEntity().
virtual void exportEntity (REntity::Id entityId, bool allBlocks=true, bool forceSelected=false)
 Calls exportEntity(REntity*) for the entity with the given ID.
virtual void exportExplodable (const RExplodable &explodable, double offset=RNANDOUBLE)
virtual void exportImage (const RImageData &image)
virtual void exportLayer (RLayer &)
virtual void exportLayer (RLayer::Id layerId)
virtual void exportLayers ()
virtual void exportLine (const RLine &line, double offset=RNANDOUBLE)
 Exports a line with the current attributes.
virtual void exportLinetype (RLinetype &)
virtual void exportLinetypes ()
virtual void exportPainterPaths (const QList< RPainterPath > &paths)
virtual void exportPainterPathSource (const RPainterPathSource &pathSource)
virtual void exportPolyline (const RPolyline &polyline, 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.
virtual void exportRectangle (const RVector &p1, const RVector &p2)
 Exports a rectangle with the current attributes.
virtual void exportShape (QSharedPointer< RShape > shape)
 Exports the given shapes as part of the geometry of the current entity.
virtual void exportShapes (const QList< QSharedPointer< RShape > > &shapes)
 Exports the given shapes as part of the geometry of the current entity.
virtual void exportSpline (const RSpline &spline, double offset=RNANDOUBLE)
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.
virtual void exportView (RView &)
virtual void exportView (RView::Id viewId)
virtual void exportViews ()
virtual REntitygetBlockRefOrEntity ()
virtual QBrush getBrush (const RPainterPath &path)
virtual QBrush getBrush ()
RDocumentgetDocument () const
 
bool getDraftMode () const
virtual REntitygetEntity ()
 Sets the current export color for entities.
virtual const REntitygetEntity () const
QStack< REntity * > getEntityStack ()
QString getErrorMessage () const
RLinetypePattern getLinetypePattern ()
virtual double getPatternFactor ()
double getPatternOffset (double length, const RLinetypePattern &pattern)
double getPatternOffset (double length, const RLinetypePattern &pattern, int index, double *gap=NULL)
virtual QPen getPen (const RPainterPath &path)
virtual QPen getPen ()
double getPixelSizeHint () const
RS::ProjectionRenderingHint getProjectionRenderingHint ()
bool getScreenBasedLinetypes () const
bool getTwoColorSelectedMode () const
virtual bool isEntitySelected ()
bool isVisualExporter () const
 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)
virtual void setColor (float r, float g, float b, float a=1.0f)
 Sets the current export color in RGB and Alpha.
virtual void setColor (const RColor &color)
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).
void setPixelSizeHint (double v)
void setProjectionRenderingHint (RS::ProjectionRenderingHint p)
 Sets a rendering hint for the current projection used for exports.
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.
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.
virtual ~RExporter ()

Private Attributes

bool exportZeroLinesAsPoints
RPainterPath path

Additional Inherited Members

- Protected Attributes inherited from RExporter
QStack< REntity * > blockRefStack
RDocumentblockSource
QBrush currentBrush
RLayercurrentLayer
RLinetypePattern currentLinetypePattern
QPen currentPen
RDocumentdocument
bool draftMode
QStack< REntity * > entityStack
QString errorMessage
RDocumentlayerSource
double pixelSizeHint
bool screenBasedLinetypes
bool twoColorSelectedMode
bool visualExporter

Detailed Description

Copyright (c) 2011-2013 by Andrew Mustun.

All rights reserved.

This file is part of the QCAD project.

QCAD is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

QCAD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with QCAD.


Constructor & Destructor Documentation

RPainterPathExporter::RPainterPathExporter ( )
inline

Member Function Documentation

virtual void RPainterPathExporter::exportArcSegment ( const RArc arc)
inlinevirtual

Reimplemented from RExporter.

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

Copyright (c) 2011-2013 by Andrew Mustun.

All rights reserved.

This file is part of the QCAD project.

QCAD is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

QCAD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with QCAD.

Implements RExporter.

virtual void RPainterPathExporter::exportPoint ( const RPoint point)
inlinevirtual

Exports a point with the current attributes.

Implements RExporter.

virtual void RPainterPathExporter::exportRay ( const RRay ray)
inlinevirtual

Exports an infinite ray.

Used for rays.

Implements RExporter.

virtual void RPainterPathExporter::exportTriangle ( const RTriangle triangle)
inlinevirtual

Exports a triangle with the current attributes.

Implements RExporter.

virtual void RPainterPathExporter::exportXLine ( const RXLine xLine)
inlinevirtual

Exports an infinite line.

Used for xlines (construction lines).

Implements RExporter.

RPainterPath RPainterPathExporter::getPainterPath ( )
void RPainterPathExporter::setExportZeroLinesAsPoints ( bool  on)
inline

Member Data Documentation

bool RPainterPathExporter::exportZeroLinesAsPoints
private
RPainterPath RPainterPathExporter::path
private

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