author | drw <drw> | 2004-01-24 18:17:58 (UTC) |
---|---|---|
committer | drw <drw> | 2004-01-24 18:17:58 (UTC) |
commit | 88b1045297b464cf1002b021a8981bd1087f8f2d (patch) (unidiff) | |
tree | 0dbbce38d4da253319fc0895ea8f2fdeb2b6940e /noncore/settings/packagemanager/packageinfodlg.cpp | |
parent | 5f333c6832ff429a00498e6a36be950525541a2a (diff) | |
download | opie-88b1045297b464cf1002b021a8981bd1087f8f2d.zip opie-88b1045297b464cf1002b021a8981bd1087f8f2d.tar.gz opie-88b1045297b464cf1002b021a8981bd1087f8f2d.tar.bz2 |
Start of package information dialog, UI done, need to retrieve package data yet
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 | |||
@@ -25,32 +25,58 @@ | |||
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 | } |