mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-19 23:17:21 -06:00
Implement tracker list in the side panel. Closes #170.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user