QCAD
Open Source 2D CAD
RStorage Class Referenceabstract

This is the abstract base class for all storage implementations. More...

#include <RStorage.h>

Inheritance diagram for RStorage:
RNonCopyable RRequireHeap RMemoryStorage RLinkedStorage

Public Member Functions

void addModifiedListener (RModifiedListener *l)
 Adds a listener for modified status changed events. More...
 
virtual void beginTransaction ()=0
 Starts a new transaction. More...
 
virtual void clear ()
 Resets this storage to its initial, empty state. More...
 
virtual void clearEntitySelection (QSet< REntity::Id > *affectedEntities=NULL)=0
 Clears the selection status of all entities. More...
 
virtual void commitTransaction ()=0
 Commits the current transaction. More...
 
virtual int countSelectedEntities () const
 
virtual bool deleteObject (RObject::Id objectId)=0
 Deletes the object with the given ID. More...
 
virtual void deleteTransactionsFrom (int transactionId)=0
 Deletes all transactions with IDs from transactionId (inclusive) to the maximum transaction ID. More...
 
virtual int deselectEntities (const QSet< REntity::Id > &entityIds, QSet< REntity::Id > *affectedEntities=NULL)=0
 Deselects all entities with the given IDs. More...
 
virtual void deselectEntity (REntity::Id entityId, QSet< REntity::Id > *affectedEntities=NULL)=0
 Deselects the entity with the given ID. More...
 
void endDocumentVariablesTransaction (RTransaction *transaction, bool useLocalTransaction, QSharedPointer< RDocumentVariables > docVars)
 
virtual RBlock::Id getBlockId (const QString &blockName) const =0
 
virtual RBlock::Id getBlockIdAuto (const QString &blockLayoutName) const =0
 
virtual QString getBlockName (RBlock::Id blockId) const =0
 
virtual QString getBlockNameFromLayout (const QString &layoutName) const =0
 
virtual QString getBlockNameFromLayout (RLayout::Id layoutId) const =0
 
virtual QSet< QString > getBlockNames (const QString &rxStr=RDEFAULT_QSTRING) const =0
 
virtual RBox getBoundingBox (bool ignoreHiddenLayers=true, bool ignoreEmpty=false) const =0
 
virtual RBlock::Id getCurrentBlockId () const
 
virtual RColor getCurrentColor () const
 
virtual RLayer::Id getCurrentLayerId () const
 
virtual RLinetype::Id getCurrentLinetypeId () const
 
virtual RLinetypePattern getCurrentLinetypePattern () const
 
virtual RLineweight::Lineweight getCurrentLineweight () const
 
virtual RView::Id getCurrentViewId () const
 
virtual RObject::Id getCurrentViewportId () const
 
virtual QString getDimensionFont () const
 
RDocumentgetDocument () const
 
virtual RBox getEntitiesBox (QSet< REntity::Id > &ids) const =0
 
virtual QVariant getKnownVariable (RS::KnownVariable key) const =0
 
QString getLastModified () const
 
QDateTime getLastModifiedDateTime () const
 
virtual int getLastTransactionId ()
 
virtual RLayer::Id getLayer0Id () const
 
virtual RLayer::Id getLayerId (const QString &layerName) const =0
 
virtual QString getLayerName (RLayer::Id layerId) const =0
 
virtual QSet< QString > getLayerNames (const QString &rxStr=RDEFAULT_QSTRING) const =0
 
virtual RLayer::Id getLayerStateId (const QString &layerStateName) const =0
 
virtual QString getLayerStateName (RLayerState::Id layerStateId) const =0
 
virtual QSet< QString > getLayerStateNames (const QString &rxStr=RDEFAULT_QSTRING) const =0
 
virtual RLayout::Id getLayoutId (const QString &layoutName) const =0
 
virtual QString getLayoutName (RLayout::Id layoutId) const =0
 
virtual QSet< QString > getLayoutNames (const QString &rxStr=RDEFAULT_QSTRING) const =0
 
virtual QString getLinetypeDescription (RLinetype::Id linetypeId) const =0
 
virtual RLinetype::Id getLinetypeId (const QString &linetypeName) const =0
 
virtual QString getLinetypeLabel (RLinetype::Id linetypeId) const =0
 
virtual QString getLinetypeName (RLinetype::Id linetypeId) const =0
 
virtual QSet< QString > getLinetypeNames () const =0
 
virtual QList< RLinetypePatterngetLinetypePatterns () const =0
 
virtual double getLinetypeScale () const
 
virtual int getMaxDrawOrder ()
 
virtual RLineweight::Lineweight getMaxLineweight () const =0
 
virtual RObject::Handle getMaxObjectHandle ()
 
virtual RObject::Id getMaxObjectId ()
 
virtual int getMaxTransactionId ()=0
 
RS::Measurement getMeasurement () const
 
virtual int getMinDrawOrder ()
 
virtual RBlock::Id getModelSpaceBlockId () const
 
virtual RObject::Handle getNewObjectHandle ()
 
virtual RObject::Id getNewObjectId ()
 
virtual RBox getSelectionBox () const =0
 
virtual RTransaction getTransaction (int transactionId)=0
 
virtual int getTransactionGroup () const
 
RS::Unit getUnit () const
 
virtual QVariant getVariable (const QString &key) const =0
 
virtual QStringList getVariables () const =0
 
virtual RView::Id getViewId (const QString &viewName) const =0
 
virtual QString getViewName (RView::Id viewId) const =0
 
virtual QSet< QString > getViewNames () const =0
 
virtual bool hasBlock (const QString &blockName) const
 
virtual bool hasBlockEntities (RBlock::Id blockId) const =0
 
virtual bool hasChildEntities (REntity::Id parentId) const =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
 
virtual bool hasVariable (const QString &key) const
 
virtual bool hasView (const QString &viewName) const
 
virtual bool isBlockFrozen (RBlock::Id blockId) const
 
virtual bool isEntity (RObject::Id objectId)
 
virtual bool isEntityVisible (const REntity &entity, RBlock::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. More...
 
virtual bool isLayerFrozen (const RLayer &layer) const
 
virtual bool isLayerFrozen (RLayer::Id layerId) const
 
virtual bool isLayerLocked (const RLayer &layer) const
 
virtual bool isLayerLocked (RLayer::Id layerId) const
 
virtual bool isLayerOff (const RLayer &layer) const
 
virtual bool isLayerOff (RLayer::Id layerId) const
 
virtual bool isLayerOffOrFrozen (const RLayer &layer) const
 
virtual bool isLayerOffOrFrozen (RLayer::Id layerId) const
 
virtual bool isLayerPlottable (const RLayer &layer) const
 
virtual bool isLayerPlottable (RLayer::Id layerId) const
 
virtual bool isLayerSnappable (const RLayer &layer) const
 
virtual bool isLayerSnappable (RLayer::Id layerId) const
 
virtual bool isLayoutBlock (RBlock::Id blockId) const
 
bool isModified () const
 
virtual bool isParentLayerFrozen (const RLayer &layer) const
 
virtual bool isParentLayerFrozen (RLayer::Id layerId) const
 
virtual bool isParentLayerLocked (const RLayer &layer) const
 
virtual bool isParentLayerLocked (RLayer::Id layerId) const
 
virtual bool isParentLayerPlottable (const RLayer &layer) const
 
virtual bool isParentLayerPlottable (RLayer::Id layerId) const
 
virtual bool isParentLayerSnappable (const RLayer &layer) const
 
virtual bool isParentLayerSnappable (RLayer::Id layerId) const
 
virtual bool isSelected (REntity::Id entityId)
 
virtual bool isSelectedWorkingSet (REntity::Id entityId)
 
virtual QList< REntity::IdorderBackToFront (const QSet< REntity::Id > &entityIds) const
 
virtual QSet< REntity::IdqueryAllBlockReferences () const =0
 
virtual QSet< RBlock::IdqueryAllBlocks (bool undone=false)=0
 
virtual QSet< REntity::IdqueryAllEntities (bool undone, bool allBlocks, QList< RS::EntityType > types)=0
 
virtual QSet< REntity::IdqueryAllEntities (bool undone=false, bool allBlocks=false, RS::EntityType type=RS::EntityAll)=0
 
virtual QSet< RLayer::IdqueryAllLayers (bool undone=false)=0
 
virtual QSet< RLayerState::IdqueryAllLayerStates (bool undone=false) const =0
 
virtual QSet< RBlock::IdqueryAllLayoutBlocks (bool includeModelSpace=false, bool undone=false) const =0
 
virtual QSet< RLayout::IdqueryAllLayouts (bool undone=false)=0
 
virtual QSet< RLinetype::IdqueryAllLinetypes ()=0
 
virtual QSet< RObject::IdqueryAllObjects () const =0
 
virtual QSet< RUcs::IdqueryAllUcs ()=0
 
virtual QSet< REntity::IdqueryAllViewports () const =0
 
virtual QSet< RView::IdqueryAllViews (bool undone=false)=0
 
virtual QSet< REntity::IdqueryAllVisibleEntities ()=0
 
virtual QSharedPointer< RBlockqueryBlock (const QString &blockName) const =0
 
virtual QSharedPointer< RBlockqueryBlock (RBlock::Id blockId) const =0
 
virtual QSharedPointer< RBlockqueryBlockDirect (const QString &blockName) const
 
virtual QSharedPointer< RBlockqueryBlockDirect (RBlock::Id blockId) const =0
 
virtual QSet< REntity::IdqueryBlockEntities (RBlock::Id blockId)=0
 
virtual QSet< REntity::IdqueryBlockReferences (RBlock::Id blockId) const =0
 
virtual QSet< REntity::IdqueryChildEntities (REntity::Id parentId, RS::EntityType type=RS::EntityAll)=0
 
virtual QSharedPointer< RBlockqueryCurrentBlock ()
 
virtual QSharedPointer< RLayerqueryCurrentLayer ()
 
virtual QSharedPointer< RLinetypequeryCurrentLinetype () const
 
virtual QSharedPointer< RViewqueryCurrentView ()
 
virtual QSharedPointer< RDocumentVariablesqueryDocumentVariables () const =0
 
virtual QSharedPointer< RDocumentVariablesqueryDocumentVariablesDirect () const =0
 
virtual QSharedPointer< REntityqueryEntity (REntity::Id entityId) const =0
 
virtual QSharedPointer< REntityqueryEntityDirect (REntity::Id entityId) const
 
virtual QSet< REntity::IdqueryInfiniteEntities () const =0
 
virtual QSharedPointer< RLayerqueryLayer (const QString &layerName) const =0
 
virtual QSharedPointer< RLayerqueryLayer (RLayer::Id layerId) const =0
 
virtual QSet< REntity::IdqueryLayerBlockEntities (RLayer::Id layerId, RBlock::Id blockId)=0
 
virtual QSharedPointer< RLayerqueryLayerDirect (const QString &layerName) const
 
virtual QSharedPointer< RLayerqueryLayerDirect (RLayer::Id layerId) const
 
virtual QSet< REntity::IdqueryLayerEntities (RLayer::Id layerId, bool allBlocks=false)=0
 
virtual QSharedPointer< RLayerStatequeryLayerState (const QString &layerStateName) const =0
 
virtual QSharedPointer< RLayerStatequeryLayerState (RLayerState::Id layerStateId) const =0
 
virtual QSharedPointer< RLayerStatequeryLayerStateDirect (const QString &layerStateName) const
 
virtual QSharedPointer< RLayerStatequeryLayerStateDirect (RLayerState::Id layerStateId) const
 
virtual QSharedPointer< RLayoutqueryLayout (const QString &layoutName) const =0
 
virtual QSharedPointer< RLayoutqueryLayout (RLayout::Id layoutId) const =0
 
virtual QSharedPointer< RLayoutqueryLayoutDirect (RLayout::Id layoutId) const
 
virtual QSharedPointer< RLinetypequeryLinetype (const QString &linetypeName) const =0
 
virtual QSharedPointer< RLinetypequeryLinetype (RLinetype::Id linetypeId) const =0
 
virtual QSharedPointer< RLinetypequeryLinetypeDirect (RLinetype::Id linetypeId) const =0
 
virtual QSharedPointer< RObjectqueryObject (RObject::Id objectId) const =0
 
virtual QSharedPointer< RObjectqueryObjectByHandle (RObject::Handle objectHandle) const =0
 
virtual QSharedPointer< RObjectqueryObjectDirect (RObject::Id objectId) const
 
virtual QSet< REntity::IdquerySelectedEntities () const =0
 
virtual QSet< RObject::IdquerySelectedLayers () const =0
 
virtual QSharedPointer< RUcsqueryUcs (const QString &ucsName) const =0
 
virtual QSharedPointer< RUcsqueryUcs (RUcs::Id ucsId) const =0
 
virtual QSharedPointer< RUcsqueryUcsDirect (RUcs::Id ucsId) const
 
virtual QSharedPointer< RViewqueryView (const QString &viewName) const =0
 
virtual QSharedPointer< RViewqueryView (RView::Id viewId) const =0
 
virtual QSharedPointer< REntityqueryVisibleEntityDirect (REntity::Id entityId) const
 
virtual QSet< REntity::IdqueryWorkingSetEntities ()=0
 
virtual bool removeObject (QSharedPointer< RObject > object)=0
 
virtual void removeVariable (const QString &key)=0
 Removes the custom variable with the given key. More...
 
virtual void resetTransactionStack ()=0
 
virtual void rollbackTransaction ()=0
 Rolls the current transaction back in order to cancel it. More...
 
 RStorage ()
 Copyright (c) 2011-2018 by Andrew Mustun. More...
 
virtual bool saveObject (QSharedPointer< RObject > object, bool checkBlockRecursion=true, bool keepHandles=false)=0
 Saves the given object to the storage. More...
 
virtual void saveTransaction (RTransaction &transaction)=0
 Saves the given transaction. More...
 
virtual void selectAllEntities (QSet< REntity::Id > *affectedEntities=NULL)=0
 Sets the selection status of all entities. More...
 
virtual int selectEntities (const QSet< REntity::Id > &entityIds, bool add=false, QSet< REntity::Id > *affectedEntities=NULL)=0
 Selects all entities with the given IDs. More...
 
virtual void selectEntity (REntity::Id entityId, bool add=false, QSet< REntity::Id > *affectedEntities=NULL)=0
 Selects the entity with the given ID. More...
 
void setCurrentBlock (const QString &blockName)
 
virtual void setCurrentBlock (RBlock::Id blockId)
 
virtual void setCurrentColor (const RColor &color)
 
void setCurrentLayer (const QString &layerName, RTransaction *transaction=NULL)
 
void setCurrentLayer (RLayer::Id layerId, RTransaction *transaction=NULL)
 
void setCurrentLinetype (const QString &name)
 
void setCurrentLinetype (RLinetype::Id ltId)
 
void setCurrentLinetypePattern (const RLinetypePattern &p)
 
void setCurrentLineweight (RLineweight::Lineweight lw)
 
void setCurrentView (const QString &viewName)
 
void setCurrentView (RView::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, REntity::Id parentId)
 
virtual void setKnownVariable (RS::KnownVariable key, const QVariant &value, RTransaction *transaction=NULL)=0
 Sets a known DXF/DWG variable for this document. More...
 
virtual void setLastTransactionId (int transactionId)
 Sets the ID of the last created transaction. More...
 
virtual void setLayer0Id (RLayer::Id id)
 
virtual void setLinetypeScale (double v, RTransaction *transaction=NULL)
 Sets the global linetype scale of this document to the given value. More...
 
virtual void setMaxDrawOrder (int m)
 
void setMeasurement (RS::Measurement m, RTransaction *transaction=NULL)
 
virtual void setModelSpaceBlockId (RBlock::Id id)
 
void setModified (bool m)
 Resets the modified flag. More...
 
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
 
void setUnit (RS::Unit unit, RTransaction *transaction=NULL)
 
virtual void setVariable (const QString &key, const QVariant &value, bool overwrite=true)=0
 Sets a custom variable in the context of this document. More...
 
QList< RBlock::IdsortBlocks (const QList< RBlock::Id > &blockIds) const
 
QList< RLayer::IdsortLayers (const QList< RLayer::Id > &layerIds) const
 
QSharedPointer< RDocumentVariablesstartDocumentVariablesTransaction (RTransaction *&transaction, bool &useLocalTransaction)
 
virtual void startTransactionGroup ()
 
virtual void toggleUndoStatus (QSet< RObject::Id > &objects)=0
 Toggles the current undo status of all given objects. More...
 
virtual void toggleUndoStatus (RObject::Id object)=0
 Toggles the current undo status of the given object. More...
 
virtual void unsetCurrentViewport ()
 
virtual void update ()
 Clear caches: More...
 
virtual ~RStorage ()
 
- Public Member Functions inherited from RRequireHeap
void doDelete ()
 

Static Public Member Functions

static QString getKnownVariableName (RS::KnownVariable n)
 
static bool lessThan (const QPair< REntity::Id, int > &p1, const QPair< REntity::Id, int > &p2)
 

Protected Attributes

RObject::Handle handleCounter
 
QDateTime lastModified
 
bool modified
 

Private Attributes

RBlock::Id currentBlockId
 
RColor currentColor
 
RLinetype::Id currentLinetypeId
 
RLineweight::Lineweight currentLineweight
 
RView::Id currentViewId
 
RObject::Id currentViewportId
 
RDocumentdocument
 
RObject::Id idCounter
 
int lastTransactionGroup
 
int lastTransactionId
 
RLayer::Id layer0Id
 
int maxDrawOrder
 
RBlock::Id modelSpaceBlockId
 
QList< RModifiedListener * > modifiedListeners
 

Friends

QDebug operator<< (QDebug dbg, RStorage &s)
 Stream operator for QDebug. More...
 

Additional Inherited Members

- Protected Member Functions inherited from RRequireHeap
virtual ~RRequireHeap ()
 
- Private Member Functions inherited from RNonCopyable
 RNonCopyable ()
 
 ~RNonCopyable ()
 

Detailed 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:\nThis class is available in script environments.\n

Constructor & Destructor Documentation

◆ RStorage()

RStorage::RStorage ( )

Copyright (c) 2011-2018 by Andrew Mustun.

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.

◆ ~RStorage()

virtual RStorage::~RStorage ( )
inlinevirtual

Member Function Documentation

◆ addModifiedListener()

void RStorage::addModifiedListener ( RModifiedListener l)

Adds a listener for modified status changed events.

This can for example be a modification indication widget.

◆ beginTransaction()

virtual void RStorage::beginTransaction ( )
pure virtual

Starts a new transaction.

This function is called before something is stored in the storage.

Implemented in RMemoryStorage.

◆ clear()

void RStorage::clear ( )
virtual

Resets this storage to its initial, empty state.

Reimplemented in RLinkedStorage, and RMemoryStorage.

◆ clearEntitySelection()

virtual void RStorage::clearEntitySelection ( QSet< REntity::Id > *  affectedEntities = NULL)
pure virtual

Clears the selection status of all entities.

Implemented in RMemoryStorage.

◆ commitTransaction()

virtual void RStorage::commitTransaction ( )
pure virtual

Commits the current transaction.

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

Implemented in RMemoryStorage.

◆ countSelectedEntities()

virtual int RStorage::countSelectedEntities ( ) const
inlinevirtual
Returns
Number of selected entities.

Reimplemented in RMemoryStorage.

◆ deleteObject()

virtual bool RStorage::deleteObject ( RObject::Id  objectId)
pure virtual

Deletes the object with the given ID.

Implemented in RLinkedStorage, and RMemoryStorage.

◆ deleteTransactionsFrom()

virtual void RStorage::deleteTransactionsFrom ( int  transactionId)
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.

Implemented in RMemoryStorage.

◆ deselectEntities()

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

Deselects all entities with the given IDs.

Parameters
affectedOptional 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.

Implemented in RMemoryStorage.

◆ deselectEntity()

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

Deselects the entity with the given ID.

Parameters
affectedOptional 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.

Implemented in RMemoryStorage.

◆ endDocumentVariablesTransaction()

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

◆ getBlockId()

virtual RBlock::Id RStorage::getBlockId ( const QString &  blockName) const
pure virtual

Implemented in RMemoryStorage, and RLinkedStorage.

◆ getBlockIdAuto()

virtual RBlock::Id RStorage::getBlockIdAuto ( const QString &  blockLayoutName) const
pure virtual

Implemented in RMemoryStorage, and RLinkedStorage.

◆ getBlockName()

virtual QString RStorage::getBlockName ( RBlock::Id  blockId) const
pure virtual

Implemented in RMemoryStorage, and RLinkedStorage.

◆ getBlockNameFromLayout() [1/2]

virtual QString RStorage::getBlockNameFromLayout ( const QString &  layoutName) const
pure virtual

Implemented in RMemoryStorage, and RLinkedStorage.

◆ getBlockNameFromLayout() [2/2]

virtual QString RStorage::getBlockNameFromLayout ( RLayout::Id  layoutId) const
pure virtual

Implemented in RMemoryStorage, and RLinkedStorage.

◆ getBlockNames()

virtual QSet<QString> RStorage::getBlockNames ( const QString &  rxStr = RDEFAULT_QSTRING) const
pure virtual

Implemented in RMemoryStorage, and RLinkedStorage.

◆ getBoundingBox()

virtual RBox RStorage::getBoundingBox ( bool  ignoreHiddenLayers = true,
bool  ignoreEmpty = false 
) const
pure virtual
Returns
The bounding box around all visible entities.

Implemented in RMemoryStorage.

◆ getCurrentBlockId()

virtual RBlock::Id RStorage::getCurrentBlockId ( ) const
inlinevirtual

Reimplemented in RLinkedStorage.

◆ getCurrentColor()

RColor RStorage::getCurrentColor ( ) const
virtual

Reimplemented in RLinkedStorage.

◆ getCurrentLayerId()

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

Reimplemented in RLinkedStorage.

◆ getCurrentLinetypeId()

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

Reimplemented in RLinkedStorage.

◆ getCurrentLinetypePattern()

RLinetypePattern RStorage::getCurrentLinetypePattern ( ) const
virtual

◆ getCurrentLineweight()

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

Reimplemented in RLinkedStorage.

◆ getCurrentViewId()

virtual RView::Id RStorage::getCurrentViewId ( ) const
inlinevirtual

Reimplemented in RLinkedStorage.

◆ getCurrentViewportId()

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

◆ getDimensionFont()

QString RStorage::getDimensionFont ( ) const
virtual

Reimplemented in RLinkedStorage.

◆ getDocument()

RDocument* RStorage::getDocument ( ) const
inline

◆ getEntitiesBox()

virtual RBox RStorage::getEntitiesBox ( QSet< REntity::Id > &  ids) const
pure virtual

Implemented in RMemoryStorage.

◆ getKnownVariable()

virtual QVariant RStorage::getKnownVariable ( RS::KnownVariable  key) const
pure virtual
Returns
Value for the given DXF/DWG variable.

Implemented in RMemoryStorage, and RLinkedStorage.

◆ getKnownVariableName()

QString RStorage::getKnownVariableName ( RS::KnownVariable  n)
static
Returns
Name of the given known variable enum. Used for debugging.

◆ getLastModified()

QString RStorage::getLastModified ( ) const
inline

◆ getLastModifiedDateTime()

QDateTime RStorage::getLastModifiedDateTime ( ) const
inline
Non-Scriptable:\nThis function is not available in script environments.\n

◆ getLastTransactionId()

virtual int RStorage::getLastTransactionId ( )
inlinevirtual
Returns
The ID of the last completed transaction. The default implementation reads variable "LastTransaction".

◆ getLayer0Id()

virtual RLayer::Id RStorage::getLayer0Id ( ) const
inlinevirtual

◆ getLayerId()

virtual RLayer::Id RStorage::getLayerId ( const QString &  layerName) const
pure virtual

Implemented in RMemoryStorage, and RLinkedStorage.

◆ getLayerName()

virtual QString RStorage::getLayerName ( RLayer::Id  layerId) const
pure virtual

Implemented in RMemoryStorage, and RLinkedStorage.

◆ getLayerNames()

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

Implemented in RMemoryStorage, and RLinkedStorage.

◆ getLayerStateId()

virtual RLayer::Id RStorage::getLayerStateId ( const QString &  layerStateName) const
pure virtual

Implemented in RMemoryStorage.

◆ getLayerStateName()

virtual QString RStorage::getLayerStateName ( RLayerState::Id  layerStateId) const
pure virtual

Implemented in RMemoryStorage.

◆ getLayerStateNames()

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

Implemented in RMemoryStorage.

◆ getLayoutId()

virtual RLayout::Id RStorage::getLayoutId ( const QString &  layoutName) const
pure virtual

Implemented in RMemoryStorage, and RLinkedStorage.

◆ getLayoutName()

virtual QString RStorage::getLayoutName ( RLayout::Id  layoutId) const
pure virtual

Implemented in RMemoryStorage, and RLinkedStorage.

◆ getLayoutNames()

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

Implemented in RMemoryStorage, and RLinkedStorage.

◆ getLinetypeDescription()

virtual QString RStorage::getLinetypeDescription ( RLinetype::Id  linetypeId) const
pure virtual
Returns
User readable description for the given linetype.

Implemented in RMemoryStorage, and RLinkedStorage.

◆ getLinetypeId()

virtual RLinetype::Id RStorage::getLinetypeId ( const QString &  linetypeName) const
pure virtual
Returns
Linetype ID of the given linetype name or RObject::INVALID_ID.

Implemented in RMemoryStorage, and RLinkedStorage.

◆ getLinetypeLabel()

virtual QString RStorage::getLinetypeLabel ( RLinetype::Id  linetypeId) const
pure virtual
Returns
User readable label for the given linetype.

Implemented in RMemoryStorage, and RLinkedStorage.

◆ getLinetypeName()

virtual QString RStorage::getLinetypeName ( RLinetype::Id  linetypeId) const
pure virtual
Returns
Linetype name of the given linetype.

Implemented in RMemoryStorage, and RLinkedStorage.

◆ getLinetypeNames()

virtual QSet<QString> RStorage::getLinetypeNames ( ) const
pure virtual
Returns
List of all available linetype pattern names in this document.

Implemented in RMemoryStorage, and RLinkedStorage.

◆ getLinetypePatterns()

virtual QList<RLinetypePattern> RStorage::getLinetypePatterns ( ) const
pure virtual
Returns
List of all available linetype patterns in this document.

Implemented in RMemoryStorage, and RLinkedStorage.

◆ getLinetypeScale()

double RStorage::getLinetypeScale ( ) const
virtual

◆ getMaxDrawOrder()

virtual int RStorage::getMaxDrawOrder ( )
inlinevirtual

◆ getMaxLineweight()

virtual RLineweight::Lineweight RStorage::getMaxLineweight ( ) const
pure virtual

Implemented in RMemoryStorage.

◆ getMaxObjectHandle()

RObject::Handle RStorage::getMaxObjectHandle ( )
virtual

◆ getMaxObjectId()

RObject::Id RStorage::getMaxObjectId ( )
virtual

◆ getMaxTransactionId()

virtual int RStorage::getMaxTransactionId ( )
pure virtual
Returns
The highest transaction ID that is in use. This should be used by deleteTransactionsFrom internally.

Implemented in RMemoryStorage.

◆ getMeasurement()

RS::Measurement RStorage::getMeasurement ( ) const

◆ getMinDrawOrder()

int RStorage::getMinDrawOrder ( )
virtual

◆ getModelSpaceBlockId()

virtual RBlock::Id RStorage::getModelSpaceBlockId ( ) const
inlinevirtual

◆ getNewObjectHandle()

RObject::Handle RStorage::getNewObjectHandle ( )
virtual

Reimplemented in RMemoryStorage, and RLinkedStorage.

◆ getNewObjectId()

RObject::Id RStorage::getNewObjectId ( )
virtual

Reimplemented in RLinkedStorage.

◆ getSelectionBox()

virtual RBox RStorage::getSelectionBox ( ) const
pure virtual

Implemented in RMemoryStorage.

◆ getTransaction()

virtual RTransaction RStorage::getTransaction ( int  transactionId)
pure virtual
Returns
Transaction with the given id.

Implemented in RMemoryStorage.

◆ getTransactionGroup()

virtual int RStorage::getTransactionGroup ( ) const
inlinevirtual

◆ getUnit()

RS::Unit RStorage::getUnit ( ) const

◆ getVariable()

virtual QVariant RStorage::getVariable ( const QString &  key) const
pure virtual
Returns
The value of the given variable or an invalid variant if the variable does not exist.

Implemented in RMemoryStorage.

◆ getVariables()

virtual QStringList RStorage::getVariables ( ) const
pure virtual
Returns
List of custom variable names stored in this document.

Implemented in RMemoryStorage.

◆ getViewId()

virtual RView::Id RStorage::getViewId ( const QString &  viewName) const
pure virtual

Implemented in RMemoryStorage, and RLinkedStorage.

◆ getViewName()

virtual QString RStorage::getViewName ( RView::Id  viewId) const
pure virtual

Implemented in RMemoryStorage, and RLinkedStorage.

◆ getViewNames()

virtual QSet<QString> RStorage::getViewNames ( ) const
pure virtual

Implemented in RMemoryStorage, and RLinkedStorage.

◆ hasBlock()

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

◆ hasBlockEntities()

virtual bool RStorage::hasBlockEntities ( RBlock::Id  blockId) const
pure virtual
Returns
True if the given block contains any entities.

Implemented in RMemoryStorage, and RLinkedStorage.

◆ hasChildEntities()

virtual bool RStorage::hasChildEntities ( REntity::Id  parentId) const
pure virtual

Implemented in RMemoryStorage, and RLinkedStorage.

◆ hasLayer()

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

◆ hasLayerState()

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

◆ hasLayerStates()

bool RStorage::hasLayerStates ( ) const
virtual

◆ hasLayout()

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

◆ hasLinetype()

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

◆ hasSelection()

virtual bool RStorage::hasSelection ( ) const
pure virtual
Returns
True if at least one entity is selected in this storage.

Implemented in RMemoryStorage.

◆ hasVariable()

virtual bool RStorage::hasVariable ( const QString &  key) const
inlinevirtual
Returns
True if the given variable exists in this storage.

◆ hasView()

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

◆ isBlockFrozen()

virtual bool RStorage::isBlockFrozen ( RBlock::Id  blockId) const
inlinevirtual
Returns
True if the given block is frozen.

◆ isEntity()

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

◆ isEntityVisible()

bool RStorage::isEntityVisible ( const REntity entity,
RBlock::Id  blockId 
) const
virtual
Returns
True if the given entity is visible in the context of the given block or the current block (default).

◆ isInBackStorage()

virtual bool RStorage::isInBackStorage ( RObject::Id  )
inlinevirtual

Linked storages should return true if the given object is stored in the storage the linked storage links to.

Reimplemented in RLinkedStorage.

◆ isLayerFrozen() [1/2]

bool RStorage::isLayerFrozen ( const RLayer layer) const
virtual
Returns
True if this layer or one of its parent layers are frozen.

◆ isLayerFrozen() [2/2]

bool RStorage::isLayerFrozen ( RLayer::Id  layerId) const
virtual
Returns
True if this layer or one of its parent layers are frozen.

◆ isLayerLocked() [1/2]

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

◆ isLayerLocked() [2/2]

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

◆ isLayerOff() [1/2]

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

◆ isLayerOff() [2/2]

bool RStorage::isLayerOff ( RLayer::Id  layerId) const
virtual
Returns
True if this layer is off.

◆ isLayerOffOrFrozen() [1/2]

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

◆ isLayerOffOrFrozen() [2/2]

bool RStorage::isLayerOffOrFrozen ( RLayer::Id  layerId) const
virtual
Returns
True if this layer is off or frozen.

◆ isLayerPlottable() [1/2]

bool RStorage::isLayerPlottable ( const RLayer layer) const
virtual
Returns
True if this layer and its parent layers are plottable.

◆ isLayerPlottable() [2/2]

bool RStorage::isLayerPlottable ( RLayer::Id  layerId) const
virtual
Returns
True if this layer and its parent layers are plottable.

◆ isLayerSnappable() [1/2]

bool RStorage::isLayerSnappable ( const RLayer layer) const
virtual
Returns
True if this layer and its parent layers are snappable.

◆ isLayerSnappable() [2/2]

bool RStorage::isLayerSnappable ( RLayer::Id  layerId) const
virtual
Returns
True if this layer and its parent layers are snappable.

◆ isLayoutBlock()

virtual bool RStorage::isLayoutBlock ( RBlock::Id  blockId) const
inlinevirtual
Returns
True if the given block is a layout block (i.e. paper space block).

◆ isModified()

bool RStorage::isModified ( ) const
inline
Returns
True if the document has unsaved changes.

◆ isParentLayerFrozen() [1/2]

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

◆ isParentLayerFrozen() [2/2]

bool RStorage::isParentLayerFrozen ( RLayer::Id  layerId) const
virtual
Returns
True if a parent layer of the given layer is frozen.

◆ isParentLayerLocked() [1/2]

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

◆ isParentLayerLocked() [2/2]

bool RStorage::isParentLayerLocked ( RLayer::Id  layerId) const
virtual
Returns
True if a parent layer of the given layer is locked.

◆ isParentLayerPlottable() [1/2]

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

◆ isParentLayerPlottable() [2/2]

bool RStorage::isParentLayerPlottable ( RLayer::Id  layerId) const
virtual
Returns
True if a parent layer of the given layer is plottable.

◆ isParentLayerSnappable() [1/2]

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

◆ isParentLayerSnappable() [2/2]

bool RStorage::isParentLayerSnappable ( RLayer::Id  layerId) const
virtual
Returns
True if a parent layer of the given layer is snappable.

◆ isSelected()

virtual bool RStorage::isSelected ( REntity::Id  entityId)
inlinevirtual

Reimplemented in RMemoryStorage.

◆ isSelectedWorkingSet()

virtual bool RStorage::isSelectedWorkingSet ( REntity::Id  entityId)
inlinevirtual

Reimplemented in RMemoryStorage.

◆ lessThan()

bool RStorage::lessThan ( const QPair< REntity::Id, int > &  p1,
const QPair< REntity::Id, int > &  p2 
)
static
Non-Scriptable:\nThis function is not available in script environments.\n

◆ orderBackToFront()

QList< REntity::Id > RStorage::orderBackToFront ( const QSet< REntity::Id > &  entityIds) const
virtual
Returns
Ordered list of given IDs for display purposes.

◆ queryAllBlockReferences()

virtual QSet<REntity::Id> RStorage::queryAllBlockReferences ( ) const
pure virtual
Returns
A set of all block reference entity IDs.

Implemented in RMemoryStorage, and RLinkedStorage.

◆ queryAllBlocks()

virtual QSet<RBlock::Id> RStorage::queryAllBlocks ( bool  undone = false)
pure virtual
Returns
A set of all block IDs of the document.

Implemented in RMemoryStorage, and RLinkedStorage.

◆ queryAllEntities() [1/2]

virtual QSet<REntity::Id> RStorage::queryAllEntities ( bool  undone,
bool  allBlocks,
QList< RS::EntityType types 
)
pure virtual

Implemented in RMemoryStorage, and RLinkedStorage.

◆ queryAllEntities() [2/2]

virtual QSet<REntity::Id> RStorage::queryAllEntities ( bool  undone = false,
bool  allBlocks = false,
RS::EntityType  type = RS::EntityAll 
)
pure virtual
Returns
A set of all entity IDs of the document.

Implemented in RMemoryStorage, and RLinkedStorage.

◆ queryAllLayers()

virtual QSet<RLayer::Id> RStorage::queryAllLayers ( bool  undone = false)
pure virtual
Returns
A set of all layer IDs of the document.

Implemented in RMemoryStorage, and RLinkedStorage.

◆ queryAllLayerStates()

virtual QSet<RLayerState::Id> RStorage::queryAllLayerStates ( bool  undone = false) const
pure virtual
Returns
A set of all layer state IDs of the document.

Implemented in RMemoryStorage.

◆ queryAllLayoutBlocks()

virtual QSet<RBlock::Id> RStorage::queryAllLayoutBlocks ( bool  includeModelSpace = false,
bool  undone = false 
) const
pure virtual
Returns
A set of all block IDs of layout blocks of the document.

Implemented in RMemoryStorage, and RLinkedStorage.

◆ queryAllLayouts()

virtual QSet<RLayout::Id> RStorage::queryAllLayouts ( bool  undone = false)
pure virtual
Returns
A set of all layout IDs of layouts of the document.

Implemented in RLinkedStorage, and RMemoryStorage.

◆ queryAllLinetypes()

virtual QSet<RLinetype::Id> RStorage::queryAllLinetypes ( )
pure virtual
Returns
A set of all linetype IDs of the document.

Implemented in RMemoryStorage, and RLinkedStorage.

◆ queryAllObjects()

virtual QSet<RObject::Id> RStorage::queryAllObjects ( ) const
pure virtual
Returns
A set of all object IDs of the document.

Implemented in RMemoryStorage, and RLinkedStorage.

◆ queryAllUcs()

virtual QSet<RUcs::Id> RStorage::queryAllUcs ( )
pure virtual
Returns
A set of all UCS IDs of the document.

Implemented in RMemoryStorage, and RLinkedStorage.

◆ queryAllViewports()

virtual QSet<REntity::Id> RStorage::queryAllViewports ( ) const
pure virtual
Returns
A set of all viewport entity IDs.

Implemented in RMemoryStorage, and RLinkedStorage.

◆ queryAllViews()

virtual QSet<RView::Id> RStorage::queryAllViews ( bool  undone = false)
pure virtual
Returns
A set of all view IDs of the document.

Implemented in RMemoryStorage, and RLinkedStorage.

◆ queryAllVisibleEntities()

virtual QSet<REntity::Id> RStorage::queryAllVisibleEntities ( )
pure virtual

Implemented in RMemoryStorage, and RLinkedStorage.

◆ queryBlock() [1/2]

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

Implemented in RLinkedStorage, and RMemoryStorage.

◆ queryBlock() [2/2]

virtual QSharedPointer<RBlock> RStorage::queryBlock ( RBlock::Id  blockId) const
pure virtual

Implemented in RLinkedStorage, and RMemoryStorage.

◆ queryBlockDirect() [1/2]

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

Reimplemented in RMemoryStorage.

◆ queryBlockDirect() [2/2]

virtual QSharedPointer<RBlock> RStorage::queryBlockDirect ( RBlock::Id  blockId) const
pure virtual

Implemented in RMemoryStorage, and RLinkedStorage.

◆ queryBlockEntities()

virtual QSet<REntity::Id> RStorage::queryBlockEntities ( RBlock::Id  blockId)
pure virtual
Returns
A set of all entity IDs that are part of the given block.

Implemented in RMemoryStorage, and RLinkedStorage.

◆ queryBlockReferences()

virtual QSet<REntity::Id> RStorage::queryBlockReferences ( RBlock::Id  blockId) const
pure virtual
Returns
A set of all block reference entity IDs that reference the given block.

Implemented in RMemoryStorage, and RLinkedStorage.

◆ queryChildEntities()

virtual QSet<REntity::Id> RStorage::queryChildEntities ( REntity::Id  parentId,
RS::EntityType  type = RS::EntityAll 
)
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.

Implemented in RMemoryStorage, and RLinkedStorage.

◆ queryCurrentBlock()

virtual QSharedPointer<RBlock> RStorage::queryCurrentBlock ( )
inlinevirtual

◆ queryCurrentLayer()

virtual QSharedPointer<RLayer> RStorage::queryCurrentLayer ( )
inlinevirtual

◆ queryCurrentLinetype()

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

◆ queryCurrentView()

virtual QSharedPointer<RView> RStorage::queryCurrentView ( )
inlinevirtual

◆ queryDocumentVariables()

virtual QSharedPointer<RDocumentVariables> RStorage::queryDocumentVariables ( ) const
pure virtual

Implemented in RMemoryStorage, and RLinkedStorage.

◆ queryDocumentVariablesDirect()

virtual QSharedPointer<RDocumentVariables> RStorage::queryDocumentVariablesDirect ( ) const
pure virtual

Implemented in RMemoryStorage, and RLinkedStorage.

◆ queryEntity()

virtual QSharedPointer<REntity> RStorage::queryEntity ( REntity::Id  entityId) const
pure virtual
Returns
A pointer to the entity with the given entityId or NULL if no such entity exists.

Implemented in RMemoryStorage, and RLinkedStorage.

◆ queryEntityDirect()

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

Reimplemented in RMemoryStorage, and RLinkedStorage.

◆ queryInfiniteEntities()

virtual QSet<REntity::Id> RStorage::queryInfiniteEntities ( ) const
pure virtual
Returns
A set of entity IDs of all infinite entities (xlines).

Implemented in RMemoryStorage, and RLinkedStorage.

◆ queryLayer() [1/2]

virtual QSharedPointer<RLayer> RStorage::queryLayer ( const QString &  layerName) const
pure virtual
Returns
A pointer to the layer with the given layerName or NULL if no such layer exists.

Implemented in RMemoryStorage, and RLinkedStorage.

◆ queryLayer() [2/2]

virtual QSharedPointer<RLayer> RStorage::queryLayer ( RLayer::Id  layerId) const
pure virtual
Returns
A pointer to the layer with the given layerId or NULL if no such layer exists.

Implemented in RMemoryStorage, and RLinkedStorage.

◆ queryLayerBlockEntities()

virtual QSet<REntity::Id> RStorage::queryLayerBlockEntities ( RLayer::Id  layerId,
RBlock::Id  blockId 
)
pure virtual

Implemented in RMemoryStorage, and RLinkedStorage.

◆ queryLayerDirect() [1/2]

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

◆ queryLayerDirect() [2/2]

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

Reimplemented in RMemoryStorage, and RLinkedStorage.

◆ queryLayerEntities()

virtual QSet<REntity::Id> RStorage::queryLayerEntities ( RLayer::Id  layerId,
bool  allBlocks = false 
)
pure virtual
Returns
A set of all entity IDs on the given layer.

Implemented in RMemoryStorage, and RLinkedStorage.

◆ queryLayerState() [1/2]

virtual QSharedPointer<RLayerState> RStorage::queryLayerState ( const QString &  layerStateName) const
pure virtual
Returns
A pointer to the layer with the given layerName or NULL if no such layer exists.

Implemented in RLinkedStorage, and RMemoryStorage.

◆ queryLayerState() [2/2]

virtual QSharedPointer<RLayerState> RStorage::queryLayerState ( RLayerState::Id  layerStateId) const
pure virtual
Returns
A pointer to the layer state with the given layerStateId or NULL if no such layer state exists.

Implemented in RLinkedStorage, and RMemoryStorage.

◆ queryLayerStateDirect() [1/2]

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

◆ queryLayerStateDirect() [2/2]

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

Reimplemented in RMemoryStorage, and RLinkedStorage.

◆ queryLayout() [1/2]

virtual QSharedPointer<RLayout> RStorage::queryLayout ( const QString &  layoutName) const
pure virtual
Returns
A pointer to the layout with the given layoutName or NULL if no such layout exists.

Implemented in RLinkedStorage, and RMemoryStorage.

◆ queryLayout() [2/2]

virtual QSharedPointer<RLayout> RStorage::queryLayout ( RLayout::Id  layoutId) const
pure virtual
Returns
A pointer to the layout with the given layoutId or NULL if no such layout exists.

Implemented in RLinkedStorage, and RMemoryStorage.

◆ queryLayoutDirect()

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

Reimplemented in RMemoryStorage, and RLinkedStorage.

◆ queryLinetype() [1/2]

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

Implemented in RLinkedStorage, and RMemoryStorage.

◆ queryLinetype() [2/2]

virtual QSharedPointer<RLinetype> RStorage::queryLinetype ( RLinetype::Id  linetypeId) const
pure virtual

Implemented in RLinkedStorage, and RMemoryStorage.

◆ queryLinetypeDirect()

virtual QSharedPointer<RLinetype> RStorage::queryLinetypeDirect ( RLinetype::Id  linetypeId) const
pure virtual

Implemented in RLinkedStorage, and RMemoryStorage.

◆ queryObject()

virtual QSharedPointer<RObject> RStorage::queryObject ( RObject::Id  objectId) const
pure virtual
Returns
A shared pointer to the object with the given objectId or null pointer if the object is no available in this storage.

Implemented in RMemoryStorage, and RLinkedStorage.

◆ queryObjectByHandle()

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

Implemented in RMemoryStorage, and RLinkedStorage.

◆ queryObjectDirect()

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

Reimplemented in RMemoryStorage, and RLinkedStorage.

◆ querySelectedEntities()

virtual QSet<REntity::Id> RStorage::querySelectedEntities ( ) const
pure virtual
Returns
A set of entity IDs of all selected entities.

Implemented in RMemoryStorage, and RLinkedStorage.

◆ querySelectedLayers()

virtual QSet<RObject::Id> RStorage::querySelectedLayers ( ) const
pure virtual
Returns
A set of object IDs of all selected objects (layers, ...).

Implemented in RMemoryStorage, and RLinkedStorage.

◆ queryUcs() [1/2]

virtual QSharedPointer<RUcs> RStorage::queryUcs ( const QString &  ucsName) const
pure virtual
Returns
A pointer to the UCS with the given ucsName or NULL if no such UCS exists.

Implemented in RLinkedStorage, and RMemoryStorage.

◆ queryUcs() [2/2]

virtual QSharedPointer<RUcs> RStorage::queryUcs ( RUcs::Id  ucsId) const
pure virtual
Returns
A pointer to the UCS with the given ucsId or NULL if no such UCS exists.

Implemented in RLinkedStorage, and RMemoryStorage.

◆ queryUcsDirect()

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

Reimplemented in RMemoryStorage, and RLinkedStorage.

◆ queryView() [1/2]

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

Implemented in RLinkedStorage, and RMemoryStorage.

◆ queryView() [2/2]

virtual QSharedPointer<RView> RStorage::queryView ( RView::Id  viewId) const
pure virtual

Implemented in RLinkedStorage, and RMemoryStorage.

◆ queryVisibleEntityDirect()

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

Reimplemented in RMemoryStorage.

◆ queryWorkingSetEntities()

virtual QSet<REntity::Id> RStorage::queryWorkingSetEntities ( )
pure virtual
Returns
A set of all entity IDs in the current working set.

Implemented in RMemoryStorage.

◆ removeObject()

virtual bool RStorage::removeObject ( QSharedPointer< RObject object)
pure virtual

Implemented in RMemoryStorage.

◆ removeVariable()

virtual void RStorage::removeVariable ( const QString &  key)
pure virtual

Removes the custom variable with the given key.

Implemented in RMemoryStorage.

◆ resetTransactionStack()

virtual void RStorage::resetTransactionStack ( )
pure virtual

Implemented in RMemoryStorage.

◆ rollbackTransaction()

virtual void RStorage::rollbackTransaction ( )
pure virtual

Rolls the current transaction back in order to cancel it.

This function should never be called under normal circumstances.

Implemented in RMemoryStorage.

◆ saveObject()

virtual bool RStorage::saveObject ( QSharedPointer< RObject object,
bool  checkBlockRecursion = true,
bool  keepHandles = false 
)
pure virtual

Saves the given object to the storage.

Implemented in RMemoryStorage.

◆ saveTransaction()

virtual void RStorage::saveTransaction ( RTransaction transaction)
pure virtual

Saves the given transaction.

Transactions need to be stored for undo / redo functionality.

Implemented in RMemoryStorage.

◆ selectAllEntities()

virtual void RStorage::selectAllEntities ( QSet< REntity::Id > *  affectedEntities = NULL)
pure virtual

Sets the selection status of all entities.

Implemented in RMemoryStorage.

◆ selectEntities()

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

Selects all entities with the given IDs.

Parameters
addTrue to add the entities to the current selection. False to replace the current selection with the new entities.
affectedOptional 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.

Implemented in RMemoryStorage.

◆ selectEntity()

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

Selects the entity with the given ID.

Parameters
addTrue to add the entity to the current selection. False to replace the current selection with the given entity.
affectedOptional 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.

Implemented in RMemoryStorage.

◆ setCurrentBlock() [1/2]

void RStorage::setCurrentBlock ( const QString &  blockName)
inline

◆ setCurrentBlock() [2/2]

virtual void RStorage::setCurrentBlock ( RBlock::Id  blockId)
inlinevirtual

Reimplemented in RMemoryStorage.

◆ setCurrentColor()

void RStorage::setCurrentColor ( const RColor color)
virtual

◆ setCurrentLayer() [1/2]

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

◆ setCurrentLayer() [2/2]

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

◆ setCurrentLinetype() [1/2]

void RStorage::setCurrentLinetype ( const QString &  name)

◆ setCurrentLinetype() [2/2]

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

◆ setCurrentLinetypePattern()

void RStorage::setCurrentLinetypePattern ( const RLinetypePattern p)

◆ setCurrentLineweight()

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

◆ setCurrentView() [1/2]

void RStorage::setCurrentView ( const QString &  viewName)
inline

◆ setCurrentView() [2/2]

void RStorage::setCurrentView ( RView::Id  viewId)
inline

◆ setCurrentViewport()

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

◆ setDimensionFont()

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

◆ setDocument()

void RStorage::setDocument ( RDocument doc)
inline

◆ setEntityParentId()

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

Reimplemented in RMemoryStorage.

◆ setKnownVariable()

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

Sets a known DXF/DWG variable for this document.

Parameters
keyVariable key (see DXF reference)
valueNew value of the variable.
transactionRTransaction to use for the change or NULL (default) to create a transaction on the fly.

Implemented in RMemoryStorage.

◆ setLastTransactionId()

virtual void RStorage::setLastTransactionId ( int  transactionId)
inlinevirtual

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

◆ setLayer0Id()

virtual void RStorage::setLayer0Id ( RLayer::Id  id)
inlinevirtual

◆ setLinetypeScale()

void RStorage::setLinetypeScale ( double  v,
RTransaction transaction = NULL 
)
virtual

Sets the global linetype scale of this document to the given value.

Parameters
transactionTransaction to use for the modification or NULL to create a local transaction (default).

◆ setMaxDrawOrder()

virtual void RStorage::setMaxDrawOrder ( int  m)
inlinevirtual

◆ setMeasurement()

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

◆ setModelSpaceBlockId()

virtual void RStorage::setModelSpaceBlockId ( RBlock::Id  id)
inlinevirtual

◆ setModified()

void RStorage::setModified ( bool  m)

Resets the modified flag.

Modification time is stored.

◆ setObjectHandle()

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

Reimplemented in RMemoryStorage.

◆ setObjectId()

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

◆ setUndoStatus() [1/2]

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

Reimplemented in RMemoryStorage.

◆ setUndoStatus() [2/2]

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

Implemented in RMemoryStorage, and RLinkedStorage.

◆ setUnit()

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

◆ setVariable()

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

Sets a custom variable in the context of this document.

Parameters
keyVariable key (name)
valueVariable value
overwriteTrue to overwrite an existing variable with the same key (default)

Implemented in RMemoryStorage.

◆ sortBlocks()

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

◆ sortLayers()

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

◆ startDocumentVariablesTransaction()

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

◆ startTransactionGroup()

virtual void RStorage::startTransactionGroup ( )
inlinevirtual

◆ toggleUndoStatus() [1/2]

virtual void RStorage::toggleUndoStatus ( QSet< RObject::Id > &  objects)
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.

Implemented in RMemoryStorage.

◆ toggleUndoStatus() [2/2]

virtual void RStorage::toggleUndoStatus ( RObject::Id  object)
pure virtual

Toggles the current undo status of the given object.

Implemented in RMemoryStorage.

◆ unsetCurrentViewport()

virtual void RStorage::unsetCurrentViewport ( )
inlinevirtual

◆ update()

virtual void RStorage::update ( )
inlinevirtual

Clear caches:

Reimplemented in RMemoryStorage.

Friends And Related Function Documentation

◆ operator<<

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

Stream operator for QDebug.

Non-Scriptable:\nThis function is not available in script environments.\n

Member Data Documentation

◆ currentBlockId

RBlock::Id RStorage::currentBlockId
private

◆ currentColor

RColor RStorage::currentColor
private

◆ currentLinetypeId

RLinetype::Id RStorage::currentLinetypeId
private

◆ currentLineweight

RLineweight::Lineweight RStorage::currentLineweight
private

◆ currentViewId

RView::Id RStorage::currentViewId
private

◆ currentViewportId

RObject::Id RStorage::currentViewportId
private

◆ document

RDocument* RStorage::document
private

◆ handleCounter

RObject::Handle RStorage::handleCounter
protected

◆ idCounter

RObject::Id RStorage::idCounter
private

◆ lastModified

QDateTime RStorage::lastModified
protected

◆ lastTransactionGroup

int RStorage::lastTransactionGroup
private

◆ lastTransactionId

int RStorage::lastTransactionId
private

◆ layer0Id

RLayer::Id RStorage::layer0Id
private

◆ maxDrawOrder

int RStorage::maxDrawOrder
private

◆ modelSpaceBlockId

RBlock::Id RStorage::modelSpaceBlockId
private

◆ modified

bool RStorage::modified
protected

◆ modifiedListeners

QList<RModifiedListener*> RStorage::modifiedListeners
private

The documentation for this class was generated from the following files: