Use cached SessionStatus and CacheStatus

This commit is contained in:
Vladimir Golovnev (Glassez)
2017-04-29 14:45:30 +03:00
parent cb678a254d
commit 8a6d8f3953
15 changed files with 171 additions and 360 deletions

View File

@@ -1,6 +1,6 @@
/*
* Bittorrent Client using Qt4 and libtorrent.
* Copyright (C) 2006 Christophe Dumez
* Bittorrent Client using Qt and libtorrent.
* Copyright (C) 2006 Christophe Dumez <chris@qbittorrent.org>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -24,8 +24,6 @@
* modify file(s), you may extend this exception to your version of the file(s),
* but you are not obligated to do so. If you do not wish to do so, delete this
* exception statement from your version.
*
* Contact : chris@qbittorrent.org
*/
#ifndef STATUSBAR_H
@@ -36,13 +34,12 @@
class QStatusBar;
class QFrame;
class QLabel;
class QTimer;
class QPushButton;
class QHBoxLayout;
namespace BitTorrent
{
class SessionStatus;
struct SessionStatus;
}
class StatusBar: public QObject
@@ -57,7 +54,6 @@ public:
public slots:
void showRestartRequired();
void stopTimer();
void refreshStatusBar();
void updateAltSpeedsBtn(bool alternative);
void toggleAlternativeSpeeds();
@@ -65,6 +61,10 @@ public slots:
void capUploadSpeed();
private:
void updateConnectionStatus();
void updateDHTNodesNumber();
void updateSpeedLabels();
QStatusBar *m_bar;
QPushButton *m_dlSpeedLbl;
QPushButton *m_upSpeedLbl;
@@ -75,13 +75,8 @@ private:
QFrame *m_statusSep4;
QPushButton *m_connecStatusLblIcon;
QPushButton *m_altSpeedsBtn;
QTimer *m_refreshTimer;
QWidget *m_container;
QHBoxLayout *m_layout;
void updateConnectionStatus(const BitTorrent::SessionStatus &sessionStatus);
void updateDHTNodesNumber(const BitTorrent::SessionStatus &sessionStatus);
void updateSpeedLabels(const BitTorrent::SessionStatus &sessionStatus);
};
#endif // STATUSBAR_H