summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/sysinfo/devicesinfo.cpp74
-rw-r--r--noncore/settings/sysinfo/devicesinfo.h56
-rw-r--r--noncore/settings/sysinfo/sysinfo.cpp17
-rw-r--r--noncore/settings/sysinfo/sysinfo.pro11
4 files changed, 141 insertions, 17 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 @@
1/*
2                This file is part of the Opie Project
3 =. Copyright (C) 2005 Michael 'Mickey' Lauer <mickey@Vanille.de>
4 .=l. Copyright (C) The Opie Team <opie-devel@handhelds.org>
5          .>+-=
6_;:,     .>    :=|. This program is free software; you can
7.> <`_,   >  .   <= redistribute it and/or modify it under
8:`=1 )Y*s>-.--   : the terms of the GNU General Public
9.="- .-=="i,     .._ License as published by the Free Software
10- .   .-<_>     .<> Foundation; version 2 of the License.
11    ._= =}       :
12   .%`+i>       _;_.
13   .i_,=:_.      -<s. This program is distributed in the hope that
14    +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
15   : ..    .:,     . . . without even the implied warranty of
16   =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A
17 _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU
18..}^=.=       =       ; General Public License for more
19++=   -.     .`     .: details.
20:     =  ...= . :.=-
21-.   .:....=;==+<; You should have received a copy of the GNU
22 -_. . .   )=.  = General Public License along with
23   --        :-=` this application; see the file LICENSE.GPL.
24 If not, write to the Free Software Foundation,
25 Inc., 59 Temple Place - Suite 330,
26 Boston, MA 02111-1307, USA.
27*/
28
29#include "devicesinfo.h"
30
31/* OPIE */
32#include <opie2/olistview.h>
33#include <qpe/qpeapplication.h>
34
35/* QT */
36#include <qcombobox.h>
37#include <qfile.h>
38#include <qlayout.h>
39#include <qmessagebox.h>
40#include <qpushbutton.h>
41#include <qtextview.h>
42#include <qtimer.h>
43#include <qwhatsthis.h>
44
45using namespace Opie::Ui;
46
47DevicesView::DevicesView( QWidget* parent, const char* name, WFlags fl )
48 : OListView( parent, name, fl )
49{
50 addColumn( tr( "Module" ) );
51 setAllColumnsShowFocus( true );
52 setRootIsDecorated( true );
53 QWhatsThis::add( this, tr( "This is a list of all the devices currently recognized on this device." ) );
54}
55
56DevicesView::~DevicesView()
57{
58}
59
60DevicesInfo::DevicesInfo( QWidget* parent, const char* name, WFlags fl )
61 : QWidget( parent, name, fl )
62{
63 QGridLayout *layout = new QGridLayout( this );
64 layout->setSpacing( 4 );
65 layout->setMargin( 4 );
66
67 view = new DevicesView( this );
68
69 layout->addMultiCellWidget( view, 0, 0, 0, 1 );
70}
71
72DevicesInfo::~DevicesInfo()
73{
74}
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 @@
1/*
2                This file is part of the Opie Project
3 =. Copyright (C) 2005 Michael 'Mickey' Lauer <mickey@Vanille.de>
4 .=l. Copyright (C) The Opie Team <opie-devel@handhelds.org>
5          .>+-=
6_;:,     .>    :=|. This program is free software; you can
7.> <`_,   >  .   <= redistribute it and/or modify it under
8:`=1 )Y*s>-.--   : the terms of the GNU General Public
9.="- .-=="i,     .._ License as published by the Free Software
10- .   .-<_>     .<> Foundation; version 2 of the License.
11    ._= =}       :
12   .%`+i>       _;_.
13   .i_,=:_.      -<s. This program is distributed in the hope that
14    +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
15   : ..    .:,     . . . without even the implied warranty of
16   =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A
17 _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU
18..}^=.=       =       ; General Public License for more
19++=   -.     .`     .: details.
20:     =  ...= . :.=-
21-.   .:....=;==+<; You should have received a copy of the GNU
22 -_. . .   )=.  = General Public License along with
23   --        :-=` this application; see the file LICENSE.GPL.
24 If not, write to the Free Software Foundation,
25 Inc., 59 Temple Place - Suite 330,
26 Boston, MA 02111-1307, USA.
27*/
28
29#ifndef DEVICESINFO_H
30#define DEVICESINFO_H
31
32#include <qwidget.h>
33#include <opie2/olistview.h>
34using namespace Opie::Ui;
35
36class DevicesView : public OListView
37{
38 Q_OBJECT
39public:
40 DevicesView( QWidget* parent = 0, const char* name = 0, WFlags f = 0 );
41 ~DevicesView();
42};
43
44class DevicesInfo : public QWidget
45{
46 Q_OBJECT
47public:
48 DevicesInfo( QWidget *parent = 0, const char *name = 0, WFlags f = 0 );
49 ~DevicesInfo();
50
51private:
52 OListView* view;
53
54private slots:
55};
56#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
@@ -10,66 +10,57 @@
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** 13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information. 14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15** 15**
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** Enhancements by: Dan Williams, <williamsdr@acm.org> 21** Enhancements by: Dan Williams, <williamsdr@acm.org>
22** 22**
23**********************************************************************/ 23**********************************************************************/
24 24
25#include "memory.h" 25#include "memory.h"
26#include "load.h" 26#include "devicesinfo.h"
27#include "storage.h" 27#include "storage.h"
28#include "processinfo.h" 28#include "processinfo.h"
29#include "modulesinfo.h" 29#include "modulesinfo.h"
30#include "benchmarkinfo.h" 30#include "benchmarkinfo.h"
31#include "sysloginfo.h" 31#include "sysloginfo.h"
32#include "versioninfo.h" 32#include "versioninfo.h"
33#include "sysinfo.h" 33#include "sysinfo.h"
34 34
35/* OPIE */ 35/* OPIE */
36#include <opie2/otabwidget.h> 36#include <opie2/otabwidget.h>
37using namespace Opie::Ui; 37using namespace Opie::Ui;
38#include <qpe/config.h> 38#include <qpe/config.h>
39#include <qpe/resource.h> 39#include <qpe/resource.h>
40 40
41/* QT */ 41/* QT */
42#include <qlayout.h> 42#include <qlayout.h>
43 43
44SystemInfo::SystemInfo( QWidget *parent, const char *name, WFlags ) 44SystemInfo::SystemInfo( QWidget *parent, const char *name, WFlags )
45 : QWidget( parent, name, WStyle_ContextHelp ) 45 : QWidget( parent, name, WStyle_ContextHelp )
46{ 46{
47 setIcon( Resource::loadPixmap( "system_icon" ) ); 47 setIcon( Resource::loadPixmap( "system_icon" ) );
48 setCaption( tr("System Info") ); 48 setCaption( tr("System Info") );
49 49
50 resize( 220, 180 );
51
52 Config config( "qpe" );
53 config.setGroup( "Appearance" );
54 bool advanced = config.readBoolEntry( "Advanced", TRUE );
55
56 QVBoxLayout *lay = new QVBoxLayout( this ); 50 QVBoxLayout *lay = new QVBoxLayout( this );
57 OTabWidget *tab = new OTabWidget( this, "tabwidget", OTabWidget::Global ); 51 OTabWidget *tab = new OTabWidget( this, "tabwidget", OTabWidget::Global );
58 lay->addWidget( tab ); 52 lay->addWidget( tab );
59 53
60 tab->addTab( new MemoryInfo( tab ), "sysinfo/memorytabicon", tr("Memory") ); 54 tab->addTab( new MemoryInfo( tab ), "sysinfo/memorytabicon", tr("Memory") );
61#if defined(_OS_LINUX_) || defined(Q_OS_LINUX) 55#if defined(_OS_LINUX_) || defined(Q_OS_LINUX)
62 tab->addTab( new FileSysInfo( tab ), "sysinfo/storagetabicon", tr("Storage") ); 56 tab->addTab( new FileSysInfo( tab ), "sysinfo/storagetabicon", tr("Storage") );
63#endif 57#endif
64 tab->addTab( new LoadInfo( tab ), "sysinfo/cputabicon", tr("CPU") ); 58 tab->addTab( new DevicesInfo( tab ), "sysinfo/cputabicon", tr("Devices") );
65 if ( advanced ) 59 tab->addTab( new ProcessInfo( tab ), "sysinfo/processtabicon", tr( "Process" ) );
66 { 60 tab->addTab( new ModulesInfo( tab ), "sysinfo/moduletabicon", tr( "Modules" ) );
67 tab->addTab( new ProcessInfo( tab ), "sysinfo/processtabicon", tr( "Process" ) );
68 tab->addTab( new ModulesInfo( tab ), "sysinfo/moduletabicon", tr( "Modules" ) );
69 }
70 tab->addTab( new SyslogInfo( tab ), "sysinfo/syslogtabicon", tr( "Syslog" ) ); 61 tab->addTab( new SyslogInfo( tab ), "sysinfo/syslogtabicon", tr( "Syslog" ) );
71 tab->addTab( new BenchmarkInfo( tab ), "sysinfo/benchmarktabicon", tr( "Benchmark" ) ); 62 tab->addTab( new BenchmarkInfo( tab ), "sysinfo/benchmarktabicon", tr( "Benchmark" ) );
72 tab->addTab( new VersionInfo( tab ), "sysinfo/versiontabicon", tr("Version") ); 63 tab->addTab( new VersionInfo( tab ), "sysinfo/versiontabicon", tr("Version") );
73 64
74 tab->setCurrentTab( tr( "Memory" ) ); 65 tab->setCurrentTab( tr( "Memory" ) );
75} 66}
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,36 +1,39 @@
1CONFIG = qt warn_on quick-app 1CONFIG = qt warn_on quick-app
2
2HEADERS = \ 3HEADERS = \
3 memory.h \ 4 memory.h \
4 graph.h \ 5 graph.h \
5 load.h \ 6 devicesinfo.h \
6 storage.h \ 7 storage.h \
7 processinfo.h \ 8 processinfo.h \
8 modulesinfo.h \ 9 modulesinfo.h \
9 detail.h \ 10 detail.h \
10 contrib/dhry.h \ 11 contrib/dhry.h \
11 benchmarkinfo.h \ 12 benchmarkinfo.h \
12 sysloginfo.h \ 13 sysloginfo.h \
13 versioninfo.h \ 14 versioninfo.h \
14 sysinfo.h 15 sysinfo.h
15SOURCES = main.cpp \ 16
17SOURCES = \
18 main.cpp \
16 memory.cpp \ 19 memory.cpp \
17 graph.cpp \ 20 graph.cpp \
18 load.cpp \ 21 devicesinfo.cpp \
19 storage.cpp \ 22 storage.cpp \
20 processinfo.cpp \ 23 processinfo.cpp \
21 modulesinfo.cpp \ 24 modulesinfo.cpp \
22 detail.cpp \ 25 detail.cpp \
23 contrib/dhry.c contrib/fft.c \ 26 contrib/dhry.c contrib/fft.c \
24 benchmarkinfo.cpp \ 27 benchmarkinfo.cpp \
25 sysloginfo.cpp \ 28 sysloginfo.cpp \
26 versioninfo.cpp \ 29 versioninfo.cpp \
27 sysinfo.cpp 30 sysinfo.cpp
28 31
29INCLUDEPATH += $(OPIEDIR)/include 32INCLUDEPATH += $(OPIEDIR)/include
30DEPENDPATH += $(OPIEDIR)/include 33DEPENDPATH += $(OPIEDIR)/include
31LIBS += -lqpe -lopiecore2 -lopieui2 34LIBS += -lqpe -lopiecore2 -lopieui2
32DEFINES += UNIX 35DEFINES += UNIX
33TARGET = sysinfo 36TARGET = sysinfo
34VERSION = 1.2.2 37VERSION = 1.3.0
35 38
36include( $(OPIEDIR)/include.pro ) 39include( $(OPIEDIR)/include.pro )