summaryrefslogtreecommitdiff
path: root/noncore/settings/aqpkg/mainwin.cpp
Unidiff
Diffstat (limited to 'noncore/settings/aqpkg/mainwin.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/aqpkg/mainwin.cpp130
1 files changed, 65 insertions, 65 deletions
diff --git a/noncore/settings/aqpkg/mainwin.cpp b/noncore/settings/aqpkg/mainwin.cpp
index b597e03..6ea619c 100644
--- a/noncore/settings/aqpkg/mainwin.cpp
+++ b/noncore/settings/aqpkg/mainwin.cpp
@@ -21,5 +21,5 @@
21#include <qpe/qcopenvelope_qws.h> 21#include <qpe/qcopenvelope_qws.h>
22#include <qpe/qpemenubar.h> 22#include <qmenubar.h>
23#include <qpe/qpeapplication.h> 23#include <qpe/qpeapplication.h>
24#include <qpe/qpetoolbar.h> 24#include <qtoolbar.h>
25#include <qpe/config.h> 25#include <qpe/config.h>
@@ -63,3 +63,3 @@ MainWindow :: MainWindow()
63 initProgressWidget(); 63 initProgressWidget();
64 64
65 // Build menu and tool bars 65 // Build menu and tool bars
@@ -67,10 +67,10 @@ MainWindow :: MainWindow()
67 67
68 QPEToolBar *bar = new QPEToolBar( this ); 68 QToolBar *bar = new QToolBar( this );
69 bar->setHorizontalStretchable( TRUE ); 69 bar->setHorizontalStretchable( TRUE );
70 QPEMenuBar *mb = new QPEMenuBar( bar ); 70 QMenuBar *mb = new QMenuBar( bar );
71 mb->setMargin( 0 ); 71 mb->setMargin( 0 );
72 bar = new QPEToolBar( this ); 72 bar = new QToolBar( this );
73 73
74 // Find toolbar 74 // Find toolbar
75 findBar = new QPEToolBar( this ); 75 findBar = new QToolBar( this );
76 addToolBar( findBar, QMainWindow::Top, true ); 76 addToolBar( findBar, QMainWindow::Top, true );
@@ -83,3 +83,3 @@ MainWindow :: MainWindow()
83 // Quick jump toolbar 83 // Quick jump toolbar
84 jumpBar = new QPEToolBar( this ); 84 jumpBar = new QToolBar( this );
85 addToolBar( jumpBar, QMainWindow::Top, true ); 85 addToolBar( jumpBar, QMainWindow::Top, true );
@@ -88,3 +88,3 @@ MainWindow :: MainWindow()
88 jumpBar->setStretchableWidget( w ); 88 jumpBar->setStretchableWidget( w );
89 89
90 QGridLayout *layout = new QGridLayout( w ); 90 QGridLayout *layout = new QGridLayout( w );
@@ -100,3 +100,3 @@ MainWindow :: MainWindow()
100 } 100 }
101 101
102 QAction *a = new QAction( QString::null, Resource::loadPixmap( "close" ), QString::null, 0, w, 0 ); 102 QAction *a = new QAction( QString::null, Resource::loadPixmap( "close" ), QString::null, 0, w, 0 );
@@ -106,6 +106,6 @@ MainWindow :: MainWindow()
106 jumpBar->hide(); 106 jumpBar->hide();
107 107
108 // Packages menu 108 // Packages menu
109 QPopupMenu *popup = new QPopupMenu( this ); 109 QPopupMenu *popup = new QPopupMenu( this );
110 110
111 a = new QAction( tr( "Update lists" ), Resource::loadPixmap( "aqpkg/update" ), QString::null, 0, this, 0 ); 111 a = new QAction( tr( "Update lists" ), Resource::loadPixmap( "aqpkg/update" ), QString::null, 0, this, 0 );
@@ -146,3 +146,3 @@ MainWindow :: MainWindow()
146 popup = new QPopupMenu( this ); 146 popup = new QPopupMenu( this );
147 147
148 actionUninstalled = new QAction( tr( "Show packages not installed" ), QString::null, 0, this, 0 ); 148 actionUninstalled = new QAction( tr( "Show packages not installed" ), QString::null, 0, this, 0 );
@@ -199,5 +199,5 @@ MainWindow :: MainWindow()
199 a->addTo( popup ); 199 a->addTo( popup );
200 200
201 mb->insertItem( tr( "View" ), popup ); 201 mb->insertItem( tr( "View" ), popup );
202 202
203 // Finish find toolbar creation 203 // Finish find toolbar creation
@@ -215,3 +215,3 @@ MainWindow :: MainWindow()
215 stack->raiseWidget( progressWindow ); 215 stack->raiseWidget( progressWindow );
216 216
217 // Delayed call to finish initialization 217 // Delayed call to finish initialization
@@ -228,5 +228,5 @@ void MainWindow :: initMainWidget()
228 networkPkgWindow = new QWidget( this ); 228 networkPkgWindow = new QWidget( this );
229 229
230 QLabel *l = new QLabel( tr( "Servers:" ), networkPkgWindow ); 230 QLabel *l = new QLabel( tr( "Servers:" ), networkPkgWindow );
231 231
232 serversList = new QComboBox( networkPkgWindow ); 232 serversList = new QComboBox( networkPkgWindow );
@@ -234,6 +234,6 @@ void MainWindow :: initMainWidget()
234 QWhatsThis::add( serversList, tr( "Click here to select a package feed." ) ); 234 QWhatsThis::add( serversList, tr( "Click here to select a package feed." ) );
235 235
236 installedIcon = Resource::loadPixmap( "installed" ); 236 installedIcon = Resource::loadPixmap( "installed" );
237 updatedIcon = Resource::loadPixmap( "aqpkg/updated" ); 237 updatedIcon = Resource::loadPixmap( "aqpkg/updated" );
238 238
239 packagesList = new QListView( networkPkgWindow ); 239 packagesList = new QListView( networkPkgWindow );
@@ -246,3 +246,3 @@ void MainWindow :: initMainWidget()
246 hbox1->addWidget( serversList ); 246 hbox1->addWidget( serversList );
247 247
248 vbox->addWidget( packagesList ); 248 vbox->addWidget( packagesList );
@@ -255,3 +255,3 @@ void MainWindow :: initProgressWidget()
255 progressWindow = new QWidget( this ); 255 progressWindow = new QWidget( this );
256 256
257 QVBoxLayout *layout = new QVBoxLayout( progressWindow, 4, 4 ); 257 QVBoxLayout *layout = new QVBoxLayout( progressWindow, 4, 4 );
@@ -278,3 +278,3 @@ void MainWindow :: init()
278 stack->raiseWidget( progressWindow ); 278 stack->raiseWidget( progressWindow );
279 279
280 mgr = new DataManager(); 280 mgr = new DataManager();
@@ -285,3 +285,3 @@ void MainWindow :: init()
285 mgr->loadServers(); 285 mgr->loadServers();
286 286
287 showUninstalledPkgs = false; 287 showUninstalledPkgs = false;
@@ -292,3 +292,3 @@ void MainWindow :: init()
292 updateData(); 292 updateData();
293 293
294 stack->raiseWidget( networkPkgWindow ); 294 stack->raiseWidget( networkPkgWindow );
@@ -301,3 +301,3 @@ void MainWindow :: setDocument( const QString &doc )
301// std::cout << "Selecting package " << package << std::endl; 301// std::cout << "Selecting package " << package << std::endl;
302 302
303 // First select local server 303 // First select local server
@@ -354,3 +354,3 @@ void MainWindow :: closeEvent( QCloseEvent *e )
354} 354}
355 355
356void MainWindow :: displayFindBar() 356void MainWindow :: displayFindBar()
@@ -396,3 +396,3 @@ void MainWindow :: filterUninstalledPackages()
396 serverSelected( -1 ); 396 serverSelected( -1 );
397 397
398 actionInstalled->setOn( FALSE ); 398 actionInstalled->setOn( FALSE );
@@ -410,3 +410,3 @@ void MainWindow :: filterInstalledPackages()
410 serverSelected( -1 ); 410 serverSelected( -1 );
411 411
412 actionUninstalled->setOn( FALSE ); 412 actionUninstalled->setOn( FALSE );
@@ -424,3 +424,3 @@ void MainWindow :: filterUpgradedPackages()
424 serverSelected( -1 ); 424 serverSelected( -1 );
425 425
426 actionUninstalled->setOn( FALSE ); 426 actionUninstalled->setOn( FALSE );
@@ -439,3 +439,3 @@ bool MainWindow :: setFilterCategory()
439 return false; 439 return false;
440 440
441 categoryFilterEnabled = true; 441 categoryFilterEnabled = true;
@@ -470,3 +470,3 @@ bool MainWindow :: filterByCategory( bool val )
470 } 470 }
471 471
472 categoryFilterEnabled = true; 472 categoryFilterEnabled = true;
@@ -533,3 +533,3 @@ void MainWindow :: updateData()
533 m_progress->setTotalSteps( mgr->getServerList().count() ); 533 m_progress->setTotalSteps( mgr->getServerList().count() );
534 534
535 serversList->clear(); 535 serversList->clear();
@@ -540,6 +540,6 @@ void MainWindow :: updateData()
540 QString serverName; 540 QString serverName;
541 541
542 QListIterator<Server> it( mgr->getServerList() ); 542 QListIterator<Server> it( mgr->getServerList() );
543 Server *server; 543 Server *server;
544 544
545 for ( ; it.current(); ++it, ++i ) 545 for ( ; it.current(); ++it, ++i )
@@ -551,3 +551,3 @@ void MainWindow :: updateData()
551 qApp->processEvents(); 551 qApp->processEvents();
552 552
553// cout << "Adding " << it->getServerName() << " to combobox" << endl; 553// cout << "Adding " << it->getServerName() << " to combobox" << endl;
@@ -559,3 +559,3 @@ void MainWindow :: updateData()
559 } 559 }
560 560
561 serversList->insertItem( serverName ); 561 serversList->insertItem( serverName );
@@ -580,3 +580,3 @@ void MainWindow :: serverSelected( int, bool raiseProgress )
580 nullIcon.fill( colorGroup().base() ); 580 nullIcon.fill( colorGroup().base() );
581 581
582 // display packages 582 // display packages
@@ -589,3 +589,3 @@ void MainWindow :: serverSelected( int, bool raiseProgress )
589 QListIterator<Package> it( list ); 589 QListIterator<Package> it( list );
590 590
591 // Display progress widget while loading list 591 // Display progress widget while loading list
@@ -625,5 +625,5 @@ void MainWindow :: serverSelected( int, bool raiseProgress )
625 } 625 }
626 626
627 QString text = ""; 627 QString text = "";
628 628
629 package = it.current(); 629 package = it.current();
@@ -660,3 +660,3 @@ void MainWindow :: serverSelected( int, bool raiseProgress )
660 QCheckListItem::CheckBox ); 660 QCheckListItem::CheckBox );
661 661
662 if ( package->isInstalled() ) 662 if ( package->isInstalled() )
@@ -675,3 +675,3 @@ void MainWindow :: serverSelected( int, bool raiseProgress )
675 } 675 }
676 676
677 QString destName = ""; 677 QString destName = "";
@@ -694,3 +694,3 @@ void MainWindow :: serverSelected( int, bool raiseProgress )
694 } 694 }
695 695
696 if ( !package->isPackageStoredLocally() ) 696 if ( !package->isPackageStoredLocally() )
@@ -703,3 +703,3 @@ void MainWindow :: serverSelected( int, bool raiseProgress )
703 new QCheckListItem( item, QString( tr( "Filename - %1" ).arg( package->getFilename() ) ) ); 703 new QCheckListItem( item, QString( tr( "Filename - %1" ).arg( package->getFilename() ) ) );
704 704
705 if ( serverName == LOCAL_SERVER ) 705 if ( serverName == LOCAL_SERVER )
@@ -756,6 +756,6 @@ void MainWindow :: searchForPackage( const QString &text )
756// start = (QCheckListItem *)start->nextSibling(); 756// start = (QCheckListItem *)start->nextSibling();
757 757
758 if ( start == 0 ) 758 if ( start == 0 )
759 start = (QCheckListItem *)packagesList->firstChild(); 759 start = (QCheckListItem *)packagesList->firstChild();
760 760
761 for ( QCheckListItem *item = start; item != 0 ; 761 for ( QCheckListItem *item = start; item != 0 ;
@@ -771,3 +771,3 @@ void MainWindow :: searchForPackage( const QString &text )
771 } 771 }
772 } 772 }
773 } 773 }
@@ -795,3 +795,3 @@ void MainWindow :: updateServer()
795 stack->raiseWidget( dlg ); 795 stack->raiseWidget( dlg );
796 796
797// delete progDlg; 797// delete progDlg;
@@ -810,3 +810,3 @@ void MainWindow :: upgradePackages()
810 warn.adjustSize(); 810 warn.adjustSize();
811 811
812 if ( warn.exec() == QMessageBox::Yes ) 812 if ( warn.exec() == QMessageBox::Yes )
@@ -845,3 +845,3 @@ void MainWindow :: downloadPackage()
845 } 845 }
846 846
847 // If user selected some packages then download the and store the locally 847 // If user selected some packages then download the and store the locally
@@ -853,3 +853,3 @@ void MainWindow :: downloadPackage()
853 downloadRemotePackage(); 853 downloadRemotePackage();
854 854
855 } 855 }
@@ -872,3 +872,3 @@ void MainWindow :: downloadPackage()
872 name.truncate( pos - 1 ); 872 name.truncate( pos - 1 );
873 873
874 Package *p = mgr->getServer( serversList->currentText() )->getPackage( name ); 874 Package *p = mgr->getServer( serversList->currentText() )->getPackage( name );
@@ -973,3 +973,3 @@ void MainWindow :: applyChanges()
973 stickyOption = ""; 973 stickyOption = "";
974 974
975 // First, write out ipkg_conf file so that ipkg can use it 975 // First, write out ipkg_conf file so that ipkg can use it
@@ -997,6 +997,6 @@ void MainWindow :: applyChanges()
997 tr( "No packages selected" ), tr( "OK" ) ); 997 tr( "No packages selected" ), tr( "OK" ) );
998 998
999 return; 999 return;
1000 } 1000 }
1001 1001
1002 // do the stuff 1002 // do the stuff
@@ -1042,3 +1042,3 @@ InstallData *MainWindow :: dealWithItem( QCheckListItem *item )
1042 newitem->packageName = name; 1042 newitem->packageName = name;
1043 1043
1044 if ( p->getInstalledTo() ) 1044 if ( p->getInstalledTo() )
@@ -1060,3 +1060,3 @@ InstallData *MainWindow :: dealWithItem( QCheckListItem *item )
1060 val = 0; 1060 val = 0;
1061 1061
1062 if ( val == -2 ) 1062 if ( val == -2 )
@@ -1117,3 +1117,3 @@ InstallData *MainWindow :: dealWithItem( QCheckListItem *item )
1117 1117
1118 1118
1119 // Check if we are reinstalling the same version 1119 // Check if we are reinstalling the same version
@@ -1132,3 +1132,3 @@ void MainWindow :: reloadData( InstallDlgImpl *dlg )
1132 stack->raiseWidget( progressWindow ); 1132 stack->raiseWidget( progressWindow );
1133 1133
1134 if ( dlg ) 1134 if ( dlg )
@@ -1138,9 +1138,9 @@ void MainWindow :: reloadData( InstallDlgImpl *dlg )
1138 } 1138 }
1139 1139
1140 mgr->reloadServerData(); 1140 mgr->reloadServerData();
1141 serverSelected( -1, FALSE ); 1141 serverSelected( -1, FALSE );
1142 1142
1143#ifdef QWS 1143#ifdef QWS
1144 m_status->setText( tr( "Updating Launcher..." ) ); 1144 m_status->setText( tr( "Updating Launcher..." ) );
1145 1145
1146 // Finally let the main system update itself 1146 // Finally let the main system update itself
@@ -1150,3 +1150,3 @@ void MainWindow :: reloadData( InstallDlgImpl *dlg )
1150#endif 1150#endif
1151 1151
1152 stack->raiseWidget( networkPkgWindow ); 1152 stack->raiseWidget( networkPkgWindow );
@@ -1183,3 +1183,3 @@ void MainWindow :: letterPushed( QString t )
1183 if ( !item ) 1183 if ( !item )
1184 item = (QCheckListItem *)packagesList->firstChild(); 1184 item = (QCheckListItem *)packagesList->firstChild();
1185 } while ( item != start); 1185 } while ( item != start);