RImporter
Class in Core Module
Header: #include <src/core/RImporter.h>
Inherited by: RFileImporter
Description
Section titled “Description”Base class for importers.
Importers import entities from a source (e.g. file, DB, network, …) into a graphics document. The implementing importer is expected to call the import functions to add objects (e.g. entities) to the document. Custom import functions may be implemented to support custom entity types supported by a specific importer.
Scriptable: This class is available in script environments.
Public Functions
Section titled “Public Functions”RImporter() |
|
RImporter(RDocument &document, RMessageHandler *messageHandler=NULL, RProgressHandler *progressHandler=NULL) |
|
| virtual | ~RImporter() |
| virtual void | endImport()Ends the import. |
| virtual RObject::Id | getCurrentBlockId() |
| RDocument & | getDocument() |
| virtual void | importObject(RObject *object)Provided for script importers as importObjectP will loose the object ID. |
| virtual void | importObjectP(QSharedPointer< RObject > object)Imports an entity into the document. |
| virtual void | setCurrentBlockId(RObject::Id id) |
| void | setDocument(RDocument *d) |
| void | setKnownVariable(RS::KnownVariable key, const QVariant &value) |
| void | setKnownVariable(RS::KnownVariable key, const RVector &value) |
| virtual void | startImport()Starts the import. |
Protected Attributes
Section titled “Protected Attributes”| RObject::Id | blockId |
| RDocument * | document |
| RMessageHandler * | messageHandler |
| RProgressHandler * | progressHandler |
| RTransaction | transaction |
Member Documentation
Section titled “Member Documentation”RImporter
Section titled “RImporter”RImporter::RImporter()All rights reserved.
This file is part of the QCAD project.
QCAD is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
QCAD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with QCAD.
RImporter
Section titled “RImporter”RImporter::RImporter(RDocument &document, RMessageHandler *messageHandler=NULL, RProgressHandler *progressHandler=NULL)~RImporter
Section titled “~RImporter”virtual RImporter::~RImporter()virtual
endImport
Section titled “endImport”virtual void RImporter::endImport()virtual
Ends the import.
Reimplementations should call this base implementation first since this commits the transaction after importing entities into the document.
getCurrentBlockId
Section titled “getCurrentBlockId”virtual RObject::Id RImporter::getCurrentBlockId()virtual
getDocument
Section titled “getDocument”RDocument & RImporter::getDocument()importObject
Section titled “importObject”virtual void RImporter::importObject(RObject *object)virtual
Provided for script importers as importObjectP will loose the object ID.
importObjectP
Section titled “importObjectP”virtual void RImporter::importObjectP(QSharedPointer< RObject > object)virtual
Imports an entity into the document.
Non-Scriptable: This function is not available in script environments.
setCurrentBlockId
Section titled “setCurrentBlockId”virtual void RImporter::setCurrentBlockId(RObject::Id id)virtual
setDocument
Section titled “setDocument”void RImporter::setDocument(RDocument *d)setKnownVariable
Section titled “setKnownVariable”void RImporter::setKnownVariable(RS::KnownVariable key, const QVariant &value)setKnownVariable
Section titled “setKnownVariable”void RImporter::setKnownVariable(RS::KnownVariable key, const RVector &value)startImport
Section titled “startImport”virtual void RImporter::startImport()virtual
Starts the import.
Reimplementations should call this base implementation first since this starts a transaction.
blockId
Section titled “blockId”RObject::Id RImporter::blockIdprotected
document
Section titled “document”RDocument* RImporter::documentprotected
messageHandler
Section titled “messageHandler”RMessageHandler* RImporter::messageHandlerprotected
progressHandler
Section titled “progressHandler”RProgressHandler* RImporter::progressHandlerprotected
transaction
Section titled “transaction”RTransaction RImporter::transactionprotected