summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/sysinfo/versioninfo.cpp19
-rw-r--r--pics/tux-logo.pngbin2272 -> 30257 bytes
2 files changed, 6 insertions, 13 deletions
diff --git a/noncore/settings/sysinfo/versioninfo.cpp b/noncore/settings/sysinfo/versioninfo.cpp
index 517029b..3a37086 100644
--- a/noncore/settings/sysinfo/versioninfo.cpp
+++ b/noncore/settings/sysinfo/versioninfo.cpp
@@ -28,82 +28,75 @@
28#include <qtimer.h> 28#include <qtimer.h>
29#include <qfile.h> 29#include <qfile.h>
30#include <qtextstream.h> 30#include <qtextstream.h>
31#include <qlayout.h> 31#include <qlayout.h>
32#include "versioninfo.h" 32#include "versioninfo.h"
33 33
34VersionInfo::VersionInfo( QWidget *parent, const char *name, WFlags f ) 34VersionInfo::VersionInfo( QWidget *parent, const char *name, WFlags f )
35 : QWidget( parent, name, f ) 35 : QWidget( parent, name, f )
36{ 36{
37 setMinimumSize( 200, 150 ); 37 setMinimumSize( 200, 150 );
38 38
39 QVBoxLayout *vb = new QVBoxLayout( this, 4 ); 39 QVBoxLayout *vb = new QVBoxLayout( this, 4 );
40 40
41 QString kernelVersionString; 41 QString kernelVersionString;
42 QFile file( "/proc/version" ); 42 QFile file( "/proc/version" );
43 if ( file.open( IO_ReadOnly ) ) { 43 if ( file.open( IO_ReadOnly ) ) {
44 QTextStream t( &file ); 44 QTextStream t( &file );
45 QString v; 45 QString v;
46 t >> v; t >> v; t >> v; 46 t >> v; t >> v; t >> v;
47 v = v.left( 20 ); 47 v = v.left( 20 );
48 kernelVersionString = tr( "<b>Linux Kernel</b><p>Version: " ) + v + "<p>"; 48 kernelVersionString = tr( "<b>Linux Kernel</b><p>Version: " ) + v + "<p>";
49 t >> v; 49 t >> v;
50 kernelVersionString += tr( "Compiled by: " ) + v; 50 kernelVersionString += tr( "Compiled by: " ) + v;
51 file.close(); 51 file.close();
52 } 52 }
53 53
54 QString palmtopVersionString; 54 QString palmtopVersionString;
55 palmtopVersionString = tr( "<b>Opie</b><p>Version: " ) + QPE_VERSION + "<p>"; 55 palmtopVersionString = tr( "<b>Opie</b><p>Version: " ) + QPE_VERSION + "<p>";
56#ifdef QPE_VENDOR 56#ifdef QPE_VENDOR
57 QString builder = QPE_VENDOR; 57 QString builder = QPE_VENDOR;
58#else 58#else
59 QString builder = "Unknown"; 59 QString builder = "Unknown";
60#endif 60#endif
61 palmtopVersionString += tr( "Compiled by: " ) + builder + "<p>"; 61 palmtopVersionString += tr( "Compiled by: " ) + builder + "<p>";
62 palmtopVersionString += tr( "Built on: " ) + __DATE__; 62 palmtopVersionString += tr( "Built on: " ) + __DATE__;
63 63
64 64
65 QHBoxLayout *hb1 = new QHBoxLayout( vb ); 65 QHBoxLayout *hb1 = new QHBoxLayout( vb );
66 hb1->setSpacing( 2 ); 66 hb1->setSpacing( 2 );
67 67
68 QLabel *palmtopLogo = new QLabel( this ); 68 QLabel *palmtopLogo = new QLabel( this );
69 QImage logo1 = Resource::loadImage( "launcher/opielogo" ); 69 QImage logo1 = Resource::loadImage( "launcher/opielogo" );
70 logo1 = logo1.smoothScale( 50, 55 ); 70 logo1 = logo1.smoothScale( 50, 55 );
71 QPixmap logo1Pixmap; 71 QPixmap logo1Pixmap;
72 logo1Pixmap.convertFromImage( logo1 ); 72 logo1Pixmap.convertFromImage( logo1 );
73 palmtopLogo->setPixmap( logo1Pixmap ); 73 palmtopLogo->setPixmap( logo1Pixmap );
74 palmtopLogo->setFixedSize( 60, 60 ); 74 palmtopLogo->setFixedSize( 60, 60 );
75 hb1->addWidget( palmtopLogo, 0, Qt::AlignTop + Qt::AlignLeft ); 75 hb1->addWidget( palmtopLogo, 0, Qt::AlignTop + Qt::AlignLeft );
76 76
77 QLabel *palmtopVersion = new QLabel( this ); 77 QLabel *palmtopVersion = new QLabel( this );
78 palmtopVersion->setText( palmtopVersionString ); 78 palmtopVersion->setText( palmtopVersionString );
79 hb1->addWidget( palmtopVersion, 1, Qt::AlignTop + Qt::AlignLeft ); 79 hb1->addWidget( palmtopVersion, 1, Qt::AlignTop + Qt::AlignLeft );
80 80
81 81
82 QHBoxLayout *hb2 = new QHBoxLayout( vb ); 82 QHBoxLayout *hb2 = new QHBoxLayout( vb );
83 hb1->setSpacing( 2 ); 83 hb1->setSpacing( 2 );
84
85 QLabel *linuxLogo = new QLabel( this );
86 84
87 // Need to do this extra qpainter code with this image becuase for some 85 QLabel *linuxLogo = new QLabel( this );
88 // reason it doesn't alpha belnd if directly converted to a pixmap
89 QPixmap logo2Pixmap( 60, 60 );
90 QColor bgColor = colorGroup().background();
91 QPainter painter( &logo2Pixmap );
92 painter.fillRect( QRect( 0, 0, 60, 60 ), QBrush( bgColor ) );
93 QImage logo2 = Resource::loadImage( "tux-logo" ); 86 QImage logo2 = Resource::loadImage( "tux-logo" );
94 logo2 = logo2.smoothScale( 40, 47 ); 87 logo2 = logo2.smoothScale( 55, 60 );
95 painter.drawImage( 0, 0, logo2 ); 88 QPixmap logo2Pixmap;
96 painter.end(); 89 logo2Pixmap.convertFromImage( logo2 );
97 linuxLogo->setPixmap( logo2Pixmap ); 90 linuxLogo->setPixmap( logo2Pixmap );
98 linuxLogo->setFixedSize( 60, 60 ); 91 linuxLogo->setFixedSize( 60, 60 );
99 hb2->addWidget( linuxLogo, 0, Qt::AlignTop + Qt::AlignLeft ); 92 hb2->addWidget( linuxLogo, 0, Qt::AlignTop + Qt::AlignLeft );
100 93
101 QLabel *kernelVersion = new QLabel( this ); 94 QLabel *kernelVersion = new QLabel( this );
102 kernelVersion->setText( kernelVersionString ); 95 kernelVersion->setText( kernelVersionString );
103 hb2->addWidget( kernelVersion, 1, Qt::AlignTop + Qt::AlignLeft ); 96 hb2->addWidget( kernelVersion, 1, Qt::AlignTop + Qt::AlignLeft );
104} 97}
105 98
106VersionInfo::~VersionInfo() 99VersionInfo::~VersionInfo()
107{ 100{
108} 101}
109 102
diff --git a/pics/tux-logo.png b/pics/tux-logo.png
index ad7c579..f405025 100644
--- a/pics/tux-logo.png
+++ b/pics/tux-logo.png
Binary files differ