summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/aqpkg/packagewin.cpp16
-rw-r--r--noncore/settings/aqpkg/packagewin.h4
2 files changed, 10 insertions, 10 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
@@ -3,117 +3,117 @@
3 =. 3 =.
4             .=l. Copyright (c) 2002 OPIE team <opie@handhelds.org?> 4             .=l. Copyright (c) 2002 OPIE team <opie@handhelds.org?>
5           .>+-= 5           .>+-=
6 _;:,     .>    :=|. This file is free software; you can 6 _;:,     .>    :=|. This file is free software; you can
7.> <`_,   >  .   <= redistribute it and/or modify it under 7.> <`_,   >  .   <= redistribute it and/or modify it under
8:`=1 )Y*s>-.--   : the terms of the GNU General Public 8:`=1 )Y*s>-.--   : the terms of the GNU General Public
9.="- .-=="i,     .._ License as published by the Free Software 9.="- .-=="i,     .._ License as published by the Free Software
10 - .   .-<_>     .<> Foundation; either version 2 of the License, 10 - .   .-<_>     .<> Foundation; either version 2 of the License,
11     ._= =}       : or (at your option) any later version. 11     ._= =}       : or (at your option) any later version.
12    .%`+i>       _;_. 12    .%`+i>       _;_.
13    .i_,=:_.      -<s. This file is distributed in the hope that 13    .i_,=:_.      -<s. This file is distributed in the hope that
14     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY; 14     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
15    : ..    .:,     . . . without even the implied warranty of 15    : ..    .:,     . . . without even the implied warranty of
16    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A 16    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A
17  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU General 17  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU General
18..}^=.=       =       ; Public License for more details. 18..}^=.=       =       ; Public License for more details.
19++=   -.     .`     .: 19++=   -.     .`     .:
20 :     =  ...= . :.=- You should have received a copy of the GNU 20 :     =  ...= . :.=- You should have received a copy of the GNU
21 -.   .:....=;==+<; General Public License along with this file; 21 -.   .:....=;==+<; General Public License along with this file;
22  -_. . .   )=.  = see the file COPYING. If not, write to the 22  -_. . .   )=.  = see the file COPYING. If not, write to the
23    --        :-=` Free Software Foundation, Inc., 23    --        :-=` Free Software Foundation, Inc.,
24 59 Temple Place - Suite 330, 24 59 Temple Place - Suite 330,
25 Boston, MA 02111-1307, USA. 25 Boston, MA 02111-1307, USA.
26 26
27*/ 27*/
28 28
29#include "packagewin.h" 29#include "packagewin.h"
30#include "package.h" 30#include "package.h"
31#include "datamgr.h" 31#include "datamgr.h"
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
40PackageWindow::PackageWindow( Package *package, const QString &server ) 40PackageWindow::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 {
47 setCaption( package->getPackageName() ); 46 setCaption( package->getPackageName() );
48 QString destName; 47 QString destName;
49 if ( package->getLocalPackage() ) 48 if ( package->getLocalPackage() )
50 { 49 {
51 if ( package->getLocalPackage()->getInstalledTo() ) 50 if ( package->getLocalPackage()->getInstalledTo() )
52 destName = package->getLocalPackage()->getInstalledTo()->getDestinationName(); 51 destName = package->getLocalPackage()->getInstalledTo()->getDestinationName();
53 } 52 }
54 else 53 else
55 { 54 {
56 if ( package->getInstalledTo() ) 55 if ( package->getInstalledTo() )
57 destName = package->getInstalledTo()->getDestinationName(); 56 destName = package->getInstalledTo()->getDestinationName();
58 } 57 }
59 58
60 if ( !package->isPackageStoredLocally() ) 59 if ( !package->isPackageStoredLocally() )
61 { 60 {
62 str.append( tr( "<b>Description</b> - " ) ); 61 str.append( tr( "<b>Description</b> - " ) );
63 str.append( package->getDescription() ); 62 str.append( package->getDescription() );
64 if ( !destName.isNull() ) 63 if ( !destName.isNull() )
65 { 64 {
66 str.append( tr( "<p><b>Installed To</b> - " ) ); 65 str.append( tr( "<p><b>Installed To</b> - " ) );
67 str.append( destName ); 66 str.append( destName );
68 } 67 }
69 str.append( tr( "<p><b>Size</b> - " ) ); 68 str.append( tr( "<p><b>Size</b> - " ) );
70 str.append( package->getPackageSize() ); 69 str.append( package->getPackageSize() );
71 str.append( tr( "<p><b>Section</b> - " ) ); 70 str.append( tr( "<p><b>Section</b> - " ) );
72 str.append( package->getSection() ); 71 str.append( package->getSection() );
73 } 72 }
74 else 73 else
75 { 74 {
76 str.append( tr( "<p><b>Filename</b> - " ) ); 75 str.append( tr( "<p><b>Filename</b> - " ) );
77 str.append( package->getFilename() ); 76 str.append( package->getFilename() );
78 } 77 }
79 78
80 if ( server == LOCAL_SERVER ) 79 if ( server == LOCAL_SERVER )
81 { 80 {
82 str.append( tr( "<p><b>Version Installed</b> - " ) ); 81 str.append( tr( "<p><b>Version Installed</b> - " ) );
83 str.append( package->getVersion() ); 82 str.append( package->getVersion() );
84 } 83 }
85 else 84 else
86 { 85 {
87 str.append( tr( "<p><b>Version Available</b> - " ) ); 86 str.append( tr( "<p><b>Version Available</b> - " ) );
88 str.append( package->getVersion() ); 87 str.append( package->getVersion() );
89 if ( package->getLocalPackage() ) 88 if ( package->getLocalPackage() )
90 { 89 {
91 if ( package->isInstalled() ) 90 if ( package->isInstalled() )
92 { 91 {
93 str.append( tr( "<p><b>Version Installed</b> - " ) ); 92 str.append( tr( "<p><b>Version Installed</b> - " ) );
94 str.append( package->getInstalledVersion() ); 93 str.append( package->getInstalledVersion() );
95 } 94 }
96 } 95 }
97 } 96 }
98 } 97 }
99 else 98 else
100 { 99 {
101 setCaption( tr( "Package Information" ) ); 100 setCaption( tr( "Package Information" ) );
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 );
111 layout->addWidget( btn ); 112 layout->addWidget( btn );
112 connect( btn, SIGNAL( clicked() ), this, SLOT( close() ) ); 113 connect( btn, SIGNAL( clicked() ), this, SLOT( close() ) );
113 114
114} 115}
115 116
116PackageWindow::~PackageWindow() 117PackageWindow::~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
@@ -7,39 +7,39 @@
7.> <`_,   >  .   <= redistribute it and/or modify it under 7.> <`_,   >  .   <= redistribute it and/or modify it under
8:`=1 )Y*s>-.--   : the terms of the GNU General Public 8:`=1 )Y*s>-.--   : the terms of the GNU General Public
9.="- .-=="i,     .._ License as published by the Free Software 9.="- .-=="i,     .._ License as published by the Free Software
10 - .   .-<_>     .<> Foundation; either version 2 of the License, 10 - .   .-<_>     .<> Foundation; either version 2 of the License,
11     ._= =}       : or (at your option) any later version. 11     ._= =}       : or (at your option) any later version.
12    .%`+i>       _;_. 12    .%`+i>       _;_.
13    .i_,=:_.      -<s. This file is distributed in the hope that 13    .i_,=:_.      -<s. This file is distributed in the hope that
14     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY; 14     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
15    : ..    .:,     . . . without even the implied warranty of 15    : ..    .:,     . . . without even the implied warranty of
16    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A 16    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A
17  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU General 17  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU General
18..}^=.=       =       ; Public License for more details. 18..}^=.=       =       ; Public License for more details.
19++=   -.     .`     .: 19++=   -.     .`     .:
20 :     =  ...= . :.=- You should have received a copy of the GNU 20 :     =  ...= . :.=- You should have received a copy of the GNU
21 -.   .:....=;==+<; General Public License along with this file; 21 -.   .:....=;==+<; General Public License along with this file;
22  -_. . .   )=.  = see the file COPYING. If not, write to the 22  -_. . .   )=.  = see the file COPYING. If not, write to the
23    --        :-=` Free Software Foundation, Inc., 23    --        :-=` Free Software Foundation, Inc.,
24 59 Temple Place - Suite 330, 24 59 Temple Place - Suite 330,
25 Boston, MA 02111-1307, USA. 25 Boston, MA 02111-1307, USA.
26 26
27*/ 27*/
28 28
29#ifndef PACKAGEWIN_H 29#ifndef PACKAGEWIN_H
30#define PACKAGEWIN_H 30#define PACKAGEWIN_H
31 31
32#include <qwidget.h> 32#include <qwidget.h>
33 33
34class Package; 34class Package;
35 35
36class PackageWindow :public QWidget 36class PackageWindow :public QWidget
37{ 37{
38 Q_OBJECT 38 Q_OBJECT
39public:
40 39
40public:
41 PackageWindow( Package * = 0x0, const QString & = QString::null ); 41 PackageWindow( Package * = 0x0, const QString & = QString::null );
42 ~PackageWindow(); 42 ~PackageWindow();
43}; 43};
44 44
45#endif \ No newline at end of file 45#endif