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/mainwindow.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/mainwindow.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/packagemanager/mainwindow.cpp | 26 |
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 | |||
@@ -47,6 +47,7 @@ | |||
47 | #include "filterdlg.h" | 47 | #include "filterdlg.h" |
48 | #include "promptdlg.h" | 48 | #include "promptdlg.h" |
49 | #include "entrydlg.h" | 49 | #include "entrydlg.h" |
50 | #include "packageinfodlg.h" | ||
50 | 51 | ||
51 | MainWindow::MainWindow( QWidget *parent, const char *name, WFlags fl ) | 52 | MainWindow::MainWindow( QWidget *parent, const char *name, WFlags fl ) |
52 | : QMainWindow( parent, name, fl || WStyle_ContextHelp ) | 53 | : QMainWindow( parent, name, fl || WStyle_ContextHelp ) |
@@ -117,6 +118,8 @@ void MainWindow::initPackageList() | |||
117 | m_packageList.addColumn( tr( "Packages" ) ); | 118 | m_packageList.addColumn( tr( "Packages" ) ); |
118 | 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." ) ); | 119 | 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." ) ); |
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 | } |
121 | 124 | ||
122 | void MainWindow::initStatusWidget() | 125 | void MainWindow::initStatusWidget() |
@@ -352,7 +355,7 @@ void MainWindow::slotUpdate() | |||
352 | // Create package manager output widget | 355 | // Create package manager output widget |
353 | InstallDlg *dlg = new InstallDlg( this, &m_packman, tr( "Update package information" ), false, | 356 | InstallDlg *dlg = new InstallDlg( this, &m_packman, tr( "Update package information" ), false, |
354 | OPackage::Update ); | 357 | OPackage::Update ); |
355 | connect( dlg, SIGNAL(closeInstallDlg()), this, SLOT(slotCloseInstallDlg()) ); | 358 | connect( dlg, SIGNAL(closeInstallDlg()), this, SLOT(slotCloseDlg()) ); |
356 | 359 | ||
357 | // Display widget | 360 | // Display widget |
358 | m_widgetStack.addWidget( dlg, 3 ); | 361 | m_widgetStack.addWidget( dlg, 3 ); |
@@ -364,7 +367,7 @@ void MainWindow::slotUpgrade() | |||
364 | // Create package manager output widget | 367 | // Create package manager output widget |
365 | InstallDlg *dlg = new InstallDlg( this, &m_packman, tr( "Upgrade installed packages" ), false, | 368 | InstallDlg *dlg = new InstallDlg( this, &m_packman, tr( "Upgrade installed packages" ), false, |
366 | OPackage::Upgrade ); | 369 | OPackage::Upgrade ); |
367 | connect( dlg, SIGNAL(closeInstallDlg()), this, SLOT(slotCloseInstallDlg()) ); | 370 | connect( dlg, SIGNAL(closeInstallDlg()), this, SLOT(slotCloseDlg()) ); |
368 | 371 | ||
369 | // Display widget | 372 | // Display widget |
370 | m_widgetStack.addWidget( dlg, 3 ); | 373 | m_widgetStack.addWidget( dlg, 3 ); |
@@ -411,7 +414,7 @@ void MainWindow::slotDownload() | |||
411 | // Create package manager output widget | 414 | // Create package manager output widget |
412 | InstallDlg *dlg = new InstallDlg( this, &m_packman, tr( "Download packages" ), false, | 415 | InstallDlg *dlg = new InstallDlg( this, &m_packman, tr( "Download packages" ), false, |
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 | ||
416 | // Display widget | 419 | // Display widget |
417 | m_widgetStack.addWidget( dlg, 3 ); | 420 | m_widgetStack.addWidget( dlg, 3 ); |
@@ -509,14 +512,14 @@ void MainWindow::slotApply() | |||
509 | removeCmd, removeList, | 512 | removeCmd, removeList, |
510 | installCmd, installList, | 513 | installCmd, installList, |
511 | upgradeCmd, upgradeList ); | 514 | upgradeCmd, upgradeList ); |
512 | connect( dlg, SIGNAL(closeInstallDlg()), this, SLOT(slotCloseInstallDlg()) ); | 515 | connect( dlg, SIGNAL(closeInstallDlg()), this, SLOT(slotCloseDlg()) ); |
513 | 516 | ||
514 | // Display widget | 517 | // Display widget |
515 | m_widgetStack.addWidget( dlg, 3 ); | 518 | m_widgetStack.addWidget( dlg, 3 ); |
516 | m_widgetStack.raiseWidget( dlg ); | 519 | m_widgetStack.raiseWidget( dlg ); |
517 | } | 520 | } |
518 | 521 | ||
519 | void MainWindow::slotCloseInstallDlg() | 522 | void MainWindow::slotCloseDlg() |
520 | { | 523 | { |
521 | // Close install dialog | 524 | // Close install dialog |
522 | delete m_widgetStack.visibleWidget(); | 525 | delete m_widgetStack.visibleWidget(); |
@@ -665,3 +668,16 @@ void MainWindow::slotFindNext() | |||
665 | { | 668 | { |
666 | searchForPackage( m_findEdit->text() ); | 669 | searchForPackage( m_findEdit->text() ); |
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 | } | ||