| 33 | |
| 34 | |
| 35 | CPULoadWidget::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 |
nothing calls this directly
no test coverage detected