- Display more information regarding the torrent in its properties pannel

- Made properties pannel scrollable, it behaves better with the splitter
This commit is contained in:
Christophe Dumez 2009-11-12 07:42:21 +00:00
parent 0e93e8dc9d
commit a6f31c7950
6 changed files with 449 additions and 433 deletions

View file

@ -41,6 +41,10 @@
#include <QList>
#include <QPair>
#include <QThread>
#include <ctime>
#include <QDateTime>
#include <boost/date_time/posix_time/posix_time_types.hpp>
#include <boost/date_time/posix_time/conversion.hpp>
#ifndef Q_WS_WIN
#ifdef Q_WS_MAC
@ -308,6 +312,12 @@ public:
return hash;
}
static QString boostTimeToQString(boost::optional<boost::posix_time::ptime> boostDate) {
if(!boostDate) return tr("Unknown");
struct std::tm tm = boost::posix_time::to_tm(*boostDate);
return QDateTime::fromTime_t(mktime(&tm)).toString(Qt::DefaultLocaleLongDate);
}
// Take a number of seconds and return an user-friendly
// time duration like "1d 2h 10m".
static QString userFriendlyDuration(qlonglong seconds) {