Skip to content

RDocumentVariables

Class in Core Module
Header: #include <src/core/RDocumentVariables.h>
Inherits: RObject

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.

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) const
Stream 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 RS::EntityType getRtti()
static void init()
static RPropertyTypeId PropertyCurrentLayerId
static RPropertyTypeId PropertyCustom
static RPropertyTypeId PropertyDimensionFont
static RPropertyTypeId PropertyHandle
static RPropertyTypeId PropertyLinetypeScale
static RPropertyTypeId PropertyProtected
static RPropertyTypeId PropertyUnit
static RPropertyTypeId PropertyWorkingSetBlockReferenceId
RObject::Id currentLayerId
QString dimensionFont
QHash< RS::KnownVariable, QVariant > knownVariables
double linetypeScale
RS::Measurement measurement
RS::Unit unit
RObject::Id workingSetBlockReferenceId

RDocumentVariables::RDocumentVariables(RDocument *document)

virtual RDocumentVariables::~RDocumentVariables()

virtual

QString RDocumentVariables::addAutoVariable(double value)

void RDocumentVariables::clear()

virtual QSharedPointer< RObject > RDocumentVariables::clone() const

virtual inline const

Reimplemented from clone.

QSharedPointer< RDocumentVariables > RDocumentVariables::cloneToDocumentVariables() const

inline const

QStringList RDocumentVariables::getAutoVariables() const

const

RObject::Id RDocumentVariables::getCurrentLayerId() const

inline const

virtual QSet< RPropertyTypeId > RDocumentVariables::getCustomPropertyTypeIds() const

virtual const

Returns: A set of all custom property IDs of properties that are available for this object.

Reimplemented from getCustomPropertyTypeIds.

QString RDocumentVariables::getDimensionFont() const

inline const

QVariant RDocumentVariables::getKnownVariable(RS::KnownVariable key) const

const

double RDocumentVariables::getLinetypeScale() const

inline const

RS::Measurement RDocumentVariables::getMeasurement() const

inline const

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.

virtual RS::EntityType RDocumentVariables::getType() const

virtual inline const

Returns: The unique entity type, usually the same as RTTI, different for custom entities.

Reimplemented from getType.

RS::Unit RDocumentVariables::getUnit() const

inline const

bool RDocumentVariables::hasKnownVariable(RS::KnownVariable key) const

const

virtual void RDocumentVariables::print(QDebug dbg) const

virtual const

Stream operator for QDebug.

Reimplemented from print.

void RDocumentVariables::setCurrentLayerId(RObject::Id id)

inline

void RDocumentVariables::setDimensionFont(const QString &f)

inline

void RDocumentVariables::setKnownVariable(RS::KnownVariable key, const QVariant &value)

void RDocumentVariables::setKnownVariable(RS::KnownVariable key, const RColor &value)

void RDocumentVariables::setKnownVariable(RS::KnownVariable key, const RVector &value)

void RDocumentVariables::setLinetypeScale(double s)

inline

void RDocumentVariables::setMeasurement(RS::Measurement m)

inline

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.

void RDocumentVariables::setUnit(RS::Unit u)

inline

static RS::EntityType RDocumentVariables::getRtti()

static inline

static void RDocumentVariables::init()

static

static RPropertyTypeId RDocumentVariables::PropertyCurrentLayerId

static

static RPropertyTypeId RDocumentVariables::PropertyCustom

static

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.

static RPropertyTypeId RDocumentVariables::PropertyDimensionFont

static

static RPropertyTypeId RDocumentVariables::PropertyHandle

static

static RPropertyTypeId RDocumentVariables::PropertyLinetypeScale

static

static RPropertyTypeId RDocumentVariables::PropertyProtected

static

static RPropertyTypeId RDocumentVariables::PropertyUnit

static

static RPropertyTypeId RDocumentVariables::PropertyWorkingSetBlockReferenceId

static

RObject::Id RDocumentVariables::currentLayerId

private

QString RDocumentVariables::dimensionFont

private

QHash<RS::KnownVariable, QVariant> RDocumentVariables::knownVariables

private

double RDocumentVariables::linetypeScale

private

RS::Measurement RDocumentVariables::measurement

private

RS::Unit RDocumentVariables::unit

private

RObject::Id RDocumentVariables::workingSetBlockReferenceId

private