summaryrefslogtreecommitdiff
path: root/noncore/unsupported/oipkg/packagelistview.cpp
Unidiff
Diffstat (limited to 'noncore/unsupported/oipkg/packagelistview.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/unsupported/oipkg/packagelistview.cpp17
1 files changed, 0 insertions, 17 deletions
diff --git a/noncore/unsupported/oipkg/packagelistview.cpp b/noncore/unsupported/oipkg/packagelistview.cpp
index 2915ac6..610a0e1 100644
--- a/noncore/unsupported/oipkg/packagelistview.cpp
+++ b/noncore/unsupported/oipkg/packagelistview.cpp
@@ -1,65 +1,48 @@
1/***************************************************************************
2 packagelistview.cpp - description
3 -------------------
4 begin : Sat Apr 27 2002
5 copyright : (C) 2002 by tille
6 email : tille@handhelds.org
7 ***************************************************************************/
8
9/***************************************************************************
10 * *
11 * This program is free software; you can redistribute it and/or modify *
12 * it under the terms of the GNU General Public License as published by *
13 * the Free Software Foundation; either version 2 of the License, or *
14 * (at your option) any later version. *
15 * *
16 ***************************************************************************/
17
18#include "packagelistview.h" 1#include "packagelistview.h"
19 2
20#include <qpopupmenu.h> 3#include <qpopupmenu.h>
21#include <qaction.h> 4#include <qaction.h>
22 5
23#include "packagelistitem.h" 6#include "packagelistitem.h"
24#include "pksettings.h" 7#include "pksettings.h"
25 8
26PackageListView::PackageListView(QWidget *p, const char* n, PackageManagerSettings *s) 9PackageListView::PackageListView(QWidget *p, const char* n, PackageManagerSettings *s)
27 : QListView(p,n) 10 : QListView(p,n)
28{ 11{
29 settings = s; 12 settings = s;
30 popupMenu = new QPopupMenu( this ); 13 popupMenu = new QPopupMenu( this );
31 destsMenu = new QPopupMenu( popupMenu ); 14 destsMenu = new QPopupMenu( popupMenu );
32 popupTimer = new QTimer( this ); 15 popupTimer = new QTimer( this );
33 setSelectionMode(QListView::NoSelection); 16 setSelectionMode(QListView::NoSelection);
34 addColumn( tr("Package") ); 17 addColumn( tr("Package") );
35 setRootIsDecorated( true ); 18 setRootIsDecorated( true );
36 19
37 connect( popupTimer, SIGNAL(timeout()), 20 connect( popupTimer, SIGNAL(timeout()),
38 this, SLOT(showPopup()) ); 21 this, SLOT(showPopup()) );
39 connect( this, SIGNAL( pressed( QListViewItem* ) ), 22 connect( this, SIGNAL( pressed( QListViewItem* ) ),
40 this, SLOT( setCurrent( QListViewItem* ) ) ); 23 this, SLOT( setCurrent( QListViewItem* ) ) );
41 connect( this, SIGNAL( clicked( QListViewItem* ) ), 24 connect( this, SIGNAL( clicked( QListViewItem* ) ),
42 this, SLOT( stopTimer( QListViewItem* ) ) ); 25 this, SLOT( stopTimer( QListViewItem* ) ) );
43 26
44} 27}
45 28
46//PackageListView::~PackageListView() 29//PackageListView::~PackageListView()
47//{ 30//{
48//} 31//}
49 32
50void PackageListView::setCurrent( QListViewItem* p ) 33void PackageListView::setCurrent( QListViewItem* p )
51{ 34{
52 if ( !p ) return; 35 if ( !p ) return;
53 activePackageListItem = (PackageListItem*)p; 36 activePackageListItem = (PackageListItem*)p;
54 activePackage = activePackageListItem->getPackage(); 37 activePackage = activePackageListItem->getPackage();
55 if (!activePackage) return; 38 if (!activePackage) return;
56 popupTimer->start( 750, true ); 39 popupTimer->start( 750, true );
57} 40}
58 41
59 42
60void PackageListView::showPopup() 43void PackageListView::showPopup()
61{ 44{
62 popupMenu->clear(); 45 popupMenu->clear();
63 destsMenu->clear(); 46 destsMenu->clear();
64 47
65 QAction *popupAction; 48 QAction *popupAction;