author | drw <drw> | 2002-11-17 02:14:03 (UTC) |
---|---|---|
committer | drw <drw> | 2002-11-17 02:14:03 (UTC) |
commit | 9ed0a6022d4c3bcd8428096cdf28cad1e0355ab2 (patch) (unidiff) | |
tree | f84b36548fa91496c0c100c96a3fa1512ec8b108 /noncore/settings/sysinfo/load.cpp | |
parent | 5a1f5ba99dfb754f1be4500dd55dca42b36413b8 (diff) | |
download | opie-9ed0a6022d4c3bcd8428096cdf28cad1e0355ab2.zip opie-9ed0a6022d4c3bcd8428096cdf28cad1e0355ab2.tar.gz opie-9ed0a6022d4c3bcd8428096cdf28cad1e0355ab2.tar.bz2 |
Start of What's This for Sysinfo, plus some code tweaks
Diffstat (limited to 'noncore/settings/sysinfo/load.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/sysinfo/load.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/noncore/settings/sysinfo/load.cpp b/noncore/settings/sysinfo/load.cpp index 0fcfa6b..900b3d3 100644 --- a/noncore/settings/sysinfo/load.cpp +++ b/noncore/settings/sysinfo/load.cpp | |||
@@ -16,19 +16,22 @@ | |||
16 | ** Contact info@trolltech.com if any conditions of this licensing are | 16 | ** Contact info@trolltech.com if any conditions of this licensing are |
17 | ** not clear to you. | 17 | ** not clear to you. |
18 | ** | 18 | ** |
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | 20 | ||
21 | #include <stdio.h> | 21 | #include <stdio.h> |
22 | |||
23 | #include <qfile.h> | ||
22 | #include <qlayout.h> | 24 | #include <qlayout.h> |
23 | #include <qlabel.h> | 25 | #include <qlabel.h> |
24 | #include <qpainter.h> | 26 | #include <qpainter.h> |
25 | #include <qpixmap.h> | 27 | #include <qpixmap.h> |
26 | #include <qtimer.h> | ||
27 | #include <qfile.h> | ||
28 | #include <qtextstream.h> | 28 | #include <qtextstream.h> |
29 | #include <qtimer.h> | ||
30 | #include <qwhatsthis.h> | ||
31 | |||
29 | #include "load.h" | 32 | #include "load.h" |
30 | 33 | ||
31 | LoadInfo::LoadInfo( QWidget *parent, const char *name, WFlags f ) | 34 | LoadInfo::LoadInfo( QWidget *parent, const char *name, WFlags f ) |
32 | : QWidget( parent, name, f ) | 35 | : QWidget( parent, name, f ) |
33 | { | 36 | { |
34 | QVBoxLayout *vb = new QVBoxLayout( this, 6 ); | 37 | QVBoxLayout *vb = new QVBoxLayout( this, 6 ); |
@@ -41,12 +44,14 @@ LoadInfo::LoadInfo( QWidget *parent, const char *name, WFlags f ) | |||
41 | l->setPixmap( makeLabel( red, tr("Application CPU usage (%)") ) ); | 44 | l->setPixmap( makeLabel( red, tr("Application CPU usage (%)") ) ); |
42 | vb->addWidget( l, 1 ); | 45 | vb->addWidget( l, 1 ); |
43 | l = new QLabel( this ); | 46 | l = new QLabel( this ); |
44 | l->setPixmap( makeLabel( green, tr("System CPU usage (%)") ) ); | 47 | l->setPixmap( makeLabel( green, tr("System CPU usage (%)") ) ); |
45 | vb->addWidget( l, 1 ); | 48 | vb->addWidget( l, 1 ); |
46 | vb->addStretch(50); | 49 | vb->addStretch(50); |
50 | |||
51 | QWhatsThis::add( this, tr( "This page shows how much this device's processor is being used." ) ); | ||
47 | } | 52 | } |
48 | 53 | ||
49 | QPixmap LoadInfo::makeLabel( const QColor &col, const QString &text ) | 54 | QPixmap LoadInfo::makeLabel( const QColor &col, const QString &text ) |
50 | { | 55 | { |
51 | int h = fontMetrics().height(); | 56 | int h = fontMetrics().height(); |
52 | QPixmap pm( 20 + fontMetrics().width( text ), h ); | 57 | QPixmap pm( 20 + fontMetrics().width( text ), h ); |