author | drw <drw> | 2002-07-31 00:20:25 (UTC) |
---|---|---|
committer | drw <drw> | 2002-07-31 00:20:25 (UTC) |
commit | 012abe9b9c667d24052a9f078030bfa7874b404e (patch) (side-by-side diff) | |
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 @@ -28,6 +28,7 @@ #include "otabwidget.h" +#include <qpe/config.h> #include <qpe/resource.h> #include <qlayout.h> @@ -37,19 +38,28 @@ SystemInfo::SystemInfo( QWidget *parent, const char *name, WFlags f ) { setIcon( Resource::loadPixmap( "system_icon" ) ); setCaption( tr("System Info") ); + + resize( 220, 180 ); + + Config config( "qpe" ); + config.setGroup( "Appearance" ); + bool advanced = config.readBoolEntry( "Advanced", TRUE ); + QVBoxLayout *lay = new QVBoxLayout( this ); - OTabWidget *tab = new OTabWidget( this, "tabwidget" ); + OTabWidget *tab = new OTabWidget( this, "tabwidget", OTabWidget::Global, OTabWidget::Bottom ); lay->addWidget( tab ); tab->addTab( new MemoryInfo( tab ), "sysinfo/memorytabicon.png", tr("Memory") ); #if defined(_OS_LINUX_) || defined(Q_OS_LINUX) tab->addTab( new StorageInfo( tab ), "sysinfo/storagetabicon.png", tr("Storage") ); #endif tab->addTab( new LoadInfo( tab ), "sysinfo/cputabicon.png", tr("CPU") ); - tab->addTab( new ProcessInfo( tab ), "sysinfo/processtabicon.png", tr("Process") ); - tab->addTab( new ModulesInfo( tab ), "sysinfo/moduletabicon.png", tr("Modules") ); + if ( advanced ) + { + tab->addTab( new ProcessInfo( tab ), "sysinfo/processtabicon.png", tr("Process") ); + tab->addTab( new ModulesInfo( tab ), "sysinfo/moduletabicon.png", tr("Modules") ); + } tab->addTab( new VersionInfo( tab ), "sysinfo/versiontabicon.png", tr("Version") ); - resize( 220, 180 ); } |