Skip to content

RStorage

Class in Core Module
Header: #include <src/core/RStorage.h>
Inherits: RNonCopyable (private), RRequireHeap
Inherited by: RMemoryStorage

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.

RStorage()
virtual ~RStorage()
void addModifiedListener(RModifiedListener *l)
Adds a listener for modified status changed events.
virtual void beginTransaction()=0 = 0
Starts a new transaction.
virtual void clear()
Resets this storage to its initial, empty state.
virtual void clearEntitySelection(QSet< RObject::Id > *affectedEntities=NULL)=0 = 0
Clears the selection status of all entities.
virtual void commitTransaction()=0 = 0
Commits the current transaction.
virtual int countSelectedEntities() const
virtual bool deleteObject(RObject::Id objectId)=0 = 0
Deletes the object with the given ID.
virtual void deleteTransactionsFrom(int transactionId)=0 = 0
Deletes 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 = 0
Deselects all entities with the given IDs.
virtual void deselectEntity(RObject::Id entityId, QSet< RObject::Id > *affectedEntities=NULL)=0 = 0
Deselects 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 = 0
Removes the custom variable with the given key.
virtual void resetTransactionStack()=0 = 0
virtual void rollbackTransaction()=0 = 0
Rolls 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 = 0
Saves the given object to the storage.
virtual void saveTransaction(RTransaction &transaction)=0 = 0
Saves the given transaction.
virtual void selectAllEntities(QSet< RObject::Id > *affectedEntities=NULL)=0 = 0
Sets the selection status of all entities.
virtual int selectEntities(const QSet< RObject::Id > &entityIds, bool add=false, QSet< RObject::Id > *affectedEntities=NULL)=0 = 0
Selects all entities with the given IDs.
virtual void selectEntity(RObject::Id entityId, bool add=false, QSet< RObject::Id > *affectedEntities=NULL)=0 = 0
Selects 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 = 0
Sets 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 = 0
Sets 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 = 0
Toggles the current undo status of all given objects.
virtual void toggleUndoStatus(RObject::Id object)=0 = 0
Toggles the current undo status of the given object.
virtual void unsetCurrentViewport()
virtual void update()
Clear caches:
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)
RObject::Handle handleCounter
QDateTime lastModified
bool modified
static QList< RS::EntityType > customEntityTypes
RObject::Id currentBlockId
RColor currentColor
RObject::Id currentLinetypeId
RLineweight::Lineweight currentLineweight
RObject::Id currentViewId
RObject::Id currentViewportId
RDocument * document
RObject::Id idCounter
int lastTransactionGroup
int lastTransactionId
RObject::Id layer0Id
int maxDrawOrder
RObject::Id modelSpaceBlockId
QList< RModifiedListener * > modifiedListeners
bool notifyGlobalListeners
QDebug operator<<(QDebug dbg, RStorage &s)
Stream operator for QDebug.

RStorage::RStorage()

virtual RStorage::~RStorage()

virtual inline

void RStorage::addModifiedListener(RModifiedListener *l)

Adds a listener for modified status changed events.

This can for example be a modification indication widget.

virtual void RStorage::beginTransaction()=0 = 0

pure 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.

virtual void RStorage::clearEntitySelection(QSet< RObject::Id > *affectedEntities=NULL)=0 = 0

pure virtual

Clears the selection status of all entities.

Reimplemented in clearEntitySelection.

virtual void RStorage::commitTransaction()=0 = 0

pure virtual

Commits the current transaction.

This function is called after something has been stored in the storage.

Reimplemented in commitTransaction.

virtual int RStorage::countSelectedEntities() const

virtual inline const

Returns: Number of selected entities.

Reimplemented in countSelectedEntities.

virtual bool RStorage::deleteObject(RObject::Id objectId)=0 = 0

pure virtual

Deletes the object with the given ID.

Reimplemented in deleteObject, deleteObject.

virtual void RStorage::deleteTransactionsFrom(int transactionId)=0 = 0

pure 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.

virtual int RStorage::deselectEntities(const QSet< RObject::Id > &entityIds, QSet< RObject::Id > *affectedEntities=NULL)=0 = 0

pure 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.

virtual void RStorage::deselectEntity(RObject::Id entityId, QSet< RObject::Id > *affectedEntities=NULL)=0 = 0

pure 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.

void RStorage::endDocumentVariablesTransaction(RTransaction *transaction, bool useLocalTransaction, QSharedPointer< RDocumentVariables > docVars)

virtual RObject::Id RStorage::getBlockId(const QString &blockName) const =0 = 0

pure virtual const

Reimplemented in getBlockId, getBlockId.

virtual RObject::Id RStorage::getBlockIdAuto(const QString &blockLayoutName) const =0 = 0

pure virtual const

Reimplemented in getBlockIdAuto, getBlockIdAuto.

virtual QString RStorage::getBlockName(RObject::Id blockId) const =0 = 0

pure virtual const

Reimplemented in getBlockName, getBlockName.

virtual QString RStorage::getBlockNameFromHandle(RObject::Handle blockHandle) const =0 = 0

pure virtual const

Reimplemented in getBlockNameFromHandle, getBlockNameFromHandle.

virtual QString RStorage::getBlockNameFromLayout(const QString &layoutName) const =0 = 0

pure virtual const

Reimplemented in getBlockNameFromLayout, getBlockNameFromLayout.

virtual QString RStorage::getBlockNameFromLayout(RObject::Id layoutId) const =0 = 0

pure virtual const

Reimplemented in getBlockNameFromLayout, getBlockNameFromLayout.

virtual QSet< QString > RStorage::getBlockNames(const QString &rxStr=RDEFAULT_QSTRING, bool undone=false) const =0 = 0

pure virtual const

Reimplemented in getBlockNames, getBlockNames.

virtual RBox RStorage::getBoundingBox(bool ignoreHiddenLayers=true, bool ignoreEmpty=false) const =0 = 0

pure virtual const

Returns: The bounding box around all visible entities.

Reimplemented in getBoundingBox.

virtual RObject::Id RStorage::getCurrentBlockId() const

virtual inline const

Reimplemented in getCurrentBlockId.

virtual RColor RStorage::getCurrentColor() const

virtual const

Reimplemented in getCurrentColor.

virtual RLayer::Id RStorage::getCurrentLayerId() const

virtual const

Reimplemented in getCurrentLayerId.

virtual RLinetype::Id RStorage::getCurrentLinetypeId() const

virtual const

Reimplemented in getCurrentLinetypeId.

virtual RLinetypePattern RStorage::getCurrentLinetypePattern() const

virtual const

virtual RLineweight::Lineweight RStorage::getCurrentLineweight() const

virtual const

Reimplemented in getCurrentLineweight.

virtual RObject::Id RStorage::getCurrentViewId() const

virtual inline const

Reimplemented in getCurrentViewId.

virtual RObject::Id RStorage::getCurrentViewportId() const

virtual inline const

virtual QString RStorage::getDimensionFont() const

virtual const

Reimplemented in getDimensionFont.

RDocument * RStorage::getDocument() const

inline const

virtual RBox RStorage::getEntitiesBox(QSet< RObject::Id > &ids) const =0 = 0

pure virtual const

Reimplemented in getEntitiesBox.

virtual QVariant RStorage::getKnownVariable(RS::KnownVariable key) const =0 = 0

pure virtual const

Returns: Value for the given DXF/DWG variable.

Reimplemented in getKnownVariable, getKnownVariable.

QString RStorage::getLastModified() const

inline const

QDateTime RStorage::getLastModifiedDateTime() const

inline const

Non-Scriptable: This function is not available in script environments.

virtual int RStorage::getLastTransactionId()

virtual inline

Returns: The ID of the last completed transaction. The default implementation reads variable “LastTransaction”.

virtual RObject::Id RStorage::getLayer0Id() const

virtual inline const

virtual RObject::Id RStorage::getLayerId(const QString &layerName) const =0 = 0

pure virtual const

Reimplemented in getLayerId, getLayerId.

virtual QString RStorage::getLayerName(RObject::Id layerId) const =0 = 0

pure virtual const

Reimplemented in getLayerName, getLayerName.

virtual QSet< QString > RStorage::getLayerNames(const QString &rxStr=RDEFAULT_QSTRING) const =0 = 0

pure virtual const

Reimplemented in getLayerNames, getLayerNames.

virtual RObject::Id RStorage::getLayerStateId(const QString &layerStateName) const =0 = 0

pure virtual const

Reimplemented in getLayerStateId.

virtual QString RStorage::getLayerStateName(RObject::Id layerStateId) const =0 = 0

pure virtual const

Reimplemented in getLayerStateName.

virtual QSet< QString > RStorage::getLayerStateNames(const QString &rxStr=RDEFAULT_QSTRING) const =0 = 0

pure virtual const

Reimplemented in getLayerStateNames.

virtual RObject::Id RStorage::getLayoutId(const QString &layoutName) const =0 = 0

pure virtual const

Reimplemented in getLayoutId, getLayoutId.

virtual QString RStorage::getLayoutName(RObject::Id layoutId) const =0 = 0

pure virtual const

Reimplemented in getLayoutName, getLayoutName.

virtual QSet< QString > RStorage::getLayoutNames(const QString &rxStr=RDEFAULT_QSTRING) const =0 = 0

pure virtual const

Reimplemented in getLayoutNames, getLayoutNames.

virtual QString RStorage::getLinetypeDescription(RObject::Id linetypeId) const =0 = 0

pure virtual const

Returns: User readable description for the given linetype.

Reimplemented in getLinetypeDescription, getLinetypeDescription.

virtual RObject::Id RStorage::getLinetypeId(const QString &linetypeName) const =0 = 0

pure virtual const

Returns: Linetype ID of the given linetype name or RObject::INVALID_ID.

Reimplemented in getLinetypeId, getLinetypeId.

virtual QString RStorage::getLinetypeLabel(RObject::Id linetypeId) const =0 = 0

pure virtual const

Returns: User readable label for the given linetype.

Reimplemented in getLinetypeLabel, getLinetypeLabel.

virtual QString RStorage::getLinetypeName(RObject::Id linetypeId) const =0 = 0

pure virtual const

Returns: Linetype name of the given linetype.

Reimplemented in getLinetypeName, getLinetypeName.

virtual QSet< QString > RStorage::getLinetypeNames() const =0 = 0

pure virtual const

Returns: List of all available linetype pattern names in this document.

Reimplemented in getLinetypeNames, getLinetypeNames.

virtual QList< RLinetypePattern > RStorage::getLinetypePatterns() const =0 = 0

pure virtual const

Returns: List of all available linetype patterns in this document.

Reimplemented in getLinetypePatterns, getLinetypePatterns.

virtual double RStorage::getLinetypeScale() const

virtual const

virtual int RStorage::getMaxDrawOrder()

virtual inline

virtual RLineweight::Lineweight RStorage::getMaxLineweight() const =0 = 0

pure virtual const

Reimplemented in getMaxLineweight.

virtual RObject::Handle RStorage::getMaxObjectHandle()

virtual

virtual RObject::Id RStorage::getMaxObjectId()

virtual

virtual int RStorage::getMaxTransactionId()=0 = 0

pure virtual

Returns: The highest transaction ID that is in use. This should be used by deleteTransactionsFrom internally.

Reimplemented in getMaxTransactionId.

RS::Measurement RStorage::getMeasurement() const

const

virtual int RStorage::getMinDrawOrder()

virtual

virtual RObject::Id RStorage::getModelSpaceBlockId() const

virtual inline const

virtual RObject::Handle RStorage::getNewObjectHandle()

virtual

Reimplemented in getNewObjectHandle, getNewObjectHandle.

virtual RObject::Id RStorage::getNewObjectId()

virtual

Reimplemented in getNewObjectId.

bool RStorage::getNotifyListeners() const

inline const

virtual RBox RStorage::getSelectionBox() const =0 = 0

pure virtual const

Reimplemented in getSelectionBox.

virtual RTransaction RStorage::getTransaction(int transactionId)=0 = 0

pure virtual

Returns: Transaction with the given id.

Reimplemented in getTransaction.

virtual int RStorage::getTransactionGroup() const

virtual inline const

RS::Unit RStorage::getUnit() const

const

virtual QVariant RStorage::getVariable(const QString &key) const =0 = 0

pure virtual const

Returns: The value of the given variable or an invalid variant if the variable does not exist.

Reimplemented in getVariable.

virtual QStringList RStorage::getVariables() const =0 = 0

pure virtual const

Returns: List of custom variable names stored in this document.

Reimplemented in getVariables.

virtual RObject::Id RStorage::getViewId(const QString &viewName) const =0 = 0

pure virtual const

Reimplemented in getViewId, getViewId.

virtual QString RStorage::getViewName(RObject::Id viewId) const =0 = 0

pure virtual const

Reimplemented in getViewName, getViewName.

virtual QSet< QString > RStorage::getViewNames() const =0 = 0

pure virtual const

Reimplemented in getViewNames, getViewNames.

virtual bool RStorage::hasBlock(const QString &blockName) const

virtual const

virtual bool RStorage::hasBlockEntities(RObject::Id blockId) const =0 = 0

pure virtual const

Returns: True if the given block contains any entities.

Reimplemented in hasBlockEntities, hasBlockEntities.

virtual bool RStorage::hasChildEntities(RObject::Id parentId) const =0 = 0

pure virtual const

Reimplemented in hasChildEntities, hasChildEntities.

virtual bool RStorage::hasLayer(const QString &layerName) const

virtual const

virtual bool RStorage::hasLayerState(const QString &layerStateName) const

virtual const

virtual bool RStorage::hasLayerStates() const

virtual const

virtual bool RStorage::hasLayout(const QString &layoutName) const

virtual const

virtual bool RStorage::hasLinetype(const QString &linetypeName) const

virtual const

virtual bool RStorage::hasSelection() const =0 = 0

pure virtual const

Returns: True if at least one entity is selected in this storage.

Reimplemented in hasSelection.

virtual bool RStorage::hasVariable(const QString &key) const

virtual inline const

Returns: True if the given variable exists in this storage.

virtual bool RStorage::hasView(const QString &viewName) const

virtual const

virtual bool RStorage::isBlockFrozen(RObject::Id blockId) const

virtual const

Returns: True if the given block is frozen.

virtual bool RStorage::isEntity(RObject::Id objectId)

virtual

virtual bool RStorage::isEntityVisible(const REntity &entity, RObject::Id blockId) const

virtual const

Returns: True if the given entity is visible in the context of the given block or the current block (default).

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.

virtual bool RStorage::isLayerFrozen(const RLayer &layer) const

virtual const

Returns: True if this layer or one of its parent layers are frozen.

virtual bool RStorage::isLayerFrozen(RObject::Id layerId) const

virtual const

Returns: True if this layer or one of its parent layers are frozen.

virtual bool RStorage::isLayerLocked(const RLayer &layer) const

virtual const

virtual bool RStorage::isLayerLocked(RObject::Id layerId) const

virtual const

virtual bool RStorage::isLayerOff(const RLayer &layer) const

virtual const

virtual bool RStorage::isLayerOff(RObject::Id layerId) const

virtual const

Returns: True if this layer is off.

virtual bool RStorage::isLayerOffOrFrozen(const RLayer &layer) const

virtual const

virtual bool RStorage::isLayerOffOrFrozen(RObject::Id layerId) const

virtual const

Returns: True if this layer is off or frozen.

virtual bool RStorage::isLayerPlottable(const RLayer &layer) const

virtual const

Returns: True if this layer and its parent layers are plottable.

virtual bool RStorage::isLayerPlottable(RObject::Id layerId) const

virtual const

Returns: True if this layer and its parent layers are plottable.

virtual bool RStorage::isLayerSnappable(const RLayer &layer) const

virtual const

Returns: True if this layer and its parent layers are snappable.

virtual bool RStorage::isLayerSnappable(RObject::Id layerId) const

virtual const

Returns: True if this layer and its parent layers are snappable.

virtual bool RStorage::isLayoutBlock(RObject::Id blockId) const

virtual const

Returns: True if the given block is a layout block (i.e. paper space block).

bool RStorage::isModified() const

inline const

Returns: True if the document has unsaved changes.

virtual bool RStorage::isParentLayerFrozen(const RLayer &layer) const

virtual const

virtual bool RStorage::isParentLayerFrozen(RObject::Id layerId) const

virtual const

Returns: True if a parent layer of the given layer is frozen.

virtual bool RStorage::isParentLayerLocked(const RLayer &layer) const

virtual const

virtual bool RStorage::isParentLayerLocked(RObject::Id layerId) const

virtual const

Returns: True if a parent layer of the given layer is locked.

virtual bool RStorage::isParentLayerPlottable(const RLayer &layer) const

virtual const

virtual bool RStorage::isParentLayerPlottable(RObject::Id layerId) const

virtual const

Returns: True if a parent layer of the given layer is plottable.

virtual bool RStorage::isParentLayerSnappable(const RLayer &layer) const

virtual const

virtual bool RStorage::isParentLayerSnappable(RObject::Id layerId) const

virtual const

Returns: True if a parent layer of the given layer is snappable.

virtual bool RStorage::isSelected(RObject::Id entityId)

virtual

Reimplemented in isSelected.

virtual bool RStorage::isSelectedWorkingSet(RObject::Id entityId)

virtual

Reimplemented in isSelectedWorkingSet.

virtual QList< REntity::Id > RStorage::orderBackToFront(const QSet< RObject::Id > &entityIds) const

virtual const

Returns: Ordered list of given IDs for display purposes.

virtual QSet< RObject::Id > RStorage::queryAllBlockReferences() const =0 = 0

pure virtual const

Returns: A set of all block reference entity IDs.

Reimplemented in queryAllBlockReferences, queryAllBlockReferences.

virtual QSet< RObject::Id > RStorage::queryAllBlocks(bool undone=false)=0 = 0

pure virtual

Returns: A set of all block IDs of the document.

Reimplemented in queryAllBlocks, queryAllBlocks.

virtual QSet< RObject::Id > RStorage::queryAllEntities(bool undone, bool allBlocks, QList< RS::EntityType > types)=0 = 0

pure virtual

Reimplemented in queryAllEntities, queryAllEntities.

virtual QSet< RObject::Id > RStorage::queryAllEntities(bool undone=false, bool allBlocks=false, RS::EntityType type=RS::EntityAll)=0 = 0

pure virtual

Returns: A set of all entity IDs of the document.

Reimplemented in queryAllEntities, queryAllEntities.

virtual QSet< RObject::Id > RStorage::queryAllLayers(bool undone=false)=0 = 0

pure virtual

Returns: A set of all layer IDs of the document.

Reimplemented in queryAllLayers, queryAllLayers.

virtual QSet< RObject::Id > RStorage::queryAllLayerStates(bool undone=false) const =0 = 0

pure virtual const

Returns: A set of all layer state IDs of the document.

Reimplemented in queryAllLayerStates.

virtual QSet< RObject::Id > RStorage::queryAllLayoutBlocks(bool includeModelSpace=false, bool undone=false) const =0 = 0

pure virtual const

Returns: A set of all block IDs of layout blocks of the document.

Reimplemented in queryAllLayoutBlocks, queryAllLayoutBlocks.

virtual QSet< RObject::Id > RStorage::queryAllLayouts(bool undone=false)=0 = 0

pure virtual

Returns: A set of all layout IDs of layouts of the document.

Reimplemented in queryAllLayouts, queryAllLayouts.

virtual QSet< RObject::Id > RStorage::queryAllLinetypes()=0 = 0

pure virtual

Returns: A set of all linetype IDs of the document.

Reimplemented in queryAllLinetypes, queryAllLinetypes.

virtual QSet< RObject::Id > RStorage::queryAllObjects() const =0 = 0

pure virtual const

Returns: A set of all object IDs of the document.

Reimplemented in queryAllObjects, queryAllObjects.

virtual QSet< RObject::Id > RStorage::queryAllUcs()=0 = 0

pure virtual

Returns: A set of all UCS IDs of the document.

Reimplemented in queryAllUcs, queryAllUcs.

virtual QSet< RObject::Id > RStorage::queryAllViewports() const =0 = 0

pure virtual const

Returns: A set of all viewport entity IDs.

Reimplemented in queryAllViewports, queryAllViewports.

virtual QSet< RObject::Id > RStorage::queryAllViews(bool undone=false)=0 = 0

pure virtual

Returns: A set of all view IDs of the document.

Reimplemented in queryAllViews, queryAllViews.

virtual QSet< RObject::Id > RStorage::queryAllVisibleEntities()=0 = 0

pure virtual

Reimplemented in queryAllVisibleEntities, queryAllVisibleEntities.

virtual QSharedPointer< RBlock > RStorage::queryBlock(const QString &blockName) const =0 = 0

pure virtual const

Reimplemented in queryBlock, queryBlock.

virtual QSharedPointer< RBlock > RStorage::queryBlock(RObject::Id blockId) const =0 = 0

pure virtual const

Reimplemented in queryBlock, queryBlock.

virtual QSharedPointer< RBlock > RStorage::queryBlockDirect(const QString &blockName) const

virtual inline const

Reimplemented in queryBlockDirect.

virtual QSharedPointer< RBlock > RStorage::queryBlockDirect(RObject::Id blockId) const =0 = 0

pure virtual const

Reimplemented in queryBlockDirect, queryBlockDirect.

virtual QSet< RObject::Id > RStorage::queryBlockEntities(RObject::Id blockId)=0 = 0

pure virtual

Returns: A set of all entity IDs that are part of the given block.

Reimplemented in queryBlockEntities, queryBlockEntities.

virtual QSet< RObject::Id > RStorage::queryBlockReferences(RObject::Id blockId) const =0 = 0

pure virtual const

Returns: A set of all block reference entity IDs that reference the given block.

Reimplemented in queryBlockReferences, queryBlockReferences.

virtual QSet< RObject::Id > RStorage::queryBlockReferencesForLayers(const QSet< RObject::Id > &layerIds) const

virtual 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.

virtual QSet< RObject::Id > RStorage::queryChildEntities(RObject::Id parentId, RS::EntityType type=RS::EntityAll)=0 = 0

pure 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.

virtual QSharedPointer< RBlock > RStorage::queryCurrentBlock()

virtual

virtual QSharedPointer< RLayer > RStorage::queryCurrentLayer()

virtual inline

virtual QSharedPointer< RLinetype > RStorage::queryCurrentLinetype() const

virtual inline const

virtual QSharedPointer< RView > RStorage::queryCurrentView()

virtual inline

virtual QSharedPointer< RDimStyle > RStorage::queryDimStyle() const =0 = 0

pure virtual const

Reimplemented in queryDimStyle, queryDimStyle.

virtual QSharedPointer< RDimStyle > RStorage::queryDimStyleDirect() const =0 = 0

pure virtual const

Reimplemented in queryDimStyleDirect, queryDimStyleDirect.

virtual QSharedPointer< RDocumentVariables > RStorage::queryDocumentVariables() const =0 = 0

pure virtual const

Reimplemented in queryDocumentVariables, queryDocumentVariables.

virtual QSharedPointer< RDocumentVariables > RStorage::queryDocumentVariablesDirect() const =0 = 0

pure virtual const

Reimplemented in queryDocumentVariablesDirect, queryDocumentVariablesDirect.

virtual QSharedPointer< REntity > RStorage::queryEntity(RObject::Id entityId) const =0 = 0

pure virtual const

Returns: A pointer to the entity with the given entityId or NULL if no such entity exists.

Reimplemented in queryEntity, queryEntity.

virtual QSharedPointer< REntity > RStorage::queryEntityDirect(RObject::Id entityId) const

virtual const

Reimplemented in queryEntityDirect, queryEntityDirect.

virtual QSet< RObject::Id > RStorage::queryInfiniteEntities() const =0 = 0

pure virtual const

Returns: A set of entity IDs of all infinite entities (xlines).

Reimplemented in queryInfiniteEntities, queryInfiniteEntities.

virtual QSharedPointer< RLayer > RStorage::queryLayer(const QString &layerName) const =0 = 0

pure virtual const

Returns: A pointer to the layer with the given layerName or NULL if no such layer exists.

Reimplemented in queryLayer, queryLayer.

virtual QSharedPointer< RLayer > RStorage::queryLayer(RObject::Id layerId) const =0 = 0

pure virtual const

Returns: A pointer to the layer with the given layerId or NULL if no such layer exists.

Reimplemented in queryLayer, queryLayer.

virtual QSet< RObject::Id > RStorage::queryLayerBlockEntities(RObject::Id layerId, RObject::Id blockId)=0 = 0

pure virtual

Reimplemented in queryLayerBlockEntities, queryLayerBlockEntities.

virtual QSharedPointer< RLayer > RStorage::queryLayerDirect(const QString &layerName) const

virtual inline const

virtual QSharedPointer< RLayer > RStorage::queryLayerDirect(RObject::Id layerId) const

virtual inline const

Reimplemented in queryLayerDirect, queryLayerDirect.

virtual QSet< RObject::Id > RStorage::queryLayerEntities(RObject::Id layerId, bool allBlocks=false)=0 = 0

pure virtual

Returns: A set of all entity IDs on the given layer.

Reimplemented in queryLayerEntities, queryLayerEntities.

virtual QSharedPointer< RLayerState > RStorage::queryLayerState(const QString &layerStateName) const =0 = 0

pure virtual const

Returns: A pointer to the layer with the given layerName or NULL if no such layer exists.

Reimplemented in queryLayerState, queryLayerState.

virtual QSharedPointer< RLayerState > RStorage::queryLayerState(RObject::Id layerStateId) const =0 = 0

pure 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.

virtual QSharedPointer< RLayerState > RStorage::queryLayerStateDirect(const QString &layerStateName) const

virtual inline const

virtual QSharedPointer< RLayerState > RStorage::queryLayerStateDirect(RObject::Id layerStateId) const

virtual inline const

Reimplemented in queryLayerStateDirect, queryLayerStateDirect.

virtual QSharedPointer< RLayout > RStorage::queryLayout(const QString &layoutName) const =0 = 0

pure virtual const

Returns: A pointer to the layout with the given layoutName or NULL if no such layout exists.

Reimplemented in queryLayout, queryLayout.

virtual QSharedPointer< RLayout > RStorage::queryLayout(RObject::Id layoutId) const =0 = 0

pure virtual const

Returns: A pointer to the layout with the given layoutId or NULL if no such layout exists.

Reimplemented in queryLayout, queryLayout.

virtual QSharedPointer< RLayout > RStorage::queryLayoutDirect(RObject::Id layoutId) const

virtual inline const

Reimplemented in queryLayoutDirect, queryLayoutDirect.

virtual QSharedPointer< RLinetype > RStorage::queryLinetype(const QString &linetypeName) const =0 = 0

pure virtual const

Reimplemented in queryLinetype, queryLinetype.

virtual QSharedPointer< RLinetype > RStorage::queryLinetype(RObject::Id linetypeId) const =0 = 0

pure virtual const

Reimplemented in queryLinetype, queryLinetype.

virtual QSharedPointer< RLinetype > RStorage::queryLinetypeDirect(RObject::Id linetypeId) const =0 = 0

pure virtual const

Reimplemented in queryLinetypeDirect, queryLinetypeDirect.

virtual QSharedPointer< RObject > RStorage::queryObject(RObject::Id objectId) const =0 = 0

pure 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.

virtual QSharedPointer< RObject > RStorage::queryObjectByHandle(RObject::Handle objectHandle) const =0 = 0

pure virtual const

Reimplemented in queryObjectByHandle, queryObjectByHandle.

virtual RObject * RStorage::queryObjectCC(RObject::Id objectId) const =0 = 0

pure virtual const

Reimplemented in queryObjectCC, queryObjectCC.

virtual QSharedPointer< RObject > RStorage::queryObjectDirect(RObject::Id objectId) const

virtual inline const

Reimplemented in queryObjectDirect, queryObjectDirect.

virtual QSet< RObject::Id > RStorage::querySelectedEntities() const =0 = 0

pure virtual const

Returns: A set of entity IDs of all selected entities.

Reimplemented in querySelectedEntities, querySelectedEntities.

virtual QSet< RObject::Id > RStorage::querySelectedLayerEntities(RObject::Id layerId, bool allBlocks=false)=0 = 0

pure virtual

Returns: A set of all entity IDs of selected entities on the given layer.

Reimplemented in querySelectedLayerEntities, querySelectedLayerEntities.

virtual QSet< RObject::Id > RStorage::querySelectedLayers() const =0 = 0

pure virtual const

Returns: A set of object IDs of all selected objects (layers, …).

Reimplemented in querySelectedLayers, querySelectedLayers.

virtual QSharedPointer< RUcs > RStorage::queryUcs(const QString &ucsName) const =0 = 0

pure virtual const

Returns: A pointer to the UCS with the given ucsName or NULL if no such UCS exists.

Reimplemented in queryUcs, queryUcs.

virtual QSharedPointer< RUcs > RStorage::queryUcs(RObject::Id ucsId) const =0 = 0

pure virtual const

Returns: A pointer to the UCS with the given ucsId or NULL if no such UCS exists.

Reimplemented in queryUcs, queryUcs.

virtual QSharedPointer< RUcs > RStorage::queryUcsDirect(RObject::Id ucsId) const

virtual inline const

Reimplemented in queryUcsDirect, queryUcsDirect.

virtual QSharedPointer< RView > RStorage::queryView(const QString &viewName) const =0 = 0

pure virtual const

Reimplemented in queryView, queryView.

virtual QSharedPointer< RView > RStorage::queryView(RObject::Id viewId) const =0 = 0

pure virtual const

Reimplemented in queryView, queryView.

virtual QSharedPointer< REntity > RStorage::queryVisibleEntityDirect(RObject::Id entityId) const

virtual const

Reimplemented in queryVisibleEntityDirect.

virtual QSet< RObject::Id > RStorage::queryWorkingSetEntities()=0 = 0

pure virtual

Returns: A set of all entity IDs in the current working set.

Reimplemented in queryWorkingSetEntities.

virtual bool RStorage::removeObject(QSharedPointer< RObject > object)=0 = 0

pure virtual

Reimplemented in removeObject.

virtual void RStorage::removeVariable(const QString &key)=0 = 0

pure virtual

Removes the custom variable with the given key.

Reimplemented in removeVariable.

virtual void RStorage::resetTransactionStack()=0 = 0

pure virtual

Reimplemented in resetTransactionStack.

virtual void RStorage::rollbackTransaction()=0 = 0

pure virtual

Rolls the current transaction back in order to cancel it.

This function should never be called under normal circumstances.

Reimplemented in rollbackTransaction.

virtual bool RStorage::saveObject(QSharedPointer< RObject > object, bool checkBlockRecursion=true, bool keepHandles=false, bool *overwrite=NULL)=0 = 0

pure virtual

Saves the given object to the storage.

Reimplemented in saveObject.

virtual void RStorage::saveTransaction(RTransaction &transaction)=0 = 0

pure virtual

Saves the given transaction.

Transactions need to be stored for undo / redo functionality.

Reimplemented in saveTransaction.

virtual void RStorage::selectAllEntities(QSet< RObject::Id > *affectedEntities=NULL)=0 = 0

pure virtual

Sets the selection status of all entities.

Reimplemented in selectAllEntities.

virtual int RStorage::selectEntities(const QSet< RObject::Id > &entityIds, bool add=false, QSet< RObject::Id > *affectedEntities=NULL)=0 = 0

pure 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.

virtual void RStorage::selectEntity(RObject::Id entityId, bool add=false, QSet< RObject::Id > *affectedEntities=NULL)=0 = 0

pure 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.

void RStorage::setCurrentBlock(const QString &blockName)

inline

virtual void RStorage::setCurrentBlock(RObject::Id blockId)

virtual

Reimplemented in setCurrentBlock.

virtual void RStorage::setCurrentColor(const RColor &color)

virtual

void RStorage::setCurrentLayer(const QString &layerName, RTransaction *transaction=NULL)

void RStorage::setCurrentLayer(RObject::Id layerId, RTransaction *transaction=NULL)

void RStorage::setCurrentLinetype(const QString &name)

void RStorage::setCurrentLinetype(RObject::Id ltId)

void RStorage::setCurrentLinetypePattern(const RLinetypePattern &p)

void RStorage::setCurrentLineweight(RLineweight::Lineweight lw)

void RStorage::setCurrentView(const QString &viewName)

inline

void RStorage::setCurrentView(RObject::Id viewId)

inline

virtual void RStorage::setCurrentViewport(RObject::Id viewportId)

virtual inline

virtual void RStorage::setDimensionFont(const QString &f, RTransaction *transaction=NULL)

virtual

void RStorage::setDocument(RDocument *doc)

inline

virtual void RStorage::setEntityParentId(REntity &entity, RObject::Id parentId)

virtual

Reimplemented in setEntityParentId.

virtual void RStorage::setKnownVariable(RS::KnownVariable key, const QVariant &value, RTransaction *transaction=NULL)=0 = 0

pure 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.

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.

virtual void RStorage::setLayer0Id(RObject::Id id)

virtual inline

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).

virtual void RStorage::setMaxDrawOrder(int m)

virtual inline

void RStorage::setMeasurement(RS::Measurement m, RTransaction *transaction=NULL)

virtual void RStorage::setModelSpaceBlockId(RObject::Id id)

virtual inline

void RStorage::setModified(bool m)

Resets the modified flag.

Modification time is stored.

void RStorage::setNotifyListeners(bool on)

inline

virtual void RStorage::setObjectHandle(RObject &object, RObject::Handle objectHandle)

virtual

Reimplemented in setObjectHandle.

virtual void RStorage::setObjectId(RObject &object, RObject::Id objectId) const

virtual const

virtual void RStorage::setUndoStatus(RObject &object, bool status)

virtual

Reimplemented in setUndoStatus.

virtual bool RStorage::setUndoStatus(RObject::Id object, bool status)=0 = 0

pure virtual

Reimplemented in setUndoStatus, setUndoStatus.

void RStorage::setUnit(RS::Unit unit, RTransaction *transaction=NULL)

virtual void RStorage::setVariable(const QString &key, const QVariant &value, bool overwrite=true)=0 = 0

pure virtual

Sets a custom variable in the context of this document.

Parameters:

  • key: Variable key (name)
  • value: Variable value
  • overwrite: True to overwrite an existing variable with the same key (default)

Reimplemented in setVariable.

QList< RBlock::Id > RStorage::sortBlocks(const QList< RObject::Id > &blockIds) const

const

QList< RLayer::Id > RStorage::sortLayers(const QList< RObject::Id > &layerIds) const

const

QSharedPointer< RDocumentVariables > RStorage::startDocumentVariablesTransaction(RTransaction *&transaction, bool &useLocalTransaction)

virtual void RStorage::startTransactionGroup()

virtual inline

virtual void RStorage::toggleUndoStatus(QSet< RObject::Id > &objects)=0 = 0

pure 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.

virtual void RStorage::toggleUndoStatus(RObject::Id object)=0 = 0

pure virtual

Toggles the current undo status of the given object.

Reimplemented in toggleUndoStatus.

virtual void RStorage::unsetCurrentViewport()

virtual inline

virtual void RStorage::update()

virtual inline

Clear caches:

Reimplemented in update.

static QString RStorage::getKnownVariableName(RS::KnownVariable n)

static

Returns: Name of the given known variable enum. Used for debugging.

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.

static void RStorage::registerCustomEntityType(RS::EntityType type)

static

static void RStorage::unregisterCustomEntityType(RS::EntityType type)

static

RObject::Handle RStorage::handleCounter

protected

QDateTime RStorage::lastModified

protected

bool RStorage::modified

protected

static QList< RS::EntityType > RStorage::customEntityTypes

static 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.

RObject::Id RStorage::currentBlockId

private

RColor RStorage::currentColor

private

RObject::Id RStorage::currentLinetypeId

private

RLineweight::Lineweight RStorage::currentLineweight

private

RObject::Id RStorage::currentViewId

private

RObject::Id RStorage::currentViewportId

private

RDocument* RStorage::document

private

RObject::Id RStorage::idCounter

private

int RStorage::lastTransactionGroup

private

int RStorage::lastTransactionId

private

RObject::Id RStorage::layer0Id

private

int RStorage::maxDrawOrder

private

RObject::Id RStorage::modelSpaceBlockId

private

QList<RModifiedListener*> RStorage::modifiedListeners

private

bool RStorage::notifyGlobalListeners

private

QDebug operator<<(QDebug dbg, RStorage &s)

Stream operator for QDebug.

Non-Scriptable: This function is not available in script environments.