KiCad PCB EDA Suite
|
Interface for vector graphics import plugins. More...
#include <graphics_import_plugin.h>
Public Member Functions | |
virtual | ~GRAPHICS_IMPORT_PLUGIN () |
virtual void | SetImporter (GRAPHICS_IMPORTER *aImporter) |
Set the receiver of the imported shapes. More... | |
virtual const wxString | GetName () const =0 |
Return the plugin name. More... | |
virtual const std::vector< std::string > | GetFileExtensions () const =0 |
Return a vector of the file extensions handled by this plugin. More... | |
wxString | GetWildcards () const |
Return a list of wildcards that contains the file extensions handled by this plugin, separated with a semi-colon. More... | |
virtual bool | Load (const wxString &aFileName)=0 |
Load file for import. More... | |
virtual bool | LoadFromMemory (const wxMemoryBuffer &aMemBuffer)=0 |
Set memory buffer with content for import. More... | |
virtual double | GetImageHeight () const =0 |
Return image height from original imported file. More... | |
virtual double | GetImageWidth () const =0 |
Return image width from original imported file. More... | |
virtual BOX2D | GetImageBBox () const =0 |
Return image bounding box from original imported file. More... | |
virtual bool | Import ()=0 |
Actually imports the file. More... | |
virtual void | SetLineWidthMM (double aLineWidth) |
virtual const wxString & | GetMessages () const =0 |
Collect warning and error messages after loading/importing. More... | |
Protected Attributes | |
GRAPHICS_IMPORTER * | m_importer |
< Importer used to create objects representing the imported shapes. More... | |
Interface for vector graphics import plugins.
Definition at line 39 of file graphics_import_plugin.h.
|
inlinevirtual |
Definition at line 42 of file graphics_import_plugin.h.
|
pure virtual |
Return a vector of the file extensions handled by this plugin.
Implemented in DXF_IMPORT_PLUGIN, and SVG_IMPORT_PLUGIN.
Referenced by GetWildcards().
|
pure virtual |
Return image bounding box from original imported file.
Implemented in DXF_IMPORT_PLUGIN, and SVG_IMPORT_PLUGIN.
|
pure virtual |
Return image height from original imported file.
Implemented in DXF_IMPORT_PLUGIN, and SVG_IMPORT_PLUGIN.
|
pure virtual |
Return image width from original imported file.
Implemented in DXF_IMPORT_PLUGIN, and SVG_IMPORT_PLUGIN.
|
pure virtual |
Collect warning and error messages after loading/importing.
Implemented in DXF_IMPORT_PLUGIN, and SVG_IMPORT_PLUGIN.
|
pure virtual |
Return the plugin name.
This string will be used as the description in the file dialog.
Implemented in DXF_IMPORT_PLUGIN, and SVG_IMPORT_PLUGIN.
|
inline |
Return a list of wildcards that contains the file extensions handled by this plugin, separated with a semi-colon.
Definition at line 70 of file graphics_import_plugin.h.
References formatWildcardExt(), and GetFileExtensions().
|
pure virtual |
Actually imports the file.
It is necessary to have loaded the file beforehand.
Implemented in DXF_IMPORT_PLUGIN, and SVG_IMPORT_PLUGIN.
|
pure virtual |
Load file for import.
It is necessary to have the GRAPHICS_IMPORTER object set before.
Implemented in DXF_IMPORT_PLUGIN, and SVG_IMPORT_PLUGIN.
|
pure virtual |
Set memory buffer with content for import.
It is necessary to have the GRAPHICS_IMPORTER object set before.
Implemented in DXF_IMPORT_PLUGIN, and SVG_IMPORT_PLUGIN.
|
inlinevirtual |
Set the receiver of the imported shapes.
Reimplemented in DXF_IMPORT_PLUGIN.
Definition at line 49 of file graphics_import_plugin.h.
References m_importer.
Referenced by ConvertSVGToLibShapes(), SCH_EASYEDAPRO_PARSER::ParseSymbol(), SCH_EASYEDA_PARSER::ParseSymbolShapes(), and DXF_IMPORT_PLUGIN::SetImporter().
|
inlinevirtual |
Reimplemented in DXF_IMPORT_PLUGIN.
Definition at line 130 of file graphics_import_plugin.h.
|
protected |
< Importer used to create objects representing the imported shapes.
Definition at line 141 of file graphics_import_plugin.h.
Referenced by DXF_IMPORT_PLUGIN::Import(), SVG_IMPORT_PLUGIN::Import(), SVG_IMPORT_PLUGIN::Load(), SVG_IMPORT_PLUGIN::LoadFromMemory(), SetImporter(), and DXF_IMPORT_PLUGIN::SetImporter().