示例#1
0
bool QTorrentFilter::isTorrentResumed(const QTorrentHandle &h) const
{
    const QTorrentState state = h.torrentState();

    return state != QTorrentState::PausedUploading
            && state != QTorrentState::PausedDownloading;
}
示例#2
0
bool QTorrentFilter::isTorrentActive(const QTorrentHandle &h) const
{
    const QTorrentState state = h.torrentState();

    return state == QTorrentState::Downloading
            || state == QTorrentState::Uploading;
}
示例#3
0
bool QTorrentFilter::isTorrentPaused(const QTorrentHandle &h) const
{
    const QTorrentState state = h.torrentState();

    return state == QTorrentState::PausedUploading
            || state == QTorrentState::Error;
}
示例#4
0
bool QTorrentFilter::isTorrentSeeding(const QTorrentHandle &h) const
{
    const QTorrentState state = h.torrentState();

    return state == QTorrentState::Uploading
            || state == QTorrentState::StalledUploading
            || state == QTorrentState::CheckingUploading
            || state == QTorrentState::QueuedUploading;
}
示例#5
0
bool QTorrentFilter::isTorrentDownloading(const QTorrentHandle &h) const
{
    const QTorrentState state = h.torrentState();

    return state == QTorrentState::Downloading
            || state == QTorrentState::StalledDownloading
            || state == QTorrentState::CheckingDownloading
            || state == QTorrentState::PausedDownloading
            || state == QTorrentState::QueuedDownloading
            || state == QTorrentState::Error;
}