QCAD
Open Source 2D CAD
Loading...
Searching...
No Matches
RDimStyle Class Reference

Dimension style class. More...

#include <RDimStyle.h>

Inheritance diagram for RDimStyle:
RObject RDimStyleData

Public Member Functions

virtual QSharedPointer< RObjectclone () const
 
QSharedPointer< RDimStylecloneToDimStyle () const
 
QPair< QVariant, RPropertyAttributesgetProperty (RPropertyTypeId &propertyTypeId, bool humanReadable=false, bool noAttributes=false, bool showOnRequest=false)
 
virtual RS::EntityType getType () const
 
 RDimStyle ()
 
 RDimStyle (RDocument *document)
 
void render (const REntityData &entityData, bool preview, bool forceSelected)
 
bool setProperty (RPropertyTypeId propertyTypeId, const QVariant &value, RTransaction *transaction)
 Sets the given property to the given value.
 
void updateDocumentVariables ()
 
void updateFromDocumentVariables ()
 
virtual ~RDimStyle ()
 
- Public Member Functions inherited from RObject
void copyCustomPropertiesFrom (const RObject *other, const QString &title=RDEFAULT_QSTRING, bool overwrite=false, const QStringList &ignoreList=RDEFAULT_QSTRINGLIST, const QString &mapKeyFrom=RDEFAULT_QSTRING, const QString &mapKeyTo=RDEFAULT_QSTRING)
 Copies all custom properties from the given object.
 
void dump () const
 
virtual int getComplexity () const
 
virtual bool getCustomBoolProperty (const QString &title, const QString &key, bool defaultValue) const
 
virtual double getCustomDoubleProperty (const QString &title, const QString &key, double defaultValue) const
 
virtual int getCustomIntProperty (const QString &title, const QString &key, int defaultValue) const
 
QMap< QString, QVariantMap > getCustomProperties () const
 
virtual QVariant getCustomProperty (const QString &title, const QString &key, const QVariant &defaultValue=RDEFAULT_QVARIANT) const
 
QStringList getCustomPropertyKeys (const QString &title) const
 
QStringList getCustomPropertyTitles () const
 
virtual QSet< RPropertyTypeIdgetCustomPropertyTypeIds () const
 
RDocumentgetDocument ()
 
const RDocumentgetDocument () const
 
bool getFlag (int flag) const
 
RObject::Handle getHandle () const
 
RObject::Id getId () const
 
virtual QSet< RPropertyTypeIdgetPropertyTypeIds (RPropertyAttributes::Option option=RPropertyAttributes::NoOptions) const
 
bool hasCustomProperties () const
 
bool hasCustomProperty (const QString &title, const QRegularExpression &key) const
 
bool hasCustomProperty (const QString &title, const QString &key) const
 
virtual bool hasPropertyType (RPropertyTypeId propertyTypeId)
 
bool isInvisible () const
 
virtual bool isOfType (RS::EntityType t) const
 Override to indicate that this entity is of a certain type, e.g.
 
bool isProtected () const
 
virtual bool isSelected () const
 
bool isUndone () const
 
virtual bool isWorkingSet () const
 
virtual bool mustAlwaysClone () const
 
virtual void removeCustomProperty (const QString &title, const QString &key)
 Removes the custom property with the given name.
 
 RObject (const RObject &other)
 
 RObject (RDocument *document=NULL)
 
virtual void setAutoUpdatesBlocked (bool on)
 
virtual void setCustomProperties (const RQMapQStringQString &properties)
 
virtual void setCustomProperty (const QString &title, const QString &key, const QVariant &value)
 Sets a custom property with the given name.
 
void setDocument (RDocument *document)
 
void setFlag (int flag, bool on=true)
 
void setInvisible (bool on)
 
void setProtected (bool on)
 
virtual void setSelected (bool on)
 
virtual void setWorkingSet (bool on)
 
virtual bool validate ()
 
virtual ~RObject ()
 
- Public Member Functions inherited from RDimStyleData
void clear ()
 
bool getBool (RS::KnownVariable key) const
 
RColor getColor (RS::KnownVariable key) const
 
double getDouble (RS::KnownVariable key) const
 
int getInt (RS::KnownVariable key) const
 
QVariant getVariant (RS::KnownVariable key) const
 
bool hasOverride (RS::KnownVariable key) const
 
void initFromSettings ()
 
bool isValid () const
 
 RDimStyleData (bool override=false)
 
void removeBool (RS::KnownVariable key)
 
void removeColor (RS::KnownVariable key)
 
void removeDouble (RS::KnownVariable key)
 
void removeInt (RS::KnownVariable key)
 
virtual void setBool (RS::KnownVariable key, bool val)
 
virtual void setColor (RS::KnownVariable key, const RColor &val)
 
virtual void setDouble (RS::KnownVariable key, double val)
 
virtual void setInt (RS::KnownVariable key, int val)
 
void setVariant (RS::KnownVariable key, const QVariant &val)
 
virtual ~RDimStyleData ()
 

Static Public Member Functions

static RDimStyleProxygetDimStyleProxy ()
 
static RS::EntityType getRtti ()
 
static bool hasProxy ()
 
static void init ()
 
static void initDimX (const RPropertyTypeId &propertyTypeId, RS::KnownVariable var, RS::KnownVariableType type)
 
static void setDimStyleProxy (RDimStyleProxy *p)
 
- Static Public Member Functions inherited from RObject
static RPropertyAttributes getCustomPropertyAttributes (const QString &title, const QString &key)
 
static RS::EntityType getRtti ()
 
static void init ()
 
static void setCustomPropertyAttributes (const QString &title, const QString &key, const RPropertyAttributes &att)
 Set attributes (read-only, invisible, ...) for the given custom property.
 
template<class T >
static bool setMember (T &variable, const QVariant &value, bool condition=true)
 
- Static Public Member Functions inherited from RDimStyleData
static bool getBoolDefault (RS::KnownVariable key)
 
static RColor getColorDefault (RS::KnownVariable key)
 
static double getDoubleDefault (RS::KnownVariable key)
 
static int getIntDefault (RS::KnownVariable key)
 
static RS::KnownVariableType getVariableType (RS::KnownVariable key)
 
static QVariant getVariantDefault (RS::KnownVariable key)
 
static void init ()
 
static void initDefaults ()
 

Static Public Attributes

static RPropertyTypeId PropertyArchTick
 
static RPropertyTypeId PropertyCustom
 Copyright (c) 2011-2021 by Andrew Mustun.
 
static RPropertyTypeId PropertyDimadec
 
static RPropertyTypeId PropertyDimasz
 
static RPropertyTypeId PropertyDimaunit
 
static RPropertyTypeId PropertyDimazin
 
static RPropertyTypeId PropertyDimblk
 
static RPropertyTypeId PropertyDimblk1
 
static RPropertyTypeId PropertyDimblk2
 
static RPropertyTypeId PropertyDimclrt
 
static RPropertyTypeId PropertyDimdec
 
static RPropertyTypeId PropertyDimdli
 
static RPropertyTypeId PropertyDimdsep
 
static RPropertyTypeId PropertyDimexe
 
static RPropertyTypeId PropertyDimexo
 
static RPropertyTypeId PropertyDimgap
 
static RPropertyTypeId PropertyDimlfac
 
static RPropertyTypeId PropertyDimlunit
 
static RPropertyTypeId PropertyDimscale
 
static RPropertyTypeId PropertyDimtad
 
static RPropertyTypeId PropertyDimtih
 
static RPropertyTypeId PropertyDimtsz
 
static RPropertyTypeId PropertyDimtxt
 
static RPropertyTypeId PropertyDimzin
 
static RPropertyTypeId PropertyHandle
 
static RPropertyTypeId PropertyProtected
 
static QList< QPair< RPropertyTypeId, RS::KnownVariable > > propertyVariables
 
- Static Public Attributes inherited from RObject
static const Handle INVALID_HANDLE = -1
 
static const Id INVALID_ID = -1
 Copyright (c) 2011-2018 by Andrew Mustun.
 
static RPropertyTypeId PropertyCustom
 
static RPropertyTypeId PropertyHandle
 
static RPropertyTypeId PropertyInvisible
 
static RPropertyTypeId PropertyProtected
 
static RPropertyTypeId PropertySelected
 
static RPropertyTypeId PropertyType
 
static RPropertyTypeId PropertyWorkingSet
 
- Static Public Attributes inherited from RDimStyleData
static QMap< RS::KnownVariable, RS::KnownVariableTypedimXTypes
 

Static Private Attributes

static RDimStyleProxydimStyleProxy = NULL
 

Friends

QDebug operator<< (QDebug dbg, const RDimStyle &s)
 

Additional Inherited Members

- Public Types inherited from RObject
typedef int Handle
 
typedef int Id
 
enum  ObjectFlag {
  NoFlags = 0x000 , Undone = 0x001 , Protect = 0x002 , Selected = 0x004 ,
  Invisible = 0x008 , WorkingSet = 0x010
}
 
enum  XYZ { X , Y , Z }
 
- Protected Member Functions inherited from RObject
virtual void print (QDebug dbg) const
 Stream operator for QDebug.
 
void setHandle (RObject::Handle h)
 
void setId (RObject::Id id)
 
bool setMemberFlag (int flag, const QVariant &value, bool condition=true)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
void setUndone (bool on)
 
- Static Protected Member Functions inherited from RObject
static bool setMember (bool &variable, const QVariant &value, bool condition=true)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
static bool setMember (double &variable, const QVariant &value, bool condition=true)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
static bool setMember (int &variable, const QVariant &value, bool condition=true)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
static bool setMember (QList< double > &variable, const QVariant &value, bool condition)
 
static bool setMember (QList< int > &variable, const QVariant &value, bool condition)
 
static bool setMember (QString &variable, const QVariant &value, bool condition=true)
 Sets the given property.
 
static bool setMemberVector (QList< RVector > &variable, const QVariant &value, RObject::XYZ xyz)
 
static bool setMemberX (QList< RVector > &variable, const QVariant &value, bool condition=true)
 
static bool setMemberY (QList< RVector > &variable, const QVariant &value, bool condition=true)
 
static bool setMemberZ (QList< RVector > &variable, const QVariant &value, bool condition=true)
 
- Protected Attributes inherited from RDimStyleData
QMap< RS::KnownVariable, bool > mapBool
 
QMap< RS::KnownVariable, RColormapColor
 
QMap< RS::KnownVariable, double > mapDouble
 
QMap< RS::KnownVariable, int > mapInt
 
- Static Protected Attributes inherited from RDimStyleData
static QMap< RS::KnownVariable, QVariant > mapDefaults
 Copyright (c) 2011-2021 by Andrew Mustun.
 

Detailed Description

Dimension style class.

This is responsible for rendering dimensions depending on style settings.

Scriptable:\nThis class is available in script environments.\n
Shared Pointer Support:\nObjects can be used in QSharedPointer.\n

Constructor & Destructor Documentation

◆ RDimStyle() [1/2]

RDimStyle::RDimStyle ( )

◆ RDimStyle() [2/2]

RDimStyle::RDimStyle ( RDocument * document)

◆ ~RDimStyle()

RDimStyle::~RDimStyle ( )
virtual

Member Function Documentation

◆ clone()

virtual QSharedPointer< RObject > RDimStyle::clone ( ) const
inlinevirtual

Implements RObject.

◆ cloneToDimStyle()

QSharedPointer< RDimStyle > RDimStyle::cloneToDimStyle ( ) const
inline

◆ getDimStyleProxy()

static RDimStyleProxy * RDimStyle::getDimStyleProxy ( )
inlinestatic
Non-Scriptable:\nThis function is not available in script environments.\n

◆ getProperty()

QPair< QVariant, RPropertyAttributes > RDimStyle::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 RObject.

◆ getRtti()

static RS::EntityType RDimStyle::getRtti ( )
inlinestatic

◆ getType()

virtual RS::EntityType RDimStyle::getType ( ) const
inlinevirtual
Returns
The unique entity type, usually the same as RTTI, different for custom entities.

Reimplemented from RObject.

◆ hasProxy()

static bool RDimStyle::hasProxy ( )
inlinestatic

◆ init()

void RDimStyle::init ( )
static

◆ initDimX()

void RDimStyle::initDimX ( const RPropertyTypeId & propertyTypeId,
RS::KnownVariable var,
RS::KnownVariableType type )
static

◆ render()

void RDimStyle::render ( const REntityData & entityData,
bool preview,
bool forceSelected )
inline

◆ setDimStyleProxy()

static void RDimStyle::setDimStyleProxy ( RDimStyleProxy * p)
inlinestatic
Non-Scriptable:\nThis function is not available in script environments.\n

◆ setProperty()

bool RDimStyle::setProperty ( RPropertyTypeId propertyTypeId,
const QVariant & value,
RTransaction * transaction )
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 RObject.

◆ updateDocumentVariables()

void RDimStyle::updateDocumentVariables ( )

◆ updateFromDocumentVariables()

void RDimStyle::updateFromDocumentVariables ( )

Friends And Related Symbol Documentation

◆ operator<<

QDebug operator<< ( QDebug dbg,
const RDimStyle & s )
friend
Non-Scriptable:\nThis function is not available in script environments.\n

Member Data Documentation

◆ dimStyleProxy

RDimStyleProxy * RDimStyle::dimStyleProxy = NULL
staticprivate

◆ PropertyArchTick

RPropertyTypeId RDimStyle::PropertyArchTick
static

◆ PropertyCustom

RPropertyTypeId RDimStyle::PropertyCustom
static

Copyright (c) 2011-2021 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.

◆ PropertyDimadec

RPropertyTypeId RDimStyle::PropertyDimadec
static

◆ PropertyDimasz

RPropertyTypeId RDimStyle::PropertyDimasz
static

◆ PropertyDimaunit

RPropertyTypeId RDimStyle::PropertyDimaunit
static

◆ PropertyDimazin

RPropertyTypeId RDimStyle::PropertyDimazin
static

◆ PropertyDimblk

RPropertyTypeId RDimStyle::PropertyDimblk
static

◆ PropertyDimblk1

RPropertyTypeId RDimStyle::PropertyDimblk1
static

◆ PropertyDimblk2

RPropertyTypeId RDimStyle::PropertyDimblk2
static

◆ PropertyDimclrt

RPropertyTypeId RDimStyle::PropertyDimclrt
static

◆ PropertyDimdec

RPropertyTypeId RDimStyle::PropertyDimdec
static

◆ PropertyDimdli

RPropertyTypeId RDimStyle::PropertyDimdli
static

◆ PropertyDimdsep

RPropertyTypeId RDimStyle::PropertyDimdsep
static

◆ PropertyDimexe

RPropertyTypeId RDimStyle::PropertyDimexe
static

◆ PropertyDimexo

RPropertyTypeId RDimStyle::PropertyDimexo
static

◆ PropertyDimgap

RPropertyTypeId RDimStyle::PropertyDimgap
static

◆ PropertyDimlfac

RPropertyTypeId RDimStyle::PropertyDimlfac
static

◆ PropertyDimlunit

RPropertyTypeId RDimStyle::PropertyDimlunit
static

◆ PropertyDimscale

RPropertyTypeId RDimStyle::PropertyDimscale
static

◆ PropertyDimtad

RPropertyTypeId RDimStyle::PropertyDimtad
static

◆ PropertyDimtih

RPropertyTypeId RDimStyle::PropertyDimtih
static

◆ PropertyDimtsz

RPropertyTypeId RDimStyle::PropertyDimtsz
static

◆ PropertyDimtxt

RPropertyTypeId RDimStyle::PropertyDimtxt
static

◆ PropertyDimzin

RPropertyTypeId RDimStyle::PropertyDimzin
static

◆ PropertyHandle

RPropertyTypeId RDimStyle::PropertyHandle
static

◆ PropertyProtected

RPropertyTypeId RDimStyle::PropertyProtected
static

◆ propertyVariables

QList< QPair< RPropertyTypeId, RS::KnownVariable > > RDimStyle::propertyVariables
static

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