QCAD Application Framework
CAD Application Development and Automation.
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
SvgImporter Class Reference

Very basic SVG import implementation. More...

Inheritance diagram for SvgImporter:
RFileImporterAdapter RFileImporter RImporter

List of all members.

Public Member Functions

void canImport (void fileName, void nameFilter)
 Implementation from RFileImporterAdapter.
void importArc (void ox, void oy, void x, void y, void rx, void ry, void angle, void isLarge, void sweep)
void importBezier (void x1, void y1, void px1, void py1, void px2, void py2, void x2, void y2)
 Imports a cubic spline with the given start point, control points and ent point.
void importBezier2 (void x1, void y1, void px, void py, void x2, void y2)
void importCircle (void x, void y, void r)
void importEllipse (void x, void y, void rx, void ry)
void importFile (void fileName)
void importLine (void x1, void y1, void x2, void y2)
void importRectangle (void x, void y, void w, void h)
void importSvgPath (void dData)
 Parses the given path data string and imports the lines, arcs and splines from the path.
void importSvgPolygon (void pointsData)
void SvgImporter (void document)
- Public Member Functions inherited from RFileImporterAdapter
virtual bool canImport (const QString &fileName, const QString &nameFilter)
 Must be implemented by script file importers to check if the given file can be imported by this importer.
virtual bool importFile (const QString &fileName)
 Must be implemented by file importers to import the given file into the document.
 RFileImporterAdapter ()
 RFileImporterAdapter (RDocument &document, RMessageHandler *messageHandler=NULL, RProgressHandler *progressHandler=NULL)
virtual ~RFileImporterAdapter ()
- Public Member Functions inherited from RFileImporter
 RFileImporter ()
 RFileImporter (RDocument &document, RMessageHandler *messageHandler=NULL, RProgressHandler *progressHandler=NULL)
virtual ~RFileImporter ()
- Public Member Functions inherited from RImporter
virtual void endImport ()
 Ends the import.
virtual RBlock::Id getCurrentBlockId ()
RDocumentgetDocument ()
virtual void importObject (QSharedPointer< RObject > object)
 Imports an entity into the document.
 RImporter ()
 RImporter (RDocument &document, RMessageHandler *messageHandler=NULL, RProgressHandler *progressHandler=NULL)
virtual void setCurrentBlockId (RBlock::Id id)
void setDocument (RDocument *d)
virtual void startImport ()
 Starts the import.
virtual ~RImporter ()

Detailed Description

Very basic SVG import implementation.

Only supports a few SVG tags.

Todo:
Use a 3rd party library to fully support SVG.

Constructor & Destructor Documentation

void SvgImporter::SvgImporter ( void  document)
inline

Member Function Documentation

void SvgImporter::canImport ( void  fileName,
void  nameFilter 
)
inline

Implementation from RFileImporterAdapter.

void SvgImporter::importArc ( void  ox,
void  oy,
void  x,
void  y,
void  rx,
void  ry,
void  angle,
void  isLarge,
void  sweep 
)
inline
void SvgImporter::importBezier ( void  x1,
void  y1,
void  px1,
void  py1,
void  px2,
void  py2,
void  x2,
void  y2 
)
inline

Imports a cubic spline with the given start point, control points and ent point.

If the spline is almost exactly resembling an arc, an arc is imported instead.

void SvgImporter::importBezier2 ( void  x1,
void  y1,
void  px,
void  py,
void  x2,
void  y2 
)
inline
void SvgImporter::importCircle ( void  x,
void  y,
void  r 
)
inline
void SvgImporter::importEllipse ( void  x,
void  y,
void  rx,
void  ry 
)
inline
void SvgImporter::importFile ( void  fileName)
inline
void SvgImporter::importLine ( void  x1,
void  y1,
void  x2,
void  y2 
)
inline
void SvgImporter::importRectangle ( void  x,
void  y,
void  w,
void  h 
)
inline
void SvgImporter::importSvgPath ( void  dData)
inline

Parses the given path data string and imports the lines, arcs and splines from the path.

void SvgImporter::importSvgPolygon ( void  pointsData)
inline

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