コード例 #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;
}