Wt: Wt::WSortFilterProxyModel Class Reference

Wt 4.10.4

Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | List of all members
Wt::WSortFilterProxyModel Class Reference
Model/view system

A proxy model for Wt's item models that provides filtering and/or sorting. More...

`#include <Wt/WSortFilterProxyModel.h>`

Inheritance diagram for Wt::WSortFilterProxyModel:
[legend]

## Public Member Functions
| WSortFilterProxyModel ()
| Constructor.
virtual | ~WSortFilterProxyModel ()
| Destructor.
virtual WModelIndex | mapFromSource (const WModelIndex &sourceIndex) const override
| Maps a source model index to the proxy model.
virtual WModelIndex | mapToSource (const WModelIndex &proxyIndex) const override
| Maps a proxy model index to the source model.
virtual void | setSourceModel (const std::shared_ptr< WAbstractItemModel > &sourceModel) override
| Sets the source model.
void | setFilterKeyColumn (int column)
| Specify the column on which the filtering is applied.
int | filterKeyColumn () const
| Return the column on which the filtering is applied.
void | setFilterRegExp (std::unique_ptr< std::regex > pattern)
| Specify a regular expression for filtering.
std::regex * | filterRegExp () const
| Return the regular expression used for filtering.
void | setFilterRole (ItemDataRole role)
| Specify the data role used for filtering.
ItemDataRole | filterRole () const
| Return the data role used for filtering.
void | setSortRole (ItemDataRole role)
| Specify the data role used used for sorting.
ItemDataRole | sortRole () const
| Return the data role used for sorting.
int | sortColumn () const
| Returns the current sort column.
SortOrder | sortOrder () const
| Returns the current sort order.
void | setDynamicSortFilter (bool enable)
| Configure the proxy to dynamically track changes in the source model.
bool | dynamicSortFilter () const
| Returns whether this proxy dynmically filters and sorts.
void | invalidate ()
| Invalidates the current filter.
virtual int | columnCount (const WModelIndex &parent=WModelIndex()) const override
| Returns the number of columns.
virtual int | rowCount (const WModelIndex &parent=WModelIndex()) const override
| Returns the number of rows.
virtual WModelIndex | parent (const WModelIndex &index) const override
| Returns the parent for a model index.
virtual WModelIndex | index (int row, int column, const WModelIndex &parent=WModelIndex()) const override
| Returns the child index for the given row and column.
virtual bool | setHeaderData (int section, Orientation orientation, const cpp17::any &value, ItemDataRole role=ItemDataRole::Edit) override
| Sets header data for a column or row.
virtual cpp17::any | headerData (int section, Orientation orientation=Orientation::Horizontal, ItemDataRole role=ItemDataRole::Display) const override
| Returns the row or column header data.
virtual WFlags< HeaderFlag > | headerFlags (int section, Orientation orientation=Orientation::Horizontal) const override
| Returns the flags for a header.
virtual bool | insertRows (int row, int count, const WModelIndex &parent=WModelIndex()) override
| Inserts a number rows.
virtual bool | removeRows (int row, int count, const WModelIndex &parent=WModelIndex()) override
| Removes a number rows.
virtual void | sort (int column, SortOrder order=SortOrder::Ascending) override
| Sorts the model according to a particular column.
Public Member Functions inherited from Wt::WAbstractProxyModel
| WAbstractProxyModel ()
| Constructor.
std::shared_ptr< WAbstractItemModel > | sourceModel () const
| Returns the source model.
virtual cpp17::any | data (const WModelIndex &index, ItemDataRole role=ItemDataRole::Display) const override
| Returns the data at a specific model index.
virtual bool | setData (const WModelIndex &index, const cpp17::any &value, ItemDataRole role=ItemDataRole::Edit) override
| Sets the data at the given model index.
virtual bool | setItemData (const WModelIndex &index, const DataMap &values) override
| Sets the data at the given model index.
virtual WFlags< ItemFlag > | flags (const WModelIndex &index) const override
| Returns the flags for an item.
virtual bool | insertColumns (int column, int count, const WModelIndex &parent=WModelIndex()) override
| Inserts one or more columns.
virtual bool | removeColumns (int column, int count, const WModelIndex &parent=WModelIndex()) override
| Removes columns.
virtual std::string | mimeType () const override
| Returns a mime-type for dragging a set of indexes.
virtual std::vector< std::string > | acceptDropMimeTypes () const override
| Returns a list of mime-types that could be accepted for a drop event.
virtual void | dropEvent (const WDropEvent &e, DropAction action, int row, int column, const WModelIndex &parent) override
| Handles a drop event.
virtual void * | toRawIndex (const WModelIndex &index) const override
| Converts a model index to a raw pointer that remains valid while the model's layout is changed.
virtual WModelIndex | fromRawIndex (void *rawIndex) const override
| Converts a raw pointer to a model index.
bool | setData (int row, int column, const cpp17::any &value, ItemDataRole role=ItemDataRole::Edit, const WModelIndex &parent=WModelIndex())
| Sets data at the given row and column.
cpp17::any | data (int row, int column, ItemDataRole role=ItemDataRole::Display, const WModelIndex &parent=WModelIndex()) const
| Returns the data item at the given column and row.
bool | setHeaderData (int section, const cpp17::any &value)
| Sets column header data.
Public Member Functions inherited from Wt::WAbstractItemModel
| WAbstractItemModel ()
| Creates a new data model.
virtual bool | hasChildren (const WModelIndex &index) const
| Returns if there are children at an index.
virtual DataMap | itemData (const WModelIndex &index) const
| Returns all data at a specific index.
virtual WModelIndexList | match (const WModelIndex &start, ItemDataRole role, const cpp17::any &value, int hits=-1, WFlags< MatchFlag > flags=WFlags< MatchFlag >(MatchFlag::StartsWith|MatchFlag::Wrap)) const
| Returns an index list for data items that match.
cpp17::any | data (int row, int column, ItemDataRole role=ItemDataRole::Display, const WModelIndex &parent=WModelIndex()) const
| Returns the data item at the given column and row.
virtual bool | hasIndex (int row, int column, const WModelIndex &parent=WModelIndex()) const
| Returns if an index at the given position is valid (i.e. falls within the column-row bounds).
bool | setHeaderData (int section, const cpp17::any &value)
| Sets column header data.
virtual void | expandColumn (int column)
| Expands a column.
virtual void | collapseColumn (int column)
| Collapses a column.
virtual void | dropEvent (const WDropEvent &e, DropAction action, const WModelIndex &index, Wt::Side side)
| Handles a drop event.
bool | insertColumn (int column, const WModelIndex &parent=WModelIndex())
| Inserts one column.
bool | insertRow (int row, const WModelIndex &parent=WModelIndex())
| Inserts one row.
bool | removeColumn (int column, const WModelIndex &parent=WModelIndex())
| Removes one column.
bool | removeRow (int row, const WModelIndex &parent=WModelIndex())
| Removes one row.
bool | setData (int row, int column, const cpp17::any &value, ItemDataRole role=ItemDataRole::Edit, const WModelIndex &parent=WModelIndex())
| Sets data at the given row and column.
virtual Signal< WModelIndex, int, int > & | columnsAboutToBeInserted ()
| Signal emitted before a number of columns will be inserted.
virtual Signal< WModelIndex, int, int > & | columnsAboutToBeRemoved ()
| Signal emitted before a number of columns will be removed.
virtual Signal< WModelIndex, int, int > & | columnsInserted ()
| Signal emitted after a number of columns were inserted.
virtual Signal< WModelIndex, int, int > & | columnsRemoved ()
| Signal emitted after a number of columns were removed.
virtual Signal< WModelIndex, int, int > & | rowsAboutToBeInserted ()
| Signal emitted before a number of rows will be inserted.
virtual Signal< WModelIndex, int, int > & | rowsAboutToBeRemoved ()
| Signal emitted before a number of rows will be removed.
virtual Signal< WModelIndex, int, int > & | rowsInserted ()
| Signal emitted after a number of rows were inserted.
virtual Signal< WModelIndex, int, int > & | rowsRemoved ()
| Signal emitted after a number of rows were removed.
virtual Signal< WModelIndex, WModelIndex > & | dataChanged ()
| Signal emitted when some data was changed.
virtual Signal< Orientation, int, int > & | headerDataChanged ()
| Signal emitted when some header data was changed.
virtual Signal & | layoutAboutToBeChanged ()
| Signal emitted when the layout is about to be changed.
virtual Signal & | layoutChanged ()
| Signal emitted when the layout is changed.
virtual Signal & | modelReset ()
| Signal emitted when the model was reset.
Public Member Functions inherited from Wt::WObject
void | addChild (std::unique_ptr< WObject > child)
| Add a child WObject whose lifetime is determined by this WObject.
template<typename Child >
Child * | addChild (std::unique_ptr< Child > child)
| Add a child WObject, returning a raw pointer.
std::unique_ptr< WObject > | removeChild (WObject *child)
| Remove a child WObject, so its lifetime is no longer determined by this WObject.
template<typename Child >
std::unique_ptr< Child > | removeChild (Child *child)
| Remove a child WObject, so its lifetime is no longer determined by this WObject.
virtual const std::string | id () const
| Returns the (unique) identifier for this object.
virtual void | setObjectName (const std::string &name)
| Sets an object name.
virtual std::string | objectName () const
| Returns the object name.
void | resetLearnedSlots ()
| Resets learned stateless slot implementations.
template<class T >
void | resetLearnedSlot (void(T::*method)())
| Resets a learned stateless slot implementation.
template<class T >
WStatelessSlot * | implementStateless (void(T::*method)())
| Declares a slot to be stateless and learn client-side behaviour on first invocation.
template<class T >
WStatelessSlot * | implementStateless (void(T::*method)(), void(T::*undoMethod)())
| Declares a slot to be stateless and learn client-side behaviour in advance.
void | isNotStateless ()
| Marks the current function as not stateless.
template<class T >
WStatelessSlot * | implementJavaScript (void(T::*method)(), const std::string &jsCode)
| Provides a JavaScript implementation for a method.
Public Member Functions inherited from Wt::Core::observable
| observable () noexcept
| Default constructor.
virtual | ~observable ()
| Destructor.
template<typename... Args, typename C >
auto | bindSafe (void(C::*method)(Args...)) noexcept
| Protects a method call against object destruction.
template<typename... Args, typename C >
auto | bindSafe (void(C::*method)(Args...) const) const noexcept
| Protects a const method call against object destruction.
template<typename Function >
auto | bindSafe (const Function &function) noexcept
| Protects a function against object destruction.

## Protected Member Functions
virtual bool | filterAcceptRow (int sourceRow, const WModelIndex &sourceParent) const
| Returns whether a source row is accepted by the filter.
virtual bool | lessThan (const WModelIndex &lhs, const WModelIndex &rhs) const
| Compares two indexes.
Protected Member Functions inherited from Wt::WAbstractProxyModel
WModelIndex | createSourceIndex (int row, int column, void *ptr) const
| Create a source model index.
void | startShiftModelIndexes (const WModelIndex &sourceParent, int start, int count, ItemMap &items)
| Utility methods to shift items in an item map.
Protected Member Functions inherited from Wt::WAbstractItemModel
void | reset ()
| Resets the model and invalidate any data.
WModelIndex | createIndex (int row, int column, void *ptr) const
| Creates a model index for the given row and column.
WModelIndex | createIndex (int row, int column, ::uint64_t id) const
| Creates a model index for the given row and column.
void | beginInsertColumns (const WModelIndex &parent, int first, int last)
| Method to be called before inserting columns.
void | beginInsertRows (const WModelIndex &parent, int first, int last)
| Method to be called before inserting rows.
void | beginRemoveColumns (const WModelIndex &parent, int first, int last)
| Method to be called before removing columns.
void | beginRemoveRows (const WModelIndex &parent, int first, int last)
| Method to be called before removing rows.
void | endInsertColumns ()
| Method to be called after inserting columns.
void | endInsertRows ()
| Method to be called after inserting rows.
void | endRemoveColumns ()
| Method to be called after removing columns.
void | endRemoveRows ()
| Method to be called after removing rows.
virtual void | copyData (const WModelIndex &sIndex, const WModelIndex &dIndex)
| Copy data to an index in this model.
Protected Member Functions inherited from Wt::WObject
virtual WStatelessSlot * | getStateless (Method method)
| On-demand stateless slot implementation.

## Additional Inherited Members
Public Types inherited from Wt::WAbstractItemModel
typedef std::map< ItemDataRole, cpp17::any > | DataMap
| Data map.
Public Types inherited from Wt::WObject
typedef void(WObject::*) | Method()
| Typedef for a WObject method without arguments.
Static Public Member Functions inherited from Wt::WObject
Protected Types inherited from Wt::WAbstractProxyModel
typedef std::map< WModelIndex, BaseItem * > | ItemMap
| A map for items.

## Detailed Description

A proxy model for Wt's item models that provides filtering and/or sorting.

This proxy model does not store data itself, but presents data from a source model, after filtering rows. It also allows sorting of the source model data, without actually altering the source model. This may be convenient when the source model does not support sorting (i.e. does not reimplement WAbstractProxyModel::sort()), or you do not want to reorder the underlying model since that affects all views on the model.

To use the proxy model to filter data, you use the methods setFilterKeyColumn(), setFilterRegExp() and setFilterRole() to specify a filtering operation based on the values of a single column. If this filtering mechanism is too limiting, you can provide specialized filtering by reimplementing the filterAcceptRow() method.

Sorting is provided by reimplementing the standard WAbstractItemModel::sort() method. In this way, a view class such as WTreeView may resort the model as indicated by the user. Use setSortRole() to indicate on what data role sorting should be done, or reimplement the lessThan() method to provide a specialized sorting method.

By default, the proxy does not automatically refilter and resort when the original model changes. Data changes or row additions to the source model are not automatically reflected in the proxy model, but to maintain integrity, row removals in the source model are always reflected in the proxy model. You can enable the model to always refilter and resort when the underlying model changes using setDynamicSortFilter().

Usage example:

// model is the source model
std::shared_ptr<Wt::WAbstractItemModel> model = ...
// we setup a proxy to filter the source model
auto proxy = std::make_shared<Wt::WSortFilterProxyModel>();
proxy->setSourceModel(model);
proxy->setDynamicSortFilter(true);
proxy->setFilterKeyColumn(0);
proxy->setFilterRole(Wt::ItemDataRole::User);
proxy->setFilterRegExp("Wt::.*");
// configure a view to use the proxy model instead of the source model
Wt::WTreeView *view = addWidget(std::make_unique<Wt::WTreeView>());
view->setModel(proxy);
...
Wt::ItemDataRole::User
static constexpr const int User
First role reserved for user purposes.
Definition WModelIndex.h:174
Wt::WTreeView
A view class that displays a model as a tree or tree table.
Definition WTreeView.h:116
Wt::WTreeView::setModel
virtual void setModel(const std::shared_ptr< WAbstractItemModel > &model) override
Sets the model.

## Member Function Documentation

## ◆ columnCount()

virtual int Wt::WSortFilterProxyModel::columnCount | ( | const WModelIndex & | parent = WModelIndex() | ) | const
| overridevirtual

Returns the number of columns.

This returns the number of columns at index `parent`.

See also
  rowCount()

Implements Wt::WAbstractItemModel.

## ◆ dynamicSortFilter()

bool Wt::WSortFilterProxyModel::dynamicSortFilter | ( |  | ) | const

Returns whether this proxy dynmically filters and sorts.

See also
  setDynamicSortFilter()

## ◆ filterAcceptRow()

virtual bool Wt::WSortFilterProxyModel::filterAcceptRow | ( | int | sourceRow,
|  | const WModelIndex & | sourceParent ) const
| protectedvirtual

Returns whether a source row is accepted by the filter.

The default implementation uses filterKeyColumn(), filterRole() and filterRegExp().

You may want to reimplement this method to provide specialized filtering.

## ◆ filterKeyColumn()

int Wt::WSortFilterProxyModel::filterKeyColumn | ( |  | ) | const

Return the column on which the filtering is applied.

See also
  setFilterKeyColumn()

## ◆ filterRegExp()

std::regex * Wt::WSortFilterProxyModel::filterRegExp | ( |  | ) | const

Return the regular expression used for filtering.

See also
  setFilterRegExp()

## ◆ filterRole()

ItemDataRole Wt::WSortFilterProxyModel::filterRole | ( |  | ) | const

Return the data role used for filtering.

See also
  setFilterRole()

## ◆ headerData()

virtual cpp17::any Wt::WSortFilterProxyModel::headerData | ( | int | section,
|  | Orientation | orientation = Orientation::Horizontal,
|  | ItemDataRole | role = ItemDataRole::Display ) const
| overridevirtual

Returns the row or column header data.

The default proxy implementation constructs a dummy WModelIndex with the row set to 0 and column set to `section` if the orientation is Wt::Orientation::Horizontal, or with the row set to `section` and the column set to 0 if the orientation is Wt::Orientation::Vertical.

The resulting section that is forwarded to sourceModel()->headerData() depends on how the WModelIndex is transformed with mapToSource().

Reimplemented from Wt::WAbstractProxyModel.

## ◆ headerFlags()

virtual WFlags< HeaderFlag > Wt::WSortFilterProxyModel::headerFlags | ( | int | section,
|  | Orientation | orientation = Orientation::Horizontal ) const
| overridevirtual

Returns the flags for a header.

The default proxy implementation constructs a dummy WModelIndex with the row set to 0 and column set to `section` if the orientation is Wt::Orientation::Horizontal, or with the row set to `section` and the column set to 0 if the orientation is Wt::Orientation::Vertical.

The resulting section that is forwarded to sourceModel()->headerFlags() depends on how the WModelIndex is transformed with mapToSource().

Reimplemented from Wt::WAbstractProxyModel.

## ◆ index()

virtual WModelIndex Wt::WSortFilterProxyModel::index | ( | int | row,
|  | int | column,
|  | const WModelIndex & | parent = WModelIndex() ) const
| overridevirtual

Returns the child index for the given row and column.

When implementing this method, you can use createIndex() to create an index that corresponds to the item at `row` and `column` within `parent`.

If the location is invalid (out of bounds at the parent), then an invalid index must be returned.

See also
  parent()

Implements Wt::WAbstractItemModel.

## ◆ insertRows()

virtual bool Wt::WSortFilterProxyModel::insertRows | ( | int | row,
|  | int | count,
|  | const WModelIndex & | parent = WModelIndex() )
| overridevirtual

Inserts a number rows.

The rows are inserted in the source model, and if successful, also in the proxy model regardless of whether they are matched by the current filter. They are inserted at the indicated row, regardless of whether this is the correct place according to the defined sorting.

As soon as you set data for the column on which the filtering is active, or which affects the sorting, the row may be filtered out or change position when dynamic sorting/filtering is enabled. Therefore, it is usually a good idea to temporarily disable the dynamic sort/filtering behaviour while inserting new row(s) of data.

Reimplemented from Wt::WAbstractItemModel.

## ◆ invalidate()

void Wt::WSortFilterProxyModel::invalidate | ( |  | ) |

Invalidates the current filter.

This refilters and resorts the model, and is useful only if you have reimplemented filterAcceptRow() and/or lessThan()

## ◆ lessThan()

virtual bool Wt::WSortFilterProxyModel::lessThan | ( | const WModelIndex & | lhs,
|  | const WModelIndex & | rhs ) const
| protectedvirtual

Compares two indexes.

The default implementation uses sortRole() and an ordering using the operator< when the data is of the same type or compares lexicographically otherwise.

You may want to reimplement this method to provide specialized sorting.

## ◆ mapFromSource()

virtual WModelIndex Wt::WSortFilterProxyModel::mapFromSource | ( | const WModelIndex & | sourceIndex | ) | const
| overridevirtual

Maps a source model index to the proxy model.

This method returns a model index in the proxy model that corresponds to the model index `sourceIndex` in the source model. This method must only be implemented for source model indexes that are mapped and thus are the result of mapToSource().

See also
  mapToSource()

Implements Wt::WAbstractProxyModel.

## ◆ mapToSource()

virtual WModelIndex Wt::WSortFilterProxyModel::mapToSource | ( | const WModelIndex & | proxyIndex | ) | const
| overridevirtual

Maps a proxy model index to the source model.

This method returns a model index in the source model that corresponds to the proxy model index `proxyIndex`.

See also
  mapFromSource()

Implements Wt::WAbstractProxyModel.

## ◆ parent()

virtual WModelIndex Wt::WSortFilterProxyModel::parent | ( | const WModelIndex & | index | ) | const
| overridevirtual

Returns the parent for a model index.

An implementation should use createIndex() to create a model index that corresponds to the parent of a given index.

Note that the index itself may be stale (referencing a row/column within the parent that is outside the model geometry), but its parent (identified by the WModelIndex::internalPointer()) is referencing an existing parent. A stale index can only be used while the model geometry is being updated, i.e. during the emission of the corresponding [rows/columns](Being)[Removed/Inserted]() signals.

See also
  index()

Implements Wt::WAbstractItemModel.

## ◆ removeRows()

virtual bool Wt::WSortFilterProxyModel::removeRows | ( | int | row,
|  | int | count,
|  | const WModelIndex & | parent = WModelIndex() )
| overridevirtual

Removes a number rows.

The rows are removed from the source model.

Reimplemented from Wt::WAbstractItemModel.

## ◆ rowCount()

virtual int Wt::WSortFilterProxyModel::rowCount | ( | const WModelIndex & | parent = WModelIndex() | ) | const
| overridevirtual

Returns the number of rows.

This returns the number of rows at index `parent`.

See also
  columnCount()

Implements Wt::WAbstractItemModel.

## ◆ setDynamicSortFilter()

void Wt::WSortFilterProxyModel::setDynamicSortFilter | ( | bool | enable | ) |

Configure the proxy to dynamically track changes in the source model.

When `enable` is `true`, the proxy will re-filter and re-sort the model when changes happen to the source model.

Note
  This may be ackward when editing through the proxy model, since changing some data may rearrange the model and thus invalidate model indexes. Therefore it is usually less complicated to manipulate directly the source model instead.

See also
  lessThan()

## ◆ setFilterKeyColumn()

void Wt::WSortFilterProxyModel::setFilterKeyColumn | ( | int | column | ) |

Specify the column on which the filtering is applied.

This configures the column on which the filterRegExp() is applied.

The default value is 0.

See also
  setFilterRegExp(), setFilterRole()

## ◆ setFilterRegExp()

void Wt::WSortFilterProxyModel::setFilterRegExp | ( | std::unique_ptr< std::regex > | pattern | ) |

Specify a regular expression for filtering.

This configures the regular expression used for filtering on filterKeyColumn().

The default value is an empty expression, which disables filtering.

See also
  setFilterKeyColumn(), setFilterRole()

## ◆ setFilterRole()

void Wt::WSortFilterProxyModel::setFilterRole | ( | ItemDataRole | role | ) |

Specify the data role used for filtering.

This configures the data role used for filtering on filterKeyColumn().

The default value is ItemDataRole::Display.

See also
  setFilterKeyColumn(), setFilterRegExp()

## ◆ setHeaderData()

virtual bool Wt::WSortFilterProxyModel::setHeaderData | ( | int | section,
|  | Orientation | orientation,
|  | const cpp17::any & | value,
|  | ItemDataRole | role = ItemDataRole::Edit )
| overridevirtual

Sets header data for a column or row.

Returns `true` if the operation was successful.

See also
  headerData()

Reimplemented from Wt::WAbstractProxyModel.

## ◆ setSortRole()

void Wt::WSortFilterProxyModel::setSortRole | ( | ItemDataRole | role | ) |

Specify the data role used used for sorting.

This configures the data role used for sorting.

The default value is ItemDataRole::Display.

See also
  lessThan()

## ◆ setSourceModel()

virtual void Wt::WSortFilterProxyModel::setSourceModel | ( | const std::shared_ptr< WAbstractItemModel > & | sourceModel | ) |
| overridevirtual

Sets the source model.

The source model provides the actual data for the proxy model.

Ownership of the source model is not transferred.

All signals of the source model are forwarded to the proxy model.

Reimplemented from Wt::WAbstractProxyModel.

## ◆ sort()

virtual void Wt::WSortFilterProxyModel::sort | ( | int | column,
|  | SortOrder | order = SortOrder::Ascending )
| overridevirtual

Sorts the model according to a particular column.

If the model supports sorting, then it should emit the layoutAboutToBeChanged() signal, rearrange its items, and afterwards emit the layoutChanged() signal.

See also
  layoutAboutToBeChanged(), layoutChanged()

Reimplemented from Wt::WAbstractItemModel.

## ◆ sortColumn()

int Wt::WSortFilterProxyModel::sortColumn | ( |  | ) | const

Returns the current sort column.

When sort() has not been called, the model is unsorted, and this method returns -1.

See also
  sort()

## ◆ sortOrder()

SortOrder Wt::WSortFilterProxyModel::sortOrder | ( |  | ) | const

Returns the current sort order.

See also
  sort()

## ◆ sortRole()

ItemDataRole Wt::WSortFilterProxyModel::sortRole | ( |  | ) | const

Return the data role used for sorting.

See also
  setSortRole()