author | drw <drw> | 2003-04-22 02:08:38 (UTC) |
---|---|---|
committer | drw <drw> | 2003-04-22 02:08:38 (UTC) |
commit | f37fda5887250b25033120021aed2f1e48f48b1b (patch) (unidiff) | |
tree | fa97b82d00209bc72d120d15792d107cfb03736b /noncore/settings/aqpkg/mainwin.cpp | |
parent | 2d4cf8a85edc83b72855854b0bd337d2993df95b (diff) | |
download | opie-f37fda5887250b25033120021aed2f1e48f48b1b.zip opie-f37fda5887250b25033120021aed2f1e48f48b1b.tar.gz opie-f37fda5887250b25033120021aed2f1e48f48b1b.tar.bz2 |
Now display package information in separate window...easier for those long descriptions. Also use click and hold to display info, not double-click.
Diffstat (limited to 'noncore/settings/aqpkg/mainwin.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/settings/aqpkg/mainwin.cpp | 48 |
1 files changed, 11 insertions, 37 deletions
diff --git a/noncore/settings/aqpkg/mainwin.cpp b/noncore/settings/aqpkg/mainwin.cpp index fb40d52..1aec6a8 100644 --- a/noncore/settings/aqpkg/mainwin.cpp +++ b/noncore/settings/aqpkg/mainwin.cpp | |||
@@ -49,4 +49,5 @@ | |||
49 | #include "letterpushbutton.h" | 49 | #include "letterpushbutton.h" |
50 | #include "mainwin.h" | 50 | #include "mainwin.h" |
51 | #include "packagewin.h" | ||
51 | #include "settingsimpl.h" | 52 | #include "settingsimpl.h" |
52 | #include "utils.h" | 53 | #include "utils.h" |
@@ -240,4 +241,7 @@ void MainWindow :: initMainWidget() | |||
240 | packagesList->addColumn( tr( "Packages" ), 225 ); | 241 | packagesList->addColumn( tr( "Packages" ), 225 ); |
241 | QWhatsThis::add( packagesList, tr( "This is a listing of all packages for the server feed selected above.\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." ) ); | 242 | QWhatsThis::add( packagesList, tr( "This is a listing of all packages for the server feed selected above.\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." ) ); |
243 | QPEApplication::setStylusOperation( packagesList->viewport(), QPEApplication::RightOnHold ); | ||
244 | connect( packagesList, SIGNAL(rightButtonPressed(QListViewItem *,const QPoint &,int)), | ||
245 | this, SLOT(slotDisplayPackage(QListViewItem *)) ); | ||
242 | 246 | ||
243 | QVBoxLayout *vbox = new QVBoxLayout( networkPkgWindow, 0, -1 ); | 247 | QVBoxLayout *vbox = new QVBoxLayout( networkPkgWindow, 0, -1 ); |
@@ -672,18 +676,4 @@ void MainWindow :: serverSelected( int, bool raiseProgress ) | |||
672 | item->setPixmap( 0, installedIcon ); | 676 | item->setPixmap( 0, installedIcon ); |
673 | } | 677 | } |
674 | |||
675 | QString destName = ""; | ||
676 | if ( package->getLocalPackage() ) | ||
677 | { | ||
678 | if ( package->getLocalPackage()->getInstalledTo() ) | ||
679 | destName = package->getLocalPackage()->getInstalledTo()->getDestinationName(); | ||
680 | } | ||
681 | else | ||
682 | { | ||
683 | if ( package->getInstalledTo() ) | ||
684 | destName = package->getInstalledTo()->getDestinationName(); | ||
685 | } | ||
686 | if ( destName != "" ) | ||
687 | new QCheckListItem( item, QString( tr( "Installed To - %1" ).arg( destName ) ) ); | ||
688 | } | 678 | } |
689 | else | 679 | else |
@@ -692,27 +682,4 @@ void MainWindow :: serverSelected( int, bool raiseProgress ) | |||
692 | } | 682 | } |
693 | 683 | ||
694 | if ( !package->isPackageStoredLocally() ) | ||
695 | { | ||
696 | new QCheckListItem( item, QString( tr( "Description - %1" ).arg( package->getDescription() ) ) ); | ||
697 | new QCheckListItem( item, QString( tr( "Size - %1" ).arg( package->getPackageSize() ) ) ); | ||
698 | new QCheckListItem( item, QString( tr( "Section - %1" ).arg( package->getSection() ) ) ); | ||
699 | } | ||
700 | else | ||
701 | new QCheckListItem( item, QString( tr( "Filename - %1" ).arg( package->getFilename() ) ) ); | ||
702 | |||
703 | if ( serverName == LOCAL_SERVER ) | ||
704 | { | ||
705 | new QCheckListItem( item, QString( tr( "V. Installed - %1" ).arg( package->getVersion() ) ) ); | ||
706 | } | ||
707 | else | ||
708 | { | ||
709 | new QCheckListItem( item, QString( tr( "V. Available - %1" ).arg( package->getVersion() ) ) ); | ||
710 | if ( package->getLocalPackage() ) | ||
711 | { | ||
712 | if ( package->isInstalled() ) | ||
713 | new QCheckListItem( item, QString( tr( "V. Installed - %1" ).arg( package->getInstalledVersion() ) ) ); | ||
714 | } | ||
715 | } | ||
716 | |||
717 | packagesList->insertItem( item ); | 684 | packagesList->insertItem( item ); |
718 | } | 685 | } |
@@ -1183,2 +1150,9 @@ void MainWindow :: letterPushed( QString t ) | |||
1183 | } while ( item != start); | 1150 | } while ( item != start); |
1184 | } | 1151 | } |
1152 | |||
1153 | void MainWindow :: slotDisplayPackage( QListViewItem *item ) | ||
1154 | { | ||
1155 | QString itemstr( ((QCheckListItem*)item)->text() ); | ||
1156 | PackageWindow *p = new PackageWindow( mgr->getServer( serversList->currentText() )->getPackage( itemstr ) ); | ||
1157 | p->showMaximized(); | ||
1158 | } | ||