~ubuntu-branches/ubuntu/saucy/clementine/saucy

« back to all changes in this revision

Viewing changes to src/core/multisortfilterproxy.h

  • Committer: Package Import Robot
  • Author(s): Thomas PIERSON
  • Date: 2012-01-01 20:43:39 UTC
  • mfrom: (1.1.1)
  • Revision ID: package-import@ubuntu.com-20120101204339-lsb6nndwhfy05sde
Tags: 1.0.1+dfsg-1
New upstream release. (Closes: #653926, #651611, #657391)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef MULTISORTFILTERPROXY_H
 
2
#define MULTISORTFILTERPROXY_H
 
3
 
 
4
#include <QSortFilterProxyModel>
 
5
 
 
6
class MultiSortFilterProxy : public QSortFilterProxyModel {
 
7
public:
 
8
  MultiSortFilterProxy(QObject* parent = NULL);
 
9
 
 
10
  void AddSortSpec(int role, Qt::SortOrder order = Qt::AscendingOrder);
 
11
 
 
12
protected:
 
13
  bool lessThan(const QModelIndex& left, const QModelIndex& right) const;
 
14
 
 
15
private:
 
16
  int Compare(const QVariant& left, const QVariant& right) const;
 
17
 
 
18
  typedef QPair<int, Qt::SortOrder> SortSpec;
 
19
  QList<SortSpec> sorting_;
 
20
};
 
21
 
 
22
#endif // MULTISORTFILTERPROXY_H