Implement tracker list in the side panel. Closes #170.

This commit is contained in:
sledgehammer999
2015-03-22 01:18:21 +02:00
parent 36d2bee557
commit f0d5ce4b98
15 changed files with 391 additions and 2 deletions

View File

@@ -32,6 +32,7 @@
#define TRANSFERLISTSORTMODEL_H
#include <QSortFilterProxyModel>
#include <QStringList>
#include "torrentfilterenum.h"
class TransferListSortModel : public QSortFilterProxyModel {
@@ -41,8 +42,10 @@ public:
TransferListSortModel(QObject *parent = 0);
void setStatusFilter(const TorrentFilter::TorrentFilter &filter);
void setLabelFilter(QString const& label);
void setLabelFilter(const QString &label);
void disableLabelFilter();
void setTrackerFilter(const QStringList &hashes);
void disableTrackerFilter();
private:
bool lessThan(const QModelIndex &left, const QModelIndex &right) const;
@@ -50,12 +53,15 @@ private:
bool matchStatusFilter(int sourceRow, const QModelIndex &sourceParent) const;
bool matchLabelFilter(int sourceRow, const QModelIndex &sourceParent) const;
bool matchTrackerFilter(int sourceRow, const QModelIndex &sourceParent) const;
private:
TorrentFilter::TorrentFilter filter0;
bool labelFilterEnabled;
QString labelFilter;
bool trackerFilterEnabled;
QStringList trackerFilter;
};
#endif // TRANSFERLISTSORTMODEL_H