QCAD
Open Source 2D CAD
RDxfExporterFactory.h
Go to the documentation of this file.
1 
20 #ifndef RDXFEXPORTERFACTORY_H_
21 #define RDXFEXPORTERFACTORY_H_
22 
23 #include "dxf_global.h"
24 
25 #include <QFileInfo>
26 #include <QMetaType>
27 
28 #include "RDocument.h"
29 #include "RDxfExporter.h"
30 #include "RFileExporter.h"
31 #include "RFileExporterFactory.h"
32 #include "RFileExporterRegistry.h"
33 
34 class RMessageHandler;
35 class RProgressHandler;
36 
41 public:
42  static void registerFileExporter() {
45  );
46  }
47 
48  virtual QStringList getFilterStrings();
49 
50  virtual RFileExporter* instantiate(RDocument& document,
51  RMessageHandler* messageHandler = NULL,
52  RProgressHandler* progressHandler = NULL) {
53 
54  return new RDxfExporter(document, messageHandler, progressHandler);
55  }
56 
57  virtual int canExport(const QString& fileName, const QString& nameFilter);
58 };
59 
61 
62 #endif
static void registerFileExporter()
Definition: RDxfExporterFactory.h:42
Copyright (c) 2011-2018 by Andrew Mustun.
Definition: RMessageHandler.h:33
static void registerFileExporter(RFileExporterFactory *factory, bool prepend=false)
Registers a file exporter.
Definition: RFileExporterRegistry.cpp:35
Definition: RDxfExporterFactory.h:40
virtual QStringList getFilterStrings()=0
virtual int canExport(const QString &fileName, const QString &nameFilter="")=0
Exporter for the DXF format, based on dxflib.
Definition: RDxfExporter.h:63
Base class for file exporters.
Definition: RFileExporter.h:42
Needs to be implemented by RFileExporter implementations to check if the exporter is suitable to expo...
Definition: RFileExporterFactory.h:41
#define QCADDXF_EXPORT
Definition: dxf_global.h:10
A graphics document contains and owns entities, layers, user coordinate systems, variables, block definitions, etc.
Definition: RDocument.h:67
Q_DECLARE_METATYPE(RMath *)
virtual RFileExporter * instantiate(RDocument &document, RMessageHandler *messageHandler=NULL, RProgressHandler *progressHandler=NULL)
Definition: RDxfExporterFactory.h:50
Copyright (c) 2011-2018 by Andrew Mustun.
Definition: RProgressHandler.h:33