-rw-r--r-- | noncore/settings/sysinfo/devicesinfo.cpp | 74 | ||||
-rw-r--r-- | noncore/settings/sysinfo/devicesinfo.h | 56 | ||||
-rw-r--r-- | noncore/settings/sysinfo/sysinfo.cpp | 13 | ||||
-rw-r--r-- | noncore/settings/sysinfo/sysinfo.pro | 11 |
4 files changed, 139 insertions, 15 deletions
diff --git a/noncore/settings/sysinfo/devicesinfo.cpp b/noncore/settings/sysinfo/devicesinfo.cpp new file mode 100644 index 0000000..38afd54 --- a/dev/null +++ b/noncore/settings/sysinfo/devicesinfo.cpp @@ -0,0 +1,74 @@ +/* + This file is part of the Opie Project + =. Copyright (C) 2005 Michael 'Mickey' Lauer <mickey@Vanille.de> + .=l. Copyright (C) The Opie Team <opie-devel@handhelds.org> + .>+-= +_;:, .> :=|. This program is free software; you can +.> <`_, > . <= redistribute it and/or modify it under +:`=1 )Y*s>-.-- : the terms of the GNU General Public +.="- .-=="i, .._ License as published by the Free Software +- . .-<_> .<> Foundation; version 2 of the License. + ._= =} : + .%`+i> _;_. + .i_,=:_. -<s. This program is distributed in the hope that + + . -:. = it will be useful, but WITHOUT ANY WARRANTY; + : .. .:, . . . without even the implied warranty of + =_ + =;=|` MERCHANTABILITY or FITNESS FOR A + _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU +..}^=.= = ; General Public License for more +++= -. .` .: details. +: = ...= . :.=- +-. .:....=;==+<; You should have received a copy of the GNU + -_. . . )=. = General Public License along with + -- :-=` this application; see the file LICENSE.GPL. + If not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. +*/ + +#include "devicesinfo.h" + +/* OPIE */ +#include <opie2/olistview.h> +#include <qpe/qpeapplication.h> + +/* QT */ +#include <qcombobox.h> +#include <qfile.h> +#include <qlayout.h> +#include <qmessagebox.h> +#include <qpushbutton.h> +#include <qtextview.h> +#include <qtimer.h> +#include <qwhatsthis.h> + +using namespace Opie::Ui; + +DevicesView::DevicesView( QWidget* parent, const char* name, WFlags fl ) + : OListView( parent, name, fl ) +{ + addColumn( tr( "Module" ) ); + setAllColumnsShowFocus( true ); + setRootIsDecorated( true ); + QWhatsThis::add( this, tr( "This is a list of all the devices currently recognized on this device." ) ); +} + +DevicesView::~DevicesView() +{ +} + +DevicesInfo::DevicesInfo( QWidget* parent, const char* name, WFlags fl ) + : QWidget( parent, name, fl ) +{ + QGridLayout *layout = new QGridLayout( this ); + layout->setSpacing( 4 ); + layout->setMargin( 4 ); + + view = new DevicesView( this ); + + layout->addMultiCellWidget( view, 0, 0, 0, 1 ); +} + +DevicesInfo::~DevicesInfo() +{ +} diff --git a/noncore/settings/sysinfo/devicesinfo.h b/noncore/settings/sysinfo/devicesinfo.h new file mode 100644 index 0000000..082586b --- a/dev/null +++ b/noncore/settings/sysinfo/devicesinfo.h @@ -0,0 +1,56 @@ +/* + This file is part of the Opie Project + =. Copyright (C) 2005 Michael 'Mickey' Lauer <mickey@Vanille.de> + .=l. Copyright (C) The Opie Team <opie-devel@handhelds.org> + .>+-= +_;:, .> :=|. This program is free software; you can +.> <`_, > . <= redistribute it and/or modify it under +:`=1 )Y*s>-.-- : the terms of the GNU General Public +.="- .-=="i, .._ License as published by the Free Software +- . .-<_> .<> Foundation; version 2 of the License. + ._= =} : + .%`+i> _;_. + .i_,=:_. -<s. This program is distributed in the hope that + + . -:. = it will be useful, but WITHOUT ANY WARRANTY; + : .. .:, . . . without even the implied warranty of + =_ + =;=|` MERCHANTABILITY or FITNESS FOR A + _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU +..}^=.= = ; General Public License for more +++= -. .` .: details. +: = ...= . :.=- +-. .:....=;==+<; You should have received a copy of the GNU + -_. . . )=. = General Public License along with + -- :-=` this application; see the file LICENSE.GPL. + If not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. +*/ + +#ifndef DEVICESINFO_H +#define DEVICESINFO_H + +#include <qwidget.h> +#include <opie2/olistview.h> +using namespace Opie::Ui; + +class DevicesView : public OListView +{ + Q_OBJECT +public: + DevicesView( QWidget* parent = 0, const char* name = 0, WFlags f = 0 ); + ~DevicesView(); +}; + +class DevicesInfo : public QWidget +{ + Q_OBJECT +public: + DevicesInfo( QWidget *parent = 0, const char *name = 0, WFlags f = 0 ); + ~DevicesInfo(); + +private: + OListView* view; + +private slots: +}; +#endif diff --git a/noncore/settings/sysinfo/sysinfo.cpp b/noncore/settings/sysinfo/sysinfo.cpp index 7000175..03db22a 100644 --- a/noncore/settings/sysinfo/sysinfo.cpp +++ b/noncore/settings/sysinfo/sysinfo.cpp @@ -20,13 +20,13 @@ ** ** Enhancements by: Dan Williams, <williamsdr@acm.org> ** **********************************************************************/ #include "memory.h" -#include "load.h" +#include "devicesinfo.h" #include "storage.h" #include "processinfo.h" #include "modulesinfo.h" #include "benchmarkinfo.h" #include "sysloginfo.h" #include "versioninfo.h" @@ -44,32 +44,23 @@ using namespace Opie::Ui; SystemInfo::SystemInfo( QWidget *parent, const char *name, WFlags ) : QWidget( parent, name, WStyle_ContextHelp ) { 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::Global ); lay->addWidget( tab ); tab->addTab( new MemoryInfo( tab ), "sysinfo/memorytabicon", tr("Memory") ); #if defined(_OS_LINUX_) || defined(Q_OS_LINUX) tab->addTab( new FileSysInfo( tab ), "sysinfo/storagetabicon", tr("Storage") ); #endif - tab->addTab( new LoadInfo( tab ), "sysinfo/cputabicon", tr("CPU") ); - if ( advanced ) - { + tab->addTab( new DevicesInfo( tab ), "sysinfo/cputabicon", tr("Devices") ); tab->addTab( new ProcessInfo( tab ), "sysinfo/processtabicon", tr( "Process" ) ); tab->addTab( new ModulesInfo( tab ), "sysinfo/moduletabicon", tr( "Modules" ) ); - } tab->addTab( new SyslogInfo( tab ), "sysinfo/syslogtabicon", tr( "Syslog" ) ); tab->addTab( new BenchmarkInfo( tab ), "sysinfo/benchmarktabicon", tr( "Benchmark" ) ); tab->addTab( new VersionInfo( tab ), "sysinfo/versiontabicon", tr("Version") ); tab->setCurrentTab( tr( "Memory" ) ); } diff --git a/noncore/settings/sysinfo/sysinfo.pro b/noncore/settings/sysinfo/sysinfo.pro index e1d6449..8b23a57 100644 --- a/noncore/settings/sysinfo/sysinfo.pro +++ b/noncore/settings/sysinfo/sysinfo.pro @@ -1,24 +1,27 @@ CONFIG = qt warn_on quick-app + HEADERS = \ memory.h \ graph.h \ - load.h \ + devicesinfo.h \ storage.h \ processinfo.h \ modulesinfo.h \ detail.h \ contrib/dhry.h \ benchmarkinfo.h \ sysloginfo.h \ versioninfo.h \ sysinfo.h -SOURCES = main.cpp \ + +SOURCES = \ + main.cpp \ memory.cpp \ graph.cpp \ - load.cpp \ + devicesinfo.cpp \ storage.cpp \ processinfo.cpp \ modulesinfo.cpp \ detail.cpp \ contrib/dhry.c contrib/fft.c \ benchmarkinfo.cpp \ @@ -28,9 +31,9 @@ SOURCES = main.cpp \ INCLUDEPATH += $(OPIEDIR)/include DEPENDPATH += $(OPIEDIR)/include LIBS += -lqpe -lopiecore2 -lopieui2 DEFINES += UNIX TARGET = sysinfo -VERSION = 1.2.2 +VERSION = 1.3.0 include( $(OPIEDIR)/include.pro ) |