swift
Loading...
Searching...
No Matches
swift::misc::IOrderable Class Reference

Entity with order attribute (can be manually ordered in views). More...

#include <orderable.h>

Inheritance diagram for swift::misc::IOrderable:
[legend]

Public Types

enum  ColumnIndex { IndexOrder = CPropertyIndexRef::GlobalIndexIOrderable , IndexOrderString }
 Properties by index. More...

Public Member Functions

int getOrder () const
 Order.
QString getOrderAsString () const
 Order as string.
void setOrder (int order)
 Set order.
bool hasValidOrder () const
 Valid order set?

Static Public Member Functions

static bool isAnyOrderIndex (int index)
 Any order index.

Protected Member Functions

 IOrderable ()=default
 Constructor.
 IOrderable (int order)
 Constructor.
QVariant propertyByIndex (CPropertyIndexRef index) const
 Property by index.
void setPropertyByIndex (CPropertyIndexRef index, const QVariant &variant)
 Set property by index.
int comparePropertyByIndex (CPropertyIndexRef index, const IOrderable &compareValue) const
 Compare for index.

Static Protected Member Functions

static bool canHandleIndex (CPropertyIndexRef index)
 Can given index be handled.

Protected Attributes

int m_order = -1
 order number

Detailed Description

Entity with order attribute (can be manually ordered in views).

Definition at line 18 of file orderable.h.

Member Enumeration Documentation

◆ ColumnIndex

Properties by index.

Definition at line 22 of file orderable.h.

Constructor & Destructor Documentation

◆ IOrderable()

swift::misc::IOrderable::IOrderable ( int order)
protected

Constructor.

Definition at line 16 of file orderable.cpp.

Member Function Documentation

◆ canHandleIndex()

bool swift::misc::IOrderable::canHandleIndex ( CPropertyIndexRef index)
staticprotected

Can given index be handled.

Definition at line 34 of file orderable.cpp.

◆ comparePropertyByIndex()

int swift::misc::IOrderable::comparePropertyByIndex ( CPropertyIndexRef index,
const IOrderable & compareValue ) const
protected

Compare for index.

Definition at line 77 of file orderable.cpp.

◆ getOrder()

int swift::misc::IOrderable::getOrder ( ) const
inline

Order.

Definition at line 29 of file orderable.h.

◆ getOrderAsString()

QString swift::misc::IOrderable::getOrderAsString ( ) const

Order as string.

Definition at line 18 of file orderable.cpp.

◆ hasValidOrder()

bool swift::misc::IOrderable::hasValidOrder ( ) const

Valid order set?

Definition at line 27 of file orderable.cpp.

◆ isAnyOrderIndex()

bool swift::misc::IOrderable::isAnyOrderIndex ( int index)
static

Any order index.

Definition at line 29 of file orderable.cpp.

◆ propertyByIndex()

QVariant swift::misc::IOrderable::propertyByIndex ( CPropertyIndexRef index) const
protected

Property by index.

Definition at line 44 of file orderable.cpp.

◆ setOrder()

void swift::misc::IOrderable::setOrder ( int order)
inline

Set order.

Definition at line 35 of file orderable.h.

◆ setPropertyByIndex()

void swift::misc::IOrderable::setPropertyByIndex ( CPropertyIndexRef index,
const QVariant & variant )
protected

Set property by index.

Definition at line 61 of file orderable.cpp.

Member Data Documentation

◆ m_order

int swift::misc::IOrderable::m_order = -1
protected

order number

Definition at line 62 of file orderable.h.


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