RDocumentVariables
Class in Core Module
Header: #include <src/core/RDocumentVariables.h>
Inherits: RObject
Description
Section titled “Description”This type of object is used to store document wide variables.
Scriptable: This class is available in script environments.
Shared Pointer Support: Objects can be used in QSharedPointer.
Public Functions
Section titled “Public Functions”RDocumentVariables(RDocument *document) |
|
| virtual | ~RDocumentVariables() |
| QString | addAutoVariable(double value) |
| void | clear() |
| virtual QSharedPointer< RObject > | clone() const |
| QSharedPointer< RDocumentVariables > | cloneToDocumentVariables() const |
| QStringList | getAutoVariables() const |
| RObject::Id | getCurrentLayerId() const |
| virtual QSet< RPropertyTypeId > | getCustomPropertyTypeIds() const |
| QString | getDimensionFont() const |
| QVariant | getKnownVariable(RS::KnownVariable key) const |
| double | getLinetypeScale() const |
| RS::Measurement | getMeasurement() const |
| virtual QPair< QVariant, RPropertyAttributes > | getProperty(RPropertyTypeId &propertyTypeId, bool humanReadable=false, bool noAttributes=false, bool showOnRequest=false) |
| virtual RS::EntityType | getType() const |
| RS::Unit | getUnit() const |
| bool | hasKnownVariable(RS::KnownVariable key) const |
| virtual void | print(QDebug dbg) constStream operator for QDebug. |
| void | setCurrentLayerId(RObject::Id id) |
| void | setDimensionFont(const QString &f) |
| void | setKnownVariable(RS::KnownVariable key, const QVariant &value) |
| void | setKnownVariable(RS::KnownVariable key, const RColor &value) |
| void | setKnownVariable(RS::KnownVariable key, const RVector &value) |
| void | setLinetypeScale(double s) |
| void | setMeasurement(RS::Measurement m) |
| virtual bool | setProperty(RPropertyTypeId propertyTypeId, const QVariant &value, RTransaction *transaction=NULL)Sets the given property to the given value. |
| void | setUnit(RS::Unit u) |
Static Public Functions
Section titled “Static Public Functions”| static RS::EntityType | getRtti() |
| static void | init() |
Static Public Attributes
Section titled “Static Public Attributes”| static RPropertyTypeId | PropertyCurrentLayerId |
| static RPropertyTypeId | PropertyCustom |
| static RPropertyTypeId | PropertyDimensionFont |
| static RPropertyTypeId | PropertyHandle |
| static RPropertyTypeId | PropertyLinetypeScale |
| static RPropertyTypeId | PropertyProtected |
| static RPropertyTypeId | PropertyUnit |
| static RPropertyTypeId | PropertyWorkingSetBlockReferenceId |
Private Attributes
Section titled “Private Attributes”| RObject::Id | currentLayerId |
| QString | dimensionFont |
| QHash< RS::KnownVariable, QVariant > | knownVariables |
| double | linetypeScale |
| RS::Measurement | measurement |
| RS::Unit | unit |
| RObject::Id | workingSetBlockReferenceId |
Member Documentation
Section titled “Member Documentation”RDocumentVariables
Section titled “RDocumentVariables”RDocumentVariables::RDocumentVariables(RDocument *document)~RDocumentVariables
Section titled “~RDocumentVariables”virtual RDocumentVariables::~RDocumentVariables()virtual
addAutoVariable
Section titled “addAutoVariable”QString RDocumentVariables::addAutoVariable(double value)void RDocumentVariables::clear()virtual QSharedPointer< RObject > RDocumentVariables::clone() constvirtual inline const
Reimplemented from clone.
cloneToDocumentVariables
Section titled “cloneToDocumentVariables”QSharedPointer< RDocumentVariables > RDocumentVariables::cloneToDocumentVariables() constinline const
getAutoVariables
Section titled “getAutoVariables”QStringList RDocumentVariables::getAutoVariables() constconst
getCurrentLayerId
Section titled “getCurrentLayerId”RObject::Id RDocumentVariables::getCurrentLayerId() constinline const
getCustomPropertyTypeIds
Section titled “getCustomPropertyTypeIds”virtual QSet< RPropertyTypeId > RDocumentVariables::getCustomPropertyTypeIds() constvirtual const
Returns: A set of all custom property IDs of properties that are available for this object.
Reimplemented from getCustomPropertyTypeIds.
getDimensionFont
Section titled “getDimensionFont”QString RDocumentVariables::getDimensionFont() constinline const
getKnownVariable
Section titled “getKnownVariable”QVariant RDocumentVariables::getKnownVariable(RS::KnownVariable key) constconst
getLinetypeScale
Section titled “getLinetypeScale”double RDocumentVariables::getLinetypeScale() constinline const
getMeasurement
Section titled “getMeasurement”RS::Measurement RDocumentVariables::getMeasurement() constinline const
getProperty
Section titled “getProperty”virtual QPair< QVariant, RPropertyAttributes > RDocumentVariables::getProperty(RPropertyTypeId &propertyTypeId, bool humanReadable=false, bool noAttributes=false, bool showOnRequest=false)virtual
Returns: The value and attributes of the given property or an invalid property if this property owner has no property with the given ID.
Reimplemented from getProperty.
getType
Section titled “getType”virtual RS::EntityType RDocumentVariables::getType() constvirtual inline const
Returns: The unique entity type, usually the same as RTTI, different for custom entities.
Reimplemented from getType.
getUnit
Section titled “getUnit”RS::Unit RDocumentVariables::getUnit() constinline const
hasKnownVariable
Section titled “hasKnownVariable”bool RDocumentVariables::hasKnownVariable(RS::KnownVariable key) constconst
virtual void RDocumentVariables::print(QDebug dbg) constvirtual const
Stream operator for QDebug.
Reimplemented from print.
setCurrentLayerId
Section titled “setCurrentLayerId”void RDocumentVariables::setCurrentLayerId(RObject::Id id)inline
setDimensionFont
Section titled “setDimensionFont”void RDocumentVariables::setDimensionFont(const QString &f)inline
setKnownVariable
Section titled “setKnownVariable”void RDocumentVariables::setKnownVariable(RS::KnownVariable key, const QVariant &value)setKnownVariable
Section titled “setKnownVariable”void RDocumentVariables::setKnownVariable(RS::KnownVariable key, const RColor &value)setKnownVariable
Section titled “setKnownVariable”void RDocumentVariables::setKnownVariable(RS::KnownVariable key, const RVector &value)setLinetypeScale
Section titled “setLinetypeScale”void RDocumentVariables::setLinetypeScale(double s)inline
setMeasurement
Section titled “setMeasurement”void RDocumentVariables::setMeasurement(RS::Measurement m)inline
setProperty
Section titled “setProperty”virtual bool RDocumentVariables::setProperty(RPropertyTypeId propertyTypeId, const QVariant &value, RTransaction *transaction=NULL)virtual
Sets the given property to the given value.
If this property owner does not know a property with that ID, it is up to the property owner what happens. The property might be added into a list of dynamic properties or dropped.
Returns: True if the property owner was modified in any way, false otherwise.
Reimplemented from setProperty.
setUnit
Section titled “setUnit”void RDocumentVariables::setUnit(RS::Unit u)inline
getRtti
Section titled “getRtti”static RS::EntityType RDocumentVariables::getRtti()static inline
static void RDocumentVariables::init()static
PropertyCurrentLayerId
Section titled “PropertyCurrentLayerId”static RPropertyTypeId RDocumentVariables::PropertyCurrentLayerIdstatic
PropertyCustom
Section titled “PropertyCustom”static RPropertyTypeId RDocumentVariables::PropertyCustomstatic
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.
PropertyDimensionFont
Section titled “PropertyDimensionFont”static RPropertyTypeId RDocumentVariables::PropertyDimensionFontstatic
PropertyHandle
Section titled “PropertyHandle”static RPropertyTypeId RDocumentVariables::PropertyHandlestatic
PropertyLinetypeScale
Section titled “PropertyLinetypeScale”static RPropertyTypeId RDocumentVariables::PropertyLinetypeScalestatic
PropertyProtected
Section titled “PropertyProtected”static RPropertyTypeId RDocumentVariables::PropertyProtectedstatic
PropertyUnit
Section titled “PropertyUnit”static RPropertyTypeId RDocumentVariables::PropertyUnitstatic
PropertyWorkingSetBlockReferenceId
Section titled “PropertyWorkingSetBlockReferenceId”static RPropertyTypeId RDocumentVariables::PropertyWorkingSetBlockReferenceIdstatic
currentLayerId
Section titled “currentLayerId”RObject::Id RDocumentVariables::currentLayerIdprivate
dimensionFont
Section titled “dimensionFont”QString RDocumentVariables::dimensionFontprivate
knownVariables
Section titled “knownVariables”QHash<RS::KnownVariable, QVariant> RDocumentVariables::knownVariablesprivate
linetypeScale
Section titled “linetypeScale”double RDocumentVariables::linetypeScaleprivate
measurement
Section titled “measurement”RS::Measurement RDocumentVariables::measurementprivate
RS::Unit RDocumentVariables::unitprivate
workingSetBlockReferenceId
Section titled “workingSetBlockReferenceId”RObject::Id RDocumentVariables::workingSetBlockReferenceIdprivate