summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/aqpkg/mainwin.cpp130
-rw-r--r--noncore/settings/aqpkg/mainwin.h6
2 files changed, 68 insertions, 68 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
@@ -20,7 +20,7 @@
#include <qpe/qcopenvelope_qws.h>
-#include <qpe/qpemenubar.h>
+#include <qmenubar.h>
#include <qpe/qpeapplication.h>
-#include <qpe/qpetoolbar.h>
+#include <qtoolbar.h>
#include <qpe/config.h>
#include <qpe/resource.h>
@@ -62,16 +62,16 @@ MainWindow :: MainWindow()
initMainWidget();
initProgressWidget();
-
+
// Build menu and tool bars
setToolBarsMovable( FALSE );
- QPEToolBar *bar = new QPEToolBar( this );
+ QToolBar *bar = new QToolBar( this );
bar->setHorizontalStretchable( TRUE );
- QPEMenuBar *mb = new QPEMenuBar( bar );
+ QMenuBar *mb = new QMenuBar( bar );
mb->setMargin( 0 );
- bar = new QPEToolBar( this );
+ bar = new QToolBar( this );
// Find toolbar
- findBar = new QPEToolBar( this );
+ findBar = new QToolBar( this );
addToolBar( findBar, QMainWindow::Top, true );
findBar->setHorizontalStretchable( true );
@@ -82,10 +82,10 @@ MainWindow :: MainWindow()
// Quick jump toolbar
- jumpBar = new QPEToolBar( this );
+ jumpBar = new QToolBar( this );
addToolBar( jumpBar, QMainWindow::Top, true );
jumpBar->setHorizontalStretchable( true );
QWidget *w = new QWidget( jumpBar );
jumpBar->setStretchableWidget( w );
-
+
QGridLayout *layout = new QGridLayout( w );
@@ -99,5 +99,5 @@ MainWindow :: MainWindow()
layout->addWidget( b, i / 13, i % 13);
}
-
+
QAction *a = new QAction( QString::null, Resource::loadPixmap( "close" ), QString::null, 0, w, 0 );
a->setWhatsThis( tr( "Click here to hide the Quick Jump toolbar." ) );
@@ -105,8 +105,8 @@ MainWindow :: MainWindow()
a->addTo( jumpBar );
jumpBar->hide();
-
+
// Packages menu
QPopupMenu *popup = new QPopupMenu( this );
-
+
a = new QAction( tr( "Update lists" ), Resource::loadPixmap( "aqpkg/update" ), QString::null, 0, this, 0 );
a->setWhatsThis( tr( "Click here to update package lists from servers." ) );
@@ -145,5 +145,5 @@ MainWindow :: MainWindow()
// View menu
popup = new QPopupMenu( this );
-
+
actionUninstalled = new QAction( tr( "Show packages not installed" ), QString::null, 0, this, 0 );
actionUninstalled->setToggleAction( TRUE );
@@ -198,7 +198,7 @@ MainWindow :: MainWindow()
connect( a, SIGNAL( activated() ), this, SLOT( displayJumpBar() ) );
a->addTo( popup );
-
+
mb->insertItem( tr( "View" ), popup );
-
+
// Finish find toolbar creation
a = new QAction( QString::null, Resource::loadPixmap( "close" ), QString::null, 0, this, 0 );
@@ -214,5 +214,5 @@ MainWindow :: MainWindow()
setCentralWidget( stack );
stack->raiseWidget( progressWindow );
-
+
// Delayed call to finish initialization
QTimer::singleShot( 100, this, SLOT( init() ) );
@@ -227,14 +227,14 @@ void MainWindow :: initMainWidget()
{
networkPkgWindow = new QWidget( this );
-
+
QLabel *l = new QLabel( tr( "Servers:" ), networkPkgWindow );
-
+
serversList = new QComboBox( networkPkgWindow );
connect( serversList, SIGNAL( activated( int ) ), this, SLOT( serverSelected( int ) ) );
QWhatsThis::add( serversList, tr( "Click here to select a package feed." ) );
-
+
installedIcon = Resource::loadPixmap( "installed" );
updatedIcon = Resource::loadPixmap( "aqpkg/updated" );
-
+
packagesList = new QListView( networkPkgWindow );
packagesList->addColumn( tr( "Packages" ), 225 );
@@ -245,5 +245,5 @@ void MainWindow :: initMainWidget()
hbox1->addWidget( l );
hbox1->addWidget( serversList );
-
+
vbox->addWidget( packagesList );
@@ -254,5 +254,5 @@ void MainWindow :: initProgressWidget()
{
progressWindow = new QWidget( this );
-
+
QVBoxLayout *layout = new QVBoxLayout( progressWindow, 4, 4 );
@@ -277,5 +277,5 @@ void MainWindow :: init()
stack->raiseWidget( progressWindow );
-
+
mgr = new DataManager();
connect( mgr, SIGNAL( progressSetSteps( int ) ), this, SLOT( setProgressSteps( int ) ) );
@@ -284,5 +284,5 @@ void MainWindow :: init()
connect( mgr, SIGNAL( progressUpdate( int ) ), this, SLOT( updateProgress( int ) ) );
mgr->loadServers();
-
+
showUninstalledPkgs = false;
showInstalledPkgs = false;
@@ -291,5 +291,5 @@ void MainWindow :: init()
updateData();
-
+
stack->raiseWidget( networkPkgWindow );
}
@@ -300,5 +300,5 @@ void MainWindow :: setDocument( const QString &doc )
QString package = Utils::getPackageNameFromIpkFilename( doc );
// std::cout << "Selecting package " << package << std::endl;
-
+
// First select local server
for ( int i = 0 ; i < serversList->count() ; ++i )
@@ -353,5 +353,5 @@ void MainWindow :: closeEvent( QCloseEvent *e )
}
}
-
+
void MainWindow :: displayFindBar()
{
@@ -395,5 +395,5 @@ void MainWindow :: filterUninstalledPackages()
}
serverSelected( -1 );
-
+
actionInstalled->setOn( FALSE );
actionUpdated->setOn( FALSE );
@@ -409,5 +409,5 @@ void MainWindow :: filterInstalledPackages()
}
serverSelected( -1 );
-
+
actionUninstalled->setOn( FALSE );
actionUpdated->setOn( FALSE );
@@ -423,5 +423,5 @@ void MainWindow :: filterUpgradedPackages()
}
serverSelected( -1 );
-
+
actionUninstalled->setOn( FALSE );
actionInstalled->setOn( FALSE );
@@ -438,5 +438,5 @@ bool MainWindow :: setFilterCategory()
if ( categoryFilter == "" )
return false;
-
+
categoryFilterEnabled = true;
serverSelected( -1 );
@@ -469,5 +469,5 @@ bool MainWindow :: filterByCategory( bool val )
return false;
}
-
+
categoryFilterEnabled = true;
serverSelected( -1 );
@@ -532,5 +532,5 @@ void MainWindow :: updateData()
{
m_progress->setTotalSteps( mgr->getServerList().count() );
-
+
serversList->clear();
packagesList->clear();
@@ -539,8 +539,8 @@ void MainWindow :: updateData()
int i = 0;
QString serverName;
-
+
QListIterator<Server> it( mgr->getServerList() );
Server *server;
-
+
for ( ; it.current(); ++it, ++i )
{
@@ -550,5 +550,5 @@ void MainWindow :: updateData()
m_progress->setProgress( i );
qApp->processEvents();
-
+
// cout << "Adding " << it->getServerName() << " to combobox" << endl;
if ( !server->isServerActive() )
@@ -558,5 +558,5 @@ void MainWindow :: updateData()
continue;
}
-
+
serversList->insertItem( serverName );
if ( serverName == currentlySelectedServer )
@@ -579,5 +579,5 @@ void MainWindow :: serverSelected( int, bool raiseProgress )
QPixmap nullIcon( installedIcon.size() );
nullIcon.fill( colorGroup().base() );
-
+
// display packages
QString serverName = serversList->currentText();
@@ -588,5 +588,5 @@ void MainWindow :: serverSelected( int, bool raiseProgress )
QList<Package> &list = s->getPackageList();
QListIterator<Package> it( list );
-
+
// Display progress widget while loading list
bool doProgress = ( list.count() > 200 );
@@ -624,7 +624,7 @@ void MainWindow :: serverSelected( int, bool raiseProgress )
qApp->processEvents();
}
-
+
QString text = "";
-
+
package = it.current();
@@ -659,5 +659,5 @@ void MainWindow :: serverSelected( int, bool raiseProgress )
QCheckListItem *item = new QCheckListItem( packagesList, package->getPackageName(),
QCheckListItem::CheckBox );
-
+
if ( package->isInstalled() )
{
@@ -674,5 +674,5 @@ void MainWindow :: serverSelected( int, bool raiseProgress )
item->setPixmap( 0, installedIcon );
}
-
+
QString destName = "";
if ( package->getLocalPackage() )
@@ -693,5 +693,5 @@ void MainWindow :: serverSelected( int, bool raiseProgress )
item->setPixmap( 0, nullIcon );
}
-
+
if ( !package->isPackageStoredLocally() )
{
@@ -702,5 +702,5 @@ void MainWindow :: serverSelected( int, bool raiseProgress )
else
new QCheckListItem( item, QString( tr( "Filename - %1" ).arg( package->getFilename() ) ) );
-
+
if ( serverName == LOCAL_SERVER )
{
@@ -755,8 +755,8 @@ void MainWindow :: searchForPackage( const QString &text )
// if ( start != 0 )
// start = (QCheckListItem *)start->nextSibling();
-
+
if ( start == 0 )
start = (QCheckListItem *)packagesList->firstChild();
-
+
for ( QCheckListItem *item = start; item != 0 ;
item = (QCheckListItem *)item->nextSibling() )
@@ -770,5 +770,5 @@ void MainWindow :: searchForPackage( const QString &text )
break;
}
- }
+ }
}
}
@@ -794,5 +794,5 @@ void MainWindow :: updateServer()
stack->addWidget( dlg, 3 );
stack->raiseWidget( dlg );
-
+
// delete progDlg;
}
@@ -809,5 +809,5 @@ void MainWindow :: upgradePackages()
0, this );
warn.adjustSize();
-
+
if ( warn.exec() == QMessageBox::Yes )
{
@@ -844,5 +844,5 @@ void MainWindow :: downloadPackage()
}
}
-
+
// If user selected some packages then download the and store the locally
// otherwise, display dialog asking user what package to download from an http server
@@ -852,5 +852,5 @@ void MainWindow :: downloadPackage()
else
downloadRemotePackage();
-
+
}
else
@@ -871,5 +871,5 @@ void MainWindow :: downloadPackage()
if ( pos > 0 )
name.truncate( pos - 1 );
-
+
Package *p = mgr->getServer( serversList->currentText() )->getPackage( name );
@@ -972,5 +972,5 @@ void MainWindow :: applyChanges()
{
stickyOption = "";
-
+
// First, write out ipkg_conf file so that ipkg can use it
mgr->writeOutIpkgConf();
@@ -996,8 +996,8 @@ void MainWindow :: applyChanges()
QMessageBox::information( this, tr( "Nothing to do" ),
tr( "No packages selected" ), tr( "OK" ) );
-
+
return;
}
-
+
// do the stuff
InstallDlgImpl *dlg = new InstallDlgImpl( workingPackages, mgr, tr( "Apply changes" ) );
@@ -1041,5 +1041,5 @@ InstallData *MainWindow :: dealWithItem( QCheckListItem *item )
else
newitem->packageName = name;
-
+
if ( p->getInstalledTo() )
{
@@ -1059,5 +1059,5 @@ InstallData *MainWindow :: dealWithItem( QCheckListItem *item )
if ( p->isPackageStoredLocally() && val == -1 )
val = 0;
-
+
if ( val == -2 )
{
@@ -1116,5 +1116,5 @@ InstallData *MainWindow :: dealWithItem( QCheckListItem *item )
}
-
+
// Check if we are reinstalling the same version
if ( newitem->option != "R" )
@@ -1131,5 +1131,5 @@ void MainWindow :: reloadData( InstallDlgImpl *dlg )
{
stack->raiseWidget( progressWindow );
-
+
if ( dlg )
{
@@ -1137,11 +1137,11 @@ void MainWindow :: reloadData( InstallDlgImpl *dlg )
delete dlg;
}
-
+
mgr->reloadServerData();
serverSelected( -1, FALSE );
-
+
#ifdef QWS
m_status->setText( tr( "Updating Launcher..." ) );
-
+
// Finally let the main system update itself
QCopEnvelope e("QPE/System", "linkChanged(QString)");
@@ -1149,5 +1149,5 @@ void MainWindow :: reloadData( InstallDlgImpl *dlg )
e << lf;
#endif
-
+
stack->raiseWidget( networkPkgWindow );
}
@@ -1182,5 +1182,5 @@ void MainWindow :: letterPushed( QString t )
item = (QCheckListItem *)item->nextSibling();
if ( !item )
- item = (QCheckListItem *)packagesList->firstChild();
+ item = (QCheckListItem *)packagesList->firstChild();
} while ( item != start);
}
diff --git a/noncore/settings/aqpkg/mainwin.h b/noncore/settings/aqpkg/mainwin.h
index b2de871..4b044de 100644
--- a/noncore/settings/aqpkg/mainwin.h
+++ b/noncore/settings/aqpkg/mainwin.h
@@ -32,5 +32,5 @@ class QLabel;
class QLineEdit;
class QListView;
-class QPEToolBar;
+class QToolBar;
class QProgressBar;
class QWidgetStack;
@@ -52,6 +52,6 @@ private:
QWidgetStack *stack;
- QPEToolBar *findBar;
- QPEToolBar *jumpBar;
+ QToolBar *findBar;
+ QToolBar *jumpBar;
QLineEdit *findEdit;
QAction *actionFindNext;