Browse Source

- FEATURE: Added an option to display current transfer speeds in title bar

adaptive-webui-19844
Christophe Dumez 18 years ago
parent
commit
70beef9f94
  1. 1
      Changelog
  2. 1
      TODO
  3. 11
      src/GUI.cpp
  4. 1
      src/GUI.h

1
Changelog

@ -38,6 +38,7 @@ @@ -38,6 +38,7 @@
- FEATURE: Added an option to set the max number of connections per torrent
- FEATURE: Added an option to set the max number of uploads per torrent
- FEATURE: Added an option to automatically delete torrents when they reach a given ratio (>= 1.0)
- FEATURE: Added an option to display current transfer speeds in title bar
- I18N: Added Hungarian translation
- I18N: Added Brazilian translation
- BUGFIX: Progress of paused torrents is now correct on restart

1
TODO

@ -104,6 +104,7 @@ beta6->beta7 changelog: @@ -104,6 +104,7 @@ beta6->beta7 changelog:
- FEATURE: Added an option to set the max number of connections per torrent
- FEATURE: Added an option to set the max number of uploads per torrent
- FEATURE: Added an option to automatically delete torrents when they reach a given ratio (>= 1.0)
- FEATURE: Added an option to display current transfer speeds in title bar
- BUGFIX: In torrent content, it is now easier to filter all torrents using right click menu
- BUGFIX: Updated man page / README / INSTALL
- BUGFIX: Paused torrents could be displayed as connected for a sec after checking

11
src/GUI.cpp

@ -56,7 +56,7 @@ namespace fs = boost::filesystem; @@ -56,7 +56,7 @@ namespace fs = boost::filesystem;
*****************************************************/
// Constructor
GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent), force_exit(false) {
GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent), displaySpeedInTitle(false), force_exit(false) {
setupUi(this);
setWindowTitle(tr("qBittorrent %1", "e.g: qBittorrent v0.x").arg(QString::fromUtf8(VERSION)));
QSettings settings(QString::fromUtf8("qBittorrent"), QString::fromUtf8("qBittorrent"));
@ -788,8 +788,10 @@ void GUI::processDownloadedFiles(QString path, QString url) { @@ -788,8 +788,10 @@ void GUI::processDownloadedFiles(QString path, QString url) {
// Set BT session configuration
void GUI::configureSession(bool deleteOptions) {
qDebug("Configuring session");
// General
displaySpeedInTitle = options->speedInTitleBar();
// Downloads
// Save path
// * Save path
BTSession->setDefaultSavePath(options->getSavePath());
BTSession->preAllocateAllFiles(options->preAllocateAllFiles());
BTSession->startTorrentsInPause(options->addTorrentsInPause());
@ -1146,6 +1148,11 @@ void GUI::updateLists() { @@ -1146,6 +1148,11 @@ void GUI::updateLists() {
default:
return;
}
if(displaySpeedInTitle) {
QString dl_rate = QByteArray::number(BTSession->getSessionStatus().payload_download_rate, 'f', 1);
QString up_rate = QByteArray::number(BTSession->getSessionStatus().payload_upload_rate, 'f', 1);
setWindowTitle(tr("qBittorrent %1 (DL: %2KiB/s, UP: %3KiB/s)", "%1 is qBittorrent version").arg(QString::fromUtf8(VERSION)).arg(dl_rate).arg(up_rate));
}
}
// Called when a tracker requires authentication

1
src/GUI.h

@ -64,6 +64,7 @@ class GUI : public QMainWindow, private Ui::MainWindow{ @@ -64,6 +64,7 @@ class GUI : public QMainWindow, private Ui::MainWindow{
FinishedTorrents *finishedTorrentTab;
QLabel *connecStatusLblIcon;
bool systrayIntegration;
bool displaySpeedInTitle;
bool force_exit;
QTimer *refresher;
// Keyboard shortcuts

Loading…
Cancel
Save