Diffstat (limited to 'noncore/settings/packagemanager/packageinfodlg.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/packagemanager/packageinfodlg.cpp | 34 |
1 files changed, 30 insertions, 4 deletions
diff --git a/noncore/settings/packagemanager/packageinfodlg.cpp b/noncore/settings/packagemanager/packageinfodlg.cpp index 71f17eb..26356b9 100644 --- a/noncore/settings/packagemanager/packageinfodlg.cpp +++ b/noncore/settings/packagemanager/packageinfodlg.cpp | |||
@@ -13,44 +13,70 @@ | |||
13 | .%`+i> _;_. | 13 | .%`+i> _;_. |
14 | .i_,=:_. -<s. This file is distributed in the hope that | 14 | .i_,=:_. -<s. This file is distributed in the hope that |
15 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | 15 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; |
16 | : .. .:, . . . without even the implied warranty of | 16 | : .. .:, . . . without even the implied warranty of |
17 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | 17 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A |
18 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General | 18 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General |
19 | ..}^=.= = ; Public License for more details. | 19 | ..}^=.= = ; Public License for more details. |
20 | ++= -. .` .: | 20 | ++= -. .` .: |
21 | : = ...= . :.=- You should have received a copy of the GNU | 21 | : = ...= . :.=- You should have received a copy of the GNU |
22 | -. .:....=;==+<; General Public License along with this file; | 22 | -. .:....=;==+<; General Public License along with this file; |
23 | -_. . . )=. = see the file COPYING. If not, write to the | 23 | -_. . . )=. = see the file COPYING. If not, write to the |
24 | -- :-=` Free Software Foundation, Inc., | 24 | -- :-=` Free Software Foundation, Inc., |
25 | 59 Temple Place - Suite 330, | 25 | 59 Temple Place - Suite 330, |
26 | Boston, MA 02111-1307, USA. | 26 | Boston, MA 02111-1307, USA. |
27 | 27 | ||
28 | */ | 28 | */ |
29 | 29 | ||
30 | #include "packageinfodlg.h" | 30 | #include "packageinfodlg.h" |
31 | 31 | ||
32 | #include <qlayout.h> | 32 | #include <qlayout.h> |
33 | #include <qpushbutton.h> | 33 | #include <qpushbutton.h> |
34 | 34 | ||
35 | #include <qpe/resource.h> | 35 | #include <qpe/resource.h> |
36 | 36 | ||
37 | #include <opie/otabwidget.h> | ||
38 | |||
37 | PackageInfoDlg::PackageInfoDlg( QWidget *parent, OPackageManager *pm, const QString &package ) | 39 | PackageInfoDlg::PackageInfoDlg( QWidget *parent, OPackageManager *pm, const QString &package ) |
38 | : QWidget( 0x0 ) | 40 | : QWidget( 0x0 ) |
39 | , m_packman( pm ) | 41 | , m_packman( pm ) |
40 | , m_output( this ) | 42 | , m_information( this ) |
43 | , m_files( this ) | ||
41 | { | 44 | { |
42 | // Initialize UI | 45 | // Initialize UI |
43 | if ( parent ) | 46 | if ( parent ) |
44 | parent->setCaption( package ); | 47 | parent->setCaption( package ); |
45 | 48 | ||
46 | QVBoxLayout *layout = new QVBoxLayout( this, 4, 0 ); | 49 | QVBoxLayout *layout = new QVBoxLayout( this, 4, 0 ); |
47 | 50 | ||
48 | m_output.setReadOnly( true ); | 51 | OTabWidget *tabWidget = new OTabWidget( this ); |
49 | layout->addWidget( &m_output ); | 52 | layout->addWidget( tabWidget ); |
50 | 53 | ||
51 | QPushButton *btn = new QPushButton( Resource::loadPixmap( "enter" ), tr( "Close" ), this ); | 54 | QPushButton *btn = new QPushButton( Resource::loadPixmap( "enter" ), tr( "Close" ), this ); |
52 | layout->addWidget( btn ); | 55 | layout->addWidget( btn ); |
53 | // TODO connect( btn, SIGNAL(clicked()), this, SLOT(slotBtnClose()) ); | 56 | connect( btn, SIGNAL(clicked()), this, SLOT(slotBtnClose()) ); |
57 | |||
58 | // Information tab | ||
59 | m_information.reparent( tabWidget, QPoint( 0, 0 ) ); | ||
60 | m_information.setReadOnly( true ); | ||
61 | tabWidget->addTab( &m_information, "UtilsIcon", tr( "Information" ) ); | ||
62 | |||
63 | // Files tab | ||
64 | QWidget *filesWidget = new QWidget( tabWidget ); | ||
65 | QVBoxLayout *filesLayout = new QVBoxLayout( filesWidget, 4, 0 ); | ||
66 | m_files.reparent( filesWidget, QPoint( 0, 0 ) ); | ||
67 | m_files.setReadOnly( true ); | ||
68 | filesLayout->addWidget( &m_files ); | ||
54 | 69 | ||
70 | btn = new QPushButton( Resource::loadPixmap( "packagemanager/apply" ), tr( "Retrieve file list" ), | ||
71 | filesWidget ); | ||
72 | filesLayout->addWidget( btn ); | ||
73 | // TODO connect( btn, SIGNAL(clicked()), this, SLOT(slotFileScan()) ); | ||
74 | tabWidget->addTab( filesWidget, "binary", tr( "Files" ) ); | ||
55 | 75 | ||
76 | tabWidget->setCurrentTab( tr( "Information" ) ); | ||
77 | } | ||
78 | |||
79 | void PackageInfoDlg::slotBtnClose() | ||
80 | { | ||
81 | emit closeInfoDlg(); | ||
56 | } | 82 | } |