mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-19 12:59:56 -07:00
- FEATURE: Real progress bar in torrent properties that displays downloaded pieces (contribution by
Ishan Arora)
This commit is contained in:
parent
5484ec923d
commit
58c78fa6f6
10 changed files with 298 additions and 57 deletions
|
@ -60,6 +60,16 @@ float QTorrentHandle::progress() const {
|
|||
return progress;
|
||||
}
|
||||
|
||||
const std::vector<bool>* QTorrentHandle::pieces() const {
|
||||
Q_ASSERT(h.is_valid());
|
||||
return h.status().pieces;
|
||||
}
|
||||
|
||||
void QTorrentHandle::get_download_queue(std::vector<partial_piece_info>& queue) const {
|
||||
Q_ASSERT(h.is_valid());
|
||||
h.get_download_queue(queue);
|
||||
}
|
||||
|
||||
QString QTorrentHandle::current_tracker() const {
|
||||
Q_ASSERT(h.is_valid());
|
||||
return misc::toQString(h.status().current_tracker);
|
||||
|
@ -74,10 +84,20 @@ bool QTorrentHandle::is_paused() const {
|
|||
return h.is_paused();
|
||||
}
|
||||
|
||||
// size_type QTorrentHandle::total_size() const {
|
||||
// Q_ASSERT(h.is_valid());
|
||||
// return h.get_torrent_info().total_size();
|
||||
// }
|
||||
size_type QTorrentHandle::total_size() const {
|
||||
Q_ASSERT(h.is_valid());
|
||||
return h.get_torrent_info().total_size();
|
||||
}
|
||||
|
||||
size_type QTorrentHandle::piece_length() const {
|
||||
Q_ASSERT(h.is_valid());
|
||||
return h.get_torrent_info().piece_length();
|
||||
}
|
||||
|
||||
int QTorrentHandle::num_pieces() const {
|
||||
Q_ASSERT(h.is_valid());
|
||||
return h.get_torrent_info().num_pieces();
|
||||
}
|
||||
|
||||
size_type QTorrentHandle::total_wanted_done() const {
|
||||
Q_ASSERT(h.is_valid());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue