Raven Core
3.0.0
P2P Digital Currency
src
qt
trafficgraphwidget.h
Go to the documentation of this file.
1
// Copyright (c) 2011-2015 The Bitcoin Core developers
2
// Copyright (c) 2017-2019 The Raven Core developers
3
// Distributed under the MIT software license, see the accompanying
4
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
5
6
#ifndef RAVEN_QT_TRAFFICGRAPHWIDGET_H
7
#define RAVEN_QT_TRAFFICGRAPHWIDGET_H
8
9
#include <QWidget>
10
#include <QQueue>
11
12
class
ClientModel
;
13
14
QT_BEGIN_NAMESPACE
15
class
QPaintEvent;
16
class
QTimer;
17
QT_END_NAMESPACE
18
19
class
TrafficGraphWidget
:
public
QWidget
20
{
21
Q_OBJECT
22
23
public
:
24
explicit
TrafficGraphWidget
(QWidget *parent = 0);
25
void
setClientModel
(
ClientModel
*model);
26
int
getGraphRangeMins
()
const
;
27
28
protected
:
29
void
paintEvent
(QPaintEvent *);
30
31
public
Q_SLOTS:
32
void
updateRates
();
33
void
setGraphRangeMins
(
int
mins);
34
void
clear
();
35
36
private
:
37
void
paintPath
(QPainterPath &path, QQueue<float> &samples);
38
39
QTimer *
timer
;
40
float
fMax
;
41
int
nMins
;
42
QQueue<float>
vSamplesIn
;
43
QQueue<float>
vSamplesOut
;
44
quint64
nLastBytesIn
;
45
quint64
nLastBytesOut
;
46
ClientModel
*
clientModel
;
47
};
48
49
#endif // RAVEN_QT_TRAFFICGRAPHWIDGET_H
TrafficGraphWidget
Definition:
trafficgraphwidget.h:19
TrafficGraphWidget::paintPath
void paintPath(QPainterPath &path, QQueue< float > &samples)
Definition:
trafficgraphwidget.cpp:49
TrafficGraphWidget::clientModel
ClientModel * clientModel
Definition:
trafficgraphwidget.h:46
TrafficGraphWidget::vSamplesIn
QQueue< float > vSamplesIn
Definition:
trafficgraphwidget.h:42
TrafficGraphWidget::vSamplesOut
QQueue< float > vSamplesOut
Definition:
trafficgraphwidget.h:43
TrafficGraphWidget::paintEvent
void paintEvent(QPaintEvent *)
Definition:
trafficgraphwidget.cpp:65
TrafficGraphWidget::timer
QTimer * timer
Definition:
trafficgraphwidget.h:39
TrafficGraphWidget::fMax
float fMax
Definition:
trafficgraphwidget.h:40
TrafficGraphWidget::getGraphRangeMins
int getGraphRangeMins() const
Definition:
trafficgraphwidget.cpp:44
ClientModel
Model for Raven network client.
Definition:
clientmodel.h:39
TrafficGraphWidget::updateRates
void updateRates()
Definition:
trafficgraphwidget.cpp:123
TrafficGraphWidget::nLastBytesIn
quint64 nLastBytesIn
Definition:
trafficgraphwidget.h:44
TrafficGraphWidget::nLastBytesOut
quint64 nLastBytesOut
Definition:
trafficgraphwidget.h:45
TrafficGraphWidget::nMins
int nMins
Definition:
trafficgraphwidget.h:41
TrafficGraphWidget::clear
void clear()
Definition:
trafficgraphwidget.cpp:164
TrafficGraphWidget::setGraphRangeMins
void setGraphRangeMins(int mins)
Definition:
trafficgraphwidget.cpp:154
TrafficGraphWidget::setClientModel
void setClientModel(ClientModel *model)
Definition:
trafficgraphwidget.cpp:35
TrafficGraphWidget::TrafficGraphWidget
TrafficGraphWidget(QWidget *parent=0)
Definition:
trafficgraphwidget.cpp:20
Generated on Mon Jul 29 2019 02:32:20 for Raven Core by
1.8.13