summaryrefslogtreecommitdiff
authorchicken <chicken>2004-05-20 13:50:03 (UTC)
committer chicken <chicken>2004-05-20 13:50:03 (UTC)
commit52164e57923870cb38030f2d2af2ef04877c35fa (patch) (unidiff)
tree1271e6c36ad162d5e03b306a3e9fece464db9ff2
parent47245723b724beb24183aa32b047d77f3469b7df (diff)
downloadopie-52164e57923870cb38030f2d2af2ef04877c35fa.zip
opie-52164e57923870cb38030f2d2af2ef04877c35fa.tar.gz
opie-52164e57923870cb38030f2d2af2ef04877c35fa.tar.bz2
jornada 56x picture for opie sysinfo
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/sysinfo/versioninfo.cpp2
-rw-r--r--pics/sysinfo/jornada56x.pngbin0 -> 29154 bytes
2 files changed, 2 insertions, 0 deletions
diff --git a/noncore/settings/sysinfo/versioninfo.cpp b/noncore/settings/sysinfo/versioninfo.cpp
index 6764aa6..1b811df 100644
--- a/noncore/settings/sysinfo/versioninfo.cpp
+++ b/noncore/settings/sysinfo/versioninfo.cpp
@@ -7,166 +7,168 @@
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
36using namespace Opie::Core; 36using namespace Opie::Core;
37 37
38VersionInfo::VersionInfo( QWidget *parent, const char *name, WFlags f ) 38VersionInfo::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->setFrameStyle( QFrame::NoFrame ); 47 sv->setFrameStyle( QFrame::NoFrame );
48 QWidget *container = new QWidget( sv->viewport() ); 48 QWidget *container = new QWidget( sv->viewport() );
49 sv->addChild( container ); 49 sv->addChild( container );
50 50
51 QVBoxLayout *vb = new QVBoxLayout( container, 3 ); 51 QVBoxLayout *vb = new QVBoxLayout( container, 3 );
52 52
53 QString kernelVersionString; 53 QString kernelVersionString;
54 QFile file( "/proc/version" ); 54 QFile file( "/proc/version" );
55 if ( file.open( IO_ReadOnly ) ) 55 if ( file.open( IO_ReadOnly ) )
56 { 56 {
57 QTextStream t( &file ); 57 QTextStream t( &file );
58 QStringList strList; 58 QStringList strList;
59 59
60 strList = QStringList::split( " " , t.read(), false ); 60 strList = QStringList::split( " " , t.read(), false );
61 61
62 kernelVersionString = "<qt>" + tr( "<b>Linux Kernel</b><p>Version: " ); 62 kernelVersionString = "<qt>" + tr( "<b>Linux Kernel</b><p>Version: " );
63 kernelVersionString.append( strList[2] ); 63 kernelVersionString.append( strList[2] );
64 kernelVersionString.append( "<br>" ); 64 kernelVersionString.append( "<br>" );
65 kernelVersionString.append( tr( "Compiled by: " ) ); 65 kernelVersionString.append( tr( "Compiled by: " ) );
66 kernelVersionString.append( strList[3] ); 66 kernelVersionString.append( strList[3] );
67 kernelVersionString.append("</qt>"); 67 kernelVersionString.append("</qt>");
68 file.close(); 68 file.close();
69 } 69 }
70 70
71 QString palmtopVersionString = "<qt>" + tr( "<b>Opie</b><p>Version: " ); 71 QString palmtopVersionString = "<qt>" + tr( "<b>Opie</b><p>Version: " );
72 palmtopVersionString.append( QPE_VERSION ); 72 palmtopVersionString.append( QPE_VERSION );
73 palmtopVersionString.append( "<br>" ); 73 palmtopVersionString.append( "<br>" );
74#ifdef QPE_VENDOR 74#ifdef QPE_VENDOR
75 QString builder = QPE_VENDOR; 75 QString builder = QPE_VENDOR;
76#else 76#else
77 QString builder = "Unknown"; 77 QString builder = "Unknown";
78#endif 78#endif
79 palmtopVersionString.append( tr( "Compiled by: " ) ); 79 palmtopVersionString.append( tr( "Compiled by: " ) );
80 palmtopVersionString.append( builder ); 80 palmtopVersionString.append( builder );
81 palmtopVersionString.append( "<br>" ); 81 palmtopVersionString.append( "<br>" );
82 palmtopVersionString.append( tr( "Built on: " ) ); 82 palmtopVersionString.append( tr( "Built on: " ) );
83 palmtopVersionString.append( __DATE__ ); 83 palmtopVersionString.append( __DATE__ );
84 palmtopVersionString.append( "</qt>" ); 84 palmtopVersionString.append( "</qt>" );
85 85
86 QHBoxLayout *hb1 = new QHBoxLayout( vb ); 86 QHBoxLayout *hb1 = new QHBoxLayout( vb );
87 hb1->setSpacing( 2 ); 87 hb1->setSpacing( 2 );
88 88
89 QLabel *palmtopLogo = new QLabel( container ); 89 QLabel *palmtopLogo = new QLabel( container );
90 QImage logo1 = Resource::loadImage( "logo/opielogo" ); 90 QImage logo1 = Resource::loadImage( "logo/opielogo" );
91 logo1 = logo1.smoothScale( 50, 55 ); 91 logo1 = logo1.smoothScale( 50, 55 );
92 QPixmap logo1Pixmap; 92 QPixmap logo1Pixmap;
93 logo1Pixmap.convertFromImage( logo1 ); 93 logo1Pixmap.convertFromImage( logo1 );
94 palmtopLogo->setPixmap( logo1Pixmap ); 94 palmtopLogo->setPixmap( logo1Pixmap );
95 palmtopLogo->setFixedSize( 60, 60 ); 95 palmtopLogo->setFixedSize( 60, 60 );
96 hb1->addWidget( palmtopLogo, 0, Qt::AlignTop + Qt::AlignLeft ); 96 hb1->addWidget( palmtopLogo, 0, Qt::AlignTop + Qt::AlignLeft );
97 97
98 QLabel *palmtopVersion = new QLabel( container ); 98 QLabel *palmtopVersion = new QLabel( container );
99 palmtopVersion->setText( palmtopVersionString ); 99 palmtopVersion->setText( palmtopVersionString );
100 hb1->addWidget( palmtopVersion, 1, Qt::AlignTop + Qt::AlignLeft ); 100 hb1->addWidget( palmtopVersion, 1, Qt::AlignTop + Qt::AlignLeft );
101 101
102 102
103 QHBoxLayout *hb2 = new QHBoxLayout( vb ); 103 QHBoxLayout *hb2 = new QHBoxLayout( vb );
104 hb1->setSpacing( 2 ); 104 hb1->setSpacing( 2 );
105 105
106 QLabel *linuxLogo = new QLabel( container ); 106 QLabel *linuxLogo = new QLabel( container );
107 QImage logo2 = Resource::loadImage( "logo/tux-logo" ); 107 QImage logo2 = Resource::loadImage( "logo/tux-logo" );
108 logo2 = logo2.smoothScale( 55, 60 ); 108 logo2 = logo2.smoothScale( 55, 60 );
109 QPixmap logo2Pixmap; 109 QPixmap logo2Pixmap;
110 logo2Pixmap.convertFromImage( logo2 ); 110 logo2Pixmap.convertFromImage( logo2 );
111 linuxLogo->setPixmap( logo2Pixmap ); 111 linuxLogo->setPixmap( logo2Pixmap );
112 linuxLogo->setFixedSize( 60, 60 ); 112 linuxLogo->setFixedSize( 60, 60 );
113 hb2->addWidget( linuxLogo, 0, Qt::AlignTop + Qt::AlignLeft ); 113 hb2->addWidget( linuxLogo, 0, Qt::AlignTop + Qt::AlignLeft );
114 114
115 QLabel *kernelVersion = new QLabel( container ); 115 QLabel *kernelVersion = new QLabel( container );
116 kernelVersion->setText( kernelVersionString ); 116 kernelVersion->setText( kernelVersionString );
117 hb2->addWidget( kernelVersion, 1, Qt::AlignTop + Qt::AlignLeft ); 117 hb2->addWidget( kernelVersion, 1, Qt::AlignTop + Qt::AlignLeft );
118 118
119 119
120 QHBoxLayout *hb3 = new QHBoxLayout( vb ); 120 QHBoxLayout *hb3 = new QHBoxLayout( vb );
121 hb3->setSpacing( 2 ); 121 hb3->setSpacing( 2 );
122 122
123 QLabel *palmtopLogo3 = new QLabel( container ); 123 QLabel *palmtopLogo3 = new QLabel( container );
124 124
125 OModel model = ODevice::inst()->model(); 125 OModel model = ODevice::inst()->model();
126 QString modelPixmap = "sysinfo/"; 126 QString modelPixmap = "sysinfo/";
127 if ( model == Model_Zaurus_SLC7x0 ) 127 if ( model == Model_Zaurus_SLC7x0 )
128 modelPixmap += "zaurusc700"; 128 modelPixmap += "zaurusc700";
129 else if ( model >= Model_Zaurus_SL5000 && model <= Model_Zaurus_SLB600 ) 129 else if ( model >= Model_Zaurus_SL5000 && model <= Model_Zaurus_SLB600 )
130 modelPixmap += "zaurus5500"; 130 modelPixmap += "zaurus5500";
131 else if ( model >= Model_iPAQ_H31xx && model <= Model_iPAQ_H5xxx ) 131 else if ( model >= Model_iPAQ_H31xx && model <= Model_iPAQ_H5xxx )
132 modelPixmap += "ipaq3600"; 132 modelPixmap += "ipaq3600";
133 else if ( model >= Model_SIMpad_CL4 && model <= Model_SIMpad_TSinus ) 133 else if ( model >= Model_SIMpad_CL4 && model <= Model_SIMpad_TSinus )
134 modelPixmap += "simpad"; 134 modelPixmap += "simpad";
135 else if ( model == Model_Jornada_56x )
136 modelPixmap += "jornada56x";
135 else 137 else
136 modelPixmap += "pda"; 138 modelPixmap += "pda";
137 139
138 QImage logo3 = Resource::loadImage( modelPixmap ); 140 QImage logo3 = Resource::loadImage( modelPixmap );
139 141
140 int width = logo3.width(); 142 int width = logo3.width();
141 int height = logo3.height(); 143 int height = logo3.height();
142 float aspect = float( height ) / width; 144 float aspect = float( height ) / width;
143 logo3 = logo3.smoothScale( 50, 50.0 * aspect ); 145 logo3 = logo3.smoothScale( 50, 50.0 * aspect );
144 146
145 QPixmap logo3Pixmap; 147 QPixmap logo3Pixmap;
146 logo3Pixmap.convertFromImage( logo3 ); 148 logo3Pixmap.convertFromImage( logo3 );
147 palmtopLogo3->setPixmap( logo3Pixmap ); 149 palmtopLogo3->setPixmap( logo3Pixmap );
148 palmtopLogo3->setFixedSize( 60, 100 ); 150 palmtopLogo3->setFixedSize( 60, 100 );
149 hb3->addWidget( palmtopLogo3, 0, Qt::AlignTop + Qt::AlignLeft ); 151 hb3->addWidget( palmtopLogo3, 0, Qt::AlignTop + Qt::AlignLeft );
150 152
151 QString systemString = "<qt><b>"; 153 QString systemString = "<qt><b>";
152 systemString.append( ODevice::inst()->systemString() ); 154 systemString.append( ODevice::inst()->systemString() );
153 systemString.append( "</b>" ); 155 systemString.append( "</b>" );
154 systemString.append( tr( "<p>Version: " ) ); 156 systemString.append( tr( "<p>Version: " ) );
155 systemString.append( ODevice::inst()->systemVersionString() ); 157 systemString.append( ODevice::inst()->systemVersionString() );
156 systemString.append( tr( "<br>Model: " ) ); 158 systemString.append( tr( "<br>Model: " ) );
157 systemString.append( ODevice::inst()->modelString() ); 159 systemString.append( ODevice::inst()->modelString() );
158 systemString.append( tr( "<br>Vendor: " ) ); 160 systemString.append( tr( "<br>Vendor: " ) );
159 systemString.append( ODevice::inst()->vendorString() ); 161 systemString.append( ODevice::inst()->vendorString() );
160 systemString.append("</qt>"); 162 systemString.append("</qt>");
161 163
162 QLabel *systemVersion = new QLabel( container ); 164 QLabel *systemVersion = new QLabel( container );
163 systemVersion->setText( systemString ); 165 systemVersion->setText( systemString );
164 hb3->addWidget( systemVersion, 1, Qt::AlignTop + Qt::AlignLeft ); 166 hb3->addWidget( systemVersion, 1, Qt::AlignTop + Qt::AlignLeft );
165 167
166 QWhatsThis::add( this, tr( "This page shows the current versions of Opie, the Linux kernel and distribution running on this handheld device." ) ); 168 QWhatsThis::add( this, tr( "This page shows the current versions of Opie, the Linux kernel and distribution running on this handheld device." ) );
167} 169}
168 170
169VersionInfo::~VersionInfo() 171VersionInfo::~VersionInfo()
170{ 172{
171} 173}
172 174
diff --git a/pics/sysinfo/jornada56x.png b/pics/sysinfo/jornada56x.png
new file mode 100644
index 0000000..e56f630
--- a/dev/null
+++ b/pics/sysinfo/jornada56x.png
Binary files differ