RStorage
Class in Core Module
Header: #include <src/core/RStorage.h>
Inherits: RNonCopyable (private), RRequireHeap
Inherited by: RMemoryStorage
Description
Section titled “Description”This is the abstract base class for all storage implementations.
A storage is used to store documents (entities, layers, blocks, transactions) in memory or on disk. Every document is backed by a storage object.
A storage implementation is available in the qcaddbstorage.
Scriptable: This class is available in script environments.
Public Functions
Section titled “Public Functions”RStorage() |
|
| virtual | ~RStorage() |
| void | addModifiedListener(RModifiedListener *l)Adds a listener for modified status changed events. |
| virtual void | beginTransaction()=0 = 0Starts a new transaction. |
| virtual void | clear()Resets this storage to its initial, empty state. |
| virtual void | clearEntitySelection(QSet< RObject::Id > *affectedEntities=NULL)=0 = 0Clears the selection status of all entities. |
| virtual void | commitTransaction()=0 = 0Commits the current transaction. |
| virtual int | countSelectedEntities() const |
| virtual bool | deleteObject(RObject::Id objectId)=0 = 0Deletes the object with the given ID. |
| virtual void | deleteTransactionsFrom(int transactionId)=0 = 0Deletes all transactions with IDs from transactionId (inclusive) to the maximum transaction ID. |
| virtual int | deselectEntities(const QSet< RObject::Id > &entityIds, QSet< RObject::Id > *affectedEntities=NULL)=0 = 0Deselects all entities with the given IDs. |
| virtual void | deselectEntity(RObject::Id entityId, QSet< RObject::Id > *affectedEntities=NULL)=0 = 0Deselects the entity with the given ID. |
| void | endDocumentVariablesTransaction(RTransaction *transaction, bool useLocalTransaction, QSharedPointer< RDocumentVariables > docVars) |
| virtual RObject::Id | getBlockId(const QString &blockName) const =0 = 0 |
| virtual RObject::Id | getBlockIdAuto(const QString &blockLayoutName) const =0 = 0 |
| virtual QString | getBlockName(RObject::Id blockId) const =0 = 0 |
| virtual QString | getBlockNameFromHandle(RObject::Handle blockHandle) const =0 = 0 |
| virtual QString | getBlockNameFromLayout(const QString &layoutName) const =0 = 0 |
| virtual QString | getBlockNameFromLayout(RObject::Id layoutId) const =0 = 0 |
| virtual QSet< QString > | getBlockNames(const QString &rxStr=RDEFAULT_QSTRING, bool undone=false) const =0 = 0 |
| virtual RBox | getBoundingBox(bool ignoreHiddenLayers=true, bool ignoreEmpty=false) const =0 = 0 |
| virtual RObject::Id | getCurrentBlockId() const |
| virtual RColor | getCurrentColor() const |
| virtual RObject::Id | getCurrentLayerId() const |
| virtual RObject::Id | getCurrentLinetypeId() const |
| virtual RLinetypePattern | getCurrentLinetypePattern() const |
| virtual RLineweight::Lineweight | getCurrentLineweight() const |
| virtual RObject::Id | getCurrentViewId() const |
| virtual RObject::Id | getCurrentViewportId() const |
| virtual QString | getDimensionFont() const |
| RDocument * | getDocument() const |
| virtual RBox | getEntitiesBox(QSet< RObject::Id > &ids) const =0 = 0 |
| virtual QVariant | getKnownVariable(RS::KnownVariable key) const =0 = 0 |
| QString | getLastModified() const |
| QDateTime | getLastModifiedDateTime() const |
| virtual int | getLastTransactionId() |
| virtual RObject::Id | getLayer0Id() const |
| virtual RObject::Id | getLayerId(const QString &layerName) const =0 = 0 |
| virtual QString | getLayerName(RObject::Id layerId) const =0 = 0 |
| virtual QSet< QString > | getLayerNames(const QString &rxStr=RDEFAULT_QSTRING) const =0 = 0 |
| virtual RObject::Id | getLayerStateId(const QString &layerStateName) const =0 = 0 |
| virtual QString | getLayerStateName(RObject::Id layerStateId) const =0 = 0 |
| virtual QSet< QString > | getLayerStateNames(const QString &rxStr=RDEFAULT_QSTRING) const =0 = 0 |
| virtual RObject::Id | getLayoutId(const QString &layoutName) const =0 = 0 |
| virtual QString | getLayoutName(RObject::Id layoutId) const =0 = 0 |
| virtual QSet< QString > | getLayoutNames(const QString &rxStr=RDEFAULT_QSTRING) const =0 = 0 |
| virtual QString | getLinetypeDescription(RObject::Id linetypeId) const =0 = 0 |
| virtual RObject::Id | getLinetypeId(const QString &linetypeName) const =0 = 0 |
| virtual QString | getLinetypeLabel(RObject::Id linetypeId) const =0 = 0 |
| virtual QString | getLinetypeName(RObject::Id linetypeId) const =0 = 0 |
| virtual QSet< QString > | getLinetypeNames() const =0 = 0 |
| virtual QList< RLinetypePattern > | getLinetypePatterns() const =0 = 0 |
| virtual double | getLinetypeScale() const |
| virtual int | getMaxDrawOrder() |
| virtual RLineweight::Lineweight | getMaxLineweight() const =0 = 0 |
| virtual RObject::Handle | getMaxObjectHandle() |
| virtual RObject::Id | getMaxObjectId() |
| virtual int | getMaxTransactionId()=0 = 0 |
| RS::Measurement | getMeasurement() const |
| virtual int | getMinDrawOrder() |
| virtual RObject::Id | getModelSpaceBlockId() const |
| virtual RObject::Handle | getNewObjectHandle() |
| virtual RObject::Id | getNewObjectId() |
| bool | getNotifyListeners() const |
| virtual RBox | getSelectionBox() const =0 = 0 |
| virtual RTransaction | getTransaction(int transactionId)=0 = 0 |
| virtual int | getTransactionGroup() const |
| RS::Unit | getUnit() const |
| virtual QVariant | getVariable(const QString &key) const =0 = 0 |
| virtual QStringList | getVariables() const =0 = 0 |
| virtual RObject::Id | getViewId(const QString &viewName) const =0 = 0 |
| virtual QString | getViewName(RObject::Id viewId) const =0 = 0 |
| virtual QSet< QString > | getViewNames() const =0 = 0 |
| virtual bool | hasBlock(const QString &blockName) const |
| virtual bool | hasBlockEntities(RObject::Id blockId) const =0 = 0 |
| virtual bool | hasChildEntities(RObject::Id parentId) const =0 = 0 |
| virtual bool | hasLayer(const QString &layerName) const |
| virtual bool | hasLayerState(const QString &layerStateName) const |
| virtual bool | hasLayerStates() const |
| virtual bool | hasLayout(const QString &layoutName) const |
| virtual bool | hasLinetype(const QString &linetypeName) const |
| virtual bool | hasSelection() const =0 = 0 |
| virtual bool | hasVariable(const QString &key) const |
| virtual bool | hasView(const QString &viewName) const |
| virtual bool | isBlockFrozen(RObject::Id blockId) const |
| virtual bool | isEntity(RObject::Id objectId) |
| virtual bool | isEntityVisible(const REntity &entity, RObject::Id blockId) const |
| virtual bool | isInBackStorage(RObject::Id)Linked storages should return true if the given object is stored in the storage the linked storage links to. |
| virtual bool | isLayerFrozen(const RLayer &layer) const |
| virtual bool | isLayerFrozen(RObject::Id layerId) const |
| virtual bool | isLayerLocked(const RLayer &layer) const |
| virtual bool | isLayerLocked(RObject::Id layerId) const |
| virtual bool | isLayerOff(const RLayer &layer) const |
| virtual bool | isLayerOff(RObject::Id layerId) const |
| virtual bool | isLayerOffOrFrozen(const RLayer &layer) const |
| virtual bool | isLayerOffOrFrozen(RObject::Id layerId) const |
| virtual bool | isLayerPlottable(const RLayer &layer) const |
| virtual bool | isLayerPlottable(RObject::Id layerId) const |
| virtual bool | isLayerSnappable(const RLayer &layer) const |
| virtual bool | isLayerSnappable(RObject::Id layerId) const |
| virtual bool | isLayoutBlock(RObject::Id blockId) const |
| bool | isModified() const |
| virtual bool | isParentLayerFrozen(const RLayer &layer) const |
| virtual bool | isParentLayerFrozen(RObject::Id layerId) const |
| virtual bool | isParentLayerLocked(const RLayer &layer) const |
| virtual bool | isParentLayerLocked(RObject::Id layerId) const |
| virtual bool | isParentLayerPlottable(const RLayer &layer) const |
| virtual bool | isParentLayerPlottable(RObject::Id layerId) const |
| virtual bool | isParentLayerSnappable(const RLayer &layer) const |
| virtual bool | isParentLayerSnappable(RObject::Id layerId) const |
| virtual bool | isSelected(RObject::Id entityId) |
| virtual bool | isSelectedWorkingSet(RObject::Id entityId) |
| virtual QList< RObject::Id > | orderBackToFront(const QSet< RObject::Id > &entityIds) const |
| virtual QSet< RObject::Id > | queryAllBlockReferences() const =0 = 0 |
| virtual QSet< RObject::Id > | queryAllBlocks(bool undone=false)=0 = 0 |
| virtual QSet< RObject::Id > | queryAllEntities(bool undone, bool allBlocks, QList< RS::EntityType > types)=0 = 0 |
| virtual QSet< RObject::Id > | queryAllEntities(bool undone=false, bool allBlocks=false, RS::EntityType type=RS::EntityAll)=0 = 0 |
| virtual QSet< RObject::Id > | queryAllLayers(bool undone=false)=0 = 0 |
| virtual QSet< RObject::Id > | queryAllLayerStates(bool undone=false) const =0 = 0 |
| virtual QSet< RObject::Id > | queryAllLayoutBlocks(bool includeModelSpace=false, bool undone=false) const =0 = 0 |
| virtual QSet< RObject::Id > | queryAllLayouts(bool undone=false)=0 = 0 |
| virtual QSet< RObject::Id > | queryAllLinetypes()=0 = 0 |
| virtual QSet< RObject::Id > | queryAllObjects() const =0 = 0 |
| virtual QSet< RObject::Id > | queryAllUcs()=0 = 0 |
| virtual QSet< RObject::Id > | queryAllViewports() const =0 = 0 |
| virtual QSet< RObject::Id > | queryAllViews(bool undone=false)=0 = 0 |
| virtual QSet< RObject::Id > | queryAllVisibleEntities()=0 = 0 |
| virtual QSharedPointer< RBlock > | queryBlock(const QString &blockName) const =0 = 0 |
| virtual QSharedPointer< RBlock > | queryBlock(RObject::Id blockId) const =0 = 0 |
| virtual QSharedPointer< RBlock > | queryBlockDirect(const QString &blockName) const |
| virtual QSharedPointer< RBlock > | queryBlockDirect(RObject::Id blockId) const =0 = 0 |
| virtual QSet< RObject::Id > | queryBlockEntities(RObject::Id blockId)=0 = 0 |
| virtual QSet< RObject::Id > | queryBlockReferences(RObject::Id blockId) const =0 = 0 |
| virtual QSet< RObject::Id > | queryBlockReferencesForLayers(const QSet< RObject::Id > &layerIds) const |
| virtual QSet< RObject::Id > | queryChildEntities(RObject::Id parentId, RS::EntityType type=RS::EntityAll)=0 = 0 |
| virtual QSharedPointer< RBlock > | queryCurrentBlock() |
| virtual QSharedPointer< RLayer > | queryCurrentLayer() |
| virtual QSharedPointer< RLinetype > | queryCurrentLinetype() const |
| virtual QSharedPointer< RView > | queryCurrentView() |
| virtual QSharedPointer< RDimStyle > | queryDimStyle() const =0 = 0 |
| virtual QSharedPointer< RDimStyle > | queryDimStyleDirect() const =0 = 0 |
| virtual QSharedPointer< RDocumentVariables > | queryDocumentVariables() const =0 = 0 |
| virtual QSharedPointer< RDocumentVariables > | queryDocumentVariablesDirect() const =0 = 0 |
| virtual QSharedPointer< REntity > | queryEntity(RObject::Id entityId) const =0 = 0 |
| virtual QSharedPointer< REntity > | queryEntityDirect(RObject::Id entityId) const |
| virtual QSet< RObject::Id > | queryInfiniteEntities() const =0 = 0 |
| virtual QSharedPointer< RLayer > | queryLayer(const QString &layerName) const =0 = 0 |
| virtual QSharedPointer< RLayer > | queryLayer(RObject::Id layerId) const =0 = 0 |
| virtual QSet< RObject::Id > | queryLayerBlockEntities(RObject::Id layerId, RObject::Id blockId)=0 = 0 |
| virtual QSharedPointer< RLayer > | queryLayerDirect(const QString &layerName) const |
| virtual QSharedPointer< RLayer > | queryLayerDirect(RObject::Id layerId) const |
| virtual QSet< RObject::Id > | queryLayerEntities(RObject::Id layerId, bool allBlocks=false)=0 = 0 |
| virtual QSharedPointer< RLayerState > | queryLayerState(const QString &layerStateName) const =0 = 0 |
| virtual QSharedPointer< RLayerState > | queryLayerState(RObject::Id layerStateId) const =0 = 0 |
| virtual QSharedPointer< RLayerState > | queryLayerStateDirect(const QString &layerStateName) const |
| virtual QSharedPointer< RLayerState > | queryLayerStateDirect(RObject::Id layerStateId) const |
| virtual QSharedPointer< RLayout > | queryLayout(const QString &layoutName) const =0 = 0 |
| virtual QSharedPointer< RLayout > | queryLayout(RObject::Id layoutId) const =0 = 0 |
| virtual QSharedPointer< RLayout > | queryLayoutDirect(RObject::Id layoutId) const |
| virtual QSharedPointer< RLinetype > | queryLinetype(const QString &linetypeName) const =0 = 0 |
| virtual QSharedPointer< RLinetype > | queryLinetype(RObject::Id linetypeId) const =0 = 0 |
| virtual QSharedPointer< RLinetype > | queryLinetypeDirect(RObject::Id linetypeId) const =0 = 0 |
| virtual QSharedPointer< RObject > | queryObject(RObject::Id objectId) const =0 = 0 |
| virtual QSharedPointer< RObject > | queryObjectByHandle(RObject::Handle objectHandle) const =0 = 0 |
| virtual RObject * | queryObjectCC(RObject::Id objectId) const =0 = 0 |
| virtual QSharedPointer< RObject > | queryObjectDirect(RObject::Id objectId) const |
| virtual QSet< RObject::Id > | querySelectedEntities() const =0 = 0 |
| virtual QSet< RObject::Id > | querySelectedLayerEntities(RObject::Id layerId, bool allBlocks=false)=0 = 0 |
| virtual QSet< RObject::Id > | querySelectedLayers() const =0 = 0 |
| virtual QSharedPointer< RUcs > | queryUcs(const QString &ucsName) const =0 = 0 |
| virtual QSharedPointer< RUcs > | queryUcs(RObject::Id ucsId) const =0 = 0 |
| virtual QSharedPointer< RUcs > | queryUcsDirect(RObject::Id ucsId) const |
| virtual QSharedPointer< RView > | queryView(const QString &viewName) const =0 = 0 |
| virtual QSharedPointer< RView > | queryView(RObject::Id viewId) const =0 = 0 |
| virtual QSharedPointer< REntity > | queryVisibleEntityDirect(RObject::Id entityId) const |
| virtual QSet< RObject::Id > | queryWorkingSetEntities()=0 = 0 |
| virtual bool | removeObject(QSharedPointer< RObject > object)=0 = 0 |
| virtual void | removeVariable(const QString &key)=0 = 0Removes the custom variable with the given key. |
| virtual void | resetTransactionStack()=0 = 0 |
| virtual void | rollbackTransaction()=0 = 0Rolls the current transaction back in order to cancel it. |
| virtual bool | saveObject(QSharedPointer< RObject > object, bool checkBlockRecursion=true, bool keepHandles=false, bool *overwrite=NULL)=0 = 0Saves the given object to the storage. |
| virtual void | saveTransaction(RTransaction &transaction)=0 = 0Saves the given transaction. |
| virtual void | selectAllEntities(QSet< RObject::Id > *affectedEntities=NULL)=0 = 0Sets the selection status of all entities. |
| virtual int | selectEntities(const QSet< RObject::Id > &entityIds, bool add=false, QSet< RObject::Id > *affectedEntities=NULL)=0 = 0Selects all entities with the given IDs. |
| virtual void | selectEntity(RObject::Id entityId, bool add=false, QSet< RObject::Id > *affectedEntities=NULL)=0 = 0Selects the entity with the given ID. |
| void | setCurrentBlock(const QString &blockName) |
| virtual void | setCurrentBlock(RObject::Id blockId) |
| virtual void | setCurrentColor(const RColor &color) |
| void | setCurrentLayer(const QString &layerName, RTransaction *transaction=NULL) |
| void | setCurrentLayer(RObject::Id layerId, RTransaction *transaction=NULL) |
| void | setCurrentLinetype(const QString &name) |
| void | setCurrentLinetype(RObject::Id ltId) |
| void | setCurrentLinetypePattern(const RLinetypePattern &p) |
| void | setCurrentLineweight(RLineweight::Lineweight lw) |
| void | setCurrentView(const QString &viewName) |
| void | setCurrentView(RObject::Id viewId) |
| virtual void | setCurrentViewport(RObject::Id viewportId) |
| virtual void | setDimensionFont(const QString &f, RTransaction *transaction=NULL) |
| void | setDocument(RDocument *doc) |
| virtual void | setEntityParentId(REntity &entity, RObject::Id parentId) |
| virtual void | setKnownVariable(RS::KnownVariable key, const QVariant &value, RTransaction *transaction=NULL)=0 = 0Sets a known DXF/DWG variable for this document. |
| virtual void | setLastTransactionId(int transactionId)Sets the ID of the last created transaction. |
| virtual void | setLayer0Id(RObject::Id id) |
| virtual void | setLinetypeScale(double v, RTransaction *transaction=NULL)Sets the global linetype scale of this document to the given value. |
| virtual void | setMaxDrawOrder(int m) |
| void | setMeasurement(RS::Measurement m, RTransaction *transaction=NULL) |
| virtual void | setModelSpaceBlockId(RObject::Id id) |
| void | setModified(bool m)Resets the modified flag. |
| void | setNotifyListeners(bool on) |
| virtual void | setObjectHandle(RObject &object, RObject::Handle objectHandle) |
| virtual void | setObjectId(RObject &object, RObject::Id objectId) const |
| virtual void | setUndoStatus(RObject &object, bool status) |
| virtual bool | setUndoStatus(RObject::Id object, bool status)=0 = 0 |
| void | setUnit(RS::Unit unit, RTransaction *transaction=NULL) |
| virtual void | setVariable(const QString &key, const QVariant &value, bool overwrite=true)=0 = 0Sets a custom variable in the context of this document. |
| QList< RObject::Id > | sortBlocks(const QList< RObject::Id > &blockIds) const |
| QList< RObject::Id > | sortLayers(const QList< RObject::Id > &layerIds) const |
| QSharedPointer< RDocumentVariables > | startDocumentVariablesTransaction(RTransaction *&transaction, bool &useLocalTransaction) |
| virtual void | startTransactionGroup() |
| virtual void | toggleUndoStatus(QSet< RObject::Id > &objects)=0 = 0Toggles the current undo status of all given objects. |
| virtual void | toggleUndoStatus(RObject::Id object)=0 = 0Toggles the current undo status of the given object. |
| virtual void | unsetCurrentViewport() |
| virtual void | update()Clear caches: |
Static Public Functions
Section titled “Static Public Functions”| static QString | getKnownVariableName(RS::KnownVariable n) |
| static bool | lessThan(const QPair< RObject::Id, int > &p1, const QPair< RObject::Id, int > &p2) |
| static void | registerCustomEntityType(RS::EntityType type) |
| static void | unregisterCustomEntityType(RS::EntityType type) |
Protected Attributes
Section titled “Protected Attributes”| RObject::Handle | handleCounter |
| QDateTime | lastModified |
| bool | modified |
Static Protected Attributes
Section titled “Static Protected Attributes”| static QList< RS::EntityType > | customEntityTypes |
Private Attributes
Section titled “Private Attributes”Friends
Section titled “Friends”| QDebug | operator<<(QDebug dbg, RStorage &s)Stream operator for QDebug. |
Member Documentation
Section titled “Member Documentation”RStorage
Section titled “RStorage”RStorage::RStorage()~RStorage
Section titled “~RStorage”virtual RStorage::~RStorage()virtual inline
addModifiedListener
Section titled “addModifiedListener”void RStorage::addModifiedListener(RModifiedListener *l)Adds a listener for modified status changed events.
This can for example be a modification indication widget.
beginTransaction
Section titled “beginTransaction”virtual void RStorage::beginTransaction()=0 = 0pure virtual
Starts a new transaction.
This function is called before something is stored in the storage.
Reimplemented in beginTransaction.
virtual void RStorage::clear()virtual
Resets this storage to its initial, empty state.
Reimplemented in clear, clear.
clearEntitySelection
Section titled “clearEntitySelection”virtual void RStorage::clearEntitySelection(QSet< RObject::Id > *affectedEntities=NULL)=0 = 0pure virtual
Clears the selection status of all entities.
Reimplemented in clearEntitySelection.
commitTransaction
Section titled “commitTransaction”virtual void RStorage::commitTransaction()=0 = 0pure virtual
Commits the current transaction.
This function is called after something has been stored in the storage.
Reimplemented in commitTransaction.
countSelectedEntities
Section titled “countSelectedEntities”virtual int RStorage::countSelectedEntities() constvirtual inline const
Returns: Number of selected entities.
Reimplemented in countSelectedEntities.
deleteObject
Section titled “deleteObject”virtual bool RStorage::deleteObject(RObject::Id objectId)=0 = 0pure virtual
Deletes the object with the given ID.
Reimplemented in deleteObject, deleteObject.
deleteTransactionsFrom
Section titled “deleteTransactionsFrom”virtual void RStorage::deleteTransactionsFrom(int transactionId)=0 = 0pure virtual
Deletes all transactions with IDs from transactionId (inclusive) to the maximum transaction ID.
This is called if some transactions have been undone and then a redo is triggered. All undone transactions have to be deleted at this point.
Reimplemented in deleteTransactionsFrom.
deselectEntities
Section titled “deselectEntities”virtual int RStorage::deselectEntities(const QSet< RObject::Id > &entityIds, QSet< RObject::Id > *affectedEntities=NULL)=0 = 0pure virtual
Deselects all entities with the given IDs.
Parameters:
affected: Optional pointer to an empty set of entity IDs. After the call, this set will contain all entity IDs of entities that were affected by the call.
Reimplemented in deselectEntities.
deselectEntity
Section titled “deselectEntity”virtual void RStorage::deselectEntity(RObject::Id entityId, QSet< RObject::Id > *affectedEntities=NULL)=0 = 0pure virtual
Deselects the entity with the given ID.
Parameters:
affected: Optional pointer to an empty set of entity IDs. After the call, this set will contain all entity IDs of entities that were affected by the call.
Reimplemented in deselectEntity.
endDocumentVariablesTransaction
Section titled “endDocumentVariablesTransaction”void RStorage::endDocumentVariablesTransaction(RTransaction *transaction, bool useLocalTransaction, QSharedPointer< RDocumentVariables > docVars)getBlockId
Section titled “getBlockId”virtual RObject::Id RStorage::getBlockId(const QString &blockName) const =0 = 0pure virtual const
Reimplemented in getBlockId, getBlockId.
getBlockIdAuto
Section titled “getBlockIdAuto”virtual RObject::Id RStorage::getBlockIdAuto(const QString &blockLayoutName) const =0 = 0pure virtual const
Reimplemented in getBlockIdAuto, getBlockIdAuto.
getBlockName
Section titled “getBlockName”virtual QString RStorage::getBlockName(RObject::Id blockId) const =0 = 0pure virtual const
Reimplemented in getBlockName, getBlockName.
getBlockNameFromHandle
Section titled “getBlockNameFromHandle”virtual QString RStorage::getBlockNameFromHandle(RObject::Handle blockHandle) const =0 = 0pure virtual const
Reimplemented in getBlockNameFromHandle, getBlockNameFromHandle.
getBlockNameFromLayout
Section titled “getBlockNameFromLayout”virtual QString RStorage::getBlockNameFromLayout(const QString &layoutName) const =0 = 0pure virtual const
Reimplemented in getBlockNameFromLayout, getBlockNameFromLayout.
getBlockNameFromLayout
Section titled “getBlockNameFromLayout”virtual QString RStorage::getBlockNameFromLayout(RObject::Id layoutId) const =0 = 0pure virtual const
Reimplemented in getBlockNameFromLayout, getBlockNameFromLayout.
getBlockNames
Section titled “getBlockNames”virtual QSet< QString > RStorage::getBlockNames(const QString &rxStr=RDEFAULT_QSTRING, bool undone=false) const =0 = 0pure virtual const
Reimplemented in getBlockNames, getBlockNames.
getBoundingBox
Section titled “getBoundingBox”virtual RBox RStorage::getBoundingBox(bool ignoreHiddenLayers=true, bool ignoreEmpty=false) const =0 = 0pure virtual const
Returns: The bounding box around all visible entities.
Reimplemented in getBoundingBox.
getCurrentBlockId
Section titled “getCurrentBlockId”virtual RObject::Id RStorage::getCurrentBlockId() constvirtual inline const
Reimplemented in getCurrentBlockId.
getCurrentColor
Section titled “getCurrentColor”virtual RColor RStorage::getCurrentColor() constvirtual const
Reimplemented in getCurrentColor.
getCurrentLayerId
Section titled “getCurrentLayerId”virtual RLayer::Id RStorage::getCurrentLayerId() constvirtual const
Reimplemented in getCurrentLayerId.
getCurrentLinetypeId
Section titled “getCurrentLinetypeId”virtual RLinetype::Id RStorage::getCurrentLinetypeId() constvirtual const
Reimplemented in getCurrentLinetypeId.
getCurrentLinetypePattern
Section titled “getCurrentLinetypePattern”virtual RLinetypePattern RStorage::getCurrentLinetypePattern() constvirtual const
getCurrentLineweight
Section titled “getCurrentLineweight”virtual RLineweight::Lineweight RStorage::getCurrentLineweight() constvirtual const
Reimplemented in getCurrentLineweight.
getCurrentViewId
Section titled “getCurrentViewId”virtual RObject::Id RStorage::getCurrentViewId() constvirtual inline const
Reimplemented in getCurrentViewId.
getCurrentViewportId
Section titled “getCurrentViewportId”virtual RObject::Id RStorage::getCurrentViewportId() constvirtual inline const
getDimensionFont
Section titled “getDimensionFont”virtual QString RStorage::getDimensionFont() constvirtual const
Reimplemented in getDimensionFont.
getDocument
Section titled “getDocument”RDocument * RStorage::getDocument() constinline const
getEntitiesBox
Section titled “getEntitiesBox”virtual RBox RStorage::getEntitiesBox(QSet< RObject::Id > &ids) const =0 = 0pure virtual const
Reimplemented in getEntitiesBox.
getKnownVariable
Section titled “getKnownVariable”virtual QVariant RStorage::getKnownVariable(RS::KnownVariable key) const =0 = 0pure virtual const
Returns: Value for the given DXF/DWG variable.
Reimplemented in getKnownVariable, getKnownVariable.
getLastModified
Section titled “getLastModified”QString RStorage::getLastModified() constinline const
getLastModifiedDateTime
Section titled “getLastModifiedDateTime”QDateTime RStorage::getLastModifiedDateTime() constinline const
Non-Scriptable: This function is not available in script environments.
getLastTransactionId
Section titled “getLastTransactionId”virtual int RStorage::getLastTransactionId()virtual inline
Returns: The ID of the last completed transaction. The default implementation reads variable “LastTransaction”.
getLayer0Id
Section titled “getLayer0Id”virtual RObject::Id RStorage::getLayer0Id() constvirtual inline const
getLayerId
Section titled “getLayerId”virtual RObject::Id RStorage::getLayerId(const QString &layerName) const =0 = 0pure virtual const
Reimplemented in getLayerId, getLayerId.
getLayerName
Section titled “getLayerName”virtual QString RStorage::getLayerName(RObject::Id layerId) const =0 = 0pure virtual const
Reimplemented in getLayerName, getLayerName.
getLayerNames
Section titled “getLayerNames”virtual QSet< QString > RStorage::getLayerNames(const QString &rxStr=RDEFAULT_QSTRING) const =0 = 0pure virtual const
Reimplemented in getLayerNames, getLayerNames.
getLayerStateId
Section titled “getLayerStateId”virtual RObject::Id RStorage::getLayerStateId(const QString &layerStateName) const =0 = 0pure virtual const
Reimplemented in getLayerStateId.
getLayerStateName
Section titled “getLayerStateName”virtual QString RStorage::getLayerStateName(RObject::Id layerStateId) const =0 = 0pure virtual const
Reimplemented in getLayerStateName.
getLayerStateNames
Section titled “getLayerStateNames”virtual QSet< QString > RStorage::getLayerStateNames(const QString &rxStr=RDEFAULT_QSTRING) const =0 = 0pure virtual const
Reimplemented in getLayerStateNames.
getLayoutId
Section titled “getLayoutId”virtual RObject::Id RStorage::getLayoutId(const QString &layoutName) const =0 = 0pure virtual const
Reimplemented in getLayoutId, getLayoutId.
getLayoutName
Section titled “getLayoutName”virtual QString RStorage::getLayoutName(RObject::Id layoutId) const =0 = 0pure virtual const
Reimplemented in getLayoutName, getLayoutName.
getLayoutNames
Section titled “getLayoutNames”virtual QSet< QString > RStorage::getLayoutNames(const QString &rxStr=RDEFAULT_QSTRING) const =0 = 0pure virtual const
Reimplemented in getLayoutNames, getLayoutNames.
getLinetypeDescription
Section titled “getLinetypeDescription”virtual QString RStorage::getLinetypeDescription(RObject::Id linetypeId) const =0 = 0pure virtual const
Returns: User readable description for the given linetype.
Reimplemented in getLinetypeDescription, getLinetypeDescription.
getLinetypeId
Section titled “getLinetypeId”virtual RObject::Id RStorage::getLinetypeId(const QString &linetypeName) const =0 = 0pure virtual const
Returns: Linetype ID of the given linetype name or RObject::INVALID_ID.
Reimplemented in getLinetypeId, getLinetypeId.
getLinetypeLabel
Section titled “getLinetypeLabel”virtual QString RStorage::getLinetypeLabel(RObject::Id linetypeId) const =0 = 0pure virtual const
Returns: User readable label for the given linetype.
Reimplemented in getLinetypeLabel, getLinetypeLabel.
getLinetypeName
Section titled “getLinetypeName”virtual QString RStorage::getLinetypeName(RObject::Id linetypeId) const =0 = 0pure virtual const
Returns: Linetype name of the given linetype.
Reimplemented in getLinetypeName, getLinetypeName.
getLinetypeNames
Section titled “getLinetypeNames”virtual QSet< QString > RStorage::getLinetypeNames() const =0 = 0pure virtual const
Returns: List of all available linetype pattern names in this document.
Reimplemented in getLinetypeNames, getLinetypeNames.
getLinetypePatterns
Section titled “getLinetypePatterns”virtual QList< RLinetypePattern > RStorage::getLinetypePatterns() const =0 = 0pure virtual const
Returns: List of all available linetype patterns in this document.
Reimplemented in getLinetypePatterns, getLinetypePatterns.
getLinetypeScale
Section titled “getLinetypeScale”virtual double RStorage::getLinetypeScale() constvirtual const
getMaxDrawOrder
Section titled “getMaxDrawOrder”virtual int RStorage::getMaxDrawOrder()virtual inline
getMaxLineweight
Section titled “getMaxLineweight”virtual RLineweight::Lineweight RStorage::getMaxLineweight() const =0 = 0pure virtual const
Reimplemented in getMaxLineweight.
getMaxObjectHandle
Section titled “getMaxObjectHandle”virtual RObject::Handle RStorage::getMaxObjectHandle()virtual
getMaxObjectId
Section titled “getMaxObjectId”virtual RObject::Id RStorage::getMaxObjectId()virtual
getMaxTransactionId
Section titled “getMaxTransactionId”virtual int RStorage::getMaxTransactionId()=0 = 0pure virtual
Returns: The highest transaction ID that is in use. This should be used by deleteTransactionsFrom internally.
Reimplemented in getMaxTransactionId.
getMeasurement
Section titled “getMeasurement”RS::Measurement RStorage::getMeasurement() constconst
getMinDrawOrder
Section titled “getMinDrawOrder”virtual int RStorage::getMinDrawOrder()virtual
getModelSpaceBlockId
Section titled “getModelSpaceBlockId”virtual RObject::Id RStorage::getModelSpaceBlockId() constvirtual inline const
getNewObjectHandle
Section titled “getNewObjectHandle”virtual RObject::Handle RStorage::getNewObjectHandle()virtual
Reimplemented in getNewObjectHandle, getNewObjectHandle.
getNewObjectId
Section titled “getNewObjectId”virtual RObject::Id RStorage::getNewObjectId()virtual
Reimplemented in getNewObjectId.
getNotifyListeners
Section titled “getNotifyListeners”bool RStorage::getNotifyListeners() constinline const
getSelectionBox
Section titled “getSelectionBox”virtual RBox RStorage::getSelectionBox() const =0 = 0pure virtual const
Reimplemented in getSelectionBox.
getTransaction
Section titled “getTransaction”virtual RTransaction RStorage::getTransaction(int transactionId)=0 = 0pure virtual
Returns: Transaction with the given id.
Reimplemented in getTransaction.
getTransactionGroup
Section titled “getTransactionGroup”virtual int RStorage::getTransactionGroup() constvirtual inline const
getUnit
Section titled “getUnit”RS::Unit RStorage::getUnit() constconst
getVariable
Section titled “getVariable”virtual QVariant RStorage::getVariable(const QString &key) const =0 = 0pure virtual const
Returns: The value of the given variable or an invalid variant if the variable does not exist.
Reimplemented in getVariable.
getVariables
Section titled “getVariables”virtual QStringList RStorage::getVariables() const =0 = 0pure virtual const
Returns: List of custom variable names stored in this document.
Reimplemented in getVariables.
getViewId
Section titled “getViewId”virtual RObject::Id RStorage::getViewId(const QString &viewName) const =0 = 0pure virtual const
Reimplemented in getViewId, getViewId.
getViewName
Section titled “getViewName”virtual QString RStorage::getViewName(RObject::Id viewId) const =0 = 0pure virtual const
Reimplemented in getViewName, getViewName.
getViewNames
Section titled “getViewNames”virtual QSet< QString > RStorage::getViewNames() const =0 = 0pure virtual const
Reimplemented in getViewNames, getViewNames.
hasBlock
Section titled “hasBlock”virtual bool RStorage::hasBlock(const QString &blockName) constvirtual const
hasBlockEntities
Section titled “hasBlockEntities”virtual bool RStorage::hasBlockEntities(RObject::Id blockId) const =0 = 0pure virtual const
Returns: True if the given block contains any entities.
Reimplemented in hasBlockEntities, hasBlockEntities.
hasChildEntities
Section titled “hasChildEntities”virtual bool RStorage::hasChildEntities(RObject::Id parentId) const =0 = 0pure virtual const
Reimplemented in hasChildEntities, hasChildEntities.
hasLayer
Section titled “hasLayer”virtual bool RStorage::hasLayer(const QString &layerName) constvirtual const
hasLayerState
Section titled “hasLayerState”virtual bool RStorage::hasLayerState(const QString &layerStateName) constvirtual const
hasLayerStates
Section titled “hasLayerStates”virtual bool RStorage::hasLayerStates() constvirtual const
hasLayout
Section titled “hasLayout”virtual bool RStorage::hasLayout(const QString &layoutName) constvirtual const
hasLinetype
Section titled “hasLinetype”virtual bool RStorage::hasLinetype(const QString &linetypeName) constvirtual const
hasSelection
Section titled “hasSelection”virtual bool RStorage::hasSelection() const =0 = 0pure virtual const
Returns: True if at least one entity is selected in this storage.
Reimplemented in hasSelection.
hasVariable
Section titled “hasVariable”virtual bool RStorage::hasVariable(const QString &key) constvirtual inline const
Returns: True if the given variable exists in this storage.
hasView
Section titled “hasView”virtual bool RStorage::hasView(const QString &viewName) constvirtual const
isBlockFrozen
Section titled “isBlockFrozen”virtual bool RStorage::isBlockFrozen(RObject::Id blockId) constvirtual const
Returns: True if the given block is frozen.
isEntity
Section titled “isEntity”virtual bool RStorage::isEntity(RObject::Id objectId)virtual
isEntityVisible
Section titled “isEntityVisible”virtual bool RStorage::isEntityVisible(const REntity &entity, RObject::Id blockId) constvirtual const
Returns: True if the given entity is visible in the context of the given block or the current block (default).
isInBackStorage
Section titled “isInBackStorage”virtual bool RStorage::isInBackStorage(RObject::Id)virtual inline
Linked storages should return true if the given object is stored in the storage the linked storage links to.
Reimplemented in isInBackStorage.
isLayerFrozen
Section titled “isLayerFrozen”virtual bool RStorage::isLayerFrozen(const RLayer &layer) constvirtual const
Returns: True if this layer or one of its parent layers are frozen.
isLayerFrozen
Section titled “isLayerFrozen”virtual bool RStorage::isLayerFrozen(RObject::Id layerId) constvirtual const
Returns: True if this layer or one of its parent layers are frozen.
isLayerLocked
Section titled “isLayerLocked”virtual bool RStorage::isLayerLocked(const RLayer &layer) constvirtual const
isLayerLocked
Section titled “isLayerLocked”virtual bool RStorage::isLayerLocked(RObject::Id layerId) constvirtual const
isLayerOff
Section titled “isLayerOff”virtual bool RStorage::isLayerOff(const RLayer &layer) constvirtual const
isLayerOff
Section titled “isLayerOff”virtual bool RStorage::isLayerOff(RObject::Id layerId) constvirtual const
Returns: True if this layer is off.
isLayerOffOrFrozen
Section titled “isLayerOffOrFrozen”virtual bool RStorage::isLayerOffOrFrozen(const RLayer &layer) constvirtual const
isLayerOffOrFrozen
Section titled “isLayerOffOrFrozen”virtual bool RStorage::isLayerOffOrFrozen(RObject::Id layerId) constvirtual const
Returns: True if this layer is off or frozen.
isLayerPlottable
Section titled “isLayerPlottable”virtual bool RStorage::isLayerPlottable(const RLayer &layer) constvirtual const
Returns: True if this layer and its parent layers are plottable.
isLayerPlottable
Section titled “isLayerPlottable”virtual bool RStorage::isLayerPlottable(RObject::Id layerId) constvirtual const
Returns: True if this layer and its parent layers are plottable.
isLayerSnappable
Section titled “isLayerSnappable”virtual bool RStorage::isLayerSnappable(const RLayer &layer) constvirtual const
Returns: True if this layer and its parent layers are snappable.
isLayerSnappable
Section titled “isLayerSnappable”virtual bool RStorage::isLayerSnappable(RObject::Id layerId) constvirtual const
Returns: True if this layer and its parent layers are snappable.
isLayoutBlock
Section titled “isLayoutBlock”virtual bool RStorage::isLayoutBlock(RObject::Id blockId) constvirtual const
Returns: True if the given block is a layout block (i.e. paper space block).
isModified
Section titled “isModified”bool RStorage::isModified() constinline const
Returns: True if the document has unsaved changes.
isParentLayerFrozen
Section titled “isParentLayerFrozen”virtual bool RStorage::isParentLayerFrozen(const RLayer &layer) constvirtual const
isParentLayerFrozen
Section titled “isParentLayerFrozen”virtual bool RStorage::isParentLayerFrozen(RObject::Id layerId) constvirtual const
Returns: True if a parent layer of the given layer is frozen.
isParentLayerLocked
Section titled “isParentLayerLocked”virtual bool RStorage::isParentLayerLocked(const RLayer &layer) constvirtual const
isParentLayerLocked
Section titled “isParentLayerLocked”virtual bool RStorage::isParentLayerLocked(RObject::Id layerId) constvirtual const
Returns: True if a parent layer of the given layer is locked.
isParentLayerPlottable
Section titled “isParentLayerPlottable”virtual bool RStorage::isParentLayerPlottable(const RLayer &layer) constvirtual const
isParentLayerPlottable
Section titled “isParentLayerPlottable”virtual bool RStorage::isParentLayerPlottable(RObject::Id layerId) constvirtual const
Returns: True if a parent layer of the given layer is plottable.
isParentLayerSnappable
Section titled “isParentLayerSnappable”virtual bool RStorage::isParentLayerSnappable(const RLayer &layer) constvirtual const
isParentLayerSnappable
Section titled “isParentLayerSnappable”virtual bool RStorage::isParentLayerSnappable(RObject::Id layerId) constvirtual const
Returns: True if a parent layer of the given layer is snappable.
isSelected
Section titled “isSelected”virtual bool RStorage::isSelected(RObject::Id entityId)virtual
Reimplemented in isSelected.
isSelectedWorkingSet
Section titled “isSelectedWorkingSet”virtual bool RStorage::isSelectedWorkingSet(RObject::Id entityId)virtual
Reimplemented in isSelectedWorkingSet.
orderBackToFront
Section titled “orderBackToFront”virtual QList< REntity::Id > RStorage::orderBackToFront(const QSet< RObject::Id > &entityIds) constvirtual const
Returns: Ordered list of given IDs for display purposes.
queryAllBlockReferences
Section titled “queryAllBlockReferences”virtual QSet< RObject::Id > RStorage::queryAllBlockReferences() const =0 = 0pure virtual const
Returns: A set of all block reference entity IDs.
Reimplemented in queryAllBlockReferences, queryAllBlockReferences.
queryAllBlocks
Section titled “queryAllBlocks”virtual QSet< RObject::Id > RStorage::queryAllBlocks(bool undone=false)=0 = 0pure virtual
Returns: A set of all block IDs of the document.
Reimplemented in queryAllBlocks, queryAllBlocks.
queryAllEntities
Section titled “queryAllEntities”virtual QSet< RObject::Id > RStorage::queryAllEntities(bool undone, bool allBlocks, QList< RS::EntityType > types)=0 = 0pure virtual
Reimplemented in queryAllEntities, queryAllEntities.
queryAllEntities
Section titled “queryAllEntities”virtual QSet< RObject::Id > RStorage::queryAllEntities(bool undone=false, bool allBlocks=false, RS::EntityType type=RS::EntityAll)=0 = 0pure virtual
Returns: A set of all entity IDs of the document.
Reimplemented in queryAllEntities, queryAllEntities.
queryAllLayers
Section titled “queryAllLayers”virtual QSet< RObject::Id > RStorage::queryAllLayers(bool undone=false)=0 = 0pure virtual
Returns: A set of all layer IDs of the document.
Reimplemented in queryAllLayers, queryAllLayers.
queryAllLayerStates
Section titled “queryAllLayerStates”virtual QSet< RObject::Id > RStorage::queryAllLayerStates(bool undone=false) const =0 = 0pure virtual const
Returns: A set of all layer state IDs of the document.
Reimplemented in queryAllLayerStates.
queryAllLayoutBlocks
Section titled “queryAllLayoutBlocks”virtual QSet< RObject::Id > RStorage::queryAllLayoutBlocks(bool includeModelSpace=false, bool undone=false) const =0 = 0pure virtual const
Returns: A set of all block IDs of layout blocks of the document.
Reimplemented in queryAllLayoutBlocks, queryAllLayoutBlocks.
queryAllLayouts
Section titled “queryAllLayouts”virtual QSet< RObject::Id > RStorage::queryAllLayouts(bool undone=false)=0 = 0pure virtual
Returns: A set of all layout IDs of layouts of the document.
Reimplemented in queryAllLayouts, queryAllLayouts.
queryAllLinetypes
Section titled “queryAllLinetypes”virtual QSet< RObject::Id > RStorage::queryAllLinetypes()=0 = 0pure virtual
Returns: A set of all linetype IDs of the document.
Reimplemented in queryAllLinetypes, queryAllLinetypes.
queryAllObjects
Section titled “queryAllObjects”virtual QSet< RObject::Id > RStorage::queryAllObjects() const =0 = 0pure virtual const
Returns: A set of all object IDs of the document.
Reimplemented in queryAllObjects, queryAllObjects.
queryAllUcs
Section titled “queryAllUcs”virtual QSet< RObject::Id > RStorage::queryAllUcs()=0 = 0pure virtual
Returns: A set of all UCS IDs of the document.
Reimplemented in queryAllUcs, queryAllUcs.
queryAllViewports
Section titled “queryAllViewports”virtual QSet< RObject::Id > RStorage::queryAllViewports() const =0 = 0pure virtual const
Returns: A set of all viewport entity IDs.
Reimplemented in queryAllViewports, queryAllViewports.
queryAllViews
Section titled “queryAllViews”virtual QSet< RObject::Id > RStorage::queryAllViews(bool undone=false)=0 = 0pure virtual
Returns: A set of all view IDs of the document.
Reimplemented in queryAllViews, queryAllViews.
queryAllVisibleEntities
Section titled “queryAllVisibleEntities”virtual QSet< RObject::Id > RStorage::queryAllVisibleEntities()=0 = 0pure virtual
Reimplemented in queryAllVisibleEntities, queryAllVisibleEntities.
queryBlock
Section titled “queryBlock”virtual QSharedPointer< RBlock > RStorage::queryBlock(const QString &blockName) const =0 = 0pure virtual const
Reimplemented in queryBlock, queryBlock.
queryBlock
Section titled “queryBlock”virtual QSharedPointer< RBlock > RStorage::queryBlock(RObject::Id blockId) const =0 = 0pure virtual const
Reimplemented in queryBlock, queryBlock.
queryBlockDirect
Section titled “queryBlockDirect”virtual QSharedPointer< RBlock > RStorage::queryBlockDirect(const QString &blockName) constvirtual inline const
Reimplemented in queryBlockDirect.
queryBlockDirect
Section titled “queryBlockDirect”virtual QSharedPointer< RBlock > RStorage::queryBlockDirect(RObject::Id blockId) const =0 = 0pure virtual const
Reimplemented in queryBlockDirect, queryBlockDirect.
queryBlockEntities
Section titled “queryBlockEntities”virtual QSet< RObject::Id > RStorage::queryBlockEntities(RObject::Id blockId)=0 = 0pure virtual
Returns: A set of all entity IDs that are part of the given block.
Reimplemented in queryBlockEntities, queryBlockEntities.
queryBlockReferences
Section titled “queryBlockReferences”virtual QSet< RObject::Id > RStorage::queryBlockReferences(RObject::Id blockId) const =0 = 0pure virtual const
Returns: A set of all block reference entity IDs that reference the given block.
Reimplemented in queryBlockReferences, queryBlockReferences.
queryBlockReferencesForLayers
Section titled “queryBlockReferencesForLayers”virtual QSet< RObject::Id > RStorage::queryBlockReferencesForLayers(const QSet< RObject::Id > &layerIds) constvirtual inline const
Returns: A set of the IDs of those block reference entities whose visual appearance may change when the visibility of the given layers changes. These are references to blocks which contain entities on one of the given layers (directly or indirectly through nested block references) and block references which are themselves on one of the given layers (the visibility of layer 0 entities in the referenced block depends on the layer of the block reference). The default implementation conservatively returns all block references.
Reimplemented in queryBlockReferencesForLayers.
queryChildEntities
Section titled “queryChildEntities”virtual QSet< RObject::Id > RStorage::queryChildEntities(RObject::Id parentId, RS::EntityType type=RS::EntityAll)=0 = 0pure virtual
Returns: A set of all block attributes which are not stored in the block definition but as separate entities on the same level as the block reference.
Reimplemented in queryChildEntities, queryChildEntities.
queryCurrentBlock
Section titled “queryCurrentBlock”virtual QSharedPointer< RBlock > RStorage::queryCurrentBlock()virtual
queryCurrentLayer
Section titled “queryCurrentLayer”virtual QSharedPointer< RLayer > RStorage::queryCurrentLayer()virtual inline
queryCurrentLinetype
Section titled “queryCurrentLinetype”virtual QSharedPointer< RLinetype > RStorage::queryCurrentLinetype() constvirtual inline const
queryCurrentView
Section titled “queryCurrentView”virtual QSharedPointer< RView > RStorage::queryCurrentView()virtual inline
queryDimStyle
Section titled “queryDimStyle”virtual QSharedPointer< RDimStyle > RStorage::queryDimStyle() const =0 = 0pure virtual const
Reimplemented in queryDimStyle, queryDimStyle.
queryDimStyleDirect
Section titled “queryDimStyleDirect”virtual QSharedPointer< RDimStyle > RStorage::queryDimStyleDirect() const =0 = 0pure virtual const
Reimplemented in queryDimStyleDirect, queryDimStyleDirect.
queryDocumentVariables
Section titled “queryDocumentVariables”virtual QSharedPointer< RDocumentVariables > RStorage::queryDocumentVariables() const =0 = 0pure virtual const
Reimplemented in queryDocumentVariables, queryDocumentVariables.
queryDocumentVariablesDirect
Section titled “queryDocumentVariablesDirect”virtual QSharedPointer< RDocumentVariables > RStorage::queryDocumentVariablesDirect() const =0 = 0pure virtual const
Reimplemented in queryDocumentVariablesDirect, queryDocumentVariablesDirect.
queryEntity
Section titled “queryEntity”virtual QSharedPointer< REntity > RStorage::queryEntity(RObject::Id entityId) const =0 = 0pure virtual const
Returns: A pointer to the entity with the given entityId or NULL if no such entity exists.
Reimplemented in queryEntity, queryEntity.
queryEntityDirect
Section titled “queryEntityDirect”virtual QSharedPointer< REntity > RStorage::queryEntityDirect(RObject::Id entityId) constvirtual const
Reimplemented in queryEntityDirect, queryEntityDirect.
queryInfiniteEntities
Section titled “queryInfiniteEntities”virtual QSet< RObject::Id > RStorage::queryInfiniteEntities() const =0 = 0pure virtual const
Returns: A set of entity IDs of all infinite entities (xlines).
Reimplemented in queryInfiniteEntities, queryInfiniteEntities.
queryLayer
Section titled “queryLayer”virtual QSharedPointer< RLayer > RStorage::queryLayer(const QString &layerName) const =0 = 0pure virtual const
Returns: A pointer to the layer with the given layerName or NULL if no such layer exists.
Reimplemented in queryLayer, queryLayer.
queryLayer
Section titled “queryLayer”virtual QSharedPointer< RLayer > RStorage::queryLayer(RObject::Id layerId) const =0 = 0pure virtual const
Returns: A pointer to the layer with the given layerId or NULL if no such layer exists.
Reimplemented in queryLayer, queryLayer.
queryLayerBlockEntities
Section titled “queryLayerBlockEntities”virtual QSet< RObject::Id > RStorage::queryLayerBlockEntities(RObject::Id layerId, RObject::Id blockId)=0 = 0pure virtual
Reimplemented in queryLayerBlockEntities, queryLayerBlockEntities.
queryLayerDirect
Section titled “queryLayerDirect”virtual QSharedPointer< RLayer > RStorage::queryLayerDirect(const QString &layerName) constvirtual inline const
queryLayerDirect
Section titled “queryLayerDirect”virtual QSharedPointer< RLayer > RStorage::queryLayerDirect(RObject::Id layerId) constvirtual inline const
Reimplemented in queryLayerDirect, queryLayerDirect.
queryLayerEntities
Section titled “queryLayerEntities”virtual QSet< RObject::Id > RStorage::queryLayerEntities(RObject::Id layerId, bool allBlocks=false)=0 = 0pure virtual
Returns: A set of all entity IDs on the given layer.
Reimplemented in queryLayerEntities, queryLayerEntities.
queryLayerState
Section titled “queryLayerState”virtual QSharedPointer< RLayerState > RStorage::queryLayerState(const QString &layerStateName) const =0 = 0pure virtual const
Returns: A pointer to the layer with the given layerName or NULL if no such layer exists.
Reimplemented in queryLayerState, queryLayerState.
queryLayerState
Section titled “queryLayerState”virtual QSharedPointer< RLayerState > RStorage::queryLayerState(RObject::Id layerStateId) const =0 = 0pure virtual const
Returns: A pointer to the layer state with the given layerStateId or NULL if no such layer state exists.
Reimplemented in queryLayerState, queryLayerState.
queryLayerStateDirect
Section titled “queryLayerStateDirect”virtual QSharedPointer< RLayerState > RStorage::queryLayerStateDirect(const QString &layerStateName) constvirtual inline const
queryLayerStateDirect
Section titled “queryLayerStateDirect”virtual QSharedPointer< RLayerState > RStorage::queryLayerStateDirect(RObject::Id layerStateId) constvirtual inline const
Reimplemented in queryLayerStateDirect, queryLayerStateDirect.
queryLayout
Section titled “queryLayout”virtual QSharedPointer< RLayout > RStorage::queryLayout(const QString &layoutName) const =0 = 0pure virtual const
Returns: A pointer to the layout with the given layoutName or NULL if no such layout exists.
Reimplemented in queryLayout, queryLayout.
queryLayout
Section titled “queryLayout”virtual QSharedPointer< RLayout > RStorage::queryLayout(RObject::Id layoutId) const =0 = 0pure virtual const
Returns: A pointer to the layout with the given layoutId or NULL if no such layout exists.
Reimplemented in queryLayout, queryLayout.
queryLayoutDirect
Section titled “queryLayoutDirect”virtual QSharedPointer< RLayout > RStorage::queryLayoutDirect(RObject::Id layoutId) constvirtual inline const
Reimplemented in queryLayoutDirect, queryLayoutDirect.
queryLinetype
Section titled “queryLinetype”virtual QSharedPointer< RLinetype > RStorage::queryLinetype(const QString &linetypeName) const =0 = 0pure virtual const
Reimplemented in queryLinetype, queryLinetype.
queryLinetype
Section titled “queryLinetype”virtual QSharedPointer< RLinetype > RStorage::queryLinetype(RObject::Id linetypeId) const =0 = 0pure virtual const
Reimplemented in queryLinetype, queryLinetype.
queryLinetypeDirect
Section titled “queryLinetypeDirect”virtual QSharedPointer< RLinetype > RStorage::queryLinetypeDirect(RObject::Id linetypeId) const =0 = 0pure virtual const
Reimplemented in queryLinetypeDirect, queryLinetypeDirect.
queryObject
Section titled “queryObject”virtual QSharedPointer< RObject > RStorage::queryObject(RObject::Id objectId) const =0 = 0pure virtual const
Returns: A shared pointer to the object with the given objectId or null pointer if the object is no available in this storage.
Reimplemented in queryObject, queryObject.
queryObjectByHandle
Section titled “queryObjectByHandle”virtual QSharedPointer< RObject > RStorage::queryObjectByHandle(RObject::Handle objectHandle) const =0 = 0pure virtual const
Reimplemented in queryObjectByHandle, queryObjectByHandle.
queryObjectCC
Section titled “queryObjectCC”virtual RObject * RStorage::queryObjectCC(RObject::Id objectId) const =0 = 0pure virtual const
Reimplemented in queryObjectCC, queryObjectCC.
queryObjectDirect
Section titled “queryObjectDirect”virtual QSharedPointer< RObject > RStorage::queryObjectDirect(RObject::Id objectId) constvirtual inline const
Reimplemented in queryObjectDirect, queryObjectDirect.
querySelectedEntities
Section titled “querySelectedEntities”virtual QSet< RObject::Id > RStorage::querySelectedEntities() const =0 = 0pure virtual const
Returns: A set of entity IDs of all selected entities.
Reimplemented in querySelectedEntities, querySelectedEntities.
querySelectedLayerEntities
Section titled “querySelectedLayerEntities”virtual QSet< RObject::Id > RStorage::querySelectedLayerEntities(RObject::Id layerId, bool allBlocks=false)=0 = 0pure virtual
Returns: A set of all entity IDs of selected entities on the given layer.
Reimplemented in querySelectedLayerEntities, querySelectedLayerEntities.
querySelectedLayers
Section titled “querySelectedLayers”virtual QSet< RObject::Id > RStorage::querySelectedLayers() const =0 = 0pure virtual const
Returns: A set of object IDs of all selected objects (layers, …).
Reimplemented in querySelectedLayers, querySelectedLayers.
queryUcs
Section titled “queryUcs”virtual QSharedPointer< RUcs > RStorage::queryUcs(const QString &ucsName) const =0 = 0pure virtual const
Returns: A pointer to the UCS with the given ucsName or NULL if no such UCS exists.
Reimplemented in queryUcs, queryUcs.
queryUcs
Section titled “queryUcs”virtual QSharedPointer< RUcs > RStorage::queryUcs(RObject::Id ucsId) const =0 = 0pure virtual const
Returns: A pointer to the UCS with the given ucsId or NULL if no such UCS exists.
Reimplemented in queryUcs, queryUcs.
queryUcsDirect
Section titled “queryUcsDirect”virtual QSharedPointer< RUcs > RStorage::queryUcsDirect(RObject::Id ucsId) constvirtual inline const
Reimplemented in queryUcsDirect, queryUcsDirect.
queryView
Section titled “queryView”virtual QSharedPointer< RView > RStorage::queryView(const QString &viewName) const =0 = 0pure virtual const
Reimplemented in queryView, queryView.
queryView
Section titled “queryView”virtual QSharedPointer< RView > RStorage::queryView(RObject::Id viewId) const =0 = 0pure virtual const
Reimplemented in queryView, queryView.
queryVisibleEntityDirect
Section titled “queryVisibleEntityDirect”virtual QSharedPointer< REntity > RStorage::queryVisibleEntityDirect(RObject::Id entityId) constvirtual const
Reimplemented in queryVisibleEntityDirect.
queryWorkingSetEntities
Section titled “queryWorkingSetEntities”virtual QSet< RObject::Id > RStorage::queryWorkingSetEntities()=0 = 0pure virtual
Returns: A set of all entity IDs in the current working set.
Reimplemented in queryWorkingSetEntities.
removeObject
Section titled “removeObject”virtual bool RStorage::removeObject(QSharedPointer< RObject > object)=0 = 0pure virtual
Reimplemented in removeObject.
removeVariable
Section titled “removeVariable”virtual void RStorage::removeVariable(const QString &key)=0 = 0pure virtual
Removes the custom variable with the given key.
Reimplemented in removeVariable.
resetTransactionStack
Section titled “resetTransactionStack”virtual void RStorage::resetTransactionStack()=0 = 0pure virtual
Reimplemented in resetTransactionStack.
rollbackTransaction
Section titled “rollbackTransaction”virtual void RStorage::rollbackTransaction()=0 = 0pure virtual
Rolls the current transaction back in order to cancel it.
This function should never be called under normal circumstances.
Reimplemented in rollbackTransaction.
saveObject
Section titled “saveObject”virtual bool RStorage::saveObject(QSharedPointer< RObject > object, bool checkBlockRecursion=true, bool keepHandles=false, bool *overwrite=NULL)=0 = 0pure virtual
Saves the given object to the storage.
Reimplemented in saveObject.
saveTransaction
Section titled “saveTransaction”virtual void RStorage::saveTransaction(RTransaction &transaction)=0 = 0pure virtual
Saves the given transaction.
Transactions need to be stored for undo / redo functionality.
Reimplemented in saveTransaction.
selectAllEntities
Section titled “selectAllEntities”virtual void RStorage::selectAllEntities(QSet< RObject::Id > *affectedEntities=NULL)=0 = 0pure virtual
Sets the selection status of all entities.
Reimplemented in selectAllEntities.
selectEntities
Section titled “selectEntities”virtual int RStorage::selectEntities(const QSet< RObject::Id > &entityIds, bool add=false, QSet< RObject::Id > *affectedEntities=NULL)=0 = 0pure virtual
Selects all entities with the given IDs.
Parameters:
add: True to add the entities to the current selection. False to replace the current selection with the new entities.affected: Optional pointer to an empty set of entity IDs. After the call, this set will contain all entity IDs of entities that were affected by the call.
Reimplemented in selectEntities.
selectEntity
Section titled “selectEntity”virtual void RStorage::selectEntity(RObject::Id entityId, bool add=false, QSet< RObject::Id > *affectedEntities=NULL)=0 = 0pure virtual
Selects the entity with the given ID.
Parameters:
add: True to add the entity to the current selection. False to replace the current selection with the given entity.affected: Optional pointer to an empty set of entity IDs. After the call, this set will contain all entity IDs of entities that were affected by the call.
Reimplemented in selectEntity.
setCurrentBlock
Section titled “setCurrentBlock”void RStorage::setCurrentBlock(const QString &blockName)inline
setCurrentBlock
Section titled “setCurrentBlock”virtual void RStorage::setCurrentBlock(RObject::Id blockId)virtual
Reimplemented in setCurrentBlock.
setCurrentColor
Section titled “setCurrentColor”virtual void RStorage::setCurrentColor(const RColor &color)virtual
setCurrentLayer
Section titled “setCurrentLayer”void RStorage::setCurrentLayer(const QString &layerName, RTransaction *transaction=NULL)setCurrentLayer
Section titled “setCurrentLayer”void RStorage::setCurrentLayer(RObject::Id layerId, RTransaction *transaction=NULL)setCurrentLinetype
Section titled “setCurrentLinetype”void RStorage::setCurrentLinetype(const QString &name)setCurrentLinetype
Section titled “setCurrentLinetype”void RStorage::setCurrentLinetype(RObject::Id ltId)setCurrentLinetypePattern
Section titled “setCurrentLinetypePattern”void RStorage::setCurrentLinetypePattern(const RLinetypePattern &p)setCurrentLineweight
Section titled “setCurrentLineweight”void RStorage::setCurrentLineweight(RLineweight::Lineweight lw)setCurrentView
Section titled “setCurrentView”void RStorage::setCurrentView(const QString &viewName)inline
setCurrentView
Section titled “setCurrentView”void RStorage::setCurrentView(RObject::Id viewId)inline
setCurrentViewport
Section titled “setCurrentViewport”virtual void RStorage::setCurrentViewport(RObject::Id viewportId)virtual inline
setDimensionFont
Section titled “setDimensionFont”virtual void RStorage::setDimensionFont(const QString &f, RTransaction *transaction=NULL)virtual
setDocument
Section titled “setDocument”void RStorage::setDocument(RDocument *doc)inline
setEntityParentId
Section titled “setEntityParentId”virtual void RStorage::setEntityParentId(REntity &entity, RObject::Id parentId)virtual
Reimplemented in setEntityParentId.
setKnownVariable
Section titled “setKnownVariable”virtual void RStorage::setKnownVariable(RS::KnownVariable key, const QVariant &value, RTransaction *transaction=NULL)=0 = 0pure virtual
Sets a known DXF/DWG variable for this document.
Parameters:
key: Variable key (see DXF reference)value: New value of the variable.transaction: RTransaction to use for the change or NULL (default) to create a transaction on the fly.
Reimplemented in setKnownVariable.
setLastTransactionId
Section titled “setLastTransactionId”virtual void RStorage::setLastTransactionId(int transactionId)virtual inline
Sets the ID of the last created transaction.
This is called when a transaction is undone or redone (the last transaction id indicates where we are in the transaction stack). The default implementation sets the variable “LastTransaction”.
Reimplemented in setLastTransactionId.
setLayer0Id
Section titled “setLayer0Id”virtual void RStorage::setLayer0Id(RObject::Id id)virtual inline
setLinetypeScale
Section titled “setLinetypeScale”virtual void RStorage::setLinetypeScale(double v, RTransaction *transaction=NULL)virtual
Sets the global linetype scale of this document to the given value.
Parameters:
transaction: Transaction to use for the modification or NULL to create a local transaction (default).
setMaxDrawOrder
Section titled “setMaxDrawOrder”virtual void RStorage::setMaxDrawOrder(int m)virtual inline
setMeasurement
Section titled “setMeasurement”void RStorage::setMeasurement(RS::Measurement m, RTransaction *transaction=NULL)setModelSpaceBlockId
Section titled “setModelSpaceBlockId”virtual void RStorage::setModelSpaceBlockId(RObject::Id id)virtual inline
setModified
Section titled “setModified”void RStorage::setModified(bool m)Resets the modified flag.
Modification time is stored.
setNotifyListeners
Section titled “setNotifyListeners”void RStorage::setNotifyListeners(bool on)inline
setObjectHandle
Section titled “setObjectHandle”virtual void RStorage::setObjectHandle(RObject &object, RObject::Handle objectHandle)virtual
Reimplemented in setObjectHandle.
setObjectId
Section titled “setObjectId”virtual void RStorage::setObjectId(RObject &object, RObject::Id objectId) constvirtual const
setUndoStatus
Section titled “setUndoStatus”virtual void RStorage::setUndoStatus(RObject &object, bool status)virtual
Reimplemented in setUndoStatus.
setUndoStatus
Section titled “setUndoStatus”virtual bool RStorage::setUndoStatus(RObject::Id object, bool status)=0 = 0pure virtual
Reimplemented in setUndoStatus, setUndoStatus.
setUnit
Section titled “setUnit”void RStorage::setUnit(RS::Unit unit, RTransaction *transaction=NULL)setVariable
Section titled “setVariable”virtual void RStorage::setVariable(const QString &key, const QVariant &value, bool overwrite=true)=0 = 0pure virtual
Sets a custom variable in the context of this document.
Parameters:
key: Variable key (name)value: Variable valueoverwrite: True to overwrite an existing variable with the same key (default)
Reimplemented in setVariable.
sortBlocks
Section titled “sortBlocks”QList< RBlock::Id > RStorage::sortBlocks(const QList< RObject::Id > &blockIds) constconst
sortLayers
Section titled “sortLayers”QList< RLayer::Id > RStorage::sortLayers(const QList< RObject::Id > &layerIds) constconst
startDocumentVariablesTransaction
Section titled “startDocumentVariablesTransaction”QSharedPointer< RDocumentVariables > RStorage::startDocumentVariablesTransaction(RTransaction *&transaction, bool &useLocalTransaction)startTransactionGroup
Section titled “startTransactionGroup”virtual void RStorage::startTransactionGroup()virtual inline
toggleUndoStatus
Section titled “toggleUndoStatus”virtual void RStorage::toggleUndoStatus(QSet< RObject::Id > &objects)=0 = 0pure virtual
Toggles the current undo status of all given objects.
The undo status can for example be a boolean value that is true if the object is undone or false otherwise.
Reimplemented in toggleUndoStatus.
toggleUndoStatus
Section titled “toggleUndoStatus”virtual void RStorage::toggleUndoStatus(RObject::Id object)=0 = 0pure virtual
Toggles the current undo status of the given object.
Reimplemented in toggleUndoStatus.
unsetCurrentViewport
Section titled “unsetCurrentViewport”virtual void RStorage::unsetCurrentViewport()virtual inline
update
Section titled “update”virtual void RStorage::update()virtual inline
Clear caches:
Reimplemented in update.
getKnownVariableName
Section titled “getKnownVariableName”static QString RStorage::getKnownVariableName(RS::KnownVariable n)static
Returns: Name of the given known variable enum. Used for debugging.
lessThan
Section titled “lessThan”static bool RStorage::lessThan(const QPair< RObject::Id, int > &p1, const QPair< RObject::Id, int > &p2)static
Non-Scriptable: This function is not available in script environments.
registerCustomEntityType
Section titled “registerCustomEntityType”static void RStorage::registerCustomEntityType(RS::EntityType type)static
unregisterCustomEntityType
Section titled “unregisterCustomEntityType”static void RStorage::unregisterCustomEntityType(RS::EntityType type)static
handleCounter
Section titled “handleCounter”RObject::Handle RStorage::handleCounterprotected
lastModified
Section titled “lastModified”QDateTime RStorage::lastModifiedprotected
modified
Section titled “modified”bool RStorage::modifiedprotected
customEntityTypes
Section titled “customEntityTypes”static QList< RS::EntityType > RStorage::customEntityTypesstatic protected
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.
currentBlockId
Section titled “currentBlockId”RObject::Id RStorage::currentBlockIdprivate
currentColor
Section titled “currentColor”RColor RStorage::currentColorprivate
currentLinetypeId
Section titled “currentLinetypeId”RObject::Id RStorage::currentLinetypeIdprivate
currentLineweight
Section titled “currentLineweight”RLineweight::Lineweight RStorage::currentLineweightprivate
currentViewId
Section titled “currentViewId”RObject::Id RStorage::currentViewIdprivate
currentViewportId
Section titled “currentViewportId”RObject::Id RStorage::currentViewportIdprivate
document
Section titled “document”RDocument* RStorage::documentprivate
idCounter
Section titled “idCounter”RObject::Id RStorage::idCounterprivate
lastTransactionGroup
Section titled “lastTransactionGroup”int RStorage::lastTransactionGroupprivate
lastTransactionId
Section titled “lastTransactionId”int RStorage::lastTransactionIdprivate
layer0Id
Section titled “layer0Id”RObject::Id RStorage::layer0Idprivate
maxDrawOrder
Section titled “maxDrawOrder”int RStorage::maxDrawOrderprivate
modelSpaceBlockId
Section titled “modelSpaceBlockId”RObject::Id RStorage::modelSpaceBlockIdprivate
modifiedListeners
Section titled “modifiedListeners”QList<RModifiedListener*> RStorage::modifiedListenersprivate
notifyGlobalListeners
Section titled “notifyGlobalListeners”bool RStorage::notifyGlobalListenersprivate
operator<<
Section titled “operator<<”QDebug operator<<(QDebug dbg, RStorage &s)Stream operator for QDebug.
Non-Scriptable: This function is not available in script environments.