summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/packagemanager/mainwindow.cpp26
-rw-r--r--noncore/settings/packagemanager/mainwindow.h5
-rw-r--r--noncore/settings/packagemanager/packageinfodlg.cpp34
-rw-r--r--noncore/settings/packagemanager/packageinfodlg.h9
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 @@
#include "entrydlg.h"
+#include "packageinfodlg.h"
@@ -119,2 +120,4 @@ void MainWindow::initPackageList()
QPEApplication::setStylusOperation( m_packageList.viewport(), QPEApplication::RightOnHold );
+ connect( &m_packageList, SIGNAL(rightButtonPressed(QListViewItem *,const QPoint &,int)),
+ this, SLOT(slotDisplayPackageInfo(QListViewItem *)) );
}
@@ -354,3 +357,3 @@ void MainWindow::slotUpdate()
OPackage::Update );
- connect( dlg, SIGNAL(closeInstallDlg()), this, SLOT(slotCloseInstallDlg()) );
+ connect( dlg, SIGNAL(closeInstallDlg()), this, SLOT(slotCloseDlg()) );
@@ -366,3 +369,3 @@ void MainWindow::slotUpgrade()
OPackage::Upgrade );
- connect( dlg, SIGNAL(closeInstallDlg()), this, SLOT(slotCloseInstallDlg()) );
+ connect( dlg, SIGNAL(closeInstallDlg()), this, SLOT(slotCloseDlg()) );
@@ -413,3 +416,3 @@ void MainWindow::slotDownload()
OPackage::Download, workingPackages );
- connect( dlg, SIGNAL(closeInstallDlg()), this, SLOT(slotCloseInstallDlg()) );
+ connect( dlg, SIGNAL(closeInstallDlg()), this, SLOT(slotCloseDlg()) );
@@ -511,3 +514,3 @@ void MainWindow::slotApply()
upgradeCmd, upgradeList );
- connect( dlg, SIGNAL(closeInstallDlg()), this, SLOT(slotCloseInstallDlg()) );
+ connect( dlg, SIGNAL(closeInstallDlg()), this, SLOT(slotCloseDlg()) );
@@ -518,3 +521,3 @@ void MainWindow::slotApply()
-void MainWindow::slotCloseInstallDlg()
+void MainWindow::slotCloseDlg()
{
@@ -667 +670,14 @@ void MainWindow::slotFindNext()
}
+
+void MainWindow::slotDisplayPackageInfo( QListViewItem *packageItem )
+{
+ QString packageName( ( static_cast<QCheckListItem*>( packageItem ) )->text() );
+
+ // Create package manager output widget
+ PackageInfoDlg *dlg = new PackageInfoDlg( this, &m_packman, packageName );
+ connect( dlg, SIGNAL(closeInfoDlg()), this, SLOT(slotCloseDlg()) );
+
+ // Display widget
+ m_widgetStack.addWidget( dlg, 3 );
+ m_widgetStack.raiseWidget( dlg );
+}
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:
void slotApply();
- void slotCloseInstallDlg();
+ void slotCloseDlg();
void slotConfigure();
@@ -133,2 +133,5 @@ private slots:
void slotFindNext();
+
+ // Other slots
+ void slotDisplayPackageInfo( QListViewItem * );
};
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 @@
+#include <opie/otabwidget.h>
+
PackageInfoDlg::PackageInfoDlg( QWidget *parent, OPackageManager *pm, const QString &package )
@@ -39,3 +41,4 @@ PackageInfoDlg::PackageInfoDlg( QWidget *parent, OPackageManager *pm, const QStr
, m_packman( pm )
- , m_output( this )
+ , m_information( this )
+ , m_files( this )
{
@@ -47,4 +50,4 @@ PackageInfoDlg::PackageInfoDlg( QWidget *parent, OPackageManager *pm, const QStr
- m_output.setReadOnly( true );
- layout->addWidget( &m_output );
+ OTabWidget *tabWidget = new OTabWidget( this );
+ layout->addWidget( tabWidget );
@@ -52,5 +55,28 @@ PackageInfoDlg::PackageInfoDlg( QWidget *parent, OPackageManager *pm, const QStr
layout->addWidget( btn );
-// TODO connect( btn, SIGNAL(clicked()), this, SLOT(slotBtnClose()) );
+ connect( btn, SIGNAL(clicked()), this, SLOT(slotBtnClose()) );
+
+ // Information tab
+ m_information.reparent( tabWidget, QPoint( 0, 0 ) );
+ m_information.setReadOnly( true );
+ tabWidget->addTab( &m_information, "UtilsIcon", tr( "Information" ) );
+
+ // Files tab
+ QWidget *filesWidget = new QWidget( tabWidget );
+ QVBoxLayout *filesLayout = new QVBoxLayout( filesWidget, 4, 0 );
+ m_files.reparent( filesWidget, QPoint( 0, 0 ) );
+ m_files.setReadOnly( true );
+ filesLayout->addWidget( &m_files );
+ btn = new QPushButton( Resource::loadPixmap( "packagemanager/apply" ), tr( "Retrieve file list" ),
+ filesWidget );
+ filesLayout->addWidget( btn );
+// TODO connect( btn, SIGNAL(clicked()), this, SLOT(slotFileScan()) );
+ tabWidget->addTab( filesWidget, "binary", tr( "Files" ) );
+ tabWidget->setCurrentTab( tr( "Information" ) );
+}
+
+void PackageInfoDlg::slotBtnClose()
+{
+ emit closeInfoDlg();
}
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:
// UI controls
- QMultiLineEdit m_output; // Multi-line edit to display package information
+ QMultiLineEdit m_information; // Multi-line edit to display package information
+ QMultiLineEdit m_files; // Multi-line edit to display package file list
+
+private slots:
+ void slotBtnClose();
+
+signals:
+ void closeInfoDlg();
};