Bitcoin ABC 0.26.3
P2P Digital Currency
Loading...
Searching...
No Matches
trafficgraphwidget.h
Go to the documentation of this file.
1// Copyright (c) 2011-2015 The Bitcoin Core developers
2// Distributed under the MIT software license, see the accompanying
3// file COPYING or http://www.opensource.org/licenses/mit-license.php.
4
5#ifndef BITCOIN_QT_TRAFFICGRAPHWIDGET_H
6#define BITCOIN_QT_TRAFFICGRAPHWIDGET_H
7
8#include <QQueue>
9#include <QWidget>
10
11class ClientModel;
12
14class QPaintEvent;
15class QPainterPath;
16class QTimer;
18
19class TrafficGraphWidget : public QWidget {
21
22public:
23 explicit TrafficGraphWidget(QWidget *parent = nullptr);
24 void setClientModel(ClientModel *model);
25 int getGraphRangeMins() const;
26
27protected:
28 void paintEvent(QPaintEvent *) override;
29
30public Q_SLOTS:
31 void updateRates();
32 void setGraphRangeMins(int mins);
33 void clear();
34
35private:
37
39 float fMax;
40 int nMins;
46};
47
48#endif // BITCOIN_QT_TRAFFICGRAPHWIDGET_H
Model for Bitcoin network client.
Definition clientmodel.h:43
void paintEvent(QPaintEvent *) override
ClientModel * clientModel
void setClientModel(ClientModel *model)
void setGraphRangeMins(int mins)
QQueue< float > vSamplesOut
void paintPath(QPainterPath &path, QQueue< float > &samples)
QQueue< float > vSamplesIn
T GetRand(T nMax=std::numeric_limits< T >::max()) noexcept
Generate a uniform random integer of type T in the range [0..nMax) nMax defaults to std::numeric_limi...
Definition random.h:85