mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2024-11-22 01:06:03 +03:00
- Displaying more infos about the torrent in its properties (hash, creator, comment)
- Preparing GUI to allow trackers list edition (Unfinished)
This commit is contained in:
parent
5dacf4755e
commit
a346d49b60
2 changed files with 624 additions and 332 deletions
File diff suppressed because it is too large
Load diff
|
@ -42,11 +42,16 @@ properties::properties(QWidget *parent, torrent_handle h, QStringList trackerErr
|
|||
filesList->setItemDelegate(PropDelegate);
|
||||
connect(filesList, SIGNAL(doubleClicked(const QModelIndex&)), this, SLOT(toggleSelectedState(const QModelIndex&)));
|
||||
// get Infos from torrent handle
|
||||
save_path->setText(QString(h.save_path().string().c_str()));
|
||||
fileHash = QString(misc::toString(h.info_hash()).c_str());
|
||||
torrent_status torrentStatus = h.status();
|
||||
torrent_info torrentInfo = h.get_torrent_info();
|
||||
fileName->setText(torrentInfo.name().c_str());
|
||||
// Torrent Infos
|
||||
save_path->setText(QString(h.save_path().string().c_str()));
|
||||
creator->setText(QString(torrentInfo.creator().c_str()));
|
||||
hash_lbl->setText(fileHash);
|
||||
comment_txt->setText(QString(torrentInfo.comment().c_str()));
|
||||
//Trackers
|
||||
QString tracker = QString(torrentStatus.current_tracker.c_str()).trimmed();
|
||||
if(!tracker.isEmpty()){
|
||||
trackerURL->setText(tracker);
|
||||
|
@ -57,6 +62,7 @@ properties::properties(QWidget *parent, torrent_handle h, QStringList trackerErr
|
|||
for(unsigned int i=0; i<trackers.size(); ++i){
|
||||
trackersURLS->addItem(QString(trackers[i].url.c_str()));
|
||||
}
|
||||
// Session infos
|
||||
char tmp[MAX_CHAR_TMP];
|
||||
failed->setText(misc::friendlyUnit(torrentStatus.total_failed_bytes));
|
||||
upTotal->setText(misc::friendlyUnit(torrentStatus.total_payload_upload));
|
||||
|
|
Loading…
Reference in a new issue