23 return QStringLiteral(
"-");
30 return (index >=
static_cast<int>(IndexOrder)) && (index <= static_cast<int>(IndexOrderString));
35 if (index.
isEmpty()) {
return false; }
47 case IndexOrder:
return QVariant::fromValue(this->
m_order);
52 const QString m = QStringLiteral(
"Cannot handle index %1").arg(index.
toQString());
54 return QVariant::fromValue(m);
64 case IndexOrder: this->
setOrder(variant.toInt());
return;
65 case IndexOrderString:
69 const QString m = QStringLiteral(
"Cannot handle index %1").arg(index.
toQString());
76 static const int max = std::numeric_limits<int>::max();
79 return Compare::compare(o1, o2);
Non-owning reference to a CPropertyIndex with a subset of its features.
QString toQString(bool i18n=false) const
Cast as QString.
bool isEmpty() const
Empty?
CastType frontCasted() const
First element casted to given type, usually the PropertIndex enum.
Entity with order attribute (can be manually ordered in views)
static bool canHandleIndex(CPropertyIndexRef index)
Can given index be handled.
static bool isAnyOrderIndex(int index)
Any order index.
int comparePropertyByIndex(CPropertyIndexRef index, const IOrderable &compareValue) const
Compare for index.
void setOrder(int order)
Set order.
ColumnIndex
Properties by index.
void setPropertyByIndex(CPropertyIndexRef index, const QVariant &variant)
Set property by index.
QString getOrderAsString() const
Order as string.
QVariant propertyByIndex(CPropertyIndexRef index) const
Property by index.
int getOrder() const
Order.
bool hasValidOrder() const
Valid order set?
Free functions in swift::misc.
#define SWIFT_VERIFY_X(COND, WHERE, WHAT)
A weaker kind of assert.