QCAD
Open Source 2D CAD
RPropertyAttributes Class Reference

Copyright (c) 2011-2018 by Andrew Mustun. More...

#include <RPropertyAttributes.h>

Public Types

enum  Option {
  NoOptions = 0x0, ReadOnly = 0x1, Invisible = 0x2, Angle = 0x4,
  AffectsOtherProperties = 0x8, IgnoreCase = 0x10, AllowMixedValue = 0x20, List = 0x40,
  Mixed = 0x80, RichText = 0x100, Style = 0x200, DimensionLabel = 0x400,
  Label = 0x800, Pattern = 0x1000, Custom = 0x2000, Integer = 0x4000,
  Redundant = 0x8000, VisibleToParent = 0x10000, KnownVariable = 0x20000, NumericallySorted = 0x40000,
  Percentage = 0x80000 | Integer, Sum = 0x100000 | ReadOnly | Redundant, Undeletable = 0x200000, OnRequest = 0x400000,
  Location = 0x800000, RefPoint = 0x1000000, Geometry = Location | RefPoint, Scale = 0x2000000,
  Area = 0x4000000, UnitLess = 0x8000000
}
 

Public Member Functions

bool affectsOtherProperties () const
 
bool getAllowMixedValue ()
 
QSet< QString > getChoices () const
 
bool getIgnoreCase () const
 
QString getLabel () const
 
bool hasChoices ()
 
bool isAngleType () const
 
bool isAreaType () const
 
bool isCustom () 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)
 Copyright (c) 2011-2018 by Andrew Mustun. More...
 
bool operator!= (const RPropertyAttributes &other) const
 
bool operator== (const RPropertyAttributes &other) const
 
 RPropertyAttributes ()
 
 RPropertyAttributes (RPropertyAttributes::Options options)
 
void setAffectsOtherProperties (bool affectsOtherProperties)
 
void setAllowMixedValue (bool allowMixedValue)
 
void setAngleType (bool angle)
 
void setAreaType (bool v)
 
void setChoices (QSet< QString > choices)
 
void setIgnoreCase (bool ignoreCase)
 
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)
 

Private Attributes

QSet< QString > choices
 
QString label
 
RPropertyAttributes::Options options
 

Detailed Description

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. 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:\nThis class is available in script environments.\n
Copyable:\nObjects are cleaned up automatically by the garbage collector of the script engine.\n

Member Enumeration Documentation

◆ Option

Enumerator
NoOptions 
ReadOnly 

Property is read only.

Invisible 

Property is not displayed.

Angle 

Property is an angle (shown in user preferred angle unit)

AffectsOtherProperties 

Property affects others, needs refresh on changing.

IgnoreCase 

Property is not case sensitive.

AllowMixedValue 

Property can be mixed.

List 

Property is a list (e.g. x values of polyline vertices)

Mixed 

Property has mixed values.

RichText 

Property is rich text and can be edited as such.

Style 

Property is a text style (font)

DimensionLabel 

Property is a dimension label (suggests context menu to insert symbols, including <>)

Label 

Property is a label (suggests context menu to insert symbols)

Pattern 

Property is a hatch pattern name.

Custom 

Property is a map of custom properties.

Integer 

Property is an int (not a double number)

Redundant 

Property is redundant (e.g. angle for line entities)

VisibleToParent 

Property can be edited in the context of the parent entity.

KnownVariable 

Property is a known DXF variable.

NumericallySorted 

Sort choices for this property numerically.

Percentage 

Property is a percentage (0...100), implies Integer.

Sum 

Sum up this property when multiple entities are selected (area, length),.

implies ReadOnly and Redundant

Undeletable 

Property is undeletable (custom properties only)

OnRequest 

Property shown on request (slow to compute)

Location 

Property affected when transforming.

RefPoint 

Property affected when moving reference point.

Geometry 

Property affected when changing geometry (Location | RefPoint)

Scale 

Property is scale (1:2, 5"=1", ...)

Area 

Property is area (relevant for formatting of value)

UnitLess 

Property has no unit (linetype scale, draw order, ...)

Constructor & Destructor Documentation

◆ RPropertyAttributes() [1/2]

RPropertyAttributes::RPropertyAttributes ( )
inline

◆ RPropertyAttributes() [2/2]

RPropertyAttributes::RPropertyAttributes ( RPropertyAttributes::Options  options)
inline

Member Function Documentation

◆ affectsOtherProperties()

bool RPropertyAttributes::affectsOtherProperties ( ) const
inline

◆ getAllowMixedValue()

bool RPropertyAttributes::getAllowMixedValue ( )
inline

◆ getChoices()

QSet<QString> RPropertyAttributes::getChoices ( ) const
inline

◆ getIgnoreCase()

bool RPropertyAttributes::getIgnoreCase ( ) const
inline

◆ getLabel()

QString RPropertyAttributes::getLabel ( ) const
inline

◆ hasChoices()

bool RPropertyAttributes::hasChoices ( )
inline

◆ isAngleType()

bool RPropertyAttributes::isAngleType ( ) const
inline

◆ isAreaType()

bool RPropertyAttributes::isAreaType ( ) const
inline

◆ isCustom()

bool RPropertyAttributes::isCustom ( ) const
inline

◆ isDimensionLabel()

bool RPropertyAttributes::isDimensionLabel ( ) const
inline

◆ isInteger()

bool RPropertyAttributes::isInteger ( ) const
inline

◆ isInvisible()

bool RPropertyAttributes::isInvisible ( ) const
inline

◆ isLabel()

bool RPropertyAttributes::isLabel ( ) const
inline

◆ isList()

bool RPropertyAttributes::isList ( ) const
inline

◆ isMixed()

bool RPropertyAttributes::isMixed ( ) const
inline

◆ isNumericallySorted()

bool RPropertyAttributes::isNumericallySorted ( ) const
inline

◆ isOnRequest()

bool RPropertyAttributes::isOnRequest ( ) const
inline

◆ isPercentage()

bool RPropertyAttributes::isPercentage ( ) const
inline

◆ isReadOnly()

bool RPropertyAttributes::isReadOnly ( ) const
inline

◆ isRedundant()

bool RPropertyAttributes::isRedundant ( ) const
inline

◆ isRichText()

bool RPropertyAttributes::isRichText ( ) const
inline

◆ isScaleType()

bool RPropertyAttributes::isScaleType ( ) const
inline

◆ isStyle()

bool RPropertyAttributes::isStyle ( ) const
inline

◆ isSum()

bool RPropertyAttributes::isSum ( ) const
inline

◆ isUndeletable()

bool RPropertyAttributes::isUndeletable ( ) const
inline

◆ isUnitLess()

bool RPropertyAttributes::isUnitLess ( ) const
inline

◆ isVisibleToParent()

bool RPropertyAttributes::isVisibleToParent ( ) const
inline

◆ mixWith()

void RPropertyAttributes::mixWith ( const RPropertyAttributes other)

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.

◆ operator!=()

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

◆ operator==()

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

◆ setAffectsOtherProperties()

void RPropertyAttributes::setAffectsOtherProperties ( bool  affectsOtherProperties)
inline

◆ setAllowMixedValue()

void RPropertyAttributes::setAllowMixedValue ( bool  allowMixedValue)
inline

◆ setAngleType()

void RPropertyAttributes::setAngleType ( bool  angle)
inline

◆ setAreaType()

void RPropertyAttributes::setAreaType ( bool  v)
inline

◆ setChoices()

void RPropertyAttributes::setChoices ( QSet< QString >  choices)
inline

◆ setIgnoreCase()

void RPropertyAttributes::setIgnoreCase ( bool  ignoreCase)
inline

◆ setInvisible()

void RPropertyAttributes::setInvisible ( bool  invisible)
inline

◆ setLabel()

void RPropertyAttributes::setLabel ( const QString &  l)
inline

◆ setList()

void RPropertyAttributes::setList ( bool  on)
inline

◆ setMixed()

void RPropertyAttributes::setMixed ( bool  mixed)
inline

◆ setNumericallySorted()

void RPropertyAttributes::setNumericallySorted ( bool  on)
inline

◆ setOnRequest()

void RPropertyAttributes::setOnRequest ( bool  onRequest)
inline

◆ setOption()

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

◆ setReadOnly()

void RPropertyAttributes::setReadOnly ( bool  readOnly)
inline

◆ setRedundant()

void RPropertyAttributes::setRedundant ( bool  on)
inline

◆ setRichText()

void RPropertyAttributes::setRichText ( bool  on)
inline

◆ setScaleType()

void RPropertyAttributes::setScaleType ( bool  v)
inline

◆ setStyle()

void RPropertyAttributes::setStyle ( bool  on)
inline

◆ setSum()

void RPropertyAttributes::setSum ( bool  sum)
inline

◆ setUndeletable()

void RPropertyAttributes::setUndeletable ( bool  undeletable)
inline

◆ setUnitLess()

void RPropertyAttributes::setUnitLess ( bool  v)
inline

Member Data Documentation

◆ choices

QSet<QString> RPropertyAttributes::choices
private

◆ label

QString RPropertyAttributes::label
private

◆ options

RPropertyAttributes::Options RPropertyAttributes::options
private

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