QCAD
Open Source 2D CAD
RImporter.h
Go to the documentation of this file.
1 
20 #ifndef RIMPORTER_H
21 #define RIMPORTER_H
22 
23 #include "core_global.h"
24 
25 #include "RTransaction.h"
26 
27 class RDocument;
28 class REntity;
29 class RVector;
30 class RMessageHandler;
31 class RProgressHandler;
32 
46 public:
47  RImporter();
48  RImporter(RDocument& document, RMessageHandler* messageHandler = NULL, RProgressHandler* progressHandler = NULL);
49  virtual ~RImporter();
50 
51  virtual void startImport();
52  virtual void endImport();
53 
57  virtual void importObjectP(QSharedPointer<RObject> object);
58 
59  virtual void importObject(RObject* object);
60 
61  virtual void setCurrentBlockId(RBlock::Id id);
62  virtual RBlock::Id getCurrentBlockId();
63 
65  void setDocument(RDocument* d);
66 
67  void setKnownVariable(RS::KnownVariable key, const QVariant& value);
68  void setKnownVariable(RS::KnownVariable key, const RVector& value);
69 
70 protected:
76 };
77 
79 
80 #endif
RMessageHandler
Copyright (c) 2011-2018 by Andrew Mustun.
Definition: RMessageHandler.h:33
RTransaction.h
RProgressHandler
Copyright (c) 2011-2018 by Andrew Mustun.
Definition: RProgressHandler.h:33
getDocument
void getDocument()
Returns the current RDocument or undefined.
Definition: simple.js:59
RS::KnownVariable
KnownVariable
Well established document variables.
Definition: RS.h:393
RObject
Abstract base class for all objects.
Definition: RObject.h:61
RVector
Represents a 3d vector (x/y/z).
Definition: RVector.h:46
RImporter::document
RDocument * document
Definition: RImporter.h:71
REntity
Base class for all entity classes.
Definition: REntity.h:65
Q_DECLARE_METATYPE
Q_DECLARE_METATYPE(RMath *)
RObject::Id
int Id
Definition: RObject.h:66
core_global.h
RDocument
A graphics document contains and owns entities, layers, user coordinate systems, variables,...
Definition: RDocument.h:72
RImporter::progressHandler
RProgressHandler * progressHandler
Definition: RImporter.h:73
RImporter::messageHandler
RMessageHandler * messageHandler
Definition: RImporter.h:72
RImporter::blockId
RBlock::Id blockId
Definition: RImporter.h:75
RImporter::transaction
RTransaction transaction
Definition: RImporter.h:74
RTransaction
Transaction implementation.
Definition: RTransaction.h:74
RImporter
Base class for importers.
Definition: RImporter.h:45
QCADCORE_EXPORT
#define QCADCORE_EXPORT
Definition: core_global.h:10