Пример #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;
}