Skip to content

RPropertyTypeId

Class in Core Module
Header: #include <src/core/RPropertyTypeId.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. Represents unique property type IDs. Every property type an object can have has such an unique ID.

E.g. all objects of type car may have a property type called brand. This property type is uniquely identified by an instance of this class. All instances of this class are automatically unique.

class QCADCORE_EXPORT Car {
public:
static RPropertyTypeId propertyBrand;
}
RPropertyTypeId Car::propertyBrand(typeid(Car));

Scriptable: This class is available in script environments.

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

RPropertyTypeId(const QString &customPropertyName)
RPropertyTypeId(const QString &customPropertyTitle, const QString &customPropertyName)
\ nonscriptable
RPropertyTypeId(const RPropertyTypeId &other)
RPropertyTypeId(long int id=INVALID_ID)
void generateId(RS::EntityType type, const QString &groupTitle, const QString &title, bool forceNew=false, RPropertyAttributes::Options options=RPropertyAttributes::NoOptions)
void generateId(RS::EntityType type, const RPropertyTypeId &other)
QString getCustomPropertyName() const
QString getCustomPropertyTitle() const
long int getId() const
QString getPropertyGroupTitle() const
QString getPropertyTitle() const
bool isCustom() const
bool isValid() const
bool operator!=(const RPropertyTypeId &other) const
!= operator
bool operator<(const RPropertyTypeId &other) const
< operator
RPropertyTypeId & operator=(const RPropertyTypeId &other)
bool operator==(const RPropertyTypeId &other) const
== operator
void setCustomPropertyName(const QString &n)
void setCustomPropertyTitle(const QString &t)
void setId(long int id)
static RPropertyTypeId getPropertyTypeId(const QString &groupTitle, const QString &title)
static QSet< RPropertyTypeId > getPropertyTypeIds(RS::EntityType type, RPropertyAttributes::Option=RPropertyAttributes::NoOptions)
Gets all property type IDs that where registered for the given class.
static bool hasPropertyType(RS::EntityType type, RPropertyTypeId propertyTypeId)
static const long int INVALID_ID
QString customPropertyName
QString customPropertyTitle
long int id
RPropertyAttributes::Options options
static QList< RPropertyAttributes::Option > cachedOptionList
static long int counter
static QMap< long int, QPair< QString, QString > > idToTitleMap
static QMap< RS::EntityType, QSet< RPropertyTypeId > > propertyTypeByObjectMap
static QMap< QPair< RS::EntityType, RPropertyAttributes::Option >, QSet< RPropertyTypeId > > propertyTypeByObjectOptionMap
static QMap< QString, QMap< QString, RPropertyTypeId > > titleToIdMap

RPropertyTypeId::RPropertyTypeId(const QString &customPropertyName)

RPropertyTypeId::RPropertyTypeId(const QString &customPropertyTitle, const QString &customPropertyName)

\ nonscriptable

\ nonscriptable

RPropertyTypeId::RPropertyTypeId(const RPropertyTypeId &other)

RPropertyTypeId::RPropertyTypeId(long int id=INVALID_ID)

void RPropertyTypeId::generateId(RS::EntityType type, const QString &groupTitle, const QString &title, bool forceNew=false, RPropertyAttributes::Options options=RPropertyAttributes::NoOptions)

void RPropertyTypeId::generateId(RS::EntityType type, const RPropertyTypeId &other)

Non-Scriptable: This function is not available in script environments.

QString RPropertyTypeId::getCustomPropertyName() const

const

Returns: The name (key) of the custom property.

QString RPropertyTypeId::getCustomPropertyTitle() const

const

long int RPropertyTypeId::getId() const

const

Returns: The internal ID of this property.

QString RPropertyTypeId::getPropertyGroupTitle() const

const

Returns: The property group title of the given property.

QString RPropertyTypeId::getPropertyTitle() const

const

Returns: The property title of the given property.

bool RPropertyTypeId::isCustom() const

const

bool RPropertyTypeId::isValid() const

const

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

const

!= operator

bool RPropertyTypeId::operator<(const RPropertyTypeId &other) const

const

< operator

RPropertyTypeId & RPropertyTypeId::operator=(const RPropertyTypeId &other)

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

const

== operator

void RPropertyTypeId::setCustomPropertyName(const QString &n)

void RPropertyTypeId::setCustomPropertyTitle(const QString &t)

void RPropertyTypeId::setId(long int id)

static RPropertyTypeId RPropertyTypeId::getPropertyTypeId(const QString &groupTitle, const QString &title)

static

static QSet< RPropertyTypeId > RPropertyTypeId::getPropertyTypeIds(RS::EntityType type, RPropertyAttributes::Option=RPropertyAttributes::NoOptions)

static

Gets all property type IDs that where registered for the given class.

Non-Scriptable: This function is not available in script environments.

Parameters:

  • classInfo: The class info, e.g. typeid(ObjectA)
  • geometryOnly: Only return geometric properties

Returns: a set of property type ID pointers or an empty set if the class has no registered property types.

static bool RPropertyTypeId::hasPropertyType(RS::EntityType type, RPropertyTypeId propertyTypeId)

static

Non-Scriptable: This function is not available in script environments.

Return values:

  • true: if the given class has the given property

static const long int RPropertyTypeId::INVALID_ID = -1

static

QString RPropertyTypeId::customPropertyName

private

QString RPropertyTypeId::customPropertyTitle

private

long int RPropertyTypeId::id

private

RPropertyAttributes::Options RPropertyTypeId::options

private

static QList< RPropertyAttributes::Option > RPropertyTypeId::cachedOptionList

static private

static long int RPropertyTypeId::counter = 0

static private

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 QMap< long int, QPair< QString, QString > > RPropertyTypeId::idToTitleMap

static private

static QMap< RS::EntityType, QSet< RPropertyTypeId > > RPropertyTypeId::propertyTypeByObjectMap

static private

static QMap< QPair< RS::EntityType, RPropertyAttributes::Option >, QSet< RPropertyTypeId > > RPropertyTypeId::propertyTypeByObjectOptionMap

static private

static QMap< QString, QMap< QString, RPropertyTypeId > > RPropertyTypeId::titleToIdMap

static private