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 | |
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') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/packagemanager/mainwindow.cpp | 26 | ||||
-rw-r--r-- | noncore/settings/packagemanager/mainwindow.h | 5 | ||||
-rw-r--r-- | noncore/settings/packagemanager/packageinfodlg.cpp | 34 | ||||
-rw-r--r-- | noncore/settings/packagemanager/packageinfodlg.h | 9 |
4 files changed, 63 insertions, 11 deletions
diff --git a/noncore/settings/packagemanager/mainwindow.cpp b/noncore/settings/packagemanager/mainwindow.cpp index 486561d..05f21bc 100644 --- a/noncore/settings/packagemanager/mainwindow.cpp +++ b/noncore/settings/packagemanager/mainwindow.cpp | |||
@@ -49,2 +49,3 @@ | |||
49 | #include "entrydlg.h" | 49 | #include "entrydlg.h" |
50 | #include "packageinfodlg.h" | ||
50 | 51 | ||
@@ -119,2 +120,4 @@ void MainWindow::initPackageList() | |||
119 | QPEApplication::setStylusOperation( m_packageList.viewport(), QPEApplication::RightOnHold ); | 120 | QPEApplication::setStylusOperation( m_packageList.viewport(), QPEApplication::RightOnHold ); |
121 | connect( &m_packageList, SIGNAL(rightButtonPressed(QListViewItem *,const QPoint &,int)), | ||
122 | this, SLOT(slotDisplayPackageInfo(QListViewItem *)) ); | ||
120 | } | 123 | } |
@@ -354,3 +357,3 @@ void MainWindow::slotUpdate() | |||
354 | OPackage::Update ); | 357 | OPackage::Update ); |
355 | connect( dlg, SIGNAL(closeInstallDlg()), this, SLOT(slotCloseInstallDlg()) ); | 358 | connect( dlg, SIGNAL(closeInstallDlg()), this, SLOT(slotCloseDlg()) ); |
356 | 359 | ||
@@ -366,3 +369,3 @@ void MainWindow::slotUpgrade() | |||
366 | OPackage::Upgrade ); | 369 | OPackage::Upgrade ); |
367 | connect( dlg, SIGNAL(closeInstallDlg()), this, SLOT(slotCloseInstallDlg()) ); | 370 | connect( dlg, SIGNAL(closeInstallDlg()), this, SLOT(slotCloseDlg()) ); |
368 | 371 | ||
@@ -413,3 +416,3 @@ void MainWindow::slotDownload() | |||
413 | OPackage::Download, workingPackages ); | 416 | OPackage::Download, workingPackages ); |
414 | connect( dlg, SIGNAL(closeInstallDlg()), this, SLOT(slotCloseInstallDlg()) ); | 417 | connect( dlg, SIGNAL(closeInstallDlg()), this, SLOT(slotCloseDlg()) ); |
415 | 418 | ||
@@ -511,3 +514,3 @@ void MainWindow::slotApply() | |||
511 | upgradeCmd, upgradeList ); | 514 | upgradeCmd, upgradeList ); |
512 | connect( dlg, SIGNAL(closeInstallDlg()), this, SLOT(slotCloseInstallDlg()) ); | 515 | connect( dlg, SIGNAL(closeInstallDlg()), this, SLOT(slotCloseDlg()) ); |
513 | 516 | ||
@@ -518,3 +521,3 @@ void MainWindow::slotApply() | |||
518 | 521 | ||
519 | void MainWindow::slotCloseInstallDlg() | 522 | void MainWindow::slotCloseDlg() |
520 | { | 523 | { |
@@ -667 +670,14 @@ void MainWindow::slotFindNext() | |||
667 | } | 670 | } |
671 | |||
672 | void MainWindow::slotDisplayPackageInfo( QListViewItem *packageItem ) | ||
673 | { | ||
674 | QString packageName( ( static_cast<QCheckListItem*>( packageItem ) )->text() ); | ||
675 | |||
676 | // Create package manager output widget | ||
677 | PackageInfoDlg *dlg = new PackageInfoDlg( this, &m_packman, packageName ); | ||
678 | connect( dlg, SIGNAL(closeInfoDlg()), this, SLOT(slotCloseDlg()) ); | ||
679 | |||
680 | // Display widget | ||
681 | m_widgetStack.addWidget( dlg, 3 ); | ||
682 | m_widgetStack.raiseWidget( dlg ); | ||
683 | } | ||
diff --git a/noncore/settings/packagemanager/mainwindow.h b/noncore/settings/packagemanager/mainwindow.h index 285cddf..fb555c5 100644 --- a/noncore/settings/packagemanager/mainwindow.h +++ b/noncore/settings/packagemanager/mainwindow.h | |||
@@ -118,3 +118,3 @@ private slots: | |||
118 | void slotApply(); | 118 | void slotApply(); |
119 | void slotCloseInstallDlg(); | 119 | void slotCloseDlg(); |
120 | void slotConfigure(); | 120 | void slotConfigure(); |
@@ -133,2 +133,5 @@ private slots: | |||
133 | void slotFindNext(); | 133 | void slotFindNext(); |
134 | |||
135 | // Other slots | ||
136 | void slotDisplayPackageInfo( QListViewItem * ); | ||
134 | }; | 137 | }; |
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 | |||
@@ -36,2 +36,4 @@ | |||
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 ) |
@@ -39,3 +41,4 @@ PackageInfoDlg::PackageInfoDlg( QWidget *parent, OPackageManager *pm, const QStr | |||
39 | , m_packman( pm ) | 41 | , m_packman( pm ) |
40 | , m_output( this ) | 42 | , m_information( this ) |
43 | , m_files( this ) | ||
41 | { | 44 | { |
@@ -47,4 +50,4 @@ PackageInfoDlg::PackageInfoDlg( QWidget *parent, OPackageManager *pm, const QStr | |||
47 | 50 | ||
48 | m_output.setReadOnly( true ); | 51 | OTabWidget *tabWidget = new OTabWidget( this ); |
49 | layout->addWidget( &m_output ); | 52 | layout->addWidget( tabWidget ); |
50 | 53 | ||
@@ -52,5 +55,28 @@ PackageInfoDlg::PackageInfoDlg( QWidget *parent, OPackageManager *pm, const QStr | |||
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 | } |
diff --git a/noncore/settings/packagemanager/packageinfodlg.h b/noncore/settings/packagemanager/packageinfodlg.h index 3bb9a7a..09af6f4 100644 --- a/noncore/settings/packagemanager/packageinfodlg.h +++ b/noncore/settings/packagemanager/packageinfodlg.h | |||
@@ -54,3 +54,10 @@ private: | |||
54 | // UI controls | 54 | // UI controls |
55 | QMultiLineEdit m_output; // Multi-line edit to display package information | 55 | QMultiLineEdit m_information; // Multi-line edit to display package information |
56 | QMultiLineEdit m_files; // Multi-line edit to display package file list | ||
57 | |||
58 | private slots: | ||
59 | void slotBtnClose(); | ||
60 | |||
61 | signals: | ||
62 | void closeInfoDlg(); | ||
56 | }; | 63 | }; |