summaryrefslogtreecommitdiff
path: root/noncore/unsupported/oipkg/mainwindow.cpp
Unidiff
Diffstat (limited to 'noncore/unsupported/oipkg/mainwindow.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/unsupported/oipkg/mainwindow.cpp16
1 files changed, 15 insertions, 1 deletions
diff --git a/noncore/unsupported/oipkg/mainwindow.cpp b/noncore/unsupported/oipkg/mainwindow.cpp
index 6bf9a7a..c95f482 100644
--- a/noncore/unsupported/oipkg/mainwindow.cpp
+++ b/noncore/unsupported/oipkg/mainwindow.cpp
@@ -20,11 +20,13 @@
20#include <qlineedit.h> 20#include <qlineedit.h>
21#include <qtabwidget.h> 21#include <qtabwidget.h>
22#include <qcombobox.h> 22#include <qcombobox.h>
23#include <qmessagebox.h>
23#include <qlayout.h> 24#include <qlayout.h>
24 25
25#include "pksettingsbase.h" 26#include "pksettingsbase.h"
26#include "packagelistitem.h" 27#include "packagelistitem.h"
27 28
29
28MainWindow::MainWindow( QWidget *parent, const char *name, WFlags f = 0 ) : 30MainWindow::MainWindow( QWidget *parent, const char *name, WFlags f = 0 ) :
29 QMainWindow( parent, name, f ) 31 QMainWindow( parent, name, f )
30 { 32 {
@@ -35,6 +37,10 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags f = 0 ) :
35 setCentralWidget( listViewPackages ); 37 setCentralWidget( listViewPackages );
36 setCaption( tr("Package Manager") ); 38 setCaption( tr("Package Manager") );
37 39
40 //wait = new QMessageBox(tr("oipkg"),tr("Please wait")//,QMessageBox::Information,QMessageBox::NoButton,QMessageBox::NoButton,QMessageBox::NoButton);
41 wait = new QMessageBox(this);
42 wait->setText(tr("Please wait"));
43
38 channel = new QCopChannel( "QPE/Application/oipkg", this ); 44 channel = new QCopChannel( "QPE/Application/oipkg", this );
39 connect( channel, SIGNAL(received(const QCString&, const QByteArray&)), 45 connect( channel, SIGNAL(received(const QCString&, const QByteArray&)),
40 this, SLOT(receive(const QCString&, const QByteArray&)) ); 46 this, SLOT(receive(const QCString&, const QByteArray&)) );
@@ -194,30 +200,38 @@ void MainWindow::runIpkg()
194 200
195void MainWindow::updateList() 201void MainWindow::updateList()
196{ 202{
203 wait->show();
197 QTimer *t = new QTimer( this ); 204 QTimer *t = new QTimer( this );
198 connect( t, SIGNAL(timeout()), SLOT( rotateUpdateIcon() ) ); 205 connect( t, SIGNAL(timeout()), SLOT( rotateUpdateIcon() ) );
199 t->start( 0, false ); 206 t->start( 0, false );
200 packageList.clear(); 207 packageList.clear();
201 ipkg->update(); 208 ipkg->update();
202 getList(); 209 getList();
203 t->stop(); 210 t->stop();
211 wait->hide();
212
204} 213}
205 214
206void MainWindow::getList() 215void MainWindow::getList()
207{ 216{
217 wait->show();
208 packageList.update(); 218 packageList.update();
209 displayList(); 219 displayList();
220 wait->hide();
210} 221}
211 222
212void MainWindow::filterList() 223void MainWindow::filterList()
213{ 224{
225 wait->show();
214 QString f = ""; 226 QString f = "";
215 if ( findAction->isOn() ) f = findEdit->text(); 227 if ( findAction->isOn() ) f = findEdit->text();
216 packageList.filterPackages( f ); 228 packageList.filterPackages( f );
229 wait->hide();
217} 230}
218 231
219void MainWindow::displayList() 232void MainWindow::displayList()
220{ 233{
234 wait->hide();
221 filterList(); 235 filterList();
222 listViewPackages->clear(); 236 listViewPackages->clear();
223 Package *pack = packageList.first(); 237 Package *pack = packageList.first();