mirror of
https://github.com/martinrotter/rssguard.git
synced 2025-01-26 15:34:59 +01:00
34 lines
810 B
C++
34 lines
810 B
C++
#ifndef MESSAGESPROXYMODEL_H
|
|
#define MESSAGESPROXYMODEL_H
|
|
|
|
#include <QSortFilterProxyModel>
|
|
|
|
|
|
class MessagesModel;
|
|
|
|
class MessagesProxyModel : public QSortFilterProxyModel {
|
|
Q_OBJECT
|
|
|
|
public:
|
|
// Constructors and destructors.
|
|
explicit MessagesProxyModel(QObject *parent = 0);
|
|
virtual ~MessagesProxyModel();
|
|
|
|
// Source model getter.
|
|
MessagesModel *sourceModel();
|
|
|
|
// Maps list of indexes.
|
|
QModelIndexList mapListToSource(const QModelIndexList &indexes);
|
|
QModelIndexList mapListFromSource(const QModelIndexList &indexes, bool deep = false);
|
|
|
|
protected:
|
|
// Compares two rows of data.
|
|
bool lessThan(const QModelIndex &left, const QModelIndex &right) const;
|
|
|
|
private:
|
|
// Source model pointer.
|
|
MessagesModel *m_sourceModel;
|
|
};
|
|
|
|
#endif // MESSAGESPROXYMODEL_H
|