|
swift
|
Property index. More...
#include <propertyindex.h>
Public Member Functions | |
| CPropertyIndex ()=default | |
| Default constructor. | |
| CPropertyIndex (int singleProperty) | |
| Non nested index. | |
| CPropertyIndex (std::initializer_list< int > il) | |
| Initializer list constructor. | |
| CPropertyIndex (const QList< int > &indexes) | |
| Construct from a list of indexes. | |
| CPropertyIndex (const QString &indexes) | |
| From string. | |
| operator CPropertyIndexRef () const | |
| Return a simplified non-owning reference. | |
| Q_REQUIRED_RESULT CPropertyIndex | copyFrontRemoved () const |
| Copy with first element removed. | |
| bool | isNested () const |
| Is nested index? | |
| bool | isMyself () const |
| Myself index, used with nesting. | |
| bool | isEmpty () const |
| Empty? | |
| QList< int > | indexList () const |
| Index list. | |
| void | prepend (int newLeftIndex) |
| Shift existing indexes to right and insert given index at front. | |
| bool | contains (int index) const |
| Contains index? | |
| template<class EnumType> | |
| bool | contains (EnumType ev) const |
| Compare with index given by enum. | |
| int | frontToInt () const |
| Front to integer. | |
| bool | startsWith (int index) const |
| Starts with given index? | |
| template<class CastType> | |
| CastType | frontCasted () const |
| First element casted to given type, usually the PropertIndex enum. | |
| template<class EnumType> | |
| bool | startsWithPropertyIndexEnum (EnumType ev) const |
| Compare with index given by enum. | |
| auto | comparator () const |
| Return a predicate function which can compare two objects based on this index. | |
| QString | convertToQString (bool i18n=false) const |
| Cast as QString. | |
| QJsonObject | toJson () const |
| Cast to JSON object. | |
| void | convertFromJson (const QJsonObject &json) |
| Assign from JSON object. | |
| Public Member Functions inherited from swift::misc::mixin::MetaType< CPropertyIndex > | |
| int | getMetaTypeId () const |
| Returns the Qt meta type ID of this object. | |
| QString | getClassName () const |
| Class name. | |
| bool | isA (int metaTypeId) const |
| Returns true if this object is an instance of the class with the given meta type ID, or one of its subclasses. | |
| Public Member Functions inherited from swift::misc::mixin::DBusByMetaClass< CPropertyIndex > | |
| void | marshallToDbus (QDBusArgument &arg, Tags...) const |
| Marshall without begin/endStructure, for when composed within another object. | |
| void | unmarshallFromDbus (const QDBusArgument &arg, Tags...) |
| Unmarshall without begin/endStructure, for when composed within another object. | |
| Public Member Functions inherited from swift::misc::mixin::DataStreamByMetaClass< CPropertyIndex > | |
| void | marshalToDataStream (QDataStream &stream) const |
| Marshal a value to a QDataStream. | |
| void | unmarshalFromDataStream (QDataStream &stream) |
| Unmarshal a value from a QDataStream. | |
| Public Member Functions inherited from swift::misc::mixin::String< CPropertyIndex > | |
| QString | toQString (bool i18n=false) const |
| Cast as QString. | |
| std::string | toStdString (bool i18n=false) const |
| To std string. | |
| QString | stringForStreaming () const |
| String for streaming operators. | |
Static Public Member Functions | |
| static const CPropertyIndex & | empty () |
| an empty property index | |
| Static Public Member Functions inherited from swift::misc::mixin::MetaType< CPropertyIndex > | |
| static void | registerMetadata () |
| Register metadata. | |
Protected Member Functions | |
| void | parseFromString (const QString &indexes) |
| Parse indexes from string. | |
Property index.
The index can be nested, that's why it is a sequence (e.g. PropertyIndexPilot, PropertyIndexRealname).
Definition at line 34 of file propertyindex.h.
| swift::misc::CPropertyIndex::CPropertyIndex | ( | int | singleProperty | ) |
Non nested index.
Definition at line 13 of file propertyindex.cpp.
| swift::misc::CPropertyIndex::CPropertyIndex | ( | std::initializer_list< int > | il | ) |
Initializer list constructor.
Definition at line 18 of file propertyindex.cpp.
| swift::misc::CPropertyIndex::CPropertyIndex | ( | const QList< int > & | indexes | ) |
Construct from a list of indexes.
Definition at line 20 of file propertyindex.cpp.
| swift::misc::CPropertyIndex::CPropertyIndex | ( | const QString & | indexes | ) |
From string.
Definition at line 22 of file propertyindex.cpp.
|
inline |
Return a predicate function which can compare two objects based on this index.
Definition at line 120 of file propertyindex.h.
|
inline |
Compare with index given by enum.
Definition at line 90 of file propertyindex.h.
| bool swift::misc::CPropertyIndex::contains | ( | int | index | ) | const |
Contains index?
Definition at line 102 of file propertyindex.cpp.
| void swift::misc::CPropertyIndex::convertFromJson | ( | const QJsonObject & | json | ) |
Assign from JSON object.
Definition at line 88 of file propertyindex.cpp.
| QString swift::misc::CPropertyIndex::convertToQString | ( | bool | i18n = false | ) | const |
Cast as QString.
Definition at line 44 of file propertyindex.cpp.
| CPropertyIndex swift::misc::CPropertyIndex::copyFrontRemoved | ( | ) | const |
Copy with first element removed.
Definition at line 26 of file propertyindex.cpp.
|
inlinestatic |
an empty property index
Definition at line 150 of file propertyindex.h.
|
inline |
First element casted to given type, usually the PropertIndex enum.
Definition at line 104 of file propertyindex.h.
| int swift::misc::CPropertyIndex::frontToInt | ( | ) | const |
Front to integer.
Definition at line 104 of file propertyindex.cpp.
| QList< int > swift::misc::CPropertyIndex::indexList | ( | ) | const |
Index list.
Definition at line 98 of file propertyindex.cpp.
| bool swift::misc::CPropertyIndex::isEmpty | ( | ) | const |
Empty?
Definition at line 42 of file propertyindex.cpp.
| bool swift::misc::CPropertyIndex::isMyself | ( | ) | const |
Myself index, used with nesting.
Definition at line 40 of file propertyindex.cpp.
| bool swift::misc::CPropertyIndex::isNested | ( | ) | const |
Is nested index?
Definition at line 38 of file propertyindex.cpp.
| swift::misc::CPropertyIndex::operator CPropertyIndexRef | ( | ) | const |
Return a simplified non-owning reference.
Definition at line 24 of file propertyindex.cpp.
|
protected |
Parse indexes from string.
Definition at line 60 of file propertyindex.cpp.
| void swift::misc::CPropertyIndex::prepend | ( | int | newLeftIndex | ) |
Shift existing indexes to right and insert given index at front.
Definition at line 100 of file propertyindex.cpp.
| bool swift::misc::CPropertyIndex::startsWith | ( | int | index | ) | const |
Starts with given index?
Definition at line 110 of file propertyindex.cpp.
|
inline |
Compare with index given by enum.
Definition at line 113 of file propertyindex.h.
| QJsonObject swift::misc::CPropertyIndex::toJson | ( | ) | const |
Cast to JSON object.
Definition at line 81 of file propertyindex.cpp.