4#ifndef QQMLSORTERCOMPOSITOR_H
5#define QQMLSORTERCOMPOSITOR_H
18#include <QtQmlModels/private/qqmlsorterbase_p.h>
22class QQmlSortFilterProxyModel;
38 static void append(QQmlListProperty<QQmlSorterBase> *sorterComp, QQmlSorterBase *sorter);
39 static qsizetype count(QQmlListProperty<QQmlSorterBase> *sorterComp);
40 static QQmlSorterBase*
at(QQmlListProperty<QQmlSorterBase> *sorterComp, qsizetype index);
41 static void clear(QQmlListProperty<QQmlSorterBase> *sorterComp);
43 QPartialOrdering compare(
const QModelIndex &,
const QModelIndex &,
const QQmlSortFilterProxyModel *)
const override {
return QPartialOrdering::Unordered; };
44 bool lessThan(
const QModelIndex &sourceLeft,
const QModelIndex &sourceRight,
const QQmlSortFilterProxyModel *proxyModel)
const;
49 void append(QQmlSorterBase *sorter);
51 QQmlSorterBase* at(qsizetype index);
63 Q_DECLARE_PUBLIC(QQmlSorterCompositor)
QList< QQmlSorterBase * > m_effectiveSorters
QPointer< QQmlSorterBase > m_primarySorter
void setPrimarySorter(QQmlSorterBase *sorter)
void resetPrimarySorter()
QQmlSortFilterProxyModel * m_sfpmModel
QList< QQmlSorterBase * > m_sorters
QPointer< QQmlSorterBase > primarySorter() const
QPartialOrdering compare(const QModelIndex &, const QModelIndex &, const QQmlSortFilterProxyModel *) const override
static void clear(QQmlListProperty< QQmlSorterBase > *sorterComp)
QQmlListProperty< QQmlSorterBase > sortersListProperty()
static void append(QQmlListProperty< QQmlSorterBase > *sorterComp, QQmlSorterBase *sorter)
QList< QQmlSorterBase * > sorters()
bool lessThan(const QModelIndex &sourceLeft, const QModelIndex &sourceRight, const QQmlSortFilterProxyModel *proxyModel) const
~QQmlSorterCompositor() override
static qsizetype count(QQmlListProperty< QQmlSorterBase > *sorterComp)
static QQmlSorterBase * at(QQmlListProperty< QQmlSorterBase > *sorterComp, qsizetype index)
void updateEffectiveSorters()