MCPcopy Create free account
hub / github.com/LMMS/lmms / CPULoadWidget

Method CPULoadWidget

src/gui/widgets/CPULoadWidget.cpp:35–53  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

33
34
35CPULoadWidget::CPULoadWidget( QWidget * _parent ) :
36 QWidget( _parent ),
37 m_currentLoad( 0 ),
38 m_temp(),
39 m_background( embed::getIconPixmap( "cpuload_bg" ) ),
40 m_leds( embed::getIconPixmap( "cpuload_leds" ) ),
41 m_changed( true ),
42 m_updateTimer()
43{
44 setAttribute( Qt::WA_OpaquePaintEvent, true );
45 setFixedSize( m_background.width(), m_background.height() );
46
47 m_temp = QPixmap( width(), height() );
48
49
50 connect( &m_updateTimer, SIGNAL( timeout() ),
51 this, SLOT( updateCpuLoad() ) );
52 m_updateTimer.start( 100 ); // update cpu-load at 10 fps
53}
54
55
56

Callers

nothing calls this directly

Calls 4

getIconPixmapFunction · 0.85
timeoutFunction · 0.85
QPixmapClass · 0.50
startMethod · 0.45

Tested by

no test coverage detected