Diffstat (limited to 'noncore/settings/sysinfo/versioninfo.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/settings/sysinfo/versioninfo.cpp | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/noncore/settings/sysinfo/versioninfo.cpp b/noncore/settings/sysinfo/versioninfo.cpp index 9a444df..801af29 100644 --- a/noncore/settings/sysinfo/versioninfo.cpp +++ b/noncore/settings/sysinfo/versioninfo.cpp | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <qlayout.h> | 27 | #include <qlayout.h> |
28 | #include <qpixmap.h> | 28 | #include <qpixmap.h> |
29 | #include <qpainter.h> | 29 | #include <qpainter.h> |
30 | #include <qscrollview.h> | ||
30 | #include <qtextstream.h> | 31 | #include <qtextstream.h> |
31 | #include <qtimer.h> | 32 | #include <qtimer.h> |
32 | #include <qwhatsthis.h> | 33 | #include <qwhatsthis.h> |
@@ -42,7 +43,15 @@ VersionInfo::VersionInfo( QWidget *parent, const char *name, WFlags f ) | |||
42 | { | 43 | { |
43 | setMinimumSize( 200, 150 ); | 44 | setMinimumSize( 200, 150 ); |
44 | 45 | ||
45 | QVBoxLayout *vb = new QVBoxLayout( this, 4 ); | 46 | QVBoxLayout *tmpvb = new QVBoxLayout( this ); |
47 | QScrollView *sv = new QScrollView( this ); | ||
48 | tmpvb->addWidget( sv, 0, 0 ); | ||
49 | sv->setResizePolicy( QScrollView::AutoOneFit ); | ||
50 | sv->setFrameStyle( QFrame::NoFrame ); | ||
51 | QWidget *container = new QWidget( sv->viewport() ); | ||
52 | sv->addChild( container ); | ||
53 | |||
54 | QVBoxLayout *vb = new QVBoxLayout( container, 4 ); | ||
46 | 55 | ||
47 | QString kernelVersionString; | 56 | QString kernelVersionString; |
48 | QFile file( "/proc/version" ); | 57 | QFile file( "/proc/version" ); |
@@ -78,7 +87,7 @@ VersionInfo::VersionInfo( QWidget *parent, const char *name, WFlags f ) | |||
78 | QHBoxLayout *hb1 = new QHBoxLayout( vb ); | 87 | QHBoxLayout *hb1 = new QHBoxLayout( vb ); |
79 | hb1->setSpacing( 2 ); | 88 | hb1->setSpacing( 2 ); |
80 | 89 | ||
81 | QLabel *palmtopLogo = new QLabel( this ); | 90 | QLabel *palmtopLogo = new QLabel( container ); |
82 | QImage logo1 = Resource::loadImage( "logo/opielogo" ); | 91 | QImage logo1 = Resource::loadImage( "logo/opielogo" ); |
83 | logo1 = logo1.smoothScale( 50, 55 ); | 92 | logo1 = logo1.smoothScale( 50, 55 ); |
84 | QPixmap logo1Pixmap; | 93 | QPixmap logo1Pixmap; |
@@ -87,7 +96,7 @@ VersionInfo::VersionInfo( QWidget *parent, const char *name, WFlags f ) | |||
87 | palmtopLogo->setFixedSize( 60, 60 ); | 96 | palmtopLogo->setFixedSize( 60, 60 ); |
88 | hb1->addWidget( palmtopLogo, 0, Qt::AlignTop + Qt::AlignLeft ); | 97 | hb1->addWidget( palmtopLogo, 0, Qt::AlignTop + Qt::AlignLeft ); |
89 | 98 | ||
90 | QLabel *palmtopVersion = new QLabel( this ); | 99 | QLabel *palmtopVersion = new QLabel( container ); |
91 | palmtopVersion->setText( palmtopVersionString ); | 100 | palmtopVersion->setText( palmtopVersionString ); |
92 | hb1->addWidget( palmtopVersion, 1, Qt::AlignTop + Qt::AlignLeft ); | 101 | hb1->addWidget( palmtopVersion, 1, Qt::AlignTop + Qt::AlignLeft ); |
93 | 102 | ||
@@ -95,7 +104,7 @@ VersionInfo::VersionInfo( QWidget *parent, const char *name, WFlags f ) | |||
95 | QHBoxLayout *hb2 = new QHBoxLayout( vb ); | 104 | QHBoxLayout *hb2 = new QHBoxLayout( vb ); |
96 | hb1->setSpacing( 2 ); | 105 | hb1->setSpacing( 2 ); |
97 | 106 | ||
98 | QLabel *linuxLogo = new QLabel( this ); | 107 | QLabel *linuxLogo = new QLabel( container ); |
99 | QImage logo2 = Resource::loadImage( "logo/tux-logo" ); | 108 | QImage logo2 = Resource::loadImage( "logo/tux-logo" ); |
100 | logo2 = logo2.smoothScale( 55, 60 ); | 109 | logo2 = logo2.smoothScale( 55, 60 ); |
101 | QPixmap logo2Pixmap; | 110 | QPixmap logo2Pixmap; |
@@ -104,7 +113,7 @@ VersionInfo::VersionInfo( QWidget *parent, const char *name, WFlags f ) | |||
104 | linuxLogo->setFixedSize( 60, 60 ); | 113 | linuxLogo->setFixedSize( 60, 60 ); |
105 | hb2->addWidget( linuxLogo, 0, Qt::AlignTop + Qt::AlignLeft ); | 114 | hb2->addWidget( linuxLogo, 0, Qt::AlignTop + Qt::AlignLeft ); |
106 | 115 | ||
107 | QLabel *kernelVersion = new QLabel( this ); | 116 | QLabel *kernelVersion = new QLabel( container ); |
108 | kernelVersion->setText( kernelVersionString ); | 117 | kernelVersion->setText( kernelVersionString ); |
109 | hb2->addWidget( kernelVersion, 1, Qt::AlignTop + Qt::AlignLeft ); | 118 | hb2->addWidget( kernelVersion, 1, Qt::AlignTop + Qt::AlignLeft ); |
110 | 119 | ||
@@ -112,7 +121,7 @@ VersionInfo::VersionInfo( QWidget *parent, const char *name, WFlags f ) | |||
112 | QHBoxLayout *hb3 = new QHBoxLayout( vb ); | 121 | QHBoxLayout *hb3 = new QHBoxLayout( vb ); |
113 | hb3->setSpacing( 2 ); | 122 | hb3->setSpacing( 2 ); |
114 | 123 | ||
115 | QLabel *palmtopLogo3 = new QLabel( this ); | 124 | QLabel *palmtopLogo3 = new QLabel( container ); |
116 | QImage logo3 = Resource::loadImage( "sysinfo/pda" ); | 125 | QImage logo3 = Resource::loadImage( "sysinfo/pda" ); |
117 | logo3 = logo3.smoothScale( 50, 55 ); | 126 | logo3 = logo3.smoothScale( 50, 55 ); |
118 | QPixmap logo3Pixmap; | 127 | QPixmap logo3Pixmap; |
@@ -131,7 +140,7 @@ VersionInfo::VersionInfo( QWidget *parent, const char *name, WFlags f ) | |||
131 | systemString.append( tr( "<p>Vendor: " ) ); | 140 | systemString.append( tr( "<p>Vendor: " ) ); |
132 | systemString.append( ODevice::inst()->vendorString() ); | 141 | systemString.append( ODevice::inst()->vendorString() ); |
133 | 142 | ||
134 | QLabel *systemVersion = new QLabel( this ); | 143 | QLabel *systemVersion = new QLabel( container ); |
135 | systemVersion->setText( systemString ); | 144 | systemVersion->setText( systemString ); |
136 | hb3->addWidget( systemVersion, 1, Qt::AlignTop + Qt::AlignLeft ); | 145 | hb3->addWidget( systemVersion, 1, Qt::AlignTop + Qt::AlignLeft ); |
137 | 146 | ||