mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-22 12:34:19 +00: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
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);
|
filesList->setItemDelegate(PropDelegate);
|
||||||
connect(filesList, SIGNAL(doubleClicked(const QModelIndex&)), this, SLOT(toggleSelectedState(const QModelIndex&)));
|
connect(filesList, SIGNAL(doubleClicked(const QModelIndex&)), this, SLOT(toggleSelectedState(const QModelIndex&)));
|
||||||
// get Infos from torrent handle
|
// get Infos from torrent handle
|
||||||
save_path->setText(QString(h.save_path().string().c_str()));
|
|
||||||
fileHash = QString(misc::toString(h.info_hash()).c_str());
|
fileHash = QString(misc::toString(h.info_hash()).c_str());
|
||||||
torrent_status torrentStatus = h.status();
|
torrent_status torrentStatus = h.status();
|
||||||
torrent_info torrentInfo = h.get_torrent_info();
|
torrent_info torrentInfo = h.get_torrent_info();
|
||||||
fileName->setText(torrentInfo.name().c_str());
|
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();
|
QString tracker = QString(torrentStatus.current_tracker.c_str()).trimmed();
|
||||||
if(!tracker.isEmpty()){
|
if(!tracker.isEmpty()){
|
||||||
trackerURL->setText(tracker);
|
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){
|
for(unsigned int i=0; i<trackers.size(); ++i){
|
||||||
trackersURLS->addItem(QString(trackers[i].url.c_str()));
|
trackersURLS->addItem(QString(trackers[i].url.c_str()));
|
||||||
}
|
}
|
||||||
|
// Session infos
|
||||||
char tmp[MAX_CHAR_TMP];
|
char tmp[MAX_CHAR_TMP];
|
||||||
failed->setText(misc::friendlyUnit(torrentStatus.total_failed_bytes));
|
failed->setText(misc::friendlyUnit(torrentStatus.total_failed_bytes));
|
||||||
upTotal->setText(misc::friendlyUnit(torrentStatus.total_payload_upload));
|
upTotal->setText(misc::friendlyUnit(torrentStatus.total_payload_upload));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user