summaryrefslogtreecommitdiff
authormickeyl <mickeyl>2003-12-03 15:59:43 (UTC)
committer mickeyl <mickeyl>2003-12-03 15:59:43 (UTC)
commit390bda85524345791782317d559fea1d004c5306 (patch) (unidiff)
tree65b49c4fef459fa12882cbc891414352dd5731c6
parenta828d719deff107cb8bfa44885f67a05f5d4ecd6 (diff)
downloadopie-390bda85524345791782317d559fea1d004c5306.zip
opie-390bda85524345791782317d559fea1d004c5306.tar.gz
opie-390bda85524345791782317d559fea1d004c5306.tar.bz2
beautify the sysinfo version tab a bit
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/sysinfo/versioninfo.cpp67
-rw-r--r--pics/sysinfo/ipaq3600.pngbin0 -> 63014 bytes
-rw-r--r--pics/sysinfo/mounticon.pngbin0 -> 719 bytes
-rw-r--r--pics/sysinfo/pda.pngbin4448 -> 14000 bytes
-rw-r--r--pics/sysinfo/simpad.pngbin0 -> 6726 bytes
-rw-r--r--pics/sysinfo/zaurus5500.pngbin0 -> 26255 bytes
-rw-r--r--pics/sysinfo/zaurusc700.pngbin0 -> 47985 bytes
7 files changed, 43 insertions, 24 deletions
diff --git a/noncore/settings/sysinfo/versioninfo.cpp b/noncore/settings/sysinfo/versioninfo.cpp
index be24baa..b3462f5 100644
--- a/noncore/settings/sysinfo/versioninfo.cpp
+++ b/noncore/settings/sysinfo/versioninfo.cpp
@@ -50,41 +50,41 @@ VersionInfo::VersionInfo( QWidget *parent, const char *name, WFlags f )
50 sv->setFrameStyle( QFrame::NoFrame ); 50 sv->setFrameStyle( QFrame::NoFrame );
51 QWidget *container = new QWidget( sv->viewport() ); 51 QWidget *container = new QWidget( sv->viewport() );
52 sv->addChild( container ); 52 sv->addChild( container );
53 53
54 QVBoxLayout *vb = new QVBoxLayout( container, 4 ); 54 QVBoxLayout *vb = new QVBoxLayout( container, 4 );
55 55
56 QString kernelVersionString; 56 QString kernelVersionString;
57 QFile file( "/proc/version" ); 57 QFile file( "/proc/version" );
58 if ( file.open( IO_ReadOnly ) ) { 58 if ( file.open( IO_ReadOnly ) )
59 QTextStream t( &file ); 59 {
60 QString v; 60 QTextStream t( &file );
61 t >> v; t >> v; t >> v; 61 QString v;
62 v = v.left( 20 ); 62 t >> v; t >> v; t >> v;
63 kernelVersionString = "<qt>"+tr( "<b>Linux Kernel</b><p>Version: " ); 63 v = v.left( 20 );
64 kernelVersionString.append( v ); 64 kernelVersionString = "<qt>" + tr( "<b>Linux Kernel</b><p>Version: " );
65 kernelVersionString.append( "<p>" ); 65 kernelVersionString.append( v );
66 t >> v; 66 kernelVersionString.append( "<br>" );
67 kernelVersionString.append( tr( "Compiled by: " ) ); 67 t >> v;
68 kernelVersionString.append( v ); 68 kernelVersionString.append( tr( "Compiled by: " ) );
69 kernelVersionString.append("</qt>"); 69 kernelVersionString.append( v );
70 file.close(); 70 kernelVersionString.append("</qt>");
71 file.close();
71 } 72 }
72 73
73 QString palmtopVersionString = tr( "<b>Opie</b><p>Version: " ); 74 QString palmtopVersionString = "<qt>" + tr( "<b>Opie</b><p>Version: " );
74 palmtopVersionString.append( QPE_VERSION ); 75 palmtopVersionString.append( QPE_VERSION );
75 palmtopVersionString.append( "<p>" ); 76 palmtopVersionString.append( "<br>" );
76#ifdef QPE_VENDOR 77#ifdef QPE_VENDOR
77 QString builder = QPE_VENDOR; 78 QString builder = QPE_VENDOR;
78#else 79#else
79 QString builder = "Unknown"; 80 QString builder = "Unknown";
80#endif 81#endif
81 palmtopVersionString.append( "<qt>"+ tr( "Compiled by: " ) ); 82 palmtopVersionString.append( tr( "Compiled by: " ) );
82 palmtopVersionString.append( builder ); 83 palmtopVersionString.append( builder );
83 palmtopVersionString.append( "<p>" ); 84 palmtopVersionString.append( "<br>" );
84 palmtopVersionString.append( tr( "Built on: " ) ); 85 palmtopVersionString.append( tr( "Built on: " ) );
85 palmtopVersionString.append( __DATE__ ); 86 palmtopVersionString.append( __DATE__ );
86 palmtopVersionString.append( "</qt>" ); 87 palmtopVersionString.append( "</qt>" );
87
88 88
89 QHBoxLayout *hb1 = new QHBoxLayout( vb ); 89 QHBoxLayout *hb1 = new QHBoxLayout( vb );
90 hb1->setSpacing( 2 ); 90 hb1->setSpacing( 2 );
@@ -124,12 +124,31 @@ VersionInfo::VersionInfo( QWidget *parent, const char *name, WFlags f )
124 hb3->setSpacing( 2 ); 124 hb3->setSpacing( 2 );
125 125
126 QLabel *palmtopLogo3 = new QLabel( container ); 126 QLabel *palmtopLogo3 = new QLabel( container );
127 QImage logo3 = Resource::loadImage( "sysinfo/pda" ); 127
128 logo3 = logo3.smoothScale( 50, 55 ); 128 OModel model = ODevice::inst()->model();
129 QString modelPixmap = "sysinfo/";
130 if ( model == Model_Zaurus_SLC7x0 )
131 modelPixmap += "zaurusc700";
132 else if ( model >= Model_Zaurus_SLC7x0 && model <= Model_Zaurus_SLC7x0 )
133 modelPixmap += "zaurus5500";
134 else if ( model >= Model_iPAQ_H31xx && model <= Model_iPAQ_H5xxx )
135 modelPixmap += "ipaq3600";
136 else if ( model >= Model_SIMpad_CL4 && model <= Model_SIMpad_TSinus )
137 modelPixmap += "simpad";
138 else
139 modelPixmap += "pda";
140
141 QImage logo3 = Resource::loadImage( modelPixmap );
142
143 int width = logo3.width();
144 int height = logo3.height();
145 float aspect = float( height ) / width;
146 logo3 = logo3.smoothScale( 50, 50.0 * aspect );
147
129 QPixmap logo3Pixmap; 148 QPixmap logo3Pixmap;
130 logo3Pixmap.convertFromImage( logo3 ); 149 logo3Pixmap.convertFromImage( logo3 );
131 palmtopLogo3->setPixmap( logo3Pixmap ); 150 palmtopLogo3->setPixmap( logo3Pixmap );
132 palmtopLogo3->setFixedSize( 60, 60 ); 151 palmtopLogo3->setFixedSize( 60, 100 );
133 hb3->addWidget( palmtopLogo3, 0, Qt::AlignTop + Qt::AlignLeft ); 152 hb3->addWidget( palmtopLogo3, 0, Qt::AlignTop + Qt::AlignLeft );
134 153
135 QString systemString = "<qt><b>"; 154 QString systemString = "<qt><b>";
@@ -137,9 +156,9 @@ VersionInfo::VersionInfo( QWidget *parent, const char *name, WFlags f )
137 systemString.append( "</b>" ); 156 systemString.append( "</b>" );
138 systemString.append( tr( "<p>Version: " ) ); 157 systemString.append( tr( "<p>Version: " ) );
139 systemString.append( ODevice::inst()->systemVersionString() ); 158 systemString.append( ODevice::inst()->systemVersionString() );
140 systemString.append( tr( "<p>Model: " ) ); 159 systemString.append( tr( "<br>Model: " ) );
141 systemString.append( ODevice::inst()->modelString() ); 160 systemString.append( ODevice::inst()->modelString() );
142 systemString.append( tr( "<p>Vendor: " ) ); 161 systemString.append( tr( "<br>Vendor: " ) );
143 systemString.append( ODevice::inst()->vendorString() ); 162 systemString.append( ODevice::inst()->vendorString() );
144 systemString.append("</qt>"); 163 systemString.append("</qt>");
145 164
diff --git a/pics/sysinfo/ipaq3600.png b/pics/sysinfo/ipaq3600.png
new file mode 100644
index 0000000..47b9beb
--- a/dev/null
+++ b/pics/sysinfo/ipaq3600.png
Binary files differ
diff --git a/pics/sysinfo/mounticon.png b/pics/sysinfo/mounticon.png
new file mode 100644
index 0000000..1b73fd1
--- a/dev/null
+++ b/pics/sysinfo/mounticon.png
Binary files differ
diff --git a/pics/sysinfo/pda.png b/pics/sysinfo/pda.png
index a75579d..aae38bf 100644
--- a/pics/sysinfo/pda.png
+++ b/pics/sysinfo/pda.png
Binary files differ
diff --git a/pics/sysinfo/simpad.png b/pics/sysinfo/simpad.png
new file mode 100644
index 0000000..fd1eac8
--- a/dev/null
+++ b/pics/sysinfo/simpad.png
Binary files differ
diff --git a/pics/sysinfo/zaurus5500.png b/pics/sysinfo/zaurus5500.png
new file mode 100644
index 0000000..6f56b94
--- a/dev/null
+++ b/pics/sysinfo/zaurus5500.png
Binary files differ
diff --git a/pics/sysinfo/zaurusc700.png b/pics/sysinfo/zaurusc700.png
new file mode 100644
index 0000000..eb81114
--- a/dev/null
+++ b/pics/sysinfo/zaurusc700.png
Binary files differ