4 #ifndef BPSSORTFILTERPROXYMODEL_H
5 #define BPSSORTFILTERPROXYMODEL_H
8 #include <QSortFilterProxyModel>
#define BPS_PRIVATE(Class)
Declare pointer to private object in a public class.
Definition: bpsglobals.h:102
Public include file for BPS GUI library macros.
#define BPSGUI_EXPORT
Declare class an import from the shared library.
Definition: bpsgui_global.h:22
Derived from QSortFilterProxyModel with enhancements for BPS.
Definition: bpssortfilterproxymodel.h:20
BpsSortFilterProxyModel(QObject *aParent=nullptr)
void setColumnSortRole(int aColumn, int aRole)
Sets a special sort role for a distinct column.
virtual bool lessThan(const QModelIndex &aLeft, const QModelIndex &aRight) const
Compares the sortRole() if set in the left item, and Qt::DisplayRole otherwise.
void setColumnSortRoles(BpsTable *aTable)
Sets special sort roles for all columns from a table specification.
QModelIndexList mapListToSource(const QModelIndexList &aProxyIndexList) const
Convenience function to convert a list of proxy into source model indexes.
QModelIndexList mapListFromSource(const QModelIndexList &aSourceIndexList) const
Convenience function to convert a list of source into proxy model indexes.
int columnSortRole(int aColumn) const
Get the special role for a distinct column.
QModelIndex firstIndex(const QModelIndex &aParent=QModelIndex())
Get index of first item.
Database table descriptor.
Definition: bpstable.h:19