Skip to content

RPropertyAttributes

Class in Core Module
Header: #include <src/core/RPropertyAttributes.h>

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. Structure to transfer attributes about property types. For example a property ‘Side’ might have the two choices ‘Left’ and ‘Right’. These choices can be stored in a RPropertyAttributes object. Other attributes define if a property is visible, if it is an angle (such properties require conversion between radiants and degrees), etc.

Scriptable: This class is available in script environments.

Copyable: Objects are cleaned up automatically by the garbage collector of the script engine.

enum Option { NoOptions, ReadOnly, Invisible, Angle, AffectsOtherProperties, IgnoreCase, AllowMixedValue, List, Mixed, RichText, Style, DimensionLabel, Label, Pattern, Custom, Integer, Redundant, VisibleToParent, KnownVariable, NumericallySorted, Percentage, Sum, Undeletable, OnRequest, Location, RefPoint, Geometry, Scale, Area, UnitLess, DimStyleOverride, CustomApp001, StoreIndex }
RPropertyAttributes()
RPropertyAttributes(RPropertyAttributes::Options options)
bool affectsOtherProperties() const
bool getAllowMixedValue()
QStringList getChoices() const
bool getIgnoreCase() const
QString getLabel() const
bool getStoreIndex() const
bool hasChoices()
bool isAngleType() const
bool isAreaType() const
bool isCustom() const
bool isCustomApp001() const
bool isDimensionLabel() const
bool isInteger() const
bool isInvisible() const
bool isLabel() const
bool isList() const
bool isMixed() const
bool isNumericallySorted() const
bool isOnRequest() const
bool isPercentage() const
bool isReadOnly() const
bool isRedundant() const
bool isRichText() const
bool isScaleType() const
bool isStyle() const
bool isSum() const
bool isUndeletable() const
bool isUnitLess() const
bool isVisibleToParent() const
void mixWith(const RPropertyAttributes &other)
bool operator!=(const RPropertyAttributes &other) const
bool operator==(const RPropertyAttributes &other) const
void setAffectsOtherProperties(bool affectsOtherProperties)
void setAllowMixedValue(bool allowMixedValue)
void setAngleType(bool angle)
void setAreaType(bool v)
void setChoices(const QStringList &choices, bool storeIndex=false)
void setCustomApp001(bool v)
void setIgnoreCase(bool ignoreCase)
void setInteger(bool i)
void setInvisible(bool invisible)
void setLabel(const QString &l)
void setList(bool on)
void setMixed(bool mixed)
void setNumericallySorted(bool on)
void setOnRequest(bool onRequest)
void setOption(RPropertyAttributes::Option option, bool on)
void setReadOnly(bool readOnly)
void setRedundant(bool on)
void setRichText(bool on)
void setScaleType(bool v)
void setStyle(bool on)
void setSum(bool sum)
void setUndeletable(bool undeletable)
void setUnitLess(bool v)
QStringList choices
QString label
RPropertyAttributes::Options options

enum Option
Value Description
NoOptions = 0x0
ReadOnly = 0x1 Property is read only.
Invisible = 0x2 Property is not displayed.
Angle = 0x4 Property is an angle (shown in user preferred angle unit).
AffectsOtherProperties = 0x8 Property affects others, needs refresh on changing.
IgnoreCase = 0x10 Property is not case sensitive.
AllowMixedValue = 0x20 Property can be mixed.
List = 0x40 Property is a list (e.g. x values of polyline vertices).
Mixed = 0x80 Property has mixed values.
RichText = 0x100 Property is rich text and can be edited as such.
Style = 0x200 Property is a text style (font).
DimensionLabel = 0x400 Property is a dimension label (suggests context menu to insert symbols, including <>).
Label = 0x800 Property is a label (suggests context menu to insert symbols).
Pattern = 0x1000 Property is a hatch pattern name.
Custom = 0x2000 Property is a map of custom properties.
Integer = 0x4000 Property is an int (not a double number).
Redundant = 0x8000 Property is redundant (e.g. angle for line entities).
VisibleToParent = 0x10000 Property can be edited in the context of the parent entity.
KnownVariable = 0x20000 Property is a known DXF variable.
NumericallySorted = 0x40000 Sort choices for this property numerically.
Percentage = 0x80000 Integer
Sum = 0x100000 ReadOnly
Undeletable = 0x200000 Property is undeletable (custom properties only).
OnRequest = 0x400000 Property shown on request (slow to compute).
Location = 0x800000 Property affected when transforming.
RefPoint = 0x1000000 Property affected when moving reference point.
Geometry = Location RefPoint
Scale = 0x2000000 Property is scale (1:2, 5”=1”, …).
Area = 0x4000000 Property is area (relevant for formatting of value).
UnitLess = 0x8000000 Property has no unit (linetype scale, draw order, …).
DimStyleOverride = 0x10000000 Property is advanced dimension style override (can be hidden).
CustomApp001 = 0x20000000 Property attribute for custom application.
StoreIndex = 0x40000000 Store index instead of text of a property with choices.

RPropertyAttributes::RPropertyAttributes()

inline

RPropertyAttributes::RPropertyAttributes(RPropertyAttributes::Options options)

inline

bool RPropertyAttributes::affectsOtherProperties() const

inline const

bool RPropertyAttributes::getAllowMixedValue()

inline

QStringList RPropertyAttributes::getChoices() const

inline const

bool RPropertyAttributes::getIgnoreCase() const

inline const

QString RPropertyAttributes::getLabel() const

inline const

bool RPropertyAttributes::getStoreIndex() const

inline const

bool RPropertyAttributes::hasChoices()

inline

bool RPropertyAttributes::isAngleType() const

inline const

bool RPropertyAttributes::isAreaType() const

inline const

bool RPropertyAttributes::isCustom() const

inline const

bool RPropertyAttributes::isCustomApp001() const

inline const

bool RPropertyAttributes::isDimensionLabel() const

inline const

bool RPropertyAttributes::isInteger() const

inline const

bool RPropertyAttributes::isInvisible() const

inline const

bool RPropertyAttributes::isLabel() const

inline const

bool RPropertyAttributes::isList() const

inline const

bool RPropertyAttributes::isMixed() const

inline const

bool RPropertyAttributes::isNumericallySorted() const

inline const

bool RPropertyAttributes::isOnRequest() const

inline const

bool RPropertyAttributes::isPercentage() const

inline const

bool RPropertyAttributes::isReadOnly() const

inline const

bool RPropertyAttributes::isRedundant() const

inline const

bool RPropertyAttributes::isRichText() const

inline const

bool RPropertyAttributes::isScaleType() const

inline const

bool RPropertyAttributes::isStyle() const

inline const

bool RPropertyAttributes::isSum() const

inline const

bool RPropertyAttributes::isUndeletable() const

inline const

bool RPropertyAttributes::isUnitLess() const

inline const

bool RPropertyAttributes::isVisibleToParent() const

inline const

void RPropertyAttributes::mixWith(const RPropertyAttributes &other)

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.

bool RPropertyAttributes::operator!=(const RPropertyAttributes &other) const

inline const

bool RPropertyAttributes::operator==(const RPropertyAttributes &other) const

inline const

void RPropertyAttributes::setAffectsOtherProperties(bool affectsOtherProperties)

inline

void RPropertyAttributes::setAllowMixedValue(bool allowMixedValue)

inline

void RPropertyAttributes::setAngleType(bool angle)

inline

void RPropertyAttributes::setAreaType(bool v)

inline

void RPropertyAttributes::setChoices(const QStringList &choices, bool storeIndex=false)

inline

void RPropertyAttributes::setCustomApp001(bool v)

inline

void RPropertyAttributes::setIgnoreCase(bool ignoreCase)

inline

void RPropertyAttributes::setInteger(bool i)

inline

void RPropertyAttributes::setInvisible(bool invisible)

inline

void RPropertyAttributes::setLabel(const QString &l)

inline

void RPropertyAttributes::setList(bool on)

inline

void RPropertyAttributes::setMixed(bool mixed)

inline

void RPropertyAttributes::setNumericallySorted(bool on)

inline

void RPropertyAttributes::setOnRequest(bool onRequest)

inline

void RPropertyAttributes::setOption(RPropertyAttributes::Option option, bool on)

void RPropertyAttributes::setReadOnly(bool readOnly)

inline

void RPropertyAttributes::setRedundant(bool on)

inline

void RPropertyAttributes::setRichText(bool on)

inline

void RPropertyAttributes::setScaleType(bool v)

inline

void RPropertyAttributes::setStyle(bool on)

inline

void RPropertyAttributes::setSum(bool sum)

inline

void RPropertyAttributes::setUndeletable(bool undeletable)

inline

void RPropertyAttributes::setUnitLess(bool v)

inline

QStringList RPropertyAttributes::choices

private

QString RPropertyAttributes::label

private

RPropertyAttributes::Options RPropertyAttributes::options

private