55 , m_category(category)
63 , m_category(category)
85 if (filter ==
"downloading")
87 else if (filter ==
"seeding")
89 else if (filter ==
"completed")
91 else if (filter ==
"paused")
93 else if (filter ==
"resumed")
95 else if (filter ==
"active")
97 else if (filter ==
"inactive")
99 else if (filter ==
"stalled")
101 else if (filter ==
"stalled_uploading")
103 else if (filter ==
"stalled_downloading")
105 else if (filter ==
"checking")
107 else if (filter ==
"errored")
128 || (
m_category.isNull() && !category.isNull())
129 || (!
m_category.isNull() && category.isNull()))
142 || (
m_tag.isNull() && !tag.isNull())
143 || (!
m_tag.isNull() && tag.isNull()))
154 if (!torrent)
return false;
214 if (
m_tag.isNull())
return true;
virtual bool isErrored() const =0
virtual TagSet tags() const =0
virtual bool isDownloading() const =0
virtual bool isCompleted() const =0
virtual bool isInactive() const =0
virtual bool hasTag(const QString &tag) const =0
virtual bool belongsToCategory(const QString &category) const =0
virtual TorrentState state() const =0
virtual bool isActive() const =0
virtual bool isPaused() const =0
virtual bool isUploading() const =0
static const QString AnyCategory
bool setCategory(const QString &category)
static const TorrentIDSet AnyID
static const TorrentFilter ActiveTorrent
bool setTag(const QString &tag)
static const TorrentFilter InactiveTorrent
static const TorrentFilter CheckingTorrent
static const QString AnyTag
static const TorrentFilter DownloadingTorrent
static const TorrentFilter ResumedTorrent
bool match(const BitTorrent::Torrent *torrent) const
bool matchTag(const BitTorrent::Torrent *torrent) const
static const TorrentFilter PausedTorrent
static const TorrentFilter ErroredTorrent
bool setTorrentIDSet(const TorrentIDSet &idSet)
static const TorrentFilter StalledUploadingTorrent
static const TorrentFilter SeedingTorrent
bool matchHash(const BitTorrent::Torrent *torrent) const
bool matchState(const BitTorrent::Torrent *torrent) const
static const TorrentFilter StalledDownloadingTorrent
bool setTypeByName(const QString &filter)
bool matchCategory(const BitTorrent::Torrent *torrent) const
static const TorrentFilter CompletedTorrent
static const TorrentFilter StalledTorrent
QSet< BitTorrent::TorrentID > TorrentIDSet