summaryrefslogtreecommitdiff
path: root/noncore/settings/aqpkg/mainwin.cpp
Side-by-side diff
Diffstat (limited to 'noncore/settings/aqpkg/mainwin.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/aqpkg/mainwin.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/noncore/settings/aqpkg/mainwin.cpp b/noncore/settings/aqpkg/mainwin.cpp
index 6f5c712..6b31cd1 100644
--- a/noncore/settings/aqpkg/mainwin.cpp
+++ b/noncore/settings/aqpkg/mainwin.cpp
@@ -91,42 +91,42 @@ MainWindow :: MainWindow( QWidget* parent, const char* name, WFlags fl )
bar->setHorizontalStretchable( TRUE );
QMenuBar *mb = new QMenuBar( bar );
mb->setMargin( 0 );
bar = new QToolBar( this );
// Find toolbar
findBar = new QToolBar( this );
addToolBar( findBar, QMainWindow::Top, true );
findBar->setHorizontalStretchable( true );
findEdit = new QLineEdit( findBar );
QWhatsThis::add( findEdit, tr( "Type the text to search for here." ) );
findBar->setStretchableWidget( findEdit );
- connect( findEdit, SIGNAL( textChanged( const QString & ) ), this, SLOT( findPackage( const QString & ) ) );
+ connect( findEdit, SIGNAL( textChanged(const QString&) ), this, SLOT( findPackage(const QString&) ) );
// Quick jump toolbar
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 );
char text[2];
text[1] = '\0';
for ( int i = 0 ; i < 26 ; ++i )
{
text[0] = 'A' + i;
LetterPushButton *b = new LetterPushButton( text, w );
- connect( b, SIGNAL( released( QString ) ), this, SLOT( letterPushed( QString ) ) );
+ connect( b, SIGNAL( released(QString) ), this, SLOT( letterPushed(QString) ) );
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." ) );
connect( a, SIGNAL( activated() ), this, SLOT( hideJumpBar() ) );
a->addTo( jumpBar );
jumpBar->hide();
// Packages menu
QPopupMenu *popup = new QPopupMenu( this );
@@ -256,26 +256,26 @@ void MainWindow :: initMainWidget()
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 );
QWhatsThis::add( packagesList, tr( "This is a listing of all packages for the server feed selected above.\n\nA blue dot next to the package name indicates that the package is currently installed.\n\nA blue dot with a star indicates that a newer version of the package is available from the server feed.\n\nClick inside the box at the left to select a package." ) );
QPEApplication::setStylusOperation( packagesList->viewport(), QPEApplication::RightOnHold );
- connect( packagesList, SIGNAL(rightButtonPressed(QListViewItem *,const QPoint &,int)),
- this, SLOT(slotDisplayPackage(QListViewItem *)) );
+ connect( packagesList, SIGNAL(rightButtonPressed(QListViewItem*,const QPoint&,int)),
+ this, SLOT(slotDisplayPackage(QListViewItem*)) );
QVBoxLayout *vbox = new QVBoxLayout( networkPkgWindow, 0, -1 );
QHBoxLayout *hbox1 = new QHBoxLayout( vbox, -1 );
hbox1->addWidget( l );
hbox1->addWidget( serversList );
vbox->addWidget( packagesList );
downloadEnabled = TRUE;
}
void MainWindow :: initProgressWidget()
@@ -297,28 +297,28 @@ void MainWindow :: init()
#ifdef QWS
// read download directory from config file
Config cfg( "aqpkg" );
cfg.setGroup( "settings" );
currentlySelectedServer = cfg.readEntry( "selectedServer", "local" );
// showJumpTo = cfg.readBoolEntry( "showJumpTo", "true" );
#endif
stack->raiseWidget( progressWindow );
mgr = new DataManager();
- connect( mgr, SIGNAL( progressSetSteps( int ) ), this, SLOT( setProgressSteps( int ) ) );
- connect( mgr, SIGNAL( progressSetMessage( const QString & ) ),
- this, SLOT( setProgressMessage( const QString & ) ) );
- connect( mgr, SIGNAL( progressUpdate( int ) ), this, SLOT( updateProgress( int ) ) );
+ connect( mgr, SIGNAL( progressSetSteps(int) ), this, SLOT( setProgressSteps(int) ) );
+ connect( mgr, SIGNAL( progressSetMessage(const QString&) ),
+ this, SLOT( setProgressMessage(const QString&) ) );
+ connect( mgr, SIGNAL( progressUpdate(int) ), this, SLOT( updateProgress(int) ) );
mgr->loadServers();
showUninstalledPkgs = false;
showInstalledPkgs = false;
showUpgradedPkgs = false;
categoryFilterEnabled = false;
updateData();
stack->raiseWidget( networkPkgWindow );
}
@@ -761,25 +761,25 @@ void MainWindow :: updateServer()
// Display dialog
// Disable buttons to stop silly people clicking lots on them :)
// First, write out ipkg_conf file so that ipkg can use it
mgr->writeOutIpkgConf();
Ipkg *ipkg = new Ipkg;
ipkg->setOption( "update" );
InstallDlgImpl *dlg = new InstallDlgImpl( ipkg, tr( "Refreshing server package lists" ),
tr( "Update lists" ) );
- connect( dlg, SIGNAL( reloadData( InstallDlgImpl * ) ), this, SLOT( reloadData( InstallDlgImpl * ) ) );
+ connect( dlg, SIGNAL( reloadData(InstallDlgImpl*) ), this, SLOT( reloadData(InstallDlgImpl*) ) );
reloadDocuments = FALSE;
stack->addWidget( dlg, 3 );
stack->raiseWidget( dlg );
// delete progDlg;
}
void MainWindow :: upgradePackages()
{
// We're gonna do an upgrade of all packages
// First warn user that this isn't recommended
// TODO - ODevice????
@@ -792,25 +792,25 @@ void MainWindow :: upgradePackages()
if ( warn.exec() == QMessageBox::Yes )
{
// First, write out ipkg_conf file so that ipkg can use it
mgr->writeOutIpkgConf();
// Now run upgrade
Ipkg *ipkg = new Ipkg;
ipkg->setOption( "upgrade" );
InstallDlgImpl *dlg = new InstallDlgImpl( ipkg, tr( "Upgrading installed packages" ),
tr ( "Upgrade" ) );
- connect( dlg, SIGNAL( reloadData( InstallDlgImpl * ) ), this, SLOT( reloadData( InstallDlgImpl * ) ) );
+ connect( dlg, SIGNAL( reloadData(InstallDlgImpl*) ), this, SLOT( reloadData(InstallDlgImpl*) ) );
reloadDocuments = TRUE;
stack->addWidget( dlg, 3 );
stack->raiseWidget( dlg );
}
}
void MainWindow :: downloadPackage()
{
bool doUpdate = true;
if ( downloadEnabled )
{
// See if any packages are selected
@@ -897,25 +897,25 @@ void MainWindow :: downloadSelectedPackages()
#ifdef QWS
// Store download directory in config file
cfg.writeEntry( "downloadDir", dir );
#endif
// Get starting directory
char initDir[PATH_MAX];
getcwd( initDir, PATH_MAX );
// Download each package
Ipkg ipkg;
- connect( &ipkg, SIGNAL(outputText(const QString &)), this, SLOT(displayText(const QString &)));
+ connect( &ipkg, SIGNAL(outputText(const QString&)), this, SLOT(displayText(const QString&)));
ipkg.setOption( "download" );
ipkg.setRuntimeDirectory( dir );
for ( QCheckListItem *item = (QCheckListItem *)packagesList->firstChild();
item != 0 ;
item = (QCheckListItem *)item->nextSibling() )
{
if ( item->isOn() )
{
ipkg.setPackage( item->text() );
ipkg.runIpkg( );
}
@@ -935,25 +935,25 @@ void MainWindow :: downloadRemotePackage()
// grab details from dialog
// QString package = dlg.getPackageLocation();
InstallData *item = new InstallData();
item->option = "I";
item->packageName = package;
QList<InstallData> workingPackages;
workingPackages.setAutoDelete( TRUE );
workingPackages.append( item );
InstallDlgImpl *dlg = new InstallDlgImpl( workingPackages, mgr, tr( "Download" ) );
- connect( dlg, SIGNAL( reloadData( InstallDlgImpl * ) ), this, SLOT( reloadData( InstallDlgImpl * ) ) );
+ connect( dlg, SIGNAL( reloadData(InstallDlgImpl*) ), this, SLOT( reloadData(InstallDlgImpl*) ) );
reloadDocuments = TRUE;
stack->addWidget( dlg, 3 );
stack->raiseWidget( dlg );
}
void MainWindow :: applyChanges()
{
stickyOption = "";
// First, write out ipkg_conf file so that ipkg can use it
mgr->writeOutIpkgConf();
@@ -979,25 +979,25 @@ void MainWindow :: applyChanges()
if ( workingPackages.count() == 0 )
{
// Nothing to do
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" ) );
- connect( dlg, SIGNAL( reloadData( InstallDlgImpl * ) ), this, SLOT( reloadData( InstallDlgImpl * ) ) );
+ connect( dlg, SIGNAL( reloadData(InstallDlgImpl*) ), this, SLOT( reloadData(InstallDlgImpl*) ) );
reloadDocuments = TRUE;
stack->addWidget( dlg, 3 );
stack->raiseWidget( dlg );
}
// decide what to do - either remove, upgrade or install
// Current rules:
// If not installed - install
// If installed and different version available - upgrade
// If installed and version up to date - remove
InstallData *MainWindow :: dealWithItem( QCheckListItem *item )
{