Merge pull request #3078 from Chocobo1/props_widget

Revamp general tab info, closes #982
This commit is contained in:
sledgehammer999
2015-06-20 16:50:32 +03:00
4 changed files with 717 additions and 293 deletions

View File

@@ -496,6 +496,11 @@ int TorrentHandle::piecesCount() const
return m_torrentInfo.piecesCount();
}
int TorrentHandle::piecesHave() const
{
return m_nativeStatus.num_pieces;
}
qreal TorrentHandle::progress() const
{
if (!m_nativeStatus.total_wanted)
@@ -846,6 +851,11 @@ int TorrentHandle::activeTime() const
return m_nativeStatus.active_time;
}
int TorrentHandle::finishedTime() const
{
return m_nativeStatus.finished_time;
}
int TorrentHandle::seedingTime() const
{
return m_nativeStatus.seeding_time;
@@ -908,6 +918,21 @@ int TorrentHandle::leechsCount() const
return (m_nativeStatus.num_peers - m_nativeStatus.num_seeds);
}
int TorrentHandle::totalSeedsCount() const
{
return m_nativeStatus.list_seeds;
}
int TorrentHandle::totalPeersCount() const
{
return m_nativeStatus.list_peers;
}
int TorrentHandle::totalLeechersCount() const
{
return (m_nativeStatus.list_peers - m_nativeStatus.list_seeds);
}
int TorrentHandle::completeCount() const
{
return m_nativeStatus.num_complete;

View File

@@ -183,6 +183,7 @@ namespace BitTorrent
QString savePathParsed() const;
int filesCount() const;
int piecesCount() const;
int piecesHave() const;
qreal progress() const;
QString label() const;
QDateTime addedTime() const;
@@ -224,12 +225,16 @@ namespace BitTorrent
qlonglong totalDownload() const;
qlonglong totalUpload() const;
int activeTime() const;
int finishedTime() const;
int seedingTime() const;
qulonglong eta() const;
QVector<qreal> filesProgress() const;
int seedsCount() const;
int peersCount() const;
int leechsCount() const;
int totalSeedsCount() const;
int totalPeersCount() const;
int totalLeechersCount() const;
int completeCount() const;
int incompleteCount() const;
QDateTime lastSeenComplete() const;