summaryrefslogtreecommitdiff
path: root/noncore/settings/packagemanager/mainwindow.cpp
Side-by-side diff
Diffstat (limited to 'noncore/settings/packagemanager/mainwindow.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/packagemanager/mainwindow.cpp26
1 files changed, 21 insertions, 5 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
@@ -48,4 +48,5 @@
#include "promptdlg.h"
#include "entrydlg.h"
+#include "packageinfodlg.h"
MainWindow::MainWindow( QWidget *parent, const char *name, WFlags fl )
@@ -118,4 +119,6 @@ void MainWindow::initPackageList()
QWhatsThis::add( &m_packageList, tr( "This is a listing of all packages.\n\nA blue dot next to the package name indicates that the package is currently installed.\n\nA blue dot with a star indicates that a newer version of the package is available from the server feed.\n\nClick inside the box at the left to select a package." ) );
QPEApplication::setStylusOperation( m_packageList.viewport(), QPEApplication::RightOnHold );
+ connect( &m_packageList, SIGNAL(rightButtonPressed(QListViewItem *,const QPoint &,int)),
+ this, SLOT(slotDisplayPackageInfo(QListViewItem *)) );
}
@@ -353,5 +356,5 @@ void MainWindow::slotUpdate()
InstallDlg *dlg = new InstallDlg( this, &m_packman, tr( "Update package information" ), false,
OPackage::Update );
- connect( dlg, SIGNAL(closeInstallDlg()), this, SLOT(slotCloseInstallDlg()) );
+ connect( dlg, SIGNAL(closeInstallDlg()), this, SLOT(slotCloseDlg()) );
// Display widget
@@ -365,5 +368,5 @@ void MainWindow::slotUpgrade()
InstallDlg *dlg = new InstallDlg( this, &m_packman, tr( "Upgrade installed packages" ), false,
OPackage::Upgrade );
- connect( dlg, SIGNAL(closeInstallDlg()), this, SLOT(slotCloseInstallDlg()) );
+ connect( dlg, SIGNAL(closeInstallDlg()), this, SLOT(slotCloseDlg()) );
// Display widget
@@ -412,5 +415,5 @@ void MainWindow::slotDownload()
InstallDlg *dlg = new InstallDlg( this, &m_packman, tr( "Download packages" ), false,
OPackage::Download, workingPackages );
- connect( dlg, SIGNAL(closeInstallDlg()), this, SLOT(slotCloseInstallDlg()) );
+ connect( dlg, SIGNAL(closeInstallDlg()), this, SLOT(slotCloseDlg()) );
// Display widget
@@ -510,5 +513,5 @@ void MainWindow::slotApply()
installCmd, installList,
upgradeCmd, upgradeList );
- connect( dlg, SIGNAL(closeInstallDlg()), this, SLOT(slotCloseInstallDlg()) );
+ connect( dlg, SIGNAL(closeInstallDlg()), this, SLOT(slotCloseDlg()) );
// Display widget
@@ -517,5 +520,5 @@ void MainWindow::slotApply()
}
-void MainWindow::slotCloseInstallDlg()
+void MainWindow::slotCloseDlg()
{
// Close install dialog
@@ -666,2 +669,15 @@ void MainWindow::slotFindNext()
searchForPackage( m_findEdit->text() );
}
+
+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 );
+}