swift
Loading...
Searching...
No Matches
swift::misc::mixin::Index< Derived > Class Template Reference

CRTP class template from which a derived class can inherit property indexing functions. More...

#include <mixinindex.h>

Inheritance diagram for swift::misc::mixin::Index< Derived >:
[legend]

Public Types

enum  ColumnIndex { IndexPixmap = 10 , IndexIcon , IndexString }
 Base class enums. More...

Public Member Functions

CPropertyIndexList apply (const CPropertyIndexVariantMap &indexMap, bool skipEqualValues=false)
 Update by variant map.
void setPropertyByIndex (CPropertyIndexRef index, const QVariant &variant)
 Set property by index.
QVariant propertyByIndex (CPropertyIndexRef index) const
 Property by index.
int comparePropertyByIndex (CPropertyIndexRef index, const Derived &compareValue) const
 Compare for index.
bool equalsPropertyByIndex (const QVariant &compareValue, CPropertyIndexRef index) const
 Is given variant equal to value of property index?

Detailed Description

template<class Derived>
class swift::misc::mixin::Index< Derived >

CRTP class template from which a derived class can inherit property indexing functions.

This is only a placeholder for future support of implementing property indexing through the tuple system. At the moment, it just implements the default properties: String, Icon, and Pixmap.

Definition at line 39 of file mixinindex.h.

Member Enumeration Documentation

◆ ColumnIndex

template<class Derived>
enum swift::misc::mixin::Index::ColumnIndex

Base class enums.

Definition at line 43 of file mixinindex.h.

Member Function Documentation

◆ apply()

template<class Derived>
CPropertyIndexList swift::misc::mixin::Index< Derived >::apply ( const CPropertyIndexVariantMap & indexMap,
bool skipEqualValues = false )

Update by variant map.

Returns
number of values changed, with skipEqualValues equal values will not be changed

Definition at line 146 of file propertyindexvariantmap.h.

◆ comparePropertyByIndex()

template<class Derived>
int swift::misc::mixin::Index< Derived >::comparePropertyByIndex ( CPropertyIndexRef index,
const Derived & compareValue ) const

Compare for index.

Definition at line 203 of file mixinindex.h.

◆ equalsPropertyByIndex()

template<class Derived>
bool swift::misc::mixin::Index< Derived >::equalsPropertyByIndex ( const QVariant & compareValue,
CPropertyIndexRef index ) const

Is given variant equal to value of property index?

Definition at line 197 of file mixinindex.h.

◆ propertyByIndex()

template<class Derived>
QVariant swift::misc::mixin::Index< Derived >::propertyByIndex ( CPropertyIndexRef index) const

Property by index.

Definition at line 180 of file mixinindex.h.

◆ setPropertyByIndex()

template<class Derived>
void swift::misc::mixin::Index< Derived >::setPropertyByIndex ( CPropertyIndexRef index,
const QVariant & variant )

Set property by index.

Definition at line 167 of file mixinindex.h.


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