QCAD Application Framework
CAD Application Development and Automation.
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
GCode Class Reference
Inheritance diagram for GCode:
CamExporter RFileExporterAdapter RFileExporter RExporter

List of all members.

Public Member Functions

void GCode (void document, void newDocument)
void getCircularCCWMoveCode ()
void getCircularCWMoveCode ()
void getFileExtension ()
void getICode (void value)
void getJCode (void value)
void getLinearMoveCode ()
void getLineNumberCode ()
void getRapidMoveCode ()
void getSaftyZLevel ()
void getToolDownLevel ()
void getToolUpLevel ()
void getXCode (void value)
void getYCode (void value)
void getZCode (void value)
void gotXMove (void x)
void gotYMove (void y)
void gotZMove (void z)
void gotZUpMove (void z)
void writeCircularMove (void x, void y, void center, void radius, void startAngle, void endAngle, void isLarge, void isReversed)
void writeFooter ()
void writeHeader ()
void writeLine (void custom)
 Writes the next line of the file or the given custom line with line nummer.
void writeLinearMove (void x, void y)
void writeRapidLinearMove (void x, void y)
void writeRapidZMove (void z)
void writeToolDown ()
void writeToolUp ()
void writeZMove (void z)
- Public Member Functions inherited from CamExporter
void appendToContour (void contour, void prepend)
 Appends / prepends entities to the given contour until no more connected entities can be found.
void CamExporter (void document, void newDocument)
void convert (void v)
 Converts the given value v from the document unit into the SVG output unit.
void endExport ()
 Called at the end of a completed export.
void exportArcSegment (void arc)
void exportContourEntity (void entity)
 Exports the given entity.
void exportEntities (void allBlocks, void undone)
void exportFile (void fileName)
void exportLineSegment (void line)
void exportPoint (void point)
void fuzzyCompare (void v1, void v2)
void getContour (void entityId)
 Creates a new contour (Contour object) with the given entity and all connected entities.
void getDocument ()
void getOperation ()
void getStartPosition ()
void prependToContour (void contour)
void startExport ()
 Called to start a new, complete export.
- Public Member Functions inherited from RFileExporterAdapter
virtual void exportArcSegment (const RArc &)
virtual bool exportFile (const QString &fileName, const QString &nameFilter, bool setFileName=true)
 Must be implemented by file exporters to export the document into the given file.
virtual void exportLineSegment (const RLine &)
 Exports a line segment (a line without pattern).
virtual void exportPoint (const RPoint &)
 Exports a point with the current attributes.
virtual void exportTriangle (const RTriangle &)
 Exports a triangle with the current attributes.
virtual double getPatternFactor ()
 RFileExporterAdapter ()
 RFileExporterAdapter (RDocument &document)
virtual ~RFileExporterAdapter ()
- Public Member Functions inherited from RFileExporter
virtual QString getCorrectedFileName (const QString &fileName, const QString &nameFilter)=0
 Must be implemented by file exporters to correct the given file name if necesary (add extension based on chosen name filter).
 RFileExporter ()
 RFileExporter (RDocument &document)
virtual ~RFileExporter ()
- Public Member Functions inherited from RExporter
virtual void endEntity ()
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)
 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)
 Sets the current entity to the given entity and calls exportEntity().
virtual void exportEntity (REntity::Id entityId, bool allBlocks=true)
 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 exportTrialEntities ()
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 ()
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 ()
RS::ProjectionRenderingHint getProjectionRenderingHint ()
virtual bool isEntitySelected ()
bool isVisualExporter () const
 RExporter ()
 RExporter (RDocument &document)
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 ()
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 setProjectionRenderingHint (RS::ProjectionRenderingHint p)
 Sets a rendering hint for the current projection used for exports.
virtual void setStyle (Qt::PenStyle penStyle)
void setVisualExporter (bool on)
virtual void startEntity (bool)
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 ()

Public Attributes

int i
int j
int lineNumber
int mode
int scale
int x
int xPrev
int y
int yPrev
int z
int zPrev
- Public Attributes inherited from CamExporter
int document
int newDocument
int op
int stream
int tolerance
int traversed
int unit

Constructor & Destructor Documentation

void GCode::GCode ( void  document,
void  newDocument 
)
inline

Member Function Documentation

void GCode::getCircularCCWMoveCode ( )
inline
void GCode::getCircularCWMoveCode ( )
inline
void GCode::getFileExtension ( )
inline
void GCode::getICode ( void  value)
inline
void GCode::getJCode ( void  value)
inline
void GCode::getLinearMoveCode ( )
inline
void GCode::getLineNumberCode ( )
inline
void GCode::getRapidMoveCode ( )
inline
void GCode::getSaftyZLevel ( )
inline
void GCode::getToolDownLevel ( )
inline
void GCode::getToolUpLevel ( )
inline
void GCode::getXCode ( void  value)
inline
void GCode::getYCode ( void  value)
inline
void GCode::getZCode ( void  value)
inline
void GCode::gotXMove ( void  x)
inline
void GCode::gotYMove ( void  y)
inline
void GCode::gotZMove ( void  z)
inline
void GCode::gotZUpMove ( void  z)
inline
void GCode::writeCircularMove ( void  x,
void  y,
void  center,
void  radius,
void  startAngle,
void  endAngle,
void  isLarge,
void  isReversed 
)
inline
void GCode::writeFooter ( )
inline

Reimplemented from CamExporter.

void GCode::writeHeader ( )
inline

Reimplemented from CamExporter.

void GCode::writeLine ( void  custom)
inline

Writes the next line of the file or the given custom line with line nummer.

Parameters:
customstring (optional) custom line contents

Reimplemented from CamExporter.

void GCode::writeLinearMove ( void  x,
void  y 
)
inline
void GCode::writeRapidLinearMove ( void  x,
void  y 
)
inline
void GCode::writeRapidZMove ( void  z)
inline
void GCode::writeToolDown ( )
inline
void GCode::writeToolUp ( )
inline

Reimplemented from CamExporter.

void GCode::writeZMove ( void  z)
inline

Member Data Documentation

int GCode::i
int GCode::j
int GCode::lineNumber
int GCode::mode
int GCode::scale

Reimplemented from CamExporter.

int GCode::x
int GCode::xPrev
int GCode::y
int GCode::yPrev
int GCode::z
int GCode::zPrev

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