RPropertyTypeId
Class in Core Module
Header: #include <src/core/RPropertyTypeId.h>
Description
Section titled “Description”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.
Public Functions
Section titled “Public Functions”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 Public Functions
Section titled “Static Public Functions”| 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 Public Attributes
Section titled “Static Public Attributes”| static const long int | INVALID_ID |
Private Attributes
Section titled “Private Attributes”| QString | customPropertyName |
| QString | customPropertyTitle |
| long int | id |
| RPropertyAttributes::Options | options |
Static Private Attributes
Section titled “Static Private Attributes”| 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 |
Member Documentation
Section titled “Member Documentation”RPropertyTypeId
Section titled “RPropertyTypeId”RPropertyTypeId::RPropertyTypeId(const QString &customPropertyName)RPropertyTypeId
Section titled “RPropertyTypeId”RPropertyTypeId::RPropertyTypeId(const QString &customPropertyTitle, const QString &customPropertyName)\ nonscriptable
\ nonscriptable
RPropertyTypeId
Section titled “RPropertyTypeId”RPropertyTypeId::RPropertyTypeId(const RPropertyTypeId &other)RPropertyTypeId
Section titled “RPropertyTypeId”RPropertyTypeId::RPropertyTypeId(long int id=INVALID_ID)generateId
Section titled “generateId”void RPropertyTypeId::generateId(RS::EntityType type, const QString &groupTitle, const QString &title, bool forceNew=false, RPropertyAttributes::Options options=RPropertyAttributes::NoOptions)generateId
Section titled “generateId”void RPropertyTypeId::generateId(RS::EntityType type, const RPropertyTypeId &other)Non-Scriptable: This function is not available in script environments.
getCustomPropertyName
Section titled “getCustomPropertyName”QString RPropertyTypeId::getCustomPropertyName() constconst
Returns: The name (key) of the custom property.
getCustomPropertyTitle
Section titled “getCustomPropertyTitle”QString RPropertyTypeId::getCustomPropertyTitle() constconst
long int RPropertyTypeId::getId() constconst
Returns: The internal ID of this property.
getPropertyGroupTitle
Section titled “getPropertyGroupTitle”QString RPropertyTypeId::getPropertyGroupTitle() constconst
Returns: The property group title of the given property.
getPropertyTitle
Section titled “getPropertyTitle”QString RPropertyTypeId::getPropertyTitle() constconst
Returns: The property title of the given property.
isCustom
Section titled “isCustom”bool RPropertyTypeId::isCustom() constconst
isValid
Section titled “isValid”bool RPropertyTypeId::isValid() constconst
operator!=
Section titled “operator!=”bool RPropertyTypeId::operator!=(const RPropertyTypeId &other) constconst
!= operator
operator<
Section titled “operator<”bool RPropertyTypeId::operator<(const RPropertyTypeId &other) constconst
< operator
operator=
Section titled “operator=”RPropertyTypeId & RPropertyTypeId::operator=(const RPropertyTypeId &other)operator==
Section titled “operator==”bool RPropertyTypeId::operator==(const RPropertyTypeId &other) constconst
== operator
setCustomPropertyName
Section titled “setCustomPropertyName”void RPropertyTypeId::setCustomPropertyName(const QString &n)setCustomPropertyTitle
Section titled “setCustomPropertyTitle”void RPropertyTypeId::setCustomPropertyTitle(const QString &t)void RPropertyTypeId::setId(long int id)getPropertyTypeId
Section titled “getPropertyTypeId”static RPropertyTypeId RPropertyTypeId::getPropertyTypeId(const QString &groupTitle, const QString &title)static
getPropertyTypeIds
Section titled “getPropertyTypeIds”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.
hasPropertyType
Section titled “hasPropertyType”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
INVALID_ID
Section titled “INVALID_ID”static const long int RPropertyTypeId::INVALID_ID = -1static
customPropertyName
Section titled “customPropertyName”QString RPropertyTypeId::customPropertyNameprivate
customPropertyTitle
Section titled “customPropertyTitle”QString RPropertyTypeId::customPropertyTitleprivate
long int RPropertyTypeId::idprivate
options
Section titled “options”RPropertyAttributes::Options RPropertyTypeId::optionsprivate
cachedOptionList
Section titled “cachedOptionList”static QList< RPropertyAttributes::Option > RPropertyTypeId::cachedOptionListstatic private
counter
Section titled “counter”static long int RPropertyTypeId::counter = 0static 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.
idToTitleMap
Section titled “idToTitleMap”static QMap< long int, QPair< QString, QString > > RPropertyTypeId::idToTitleMapstatic private
propertyTypeByObjectMap
Section titled “propertyTypeByObjectMap”static QMap< RS::EntityType, QSet< RPropertyTypeId > > RPropertyTypeId::propertyTypeByObjectMapstatic private
propertyTypeByObjectOptionMap
Section titled “propertyTypeByObjectOptionMap”static QMap< QPair< RS::EntityType, RPropertyAttributes::Option >, QSet< RPropertyTypeId > > RPropertyTypeId::propertyTypeByObjectOptionMapstatic private
titleToIdMap
Section titled “titleToIdMap”static QMap< QString, QMap< QString, RPropertyTypeId > > RPropertyTypeId::titleToIdMapstatic private