author | drw <drw> | 2002-07-31 00:20:25 (UTC) |
---|---|---|
committer | drw <drw> | 2002-07-31 00:20:25 (UTC) |
commit | 012abe9b9c667d24052a9f078030bfa7874b404e (patch) (unidiff) | |
tree | c781fc00f048010835d7f7a1346ac16c87c8479e /noncore/settings/sysinfo/sysinfo.cpp | |
parent | aedd5172ae67346f491dcd58e89e8e3f50247f2b (diff) | |
download | opie-012abe9b9c667d24052a9f078030bfa7874b404e.zip opie-012abe9b9c667d24052a9f078030bfa7874b404e.tar.gz opie-012abe9b9c667d24052a9f078030bfa7874b404e.tar.bz2 |
Added advanced config option to determine tabs to display, and otabwidget updates
Diffstat (limited to 'noncore/settings/sysinfo/sysinfo.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/sysinfo/sysinfo.cpp | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/noncore/settings/sysinfo/sysinfo.cpp b/noncore/settings/sysinfo/sysinfo.cpp index 56ac488..ca08ae2 100644 --- a/noncore/settings/sysinfo/sysinfo.cpp +++ b/noncore/settings/sysinfo/sysinfo.cpp | |||
@@ -27,8 +27,9 @@ | |||
27 | #include "sysinfo.h" | 27 | #include "sysinfo.h" |
28 | 28 | ||
29 | #include "otabwidget.h" | 29 | #include "otabwidget.h" |
30 | 30 | ||
31 | #include <qpe/config.h> | ||
31 | #include <qpe/resource.h> | 32 | #include <qpe/resource.h> |
32 | 33 | ||
33 | #include <qlayout.h> | 34 | #include <qlayout.h> |
34 | 35 | ||
@@ -36,20 +37,29 @@ SystemInfo::SystemInfo( QWidget *parent, const char *name, WFlags f ) | |||
36 | : QWidget( parent, name, f ) | 37 | : QWidget( parent, name, f ) |
37 | { | 38 | { |
38 | setIcon( Resource::loadPixmap( "system_icon" ) ); | 39 | setIcon( Resource::loadPixmap( "system_icon" ) ); |
39 | setCaption( tr("System Info") ); | 40 | setCaption( tr("System Info") ); |
41 | |||
42 | resize( 220, 180 ); | ||
43 | |||
44 | Config config( "qpe" ); | ||
45 | config.setGroup( "Appearance" ); | ||
46 | bool advanced = config.readBoolEntry( "Advanced", TRUE ); | ||
47 | |||
40 | QVBoxLayout *lay = new QVBoxLayout( this ); | 48 | QVBoxLayout *lay = new QVBoxLayout( this ); |
41 | OTabWidget *tab = new OTabWidget( this, "tabwidget" ); | 49 | OTabWidget *tab = new OTabWidget( this, "tabwidget", OTabWidget::Global, OTabWidget::Bottom ); |
42 | lay->addWidget( tab ); | 50 | lay->addWidget( tab ); |
43 | tab->addTab( new MemoryInfo( tab ), "sysinfo/memorytabicon.png", tr("Memory") ); | 51 | tab->addTab( new MemoryInfo( tab ), "sysinfo/memorytabicon.png", tr("Memory") ); |
44 | #if defined(_OS_LINUX_) || defined(Q_OS_LINUX) | 52 | #if defined(_OS_LINUX_) || defined(Q_OS_LINUX) |
45 | tab->addTab( new StorageInfo( tab ), "sysinfo/storagetabicon.png", tr("Storage") ); | 53 | tab->addTab( new StorageInfo( tab ), "sysinfo/storagetabicon.png", tr("Storage") ); |
46 | #endif | 54 | #endif |
47 | tab->addTab( new LoadInfo( tab ), "sysinfo/cputabicon.png", tr("CPU") ); | 55 | tab->addTab( new LoadInfo( tab ), "sysinfo/cputabicon.png", tr("CPU") ); |
48 | tab->addTab( new ProcessInfo( tab ), "sysinfo/processtabicon.png", tr("Process") ); | 56 | if ( advanced ) |
49 | tab->addTab( new ModulesInfo( tab ), "sysinfo/moduletabicon.png", tr("Modules") ); | 57 | { |
58 | tab->addTab( new ProcessInfo( tab ), "sysinfo/processtabicon.png", tr("Process") ); | ||
59 | tab->addTab( new ModulesInfo( tab ), "sysinfo/moduletabicon.png", tr("Modules") ); | ||
60 | } | ||
50 | tab->addTab( new VersionInfo( tab ), "sysinfo/versiontabicon.png", tr("Version") ); | 61 | tab->addTab( new VersionInfo( tab ), "sysinfo/versiontabicon.png", tr("Version") ); |
51 | 62 | ||
52 | resize( 220, 180 ); | ||
53 | } | 63 | } |
54 | 64 | ||
55 | 65 | ||