20#ifndef RPROPERTYATTRIBUTES_H
21#define RPROPERTYATTRIBUTES_H
49 AffectsOtherProperties = 0x8,
51 AllowMixedValue = 0x20,
56 DimensionLabel = 0x400,
62 VisibleToParent = 0x10000,
63 KnownVariable = 0x20000,
64 NumericallySorted = 0x40000,
65 Percentage = 0x80000 | Integer,
66 Sum = 0x100000 | ReadOnly | Redundant,
68 Undeletable = 0x200000,
72 Geometry = Location | RefPoint,
76 DimStyleOverride = 0x10000000,
77 CustomApp001 = 0x20000000,
78 StoreIndex = 0x40000000
80 Q_DECLARE_FLAGS(Options, Option)
92 return options.testFlag(ReadOnly);
96 setOption(ReadOnly, readOnly);
100 return options.testFlag(Invisible);
104 setOption(Invisible, invisible);
108 return options.testFlag(Undeletable);
112 setOption(Undeletable, undeletable);
116 return options.testFlag(List);
124 return options.testFlag(Angle);
128 setOption(Angle, angle);
132 return options.testFlag(IgnoreCase);
136 setOption(IgnoreCase, ignoreCase);
140 return options.testFlag(AffectsOtherProperties);
144 setOption(AffectsOtherProperties, affectsOtherProperties);
148 setOption(AllowMixedValue, allowMixedValue);
152 return options.testFlag(AllowMixedValue);
159 void setChoices(
const QStringList& choices,
bool storeIndex =
false) {
160 this->choices = choices;
161 setOption(StoreIndex, storeIndex);
165 return !choices.isEmpty();
169 return options.testFlag(StoreIndex);
185 return options.testFlag(RichText);
189 setOption(RichText, on);
193 return options.testFlag(Style);
197 setOption(Style, on);
203 return options.testFlag(Mixed);
207 setOption(Mixed, mixed);
211 return options.testFlag(Sum);
219 return options.testFlag(OnRequest);
223 setOption(OnRequest, onRequest);
227 return options.testFlag(Label);
231 return options.testFlag(Custom);
235 return options.testFlag(DimensionLabel);
239 setOption(Integer,
i);
243 return options.testFlag(Integer);
247 return options.testFlag(Redundant);
251 setOption(Redundant, on);
255 return options.testFlag(VisibleToParent);
259 return options.testFlag(NumericallySorted);
263 setOption(NumericallySorted, on);
267 return options.testFlag(
Scale);
275 return options.testFlag(Area);
283 return options.testFlag(UnitLess);
287 setOption(UnitLess, v);
291 return options.testFlag(Percentage);
295 return options.testFlag(CustomApp001);
299 setOption(CustomApp001, v);
320 if (isList() != other.
isList()) {
323 if (choices != other.
choices) {
331 return !operator ==(other);
341Q_DECLARE_OPERATORS_FOR_FLAGS(RPropertyAttributes::Options)
Q_DECLARE_METATYPE(RMath *)
QPair< QVariant, RPropertyAttributes > _RPairVariantPropertyAttributes
Definition RPropertyAttributes.h:343
int i
Copyright (c) 2011-2018 by Andrew Mustun.
Definition autostart.js:32
Copyright (c) 2011-2018 by Andrew Mustun.
Definition RPropertyAttributes.h:42
bool isPercentage() const
Definition RPropertyAttributes.h:290
void setStyle(bool on)
Definition RPropertyAttributes.h:196
QStringList getChoices() const
Definition RPropertyAttributes.h:155
bool isCustom() const
Definition RPropertyAttributes.h:230
void setUndeletable(bool undeletable)
Definition RPropertyAttributes.h:111
bool isNumericallySorted() const
Definition RPropertyAttributes.h:258
Option
Definition RPropertyAttributes.h:44
void setAllowMixedValue(bool allowMixedValue)
Definition RPropertyAttributes.h:147
bool isMixed() const
Definition RPropertyAttributes.h:202
void setList(bool on)
Definition RPropertyAttributes.h:119
void setOnRequest(bool onRequest)
Definition RPropertyAttributes.h:222
bool isReadOnly() const
Definition RPropertyAttributes.h:91
void setChoices(const QStringList &choices, bool storeIndex=false)
Definition RPropertyAttributes.h:159
bool isInvisible() const
Definition RPropertyAttributes.h:99
void setNumericallySorted(bool on)
Definition RPropertyAttributes.h:262
bool isOnRequest() const
Definition RPropertyAttributes.h:218
bool isScaleType() const
Definition RPropertyAttributes.h:266
QStringList choices
Definition RPropertyAttributes.h:337
QString getLabel() const
Definition RPropertyAttributes.h:302
bool isVisibleToParent() const
Definition RPropertyAttributes.h:254
void setInteger(bool i)
Definition RPropertyAttributes.h:238
void setInvisible(bool invisible)
Definition RPropertyAttributes.h:103
bool affectsOtherProperties() const
Definition RPropertyAttributes.h:139
bool isSum() const
Definition RPropertyAttributes.h:210
void setSum(bool sum)
Definition RPropertyAttributes.h:214
void setIgnoreCase(bool ignoreCase)
Definition RPropertyAttributes.h:135
void setCustomApp001(bool v)
Definition RPropertyAttributes.h:298
void setScaleType(bool v)
Definition RPropertyAttributes.h:270
bool isUndeletable() const
Definition RPropertyAttributes.h:107
bool hasChoices()
Definition RPropertyAttributes.h:164
bool isDimensionLabel() const
Definition RPropertyAttributes.h:234
void setAreaType(bool v)
Definition RPropertyAttributes.h:278
QString label
Definition RPropertyAttributes.h:338
bool isStyle() const
Definition RPropertyAttributes.h:192
void setAngleType(bool angle)
Definition RPropertyAttributes.h:127
bool isRichText() const
Definition RPropertyAttributes.h:184
void setMixed(bool mixed)
Definition RPropertyAttributes.h:206
bool getIgnoreCase() const
Definition RPropertyAttributes.h:131
void setUnitLess(bool v)
Definition RPropertyAttributes.h:286
bool isAngleType() const
Definition RPropertyAttributes.h:123
RPropertyAttributes::Options options
Definition RPropertyAttributes.h:336
bool isRedundant() const
Definition RPropertyAttributes.h:246
bool getAllowMixedValue()
Definition RPropertyAttributes.h:151
bool isLabel() const
Definition RPropertyAttributes.h:226
void setRichText(bool on)
Definition RPropertyAttributes.h:188
bool isAreaType() const
Definition RPropertyAttributes.h:274
void setReadOnly(bool readOnly)
Definition RPropertyAttributes.h:95
bool isUnitLess() const
Definition RPropertyAttributes.h:282
void setLabel(const QString &l)
Definition RPropertyAttributes.h:306
bool isCustomApp001() const
Definition RPropertyAttributes.h:294
bool getStoreIndex() const
Definition RPropertyAttributes.h:168
void setAffectsOtherProperties(bool affectsOtherProperties)
Definition RPropertyAttributes.h:143
bool isInteger() const
Definition RPropertyAttributes.h:242
void setRedundant(bool on)
Definition RPropertyAttributes.h:250
RPropertyAttributes()
Definition RPropertyAttributes.h:83
bool isList() const
Definition RPropertyAttributes.h:115
RPropertyAttributes(RPropertyAttributes::Options options)
Definition RPropertyAttributes.h:85
Scales selected entities.
Definition Scale.js:11
#define QCADCORE_EXPORT
Definition core_global.h:10