rssguard/src/core/messagesproxymodel.h
Martin Rotter 431b668f28 Changes...
2013-12-08 14:02:28 +01:00

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