author | harlekin <harlekin> | 2004-01-07 22:59:40 (UTC) |
---|---|---|
committer | harlekin <harlekin> | 2004-01-07 22:59:40 (UTC) |
commit | c4d6574e85f74d6086c1709ecf0d117df7417222 (patch) (unidiff) | |
tree | 73ec72034552ff8def55dd8c0b7115d05a2d3260 | |
parent | 872dc276a047a289561779fb59ab4ce45aaa9062 (diff) | |
download | opie-c4d6574e85f74d6086c1709ecf0d117df7417222.zip opie-c4d6574e85f74d6086c1709ecf0d117df7417222.tar.gz opie-c4d6574e85f74d6086c1709ecf0d117df7417222.tar.bz2 |
bring over some enhancements I allready did in branch
-rw-r--r-- | noncore/settings/sysinfo/detail.cpp | 6 | ||||
-rw-r--r-- | noncore/settings/sysinfo/main.cpp | 1 | ||||
-rw-r--r-- | noncore/settings/sysinfo/modulesinfo.cpp | 5 | ||||
-rw-r--r-- | noncore/settings/sysinfo/processinfo.cpp | 3 | ||||
-rw-r--r-- | noncore/settings/sysinfo/storage.cpp | 1 | ||||
-rw-r--r-- | noncore/settings/sysinfo/versioninfo.cpp | 16 |
6 files changed, 6 insertions, 26 deletions
diff --git a/noncore/settings/sysinfo/detail.cpp b/noncore/settings/sysinfo/detail.cpp index 2c5fdc4..79daa2b 100644 --- a/noncore/settings/sysinfo/detail.cpp +++ b/noncore/settings/sysinfo/detail.cpp | |||
@@ -3,48 +3,42 @@ | |||
3 | ** | 3 | ** |
4 | ** Display module information | 4 | ** Display module information |
5 | ** | 5 | ** |
6 | ** Copyright (C) 2002, Michael Lauer | 6 | ** Copyright (C) 2002, Michael Lauer |
7 | ** mickey@tm.informatik.uni-frankfurt.de | 7 | ** mickey@tm.informatik.uni-frankfurt.de |
8 | ** http://www.Vanille.de | 8 | ** http://www.Vanille.de |
9 | ** | 9 | ** |
10 | ** Based on ProcessDetail by Dan Williams <williamsdr@acm.org> | 10 | ** Based on ProcessDetail by Dan Williams <williamsdr@acm.org> |
11 | ** | 11 | ** |
12 | ** This file may be distributed and/or modified under the terms of the | 12 | ** This file may be distributed and/or modified under the terms of the |
13 | ** GNU General Public License version 2 as published by the Free Software | 13 | ** GNU General Public License version 2 as published by the Free Software |
14 | ** Foundation and appearing in the file LICENSE.GPL included in the | 14 | ** Foundation and appearing in the file LICENSE.GPL included in the |
15 | ** packaging of this file. | 15 | ** packaging of this file. |
16 | ** | 16 | ** |
17 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 17 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
18 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 18 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
19 | ** | 19 | ** |
20 | **********************************************************************/ | 20 | **********************************************************************/ |
21 | 21 | ||
22 | #include "detail.h" | 22 | #include "detail.h" |
23 | 23 | ||
24 | #include <sys/types.h> | 24 | #include <sys/types.h> |
25 | #include <stdio.h> | 25 | #include <stdio.h> |
26 | 26 | ||
27 | #include <qcombobox.h> | ||
28 | #include <qlayout.h> | 27 | #include <qlayout.h> |
29 | #include <qlistview.h> | ||
30 | #include <qmessagebox.h> | ||
31 | #include <qpushbutton.h> | ||
32 | #include <qtextview.h> | ||
33 | #include <qwhatsthis.h> | ||
34 | 28 | ||
35 | Detail::Detail( QWidget* parent, const char* name, WFlags ) | 29 | Detail::Detail( QWidget* parent, const char* name, WFlags ) |
36 | : QWidget( parent, name, WStyle_ContextHelp ) | 30 | : QWidget( parent, name, WStyle_ContextHelp ) |
37 | { | 31 | { |
38 | QVBoxLayout *layout = new QVBoxLayout( this ); | 32 | QVBoxLayout *layout = new QVBoxLayout( this ); |
39 | 33 | ||
40 | detailView = new QTextView( this ); | 34 | detailView = new QTextView( this ); |
41 | detailView->setTextFormat( PlainText ); | 35 | detailView->setTextFormat( PlainText ); |
42 | 36 | ||
43 | layout->addWidget( detailView ); | 37 | layout->addWidget( detailView ); |
44 | } | 38 | } |
45 | 39 | ||
46 | Detail::~Detail() | 40 | Detail::~Detail() |
47 | { | 41 | { |
48 | } | 42 | } |
49 | 43 | ||
50 | 44 | ||
diff --git a/noncore/settings/sysinfo/main.cpp b/noncore/settings/sysinfo/main.cpp index 02b1098..d071f71 100644 --- a/noncore/settings/sysinfo/main.cpp +++ b/noncore/settings/sysinfo/main.cpp | |||
@@ -1,27 +1,26 @@ | |||
1 | /********************************************************************** | 1 | /********************************************************************** |
2 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. | 2 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. |
3 | ** | 3 | ** |
4 | ** This file is part of Qtopia Environment. | 4 | ** This file is part of Qtopia Environment. |
5 | ** | 5 | ** |
6 | ** This file may be distributed and/or modified under the terms of the | 6 | ** This file may be distributed and/or modified under the terms of the |
7 | ** GNU General Public License version 2 as published by the Free Software | 7 | ** GNU General Public License version 2 as published by the Free Software |
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | 8 | ** Foundation and appearing in the file LICENSE.GPL included in the |
9 | ** packaging of this file. | 9 | ** packaging of this file. |
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 | #include "sysinfo.h" | 21 | #include "sysinfo.h" |
22 | 22 | ||
23 | #include <qpe/qpeapplication.h> | ||
24 | #include <opie/oapplicationfactory.h> | 23 | #include <opie/oapplicationfactory.h> |
25 | 24 | ||
26 | 25 | ||
27 | OPIE_EXPORT_APP( OApplicationFactory<SystemInfo> ) | 26 | OPIE_EXPORT_APP( OApplicationFactory<SystemInfo> ) |
diff --git a/noncore/settings/sysinfo/modulesinfo.cpp b/noncore/settings/sysinfo/modulesinfo.cpp index 0bf51e8..566b179 100644 --- a/noncore/settings/sysinfo/modulesinfo.cpp +++ b/noncore/settings/sysinfo/modulesinfo.cpp | |||
@@ -1,55 +1,50 @@ | |||
1 | /********************************************************************** | 1 | /********************************************************************** |
2 | ** ModulesInfo | 2 | ** ModulesInfo |
3 | ** | 3 | ** |
4 | ** Display Modules information | 4 | ** Display Modules information |
5 | ** | 5 | ** |
6 | ** Copyright (C) 2002, Michael Lauer | 6 | ** Copyright (C) 2002, Michael Lauer |
7 | ** mickey@tm.informatik.uni-frankfurt.de | 7 | ** mickey@tm.informatik.uni-frankfurt.de |
8 | ** http://www.Vanille.de | 8 | ** http://www.Vanille.de |
9 | ** | 9 | ** |
10 | ** Based on ProcessInfo by Dan Williams <williamsdr@acm.org> | 10 | ** Based on ProcessInfo by Dan Williams <williamsdr@acm.org> |
11 | ** | 11 | ** |
12 | ** This file may be distributed and/or modified under the terms of the | 12 | ** This file may be distributed and/or modified under the terms of the |
13 | ** GNU General Public License version 2 as published by the Free Software | 13 | ** GNU General Public License version 2 as published by the Free Software |
14 | ** Foundation and appearing in the file LICENSE.GPL included in the | 14 | ** Foundation and appearing in the file LICENSE.GPL included in the |
15 | ** packaging of this file. | 15 | ** packaging of this file. |
16 | ** | 16 | ** |
17 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 17 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
18 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 18 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
19 | ** | 19 | ** |
20 | **********************************************************************/ | 20 | **********************************************************************/ |
21 | 21 | ||
22 | #include <qpe/qpeapplication.h> | 22 | #include <qpe/qpeapplication.h> |
23 | 23 | ||
24 | #include <qcombobox.h> | ||
25 | #include <qfile.h> | 24 | #include <qfile.h> |
26 | #include <qheader.h> | ||
27 | #include <qlayout.h> | 25 | #include <qlayout.h> |
28 | #include <qlistview.h> | ||
29 | #include <qmessagebox.h> | 26 | #include <qmessagebox.h> |
30 | #include <qpushbutton.h> | ||
31 | #include <qstring.h> | ||
32 | #include <qtimer.h> | 27 | #include <qtimer.h> |
33 | #include <qwhatsthis.h> | 28 | #include <qwhatsthis.h> |
34 | 29 | ||
35 | #include "modulesinfo.h" | 30 | #include "modulesinfo.h" |
36 | #include "detail.h" | 31 | #include "detail.h" |
37 | 32 | ||
38 | ModulesInfo::ModulesInfo( QWidget* parent, const char* name, WFlags fl ) | 33 | ModulesInfo::ModulesInfo( QWidget* parent, const char* name, WFlags fl ) |
39 | : QWidget( parent, name, fl ) | 34 | : QWidget( parent, name, fl ) |
40 | { | 35 | { |
41 | QGridLayout *layout = new QGridLayout( this ); | 36 | QGridLayout *layout = new QGridLayout( this ); |
42 | layout->setSpacing( 4 ); | 37 | layout->setSpacing( 4 ); |
43 | layout->setMargin( 4 ); | 38 | layout->setMargin( 4 ); |
44 | 39 | ||
45 | ModulesView = new QListView( this ); | 40 | ModulesView = new QListView( this ); |
46 | int colnum = ModulesView->addColumn( tr( "Module" ) ); | 41 | int colnum = ModulesView->addColumn( tr( "Module" ) ); |
47 | colnum = ModulesView->addColumn( tr( "Size" ) ); | 42 | colnum = ModulesView->addColumn( tr( "Size" ) ); |
48 | ModulesView->setColumnAlignment( colnum, Qt::AlignRight ); | 43 | ModulesView->setColumnAlignment( colnum, Qt::AlignRight ); |
49 | colnum = ModulesView->addColumn( tr( "Use#" ) ); | 44 | colnum = ModulesView->addColumn( tr( "Use#" ) ); |
50 | ModulesView->setColumnAlignment( colnum, Qt::AlignRight ); | 45 | ModulesView->setColumnAlignment( colnum, Qt::AlignRight ); |
51 | colnum = ModulesView->addColumn( tr( "Used by" ) ); | 46 | colnum = ModulesView->addColumn( tr( "Used by" ) ); |
52 | ModulesView->setAllColumnsShowFocus( TRUE ); | 47 | ModulesView->setAllColumnsShowFocus( TRUE ); |
53 | layout->addMultiCellWidget( ModulesView, 0, 0, 0, 1 ); | 48 | layout->addMultiCellWidget( ModulesView, 0, 0, 0, 1 ); |
54 | QWhatsThis::add( ModulesView, tr( "This is a list of all the kernel modules currently loaded on this handheld device.\n\nClick and hold on a module to see additional information about the module, or to unload it." ) ); | 49 | QWhatsThis::add( ModulesView, tr( "This is a list of all the kernel modules currently loaded on this handheld device.\n\nClick and hold on a module to see additional information about the module, or to unload it." ) ); |
55 | 50 | ||
diff --git a/noncore/settings/sysinfo/processinfo.cpp b/noncore/settings/sysinfo/processinfo.cpp index 709158d..af0fe26 100644 --- a/noncore/settings/sysinfo/processinfo.cpp +++ b/noncore/settings/sysinfo/processinfo.cpp | |||
@@ -1,50 +1,47 @@ | |||
1 | /********************************************************************** | 1 | /********************************************************************** |
2 | ** ProcessInfo | 2 | ** ProcessInfo |
3 | ** | 3 | ** |
4 | ** Display process information | 4 | ** Display process information |
5 | ** | 5 | ** |
6 | ** Copyright (C) 2002, Dan Williams | 6 | ** Copyright (C) 2002, Dan Williams |
7 | ** williamsdr@acm.org | 7 | ** williamsdr@acm.org |
8 | ** http://draknor.net | 8 | ** http://draknor.net |
9 | ** | 9 | ** |
10 | ** This file may be distributed and/or modified under the terms of the | 10 | ** This file may be distributed and/or modified under the terms of the |
11 | ** GNU General Public License version 2 as published by the Free Software | 11 | ** GNU General Public License version 2 as published by the Free Software |
12 | ** Foundation and appearing in the file LICENSE.GPL included in the | 12 | ** Foundation and appearing in the file LICENSE.GPL included in the |
13 | ** packaging of this file. | 13 | ** packaging of this file. |
14 | ** | 14 | ** |
15 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 15 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
16 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 16 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
17 | ** | 17 | ** |
18 | **********************************************************************/ | 18 | **********************************************************************/ |
19 | 19 | ||
20 | #include <qpe/qpeapplication.h> | 20 | #include <qpe/qpeapplication.h> |
21 | 21 | ||
22 | #include <qdir.h> | 22 | #include <qdir.h> |
23 | #include <qfile.h> | ||
24 | #include <qheader.h> | ||
25 | #include <qlayout.h> | 23 | #include <qlayout.h> |
26 | #include <qlistview.h> | ||
27 | #include <qmessagebox.h> | 24 | #include <qmessagebox.h> |
28 | #include <qtimer.h> | 25 | #include <qtimer.h> |
29 | #include <qwhatsthis.h> | 26 | #include <qwhatsthis.h> |
30 | 27 | ||
31 | #include <sys/types.h> | 28 | #include <sys/types.h> |
32 | #include <signal.h> | 29 | #include <signal.h> |
33 | 30 | ||
34 | #include "processinfo.h" | 31 | #include "processinfo.h" |
35 | #include "detail.h" | 32 | #include "detail.h" |
36 | 33 | ||
37 | ProcessInfo::ProcessInfo( QWidget* parent, const char* name, WFlags fl ) | 34 | ProcessInfo::ProcessInfo( QWidget* parent, const char* name, WFlags fl ) |
38 | : QWidget( parent, name, fl ) | 35 | : QWidget( parent, name, fl ) |
39 | { | 36 | { |
40 | QGridLayout *layout = new QGridLayout( this ); | 37 | QGridLayout *layout = new QGridLayout( this ); |
41 | layout->setSpacing( 4 ); | 38 | layout->setSpacing( 4 ); |
42 | layout->setMargin( 4 ); | 39 | layout->setMargin( 4 ); |
43 | 40 | ||
44 | 41 | ||
45 | ProcessView = new QListView( this, "ProcessView" ); | 42 | ProcessView = new QListView( this, "ProcessView" ); |
46 | int colnum = ProcessView->addColumn( tr( "PID" ) ); | 43 | int colnum = ProcessView->addColumn( tr( "PID" ) ); |
47 | ProcessView->setColumnAlignment( colnum, Qt::AlignRight ); | 44 | ProcessView->setColumnAlignment( colnum, Qt::AlignRight ); |
48 | colnum = ProcessView->addColumn( tr( "Command" ),96 ); | 45 | colnum = ProcessView->addColumn( tr( "Command" ),96 ); |
49 | colnum = ProcessView->addColumn( tr( "Status" ) ); | 46 | colnum = ProcessView->addColumn( tr( "Status" ) ); |
50 | colnum = ProcessView->addColumn( tr( "Time" ) ); | 47 | colnum = ProcessView->addColumn( tr( "Time" ) ); |
diff --git a/noncore/settings/sysinfo/storage.cpp b/noncore/settings/sysinfo/storage.cpp index 4ef7122..fc583e3 100644 --- a/noncore/settings/sysinfo/storage.cpp +++ b/noncore/settings/sysinfo/storage.cpp | |||
@@ -3,49 +3,48 @@ | |||
3 | ** | 3 | ** |
4 | ** This file is part of Qtopia Environment. | 4 | ** This file is part of Qtopia Environment. |
5 | ** | 5 | ** |
6 | ** This file may be distributed and/or modified under the terms of the | 6 | ** This file may be distributed and/or modified under the terms of the |
7 | ** GNU General Public License version 2 as published by the Free Software | 7 | ** GNU General Public License version 2 as published by the Free Software |
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | 8 | ** Foundation and appearing in the file LICENSE.GPL included in the |
9 | ** packaging of this file. | 9 | ** packaging of this file. |
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 | // additions copyright 2002 by L.J. Potter | 20 | // additions copyright 2002 by L.J. Potter |
21 | 21 | ||
22 | #include <qpe/storage.h> | 22 | #include <qpe/storage.h> |
23 | 23 | ||
24 | #include <qlabel.h> | 24 | #include <qlabel.h> |
25 | #include <qlayout.h> | 25 | #include <qlayout.h> |
26 | #include <qscrollview.h> | 26 | #include <qscrollview.h> |
27 | #include <qtimer.h> | ||
28 | #include <qwhatsthis.h> | 27 | #include <qwhatsthis.h> |
29 | 28 | ||
30 | #include "graph.h" | 29 | #include "graph.h" |
31 | #include "storage.h" | 30 | #include "storage.h" |
32 | 31 | ||
33 | #include <stdio.h> | 32 | #include <stdio.h> |
34 | #if defined(_OS_LINUX_) || defined(Q_OS_LINUX) | 33 | #if defined(_OS_LINUX_) || defined(Q_OS_LINUX) |
35 | #include <sys/vfs.h> | 34 | #include <sys/vfs.h> |
36 | #include <mntent.h> | 35 | #include <mntent.h> |
37 | #endif | 36 | #endif |
38 | 37 | ||
39 | FileSysInfo::FileSysInfo( QWidget *parent, const char *name ) | 38 | FileSysInfo::FileSysInfo( QWidget *parent, const char *name ) |
40 | : QWidget( parent, name ) | 39 | : QWidget( parent, name ) |
41 | { | 40 | { |
42 | QVBoxLayout *tmpvb = new QVBoxLayout( this ); | 41 | QVBoxLayout *tmpvb = new QVBoxLayout( this ); |
43 | QScrollView *sv = new QScrollView( this ); | 42 | QScrollView *sv = new QScrollView( this ); |
44 | tmpvb->addWidget( sv, 0, 0 ); | 43 | tmpvb->addWidget( sv, 0, 0 ); |
45 | sv->setResizePolicy( QScrollView::AutoOneFit ); | 44 | sv->setResizePolicy( QScrollView::AutoOneFit ); |
46 | sv->setFrameStyle( QFrame::NoFrame ); | 45 | sv->setFrameStyle( QFrame::NoFrame ); |
47 | container = new QWidget( sv->viewport() ); | 46 | container = new QWidget( sv->viewport() ); |
48 | sv->addChild( container ); | 47 | sv->addChild( container ); |
49 | vb = 0x0; | 48 | vb = 0x0; |
50 | 49 | ||
51 | storage = new StorageInfo( this ); | 50 | storage = new StorageInfo( this ); |
diff --git a/noncore/settings/sysinfo/versioninfo.cpp b/noncore/settings/sysinfo/versioninfo.cpp index 1984823..c44a05a 100644 --- a/noncore/settings/sysinfo/versioninfo.cpp +++ b/noncore/settings/sysinfo/versioninfo.cpp | |||
@@ -1,93 +1,89 @@ | |||
1 | /********************************************************************** | 1 | /********************************************************************** |
2 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. | 2 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. |
3 | ** | 3 | ** |
4 | ** This file is part of Qtopia Environment. | 4 | ** This file is part of Qtopia Environment. |
5 | ** | 5 | ** |
6 | ** This file may be distributed and/or modified under the terms of the | 6 | ** This file may be distributed and/or modified under the terms of the |
7 | ** GNU General Public License version 2 as published by the Free Software | 7 | ** GNU General Public License version 2 as published by the Free Software |
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | 8 | ** Foundation and appearing in the file LICENSE.GPL included in the |
9 | ** packaging of this file. | 9 | ** packaging of this file. |
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 | #include <qpe/resource.h> | 21 | #include <qpe/resource.h> |
22 | #include <qpe/version.h> | 22 | #include <qpe/version.h> |
23 | 23 | ||
24 | #include <qfile.h> | 24 | #include <qfile.h> |
25 | #include <qimage.h> | ||
26 | #include <qlabel.h> | 25 | #include <qlabel.h> |
27 | #include <qlayout.h> | 26 | #include <qlayout.h> |
28 | #include <qpixmap.h> | ||
29 | #include <qpainter.h> | ||
30 | #include <qscrollview.h> | 27 | #include <qscrollview.h> |
31 | #include <qtextstream.h> | 28 | #include <qtextstream.h> |
32 | #include <qtimer.h> | ||
33 | #include <qwhatsthis.h> | 29 | #include <qwhatsthis.h> |
34 | 30 | ||
35 | #include "versioninfo.h" | 31 | #include "versioninfo.h" |
36 | 32 | ||
37 | #include <opie/odevice.h> | 33 | #include <opie/odevice.h> |
38 | 34 | ||
39 | using namespace Opie; | 35 | using namespace Opie; |
40 | 36 | ||
41 | VersionInfo::VersionInfo( QWidget *parent, const char *name, WFlags f ) | 37 | VersionInfo::VersionInfo( QWidget *parent, const char *name, WFlags f ) |
42 | : QWidget( parent, name, f ) | 38 | : QWidget( parent, name, f ) |
43 | { | 39 | { |
44 | setMinimumSize( 200, 150 ); | 40 | setMinimumSize( 200, 150 ); |
45 | 41 | ||
46 | QVBoxLayout *tmpvb = new QVBoxLayout( this ); | 42 | QVBoxLayout *tmpvb = new QVBoxLayout( this ); |
47 | QScrollView *sv = new QScrollView( this ); | 43 | QScrollView *sv = new QScrollView( this ); |
48 | tmpvb->addWidget( sv, 0, 0 ); | 44 | tmpvb->addWidget( sv, 0, 0 ); |
49 | sv->setResizePolicy( QScrollView::AutoOneFit ); | 45 | sv->setResizePolicy( QScrollView::AutoOneFit ); |
50 | sv->setFrameStyle( QFrame::NoFrame ); | 46 | sv->setFrameStyle( QFrame::NoFrame ); |
51 | QWidget *container = new QWidget( sv->viewport() ); | 47 | QWidget *container = new QWidget( sv->viewport() ); |
52 | sv->addChild( container ); | 48 | sv->addChild( container ); |
53 | 49 | ||
54 | QVBoxLayout *vb = new QVBoxLayout( container, 3 ); | 50 | QVBoxLayout *vb = new QVBoxLayout( container, 3 ); |
55 | 51 | ||
56 | QString kernelVersionString; | 52 | QString kernelVersionString; |
57 | QFile file( "/proc/version" ); | 53 | QFile file( "/proc/version" ); |
58 | if ( file.open( IO_ReadOnly ) ) | 54 | if ( file.open( IO_ReadOnly ) ) |
59 | { | 55 | { |
60 | QTextStream t( &file ); | 56 | QTextStream t( &file ); |
61 | QString v; | 57 | QStringList strList; |
62 | t >> v; t >> v; t >> v; | 58 | |
63 | v = v.left( 20 ); | 59 | strList = QStringList::split( " " , t.read(), false ); |
60 | |||
64 | kernelVersionString = "<qt>" + tr( "<b>Linux Kernel</b><p>Version: " ); | 61 | kernelVersionString = "<qt>" + tr( "<b>Linux Kernel</b><p>Version: " ); |
65 | kernelVersionString.append( v ); | 62 | kernelVersionString.append( strList[2] ); |
66 | kernelVersionString.append( "<br>" ); | 63 | kernelVersionString.append( "<br>" ); |
67 | t >> v; | ||
68 | kernelVersionString.append( tr( "Compiled by: " ) ); | 64 | kernelVersionString.append( tr( "Compiled by: " ) ); |
69 | kernelVersionString.append( v ); | 65 | kernelVersionString.append( strList[3] ); |
70 | kernelVersionString.append("</qt>"); | 66 | kernelVersionString.append("</qt>"); |
71 | file.close(); | 67 | file.close(); |
72 | } | 68 | } |
73 | 69 | ||
74 | QString palmtopVersionString = "<qt>" + tr( "<b>Opie</b><p>Version: " ); | 70 | QString palmtopVersionString = "<qt>" + tr( "<b>Opie</b><p>Version: " ); |
75 | palmtopVersionString.append( QPE_VERSION ); | 71 | palmtopVersionString.append( QPE_VERSION ); |
76 | palmtopVersionString.append( "<br>" ); | 72 | palmtopVersionString.append( "<br>" ); |
77 | #ifdef QPE_VENDOR | 73 | #ifdef QPE_VENDOR |
78 | QString builder = QPE_VENDOR; | 74 | QString builder = QPE_VENDOR; |
79 | #else | 75 | #else |
80 | QString builder = "Unknown"; | 76 | QString builder = "Unknown"; |
81 | #endif | 77 | #endif |
82 | palmtopVersionString.append( tr( "Compiled by: " ) ); | 78 | palmtopVersionString.append( tr( "Compiled by: " ) ); |
83 | palmtopVersionString.append( builder ); | 79 | palmtopVersionString.append( builder ); |
84 | palmtopVersionString.append( "<br>" ); | 80 | palmtopVersionString.append( "<br>" ); |
85 | palmtopVersionString.append( tr( "Built on: " ) ); | 81 | palmtopVersionString.append( tr( "Built on: " ) ); |
86 | palmtopVersionString.append( __DATE__ ); | 82 | palmtopVersionString.append( __DATE__ ); |
87 | palmtopVersionString.append( "</qt>" ); | 83 | palmtopVersionString.append( "</qt>" ); |
88 | 84 | ||
89 | QHBoxLayout *hb1 = new QHBoxLayout( vb ); | 85 | QHBoxLayout *hb1 = new QHBoxLayout( vb ); |
90 | hb1->setSpacing( 2 ); | 86 | hb1->setSpacing( 2 ); |
91 | 87 | ||
92 | QLabel *palmtopLogo = new QLabel( container ); | 88 | QLabel *palmtopLogo = new QLabel( container ); |
93 | QImage logo1 = Resource::loadImage( "logo/opielogo" ); | 89 | QImage logo1 = Resource::loadImage( "logo/opielogo" ); |