summaryrefslogtreecommitdiff
path: root/noncore/unsupported/oipkg/mainwindow.cpp
authortille <tille>2002-04-28 01:35:36 (UTC)
committer tille <tille>2002-04-28 01:35:36 (UTC)
commit61cc74e0e4602d0df07b250f2786f0f0e96da28f (patch) (unidiff)
tree7fab7d278163082856f0561ec9e451922f6066e3 /noncore/unsupported/oipkg/mainwindow.cpp
parenta64cc0ad0574ae1e15c4965d2557c3e06cc3fd65 (diff)
downloadopie-61cc74e0e4602d0df07b250f2786f0f0e96da28f.zip
opie-61cc74e0e4602d0df07b250f2786f0f0e96da28f.tar.gz
opie-61cc74e0e4602d0df07b250f2786f0f0e96da28f.tar.bz2
gui fixes
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
@@ -11,39 +11,45 @@
11#include <qaction.h> 11#include <qaction.h>
12#include <qmessagebox.h> 12#include <qmessagebox.h>
13#include <qpopupmenu.h> 13#include <qpopupmenu.h>
14#include <qtoolbutton.h> 14#include <qtoolbutton.h>
15#include <qstring.h> 15#include <qstring.h>
16#include <qlabel.h> 16#include <qlabel.h>
17#include <qfile.h> 17#include <qfile.h>
18#include <qlistview.h> 18#include <qlistview.h>
19#include <qtextview.h> 19#include <qtextview.h>
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 {
31 settings = new PackageManagerSettings(this,0,TRUE); 33 settings = new PackageManagerSettings(this,0,TRUE);
32 listViewPackages = new PackageListView( this,"listViewPackages",settings ); 34 listViewPackages = new PackageListView( this,"listViewPackages",settings );
33 ipkg = new PmIpkg( settings, this ); 35 ipkg = new PmIpkg( settings, this );
34 36
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&)) );
41 47
42 makeMenu(); 48 makeMenu();
43 49
44 connect( section, SIGNAL( activated(int) ), 50 connect( section, SIGNAL( activated(int) ),
45 this, SLOT( sectionChanged() ) ); 51 this, SLOT( sectionChanged() ) );
46 connect( subsection, SIGNAL(activated(int) ), 52 connect( subsection, SIGNAL(activated(int) ),
47 this, SLOT( subSectionChanged() ) ); 53 this, SLOT( subSectionChanged() ) );
48 54
49 ipkg = new PmIpkg( settings, this ); 55 ipkg = new PmIpkg( settings, this );
@@ -185,48 +191,56 @@ void MainWindow::runIpkg()
185{ 191{
186 ipkg->commit( packageList ); 192 ipkg->commit( packageList );
187 // ##### If we looked in the list of files, we could send out accurate 193 // ##### If we looked in the list of files, we could send out accurate
188 // ##### messages. But we don't bother yet, and just do an "all". 194 // ##### messages. But we don't bother yet, and just do an "all".
189 QCopEnvelope e("QPE/System", "linkChanged(QString)"); 195 QCopEnvelope e("QPE/System", "linkChanged(QString)");
190 QString lf = QString::null; 196 QString lf = QString::null;
191 e << lf; 197 e << lf;
192 displayList(); 198 displayList();
193} 199}
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();
224 while( pack ) 238 while( pack )
225 { 239 {
226 if ( pack && (pack->name() != "") ) 240 if ( pack && (pack->name() != "") )
227 listViewPackages->insertItem( new PackageListItem( listViewPackages, pack, settings ) ); 241 listViewPackages->insertItem( new PackageListItem( listViewPackages, pack, settings ) );
228 pack = packageList.next(); 242 pack = packageList.next();
229 } 243 }
230} 244}
231 245
232void MainWindow::sectionChanged() 246void MainWindow::sectionChanged()