]> Git Repo - VerusCoin.git/blame - src/qt/trafficgraphwidget.h
komodo strings
[VerusCoin.git] / src / qt / trafficgraphwidget.h
CommitLineData
f914f1a7 1// Copyright (c) 2011-2013 The Bitcoin Core developers
78253fcb 2// Distributed under the MIT software license, see the accompanying
e592d43f
WL
3// file COPYING or http://www.opensource.org/licenses/mit-license.php.
4
84738627
PJ
5#ifndef BITCOIN_QT_TRAFFICGRAPHWIDGET_H
6#define BITCOIN_QT_TRAFFICGRAPHWIDGET_H
ce14345a
SE
7
8#include <QWidget>
9#include <QQueue>
10
11class ClientModel;
12
13QT_BEGIN_NAMESPACE
14class QPaintEvent;
15class QTimer;
16QT_END_NAMESPACE
17
18class TrafficGraphWidget : public QWidget
19{
20 Q_OBJECT
21
22public:
23 explicit TrafficGraphWidget(QWidget *parent = 0);
24 void setClientModel(ClientModel *model);
25 int getGraphRangeMins() const;
26
27protected:
28 void paintEvent(QPaintEvent *);
29
e092f229 30public Q_SLOTS:
ce14345a
SE
31 void updateRates();
32 void setGraphRangeMins(int mins);
33 void clear();
34
35private:
36 void paintPath(QPainterPath &path, QQueue<float> &samples);
37
38 QTimer *timer;
39 float fMax;
40 int nMins;
41 QQueue<float> vSamplesIn;
42 QQueue<float> vSamplesOut;
43 quint64 nLastBytesIn;
44 quint64 nLastBytesOut;
45 ClientModel *clientModel;
46};
47
84738627 48#endif // BITCOIN_QT_TRAFFICGRAPHWIDGET_H
This page took 0.127318 seconds and 4 git commands to generate.