Diffstat (limited to 'noncore/settings/sysinfo/load.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/settings/sysinfo/load.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/noncore/settings/sysinfo/load.cpp b/noncore/settings/sysinfo/load.cpp index 900b3d3..d9d7a66 100644 --- a/noncore/settings/sysinfo/load.cpp +++ b/noncore/settings/sysinfo/load.cpp @@ -107,49 +107,49 @@ QString LoadInfo::getCpuInfo() } Load::Load( QWidget *parent, const char *name, WFlags f ) : QWidget( parent, name, f ) { setMinimumHeight( 30 ); setBackgroundColor( black ); points = 100; setMinimumWidth( points ); userLoad = new double [points]; systemLoad = new double [points]; for ( int i = 0; i < points; i++ ) { userLoad[i] = 0.0; systemLoad[i] = 0.0; } maxLoad = 1.3; QTimer *timer = new QTimer( this ); connect( timer, SIGNAL(timeout()), SLOT(timeout()) ); timer->start( 2000 ); gettimeofday( &last, 0 ); first = TRUE; timeout(); } -void Load::paintEvent( QPaintEvent *ev ) +void Load::paintEvent( QPaintEvent * ) { QPainter p( this ); int h = height() - 5; int mult = (int)(h / maxLoad); p.setPen( gray ); p.drawLine( 0, h - mult, width(), h - mult ); p.drawText( 0, h - mult, "100" ); p.drawText( 0, h, "0" ); p.setPen( green ); for ( int i = 1; i < points; i++ ) { int x1 = (i - 1) * width() / points; int x2 = i * width() / points; p.drawLine( x1, h - systemLoad[i-1] * mult, x2, h - systemLoad[i] * mult ); } p.setPen( red ); for ( int i = 1; i < points; i++ ) { int x1 = (i - 1) * width() / points; int x2 = i * width() / points; |