QCAD
Open Source 2D CAD
RDxfImporterFactory.h
Go to the documentation of this file.
1 
20 #ifndef RDXFIMPORTERFACTORY_H_
21 #define RDXFIMPORTERFACTORY_H_
22 
23 #include "dxf_global.h"
24 
25 #include <QFileInfo>
26 #include <QMetaType>
27 
28 #include "RDocument.h"
29 #include "RDxfImporter.h"
30 #include "RFileImporter.h"
31 #include "RFileImporterFactory.h"
32 #include "RFileImporterRegistry.h"
33 
34 class RMessageHandler;
35 class RProgressHandler;
36 
41 public:
42  static void registerFileImporter() {
45  );
46  }
47 
48  virtual QStringList getFilterStrings();
49 
50  virtual RFileImporter* instantiate(RDocument& document,
51  RMessageHandler* messageHandler = NULL,
52  RProgressHandler* progressHandler = NULL) {
53 
54  return new RDxfImporter(document, messageHandler, progressHandler);
55  }
56 
57  virtual int canImport(const QString& fileName, const QString& nameFilter);
58 };
59 
61 
62 #endif
Copyright (c) 2011-2018 by Andrew Mustun.
Definition: RMessageHandler.h:33
Definition: RDxfImporterFactory.h:40
virtual int canImport(const QString &fileName, const QString &nameFilter="")=0
virtual RFileImporter * instantiate(RDocument &document, RMessageHandler *messageHandler=NULL, RProgressHandler *progressHandler=NULL)
Definition: RDxfImporterFactory.h:50
Needs to be implemented by RFileImporter implementations to check if the importer is suitable to impo...
Definition: RFileImporterFactory.h:41
Copyright (c) 2011-2018 by Andrew Mustun.
Definition: RFileImporter.h:37
static void registerFileImporter()
Definition: RDxfImporterFactory.h:42
#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 *)
static void registerFileImporter(RFileImporterFactory *factory)
Registers a file importer.
Definition: RFileImporterRegistry.cpp:42
Importer for the DXF format, based on the dxflib library.
Definition: RDxfImporter.h:62
virtual QStringList getFilterStrings()=0
Copyright (c) 2011-2018 by Andrew Mustun.
Definition: RProgressHandler.h:33