-rw-r--r-- | noncore/settings/sysinfo/sysinfo.pro | 2 | ||||
-rw-r--r-- | noncore/settings/sysinfo/versioninfo.cpp | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/noncore/settings/sysinfo/sysinfo.pro b/noncore/settings/sysinfo/sysinfo.pro index fc754d7..e1d6449 100644 --- a/noncore/settings/sysinfo/sysinfo.pro +++ b/noncore/settings/sysinfo/sysinfo.pro | |||
@@ -1,36 +1,36 @@ | |||
1 | CONFIG = qt warn_on quick-app | 1 | CONFIG = qt warn_on quick-app |
2 | HEADERS = \ | 2 | HEADERS = \ |
3 | memory.h \ | 3 | memory.h \ |
4 | graph.h \ | 4 | graph.h \ |
5 | load.h \ | 5 | load.h \ |
6 | storage.h \ | 6 | storage.h \ |
7 | processinfo.h \ | 7 | processinfo.h \ |
8 | modulesinfo.h \ | 8 | modulesinfo.h \ |
9 | detail.h \ | 9 | detail.h \ |
10 | contrib/dhry.h \ | 10 | contrib/dhry.h \ |
11 | benchmarkinfo.h \ | 11 | benchmarkinfo.h \ |
12 | sysloginfo.h \ | 12 | sysloginfo.h \ |
13 | versioninfo.h \ | 13 | versioninfo.h \ |
14 | sysinfo.h | 14 | sysinfo.h |
15 | SOURCES = main.cpp \ | 15 | SOURCES = main.cpp \ |
16 | memory.cpp \ | 16 | memory.cpp \ |
17 | graph.cpp \ | 17 | graph.cpp \ |
18 | load.cpp \ | 18 | load.cpp \ |
19 | storage.cpp \ | 19 | storage.cpp \ |
20 | processinfo.cpp \ | 20 | processinfo.cpp \ |
21 | modulesinfo.cpp \ | 21 | modulesinfo.cpp \ |
22 | detail.cpp \ | 22 | detail.cpp \ |
23 | contrib/dhry.c contrib/fft.c \ | 23 | contrib/dhry.c contrib/fft.c \ |
24 | benchmarkinfo.cpp \ | 24 | benchmarkinfo.cpp \ |
25 | sysloginfo.cpp \ | 25 | sysloginfo.cpp \ |
26 | versioninfo.cpp \ | 26 | versioninfo.cpp \ |
27 | sysinfo.cpp | 27 | sysinfo.cpp |
28 | 28 | ||
29 | INCLUDEPATH += $(OPIEDIR)/include | 29 | INCLUDEPATH += $(OPIEDIR)/include |
30 | DEPENDPATH += $(OPIEDIR)/include | 30 | DEPENDPATH += $(OPIEDIR)/include |
31 | LIBS += -lqpe -lopiecore2 -lopieui2 | 31 | LIBS += -lqpe -lopiecore2 -lopieui2 |
32 | DEFINES += UNIX | 32 | DEFINES += UNIX |
33 | TARGET = sysinfo | 33 | TARGET = sysinfo |
34 | VERSION = 1.2.1 | 34 | VERSION = 1.2.2 |
35 | 35 | ||
36 | include( $(OPIEDIR)/include.pro ) | 36 | include( $(OPIEDIR)/include.pro ) |
diff --git a/noncore/settings/sysinfo/versioninfo.cpp b/noncore/settings/sysinfo/versioninfo.cpp index 2111298..d8fd7fa 100644 --- a/noncore/settings/sysinfo/versioninfo.cpp +++ b/noncore/settings/sysinfo/versioninfo.cpp | |||
@@ -1,176 +1,176 @@ | |||
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 "versioninfo.h" | 21 | #include "versioninfo.h" |
22 | 22 | ||
23 | /* OPIE */ | 23 | /* OPIE */ |
24 | #include <opie2/odevice.h> | 24 | #include <opie2/odevice.h> |
25 | #include <qpe/resource.h> | 25 | #include <qpe/resource.h> |
26 | #include <qpe/version.h> | 26 | #include <qpe/version.h> |
27 | 27 | ||
28 | /* QT */ | 28 | /* QT */ |
29 | #include <qfile.h> | 29 | #include <qfile.h> |
30 | #include <qlabel.h> | 30 | #include <qlabel.h> |
31 | #include <qlayout.h> | 31 | #include <qlayout.h> |
32 | #include <qscrollview.h> | 32 | #include <qscrollview.h> |
33 | #include <qtextstream.h> | 33 | #include <qtextstream.h> |
34 | #include <qwhatsthis.h> | 34 | #include <qwhatsthis.h> |
35 | 35 | ||
36 | using namespace Opie::Core; | 36 | using namespace Opie::Core; |
37 | 37 | ||
38 | VersionInfo::VersionInfo( QWidget *parent, const char *name, WFlags f ) | 38 | VersionInfo::VersionInfo( QWidget *parent, const char *name, WFlags f ) |
39 | : QWidget( parent, name, f ) | 39 | : QWidget( parent, name, f ) |
40 | { | 40 | { |
41 | setMinimumSize( 200, 150 ); | 41 | setMinimumSize( 200, 150 ); |
42 | 42 | ||
43 | QVBoxLayout *tmpvb = new QVBoxLayout( this ); | 43 | QVBoxLayout *tmpvb = new QVBoxLayout( this ); |
44 | QScrollView *sv = new QScrollView( this ); | 44 | QScrollView *sv = new QScrollView( this ); |
45 | tmpvb->addWidget( sv, 0, 0 ); | 45 | tmpvb->addWidget( sv, 0, 0 ); |
46 | sv->setResizePolicy( QScrollView::AutoOneFit ); | 46 | sv->setResizePolicy( QScrollView::AutoOneFit ); |
47 | sv->setHScrollBarMode( QScrollView::AlwaysOff ); | 47 | sv->setHScrollBarMode( QScrollView::AlwaysOff ); |
48 | sv->setVScrollBarMode( QScrollView::AlwaysOff ); | 48 | sv->setVScrollBarMode( QScrollView::AlwaysOff ); |
49 | sv->setFrameStyle( QFrame::NoFrame ); | 49 | sv->setFrameStyle( QFrame::NoFrame ); |
50 | QWidget *container = new QWidget( sv->viewport() ); | 50 | QWidget *container = new QWidget( sv->viewport() ); |
51 | sv->addChild( container ); | 51 | sv->addChild( container ); |
52 | 52 | ||
53 | QVBoxLayout *vb = new QVBoxLayout( container, 3 ); | 53 | QVBoxLayout *vb = new QVBoxLayout( container, 3 ); |
54 | 54 | ||
55 | QString kernelVersionString; | 55 | QString kernelVersionString; |
56 | QFile file( "/proc/version" ); | 56 | QFile file( "/proc/version" ); |
57 | if ( file.open( IO_ReadOnly ) ) | 57 | if ( file.open( IO_ReadOnly ) ) |
58 | { | 58 | { |
59 | QTextStream t( &file ); | 59 | QTextStream t( &file ); |
60 | QStringList strList; | 60 | QStringList strList; |
61 | 61 | ||
62 | strList = QStringList::split( " " , t.read(), false ); | 62 | strList = QStringList::split( " " , t.read(), false ); |
63 | 63 | ||
64 | kernelVersionString = "<qt>" + tr( "<b>Linux Kernel</b><p>Version: " ); | 64 | kernelVersionString = "<qt>" + tr( "<b>Linux Kernel</b><p>Version: " ); |
65 | kernelVersionString.append( strList[2] ); | 65 | kernelVersionString.append( strList[2] ); |
66 | kernelVersionString.append( "<br>" ); | 66 | kernelVersionString.append( "<br>" ); |
67 | kernelVersionString.append( tr( "Compiled by: " ) ); | 67 | kernelVersionString.append( tr( "Compiled by: " ) ); |
68 | kernelVersionString.append( strList[3] ); | 68 | kernelVersionString.append( strList[3] ); |
69 | kernelVersionString.append("</qt>"); | 69 | kernelVersionString.append("</qt>"); |
70 | file.close(); | 70 | file.close(); |
71 | } | 71 | } |
72 | 72 | ||
73 | QString palmtopVersionString = "<qt>" + tr( "<b>Opie</b><p>Version: " ); | 73 | QString palmtopVersionString = "<qt>" + tr( "<b>Opie</b><p>Version: " ); |
74 | palmtopVersionString.append( QPE_VERSION ); | 74 | palmtopVersionString.append( QPE_VERSION ); |
75 | palmtopVersionString.append( "<br>" ); | 75 | palmtopVersionString.append( "<br>" ); |
76 | #ifdef QPE_VENDOR | 76 | #ifdef QPE_VENDOR |
77 | QString builder = QPE_VENDOR; | 77 | QString builder = QPE_VENDOR; |
78 | #else | 78 | #else |
79 | QString builder = "Unknown"; | 79 | QString builder = "Unknown"; |
80 | #endif | 80 | #endif |
81 | palmtopVersionString.append( tr( "Compiled by: " ) ); | 81 | palmtopVersionString.append( tr( "Built against Qt/E " ) ); |
82 | palmtopVersionString.append( builder ); | 82 | palmtopVersionString.append( QT_VERSION_STR ); |
83 | palmtopVersionString.append( "<br>" ); | 83 | palmtopVersionString.append( "<br>" ); |
84 | palmtopVersionString.append( tr( "Built on: " ) ); | 84 | palmtopVersionString.append( tr( "Built on: " ) ); |
85 | palmtopVersionString.append( __DATE__ ); | 85 | palmtopVersionString.append( __DATE__ ); |
86 | palmtopVersionString.append( "</qt>" ); | 86 | palmtopVersionString.append( "</qt>" ); |
87 | 87 | ||
88 | QHBoxLayout *hb1 = new QHBoxLayout( vb ); | 88 | QHBoxLayout *hb1 = new QHBoxLayout( vb ); |
89 | hb1->setSpacing( 2 ); | 89 | hb1->setSpacing( 2 ); |
90 | 90 | ||
91 | QLabel *palmtopLogo = new QLabel( container ); | 91 | QLabel *palmtopLogo = new QLabel( container ); |
92 | QImage logo1 = Resource::loadImage( "logo/opielogo" ); | 92 | QImage logo1 = Resource::loadImage( "logo/opielogo" ); |
93 | logo1 = logo1.smoothScale( 50, 55 ); | 93 | logo1 = logo1.smoothScale( 50, 55 ); |
94 | QPixmap logo1Pixmap; | 94 | QPixmap logo1Pixmap; |
95 | logo1Pixmap.convertFromImage( logo1 ); | 95 | logo1Pixmap.convertFromImage( logo1 ); |
96 | palmtopLogo->setPixmap( logo1Pixmap ); | 96 | palmtopLogo->setPixmap( logo1Pixmap ); |
97 | palmtopLogo->setFixedSize( 60, 60 ); | 97 | palmtopLogo->setFixedSize( 60, 60 ); |
98 | hb1->addWidget( palmtopLogo, 0, Qt::AlignTop + Qt::AlignLeft ); | 98 | hb1->addWidget( palmtopLogo, 0, Qt::AlignTop + Qt::AlignLeft ); |
99 | 99 | ||
100 | QLabel *palmtopVersion = new QLabel( container ); | 100 | QLabel *palmtopVersion = new QLabel( container ); |
101 | palmtopVersion->setText( palmtopVersionString ); | 101 | palmtopVersion->setText( palmtopVersionString ); |
102 | hb1->addWidget( palmtopVersion, 1, Qt::AlignTop + Qt::AlignLeft ); | 102 | hb1->addWidget( palmtopVersion, 1, Qt::AlignTop + Qt::AlignLeft ); |
103 | 103 | ||
104 | 104 | ||
105 | QHBoxLayout *hb2 = new QHBoxLayout( vb ); | 105 | QHBoxLayout *hb2 = new QHBoxLayout( vb ); |
106 | hb1->setSpacing( 2 ); | 106 | hb1->setSpacing( 2 ); |
107 | 107 | ||
108 | QLabel *linuxLogo = new QLabel( container ); | 108 | QLabel *linuxLogo = new QLabel( container ); |
109 | QImage logo2 = Resource::loadImage( "logo/tux-logo" ); | 109 | QImage logo2 = Resource::loadImage( "logo/tux-logo" ); |
110 | logo2 = logo2.smoothScale( 55, 60 ); | 110 | logo2 = logo2.smoothScale( 55, 60 ); |
111 | QPixmap logo2Pixmap; | 111 | QPixmap logo2Pixmap; |
112 | logo2Pixmap.convertFromImage( logo2 ); | 112 | logo2Pixmap.convertFromImage( logo2 ); |
113 | linuxLogo->setPixmap( logo2Pixmap ); | 113 | linuxLogo->setPixmap( logo2Pixmap ); |
114 | linuxLogo->setFixedSize( 60, 60 ); | 114 | linuxLogo->setFixedSize( 60, 60 ); |
115 | hb2->addWidget( linuxLogo, 0, Qt::AlignTop + Qt::AlignLeft ); | 115 | hb2->addWidget( linuxLogo, 0, Qt::AlignTop + Qt::AlignLeft ); |
116 | 116 | ||
117 | QLabel *kernelVersion = new QLabel( container ); | 117 | QLabel *kernelVersion = new QLabel( container ); |
118 | kernelVersion->setText( kernelVersionString ); | 118 | kernelVersion->setText( kernelVersionString ); |
119 | hb2->addWidget( kernelVersion, 1, Qt::AlignTop + Qt::AlignLeft ); | 119 | hb2->addWidget( kernelVersion, 1, Qt::AlignTop + Qt::AlignLeft ); |
120 | 120 | ||
121 | 121 | ||
122 | QHBoxLayout *hb3 = new QHBoxLayout( vb ); | 122 | QHBoxLayout *hb3 = new QHBoxLayout( vb ); |
123 | hb3->setSpacing( 2 ); | 123 | hb3->setSpacing( 2 ); |
124 | 124 | ||
125 | QLabel *palmtopLogo3 = new QLabel( container ); | 125 | QLabel *palmtopLogo3 = new QLabel( container ); |
126 | 126 | ||
127 | OModel model = ODevice::inst()->model(); | 127 | OModel model = ODevice::inst()->model(); |
128 | QString modelPixmap = "sysinfo/"; | 128 | QString modelPixmap = "sysinfo/"; |
129 | if ( model == Model_Zaurus_SLC7x0 ) | 129 | if ( model == Model_Zaurus_SLC7x0 ) |
130 | modelPixmap += "zaurusc700"; | 130 | modelPixmap += "zaurusc700"; |
131 | else if ( model >= Model_Zaurus_SL5000 && model <= Model_Zaurus_SLB600 ) | 131 | else if ( model >= Model_Zaurus_SL5000 && model <= Model_Zaurus_SLB600 ) |
132 | modelPixmap += "zaurus5500"; | 132 | modelPixmap += "zaurus5500"; |
133 | else if ( model >= Model_iPAQ_H31xx && model <= Model_iPAQ_H5xxx ) | 133 | else if ( model >= Model_iPAQ_H31xx && model <= Model_iPAQ_H5xxx ) |
134 | modelPixmap += "ipaq3600"; | 134 | modelPixmap += "ipaq3600"; |
135 | else if ( model >= Model_SIMpad_CL4 && model <= Model_SIMpad_TSinus ) | 135 | else if ( model >= Model_SIMpad_CL4 && model <= Model_SIMpad_TSinus ) |
136 | modelPixmap += "simpad"; | 136 | modelPixmap += "simpad"; |
137 | else if ( model == Model_Jornada_56x ) | 137 | else if ( model == Model_Jornada_56x ) |
138 | modelPixmap += "jornada56x"; | 138 | modelPixmap += "jornada56x"; |
139 | else | 139 | else |
140 | modelPixmap += "pda"; | 140 | modelPixmap += "pda"; |
141 | 141 | ||
142 | QImage logo3 = Resource::loadImage( modelPixmap ); | 142 | QImage logo3 = Resource::loadImage( modelPixmap ); |
143 | 143 | ||
144 | int width = logo3.width(); | 144 | int width = logo3.width(); |
145 | int height = logo3.height(); | 145 | int height = logo3.height(); |
146 | float aspect = float( height ) / width; | 146 | float aspect = float( height ) / width; |
147 | logo3 = logo3.smoothScale( 50, 50.0 * aspect ); | 147 | logo3 = logo3.smoothScale( 50, 50.0 * aspect ); |
148 | 148 | ||
149 | QPixmap logo3Pixmap; | 149 | QPixmap logo3Pixmap; |
150 | logo3Pixmap.convertFromImage( logo3 ); | 150 | logo3Pixmap.convertFromImage( logo3 ); |
151 | palmtopLogo3->setPixmap( logo3Pixmap ); | 151 | palmtopLogo3->setPixmap( logo3Pixmap ); |
152 | palmtopLogo3->setFixedSize( 60, 100 ); | 152 | palmtopLogo3->setFixedSize( 60, 100 ); |
153 | hb3->addWidget( palmtopLogo3, 0, Qt::AlignTop + Qt::AlignLeft ); | 153 | hb3->addWidget( palmtopLogo3, 0, Qt::AlignTop + Qt::AlignLeft ); |
154 | 154 | ||
155 | QString systemString = "<qt><b>"; | 155 | QString systemString = "<qt><b>"; |
156 | systemString.append( ODevice::inst()->systemString() ); | 156 | systemString.append( ODevice::inst()->systemString() ); |
157 | systemString.append( "</b>" ); | 157 | systemString.append( "</b>" ); |
158 | systemString.append( tr( "<p>Version: " ) ); | 158 | systemString.append( tr( "<p>Version: " ) ); |
159 | systemString.append( ODevice::inst()->systemVersionString() ); | 159 | systemString.append( ODevice::inst()->systemVersionString() ); |
160 | systemString.append( tr( "<br>Model: " ) ); | 160 | systemString.append( tr( "<br>Model: " ) ); |
161 | systemString.append( ODevice::inst()->modelString() ); | 161 | systemString.append( ODevice::inst()->modelString() ); |
162 | systemString.append( tr( "<br>Vendor: " ) ); | 162 | systemString.append( tr( "<br>Vendor: " ) ); |
163 | systemString.append( ODevice::inst()->vendorString() ); | 163 | systemString.append( ODevice::inst()->vendorString() ); |
164 | systemString.append("</qt>"); | 164 | systemString.append("</qt>"); |
165 | 165 | ||
166 | QLabel *systemVersion = new QLabel( container ); | 166 | QLabel *systemVersion = new QLabel( container ); |
167 | systemVersion->setText( systemString ); | 167 | systemVersion->setText( systemString ); |
168 | hb3->addWidget( systemVersion, 1, Qt::AlignTop + Qt::AlignLeft ); | 168 | hb3->addWidget( systemVersion, 1, Qt::AlignTop + Qt::AlignLeft ); |
169 | 169 | ||
170 | QWhatsThis::add( this, tr( "This page shows the current versions of Opie, the Linux kernel and distribution running on this handheld device." ) ); | 170 | QWhatsThis::add( this, tr( "This page shows the current versions of Opie, the Linux kernel and distribution running on this handheld device." ) ); |
171 | } | 171 | } |
172 | 172 | ||
173 | VersionInfo::~VersionInfo() | 173 | VersionInfo::~VersionInfo() |
174 | { | 174 | { |
175 | } | 175 | } |
176 | 176 | ||