Redesign main core classes.

This commit is contained in:
Vladimir Golovnev (Glassez)
2015-04-19 18:17:47 +03:00
parent 60c0939e05
commit d16d1fdb3a
152 changed files with 11366 additions and 8967 deletions

View File

@@ -32,8 +32,9 @@
#define TRANSFERLISTSORTMODEL_H
#include <QSortFilterProxyModel>
#include <QStringList>
#include "torrentfilterenum.h"
#include "core/torrentfilter.h"
class QStringList;
class TransferListSortModel: public QSortFilterProxyModel
{
@@ -42,7 +43,7 @@ class TransferListSortModel: public QSortFilterProxyModel
public:
TransferListSortModel(QObject *parent = 0);
void setStatusFilter(const TorrentFilter::TorrentFilter &filter);
void setStatusFilter(TorrentFilter::Type filter);
void setLabelFilter(const QString &label);
void disableLabelFilter();
void setTrackerFilter(const QStringList &hashes);
@@ -52,18 +53,10 @@ private:
bool lessThan(const QModelIndex &left, const QModelIndex &right) const;
bool lowerPositionThan(const QModelIndex &left, const QModelIndex &right) const;
bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const;
bool matchStatusFilter(int sourceRow, const QModelIndex &sourceParent) const;
bool matchLabelFilter(int sourceRow, const QModelIndex &sourceParent) const;
bool matchTrackerFilter(int sourceRow, const QModelIndex &sourceParent) const;
bool matchFilter(int sourceRow, const QModelIndex &sourceParent) const;
private:
TorrentFilter::TorrentFilter filter0;
bool labelFilterEnabled;
QString labelFilter;
bool trackerFilterEnabled;
QStringList trackerFilter;
TorrentFilter m_filter;
};
#endif // TRANSFERLISTSORTMODEL_H