hydrogen
1.2.6
CpuLoadWidget.h
Go to the documentation of this file.
1
/*
2
* Hydrogen
3
* Copyright(c) 2002-2008 by Alex >Comix< Cominu [comix@users.sourceforge.net]
4
* Copyright(c) 2008-2025 The hydrogen development team [hydrogen-devel@lists.sourceforge.net]
5
*
6
* http://www.hydrogen-music.org
7
*
8
* This program is free software; you can redistribute it and/or modify
9
* it under the terms of the GNU General Public License as published by
10
* the Free Software Foundation; either version 2 of the License, or
11
* (at your option) any later version.
12
*
13
* This program is distributed in the hope that it will be useful,
14
* but WITHOUT ANY WARRANTY, without even the implied warranty of
15
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
* GNU General Public License for more details.
17
*
18
* You should have received a copy of the GNU General Public License
19
* along with this program. If not, see https://www.gnu.org/licenses
20
*
21
*/
22
23
#ifndef CPU_LOAD_WIDGET_H
24
#define CPU_LOAD_WIDGET_H
25
26
#include <chrono>
27
#include <vector>
28
29
#include "
../EventListener.h
"
30
#include <
core/Object.h
>
31
32
#include <QtGui>
33
#include <QtWidgets>
34
49
class
CpuLoadWidget
:
public
QWidget,
public
EventListener
,
public
H2Core::Object
<CpuLoadWidget>
50
{
51
H2_OBJECT
(
CpuLoadWidget
)
52
Q_OBJECT
53
54
public
:
55
explicit
CpuLoadWidget
( QWidget *pParent );
56
~CpuLoadWidget
();
57
58
private
slots:
59
void
updateCpuLoadWidget
();
60
61
private
:
62
std::vector<float>
m_recentValues
;
63
float
m_fValue
;
64
uint
m_nXRunValue
;
65
QSize
m_size
;
66
67
virtual
void
paintEvent
( QPaintEvent *ev )
override
;
68
69
virtual
void
XRunEvent
()
override
;
70
71
};
72
73
74
#endif
EventListener.h
Object.h
H2_OBJECT
#define H2_OBJECT(name)
Definition
Object.h:227
CpuLoadWidget::CpuLoadWidget
CpuLoadWidget(QWidget *pParent)
Definition
CpuLoadWidget.cpp:30
CpuLoadWidget::m_size
QSize m_size
Definition
CpuLoadWidget.h:65
CpuLoadWidget::m_fValue
float m_fValue
Definition
CpuLoadWidget.h:63
CpuLoadWidget::m_nXRunValue
uint m_nXRunValue
Definition
CpuLoadWidget.h:64
CpuLoadWidget::updateCpuLoadWidget
void updateCpuLoadWidget()
Definition
CpuLoadWidget.cpp:118
CpuLoadWidget::XRunEvent
virtual void XRunEvent() override
Definition
CpuLoadWidget.cpp:147
CpuLoadWidget::paintEvent
virtual void paintEvent(QPaintEvent *ev) override
Definition
CpuLoadWidget.cpp:60
CpuLoadWidget::m_recentValues
std::vector< float > m_recentValues
Definition
CpuLoadWidget.h:62
CpuLoadWidget::~CpuLoadWidget
~CpuLoadWidget()
Definition
CpuLoadWidget.cpp:57
EventListener
Definition
EventListener.h:29
H2Core::Object
Definition
Object.h:181
src
gui
src
Widgets
CpuLoadWidget.h
Generated by
1.13.2