author | drw <drw> | 2003-04-29 01:09:51 (UTC) |
---|---|---|
committer | drw <drw> | 2003-04-29 01:09:51 (UTC) |
commit | 2f26f696ca6acd05aa615e15d891eede9907a1c0 (patch) (unidiff) | |
tree | 5a0096175cc9879b7d6f8b0f40ad2333d5e52cbe /noncore | |
parent | 63d3f7ca039d93612abaa4a65fc00b337c42ec9d (diff) | |
download | opie-2f26f696ca6acd05aa615e15d891eede9907a1c0.zip opie-2f26f696ca6acd05aa615e15d891eede9907a1c0.tar.gz opie-2f26f696ca6acd05aa615e15d891eede9907a1c0.tar.bz2 |
Now use QTextView for package information. This is for scroll through long package descriptions (e.g. OZ busybox).
-rw-r--r-- | noncore/settings/aqpkg/packagewin.cpp | 12 | ||||
-rw-r--r-- | noncore/settings/aqpkg/packagewin.h | 2 |
2 files changed, 7 insertions, 7 deletions
diff --git a/noncore/settings/aqpkg/packagewin.cpp b/noncore/settings/aqpkg/packagewin.cpp index f00453e..7971ccc 100644 --- a/noncore/settings/aqpkg/packagewin.cpp +++ b/noncore/settings/aqpkg/packagewin.cpp | |||
@@ -32,15 +32,14 @@ | |||
32 | 32 | ||
33 | #include <qpe/resource.h> | 33 | #include <qpe/resource.h> |
34 | 34 | ||
35 | #include <qlabel.h> | ||
36 | #include <qlayout.h> | 35 | #include <qlayout.h> |
37 | #include <qpushbutton.h> | 36 | #include <qpushbutton.h> |
38 | #include <qstring.h> | 37 | #include <qstring.h> |
38 | #include <qtextview.h> | ||
39 | 39 | ||
40 | PackageWindow::PackageWindow( Package *package, const QString &server ) | 40 | PackageWindow::PackageWindow( Package *package, const QString &server ) |
41 | : QWidget( 0, 0, 0 ) | 41 | : QWidget( 0, 0, 0 ) |
42 | { | 42 | { |
43 | QVBoxLayout *layout = new QVBoxLayout( this, 4, 4 ); | ||
44 | QString str; | 43 | QString str; |
45 | if ( package ) | 44 | if ( package ) |
46 | { | 45 | { |
@@ -102,9 +101,11 @@ PackageWindow::PackageWindow( Package *package, const QString &server ) | |||
102 | str = tr( "Package information is unavailable" ); | 101 | str = tr( "Package information is unavailable" ); |
103 | } | 102 | } |
104 | 103 | ||
105 | QLabel *l = new QLabel( str, this ); | 104 | QVBoxLayout *layout = new QVBoxLayout( this, 4, 4 ); |
106 | l->setTextFormat( Qt::RichText ); | 105 | |
107 | l->setAlignment( Qt::AlignLeft | Qt::AlignVCenter | Qt::WordBreak ); | 106 | QTextView *l = new QTextView( str, QString::null, this ); |
107 | //l->setTextFormat( Qt::RichText ); | ||
108 | //l->setAlignment( Qt::AlignLeft | Qt::AlignVCenter | Qt::WordBreak ); | ||
108 | layout->addWidget( l ); | 109 | layout->addWidget( l ); |
109 | 110 | ||
110 | QPushButton *btn = new QPushButton( Resource::loadPixmap( "enter" ), tr( "Close" ), this ); | 111 | QPushButton *btn = new QPushButton( Resource::loadPixmap( "enter" ), tr( "Close" ), this ); |
@@ -116,4 +117,3 @@ PackageWindow::PackageWindow( Package *package, const QString &server ) | |||
116 | PackageWindow::~PackageWindow() | 117 | PackageWindow::~PackageWindow() |
117 | { | 118 | { |
118 | } | 119 | } |
119 | |||
diff --git a/noncore/settings/aqpkg/packagewin.h b/noncore/settings/aqpkg/packagewin.h index c1943b5..b4fdcad 100644 --- a/noncore/settings/aqpkg/packagewin.h +++ b/noncore/settings/aqpkg/packagewin.h | |||
@@ -36,8 +36,8 @@ class Package; | |||
36 | class PackageWindow :public QWidget | 36 | class PackageWindow :public QWidget |
37 | { | 37 | { |
38 | Q_OBJECT | 38 | Q_OBJECT |
39 | public: | ||
40 | 39 | ||
40 | public: | ||
41 | PackageWindow( Package * = 0x0, const QString & = QString::null ); | 41 | PackageWindow( Package * = 0x0, const QString & = QString::null ); |
42 | ~PackageWindow(); | 42 | ~PackageWindow(); |
43 | }; | 43 | }; |