* more of the same

This commit is contained in:
giantpune 2011-05-17 19:02:45 +00:00
parent 4f74cc3968
commit 3ee828284a
5 changed files with 126 additions and 126 deletions

View File

@ -165,7 +165,7 @@ private:
signals: signals:
void SendError( const QString &message, NusJob job );//send an errer and the title the error is about void SendError( const QString &message, NusJob job );//send an errer and the title the error is about
//send an errer and the title the error is about, no more jobs will be done, and the SendDone signal will not be emited //send an errer and the title the error is about, no more jobs will be done, and the SendDone signal will not be emited
void SendFatalErrorError( const QString &message, NusJob job );//currently not used void SendFatalErrorError( const QString &message, const NusJob &job );//currently not used
void SendDone();//message that all jobs are done void SendDone();//message that all jobs are done
//send progress about the currently downloading job //send progress about the currently downloading job
@ -178,13 +178,13 @@ signals:
void SendTitleProgress( int ); void SendTitleProgress( int );
//sends a completed job to whoever is listening //sends a completed job to whoever is listening
void SendData( NusJob ); void SendData( const NusJob & );
//a file is done downloading //a file is done downloading
void finished(); void finished();
//send pretty text about what is happening //send pretty text about what is happening
void SendText( QString ); void SendText( const QString & );
//maybe this one is redundant //maybe this one is redundant
//void SendJobFinished( downloadJob ); //void SendJobFinished( downloadJob );

View File

@ -33,9 +33,9 @@ MainWindow::MainWindow( QWidget *parent ) : QMainWindow( parent ), ui( new Ui::M
connect( &nus, SIGNAL( SendTitleProgress( int ) ), ui->progressBar_title, SLOT( setValue( int ) ) ); connect( &nus, SIGNAL( SendTitleProgress( int ) ), ui->progressBar_title, SLOT( setValue( int ) ) );
connect( &nus, SIGNAL( SendTotalProgress( int ) ), ui->progressBar_whole, SLOT( setValue( int ) ) ); connect( &nus, SIGNAL( SendTotalProgress( int ) ), ui->progressBar_whole, SLOT( setValue( int ) ) );
connect( &nus, SIGNAL( SendText( QString ) ), ui->statusBar, SLOT( showMessage( QString ) ) ); connect( &nus, SIGNAL( SendText( QString ) ), ui->statusBar, SLOT( showMessage( QString ) ) );
connect( &nus, SIGNAL( SendError( const QString &, NusJob ) ), this, SLOT( GetError( const QString &, NusJob ) ) ); connect( &nus, SIGNAL( SendError( const QString &, const NusJob & ) ), this, SLOT( GetError( const QString &, const NusJob & ) ) );
connect( &nus, SIGNAL( SendDone() ), this, SLOT( NusIsDone() ) ); connect( &nus, SIGNAL( SendDone() ), this, SLOT( NusIsDone() ) );
connect( &nus, SIGNAL( SendData( NusJob ) ), this, SLOT( ReceiveTitleFromNus( NusJob) ) ); connect( &nus, SIGNAL( SendData( const NusJob & ) ), this, SLOT( ReceiveTitleFromNus( const NusJob & ) ) );
LoadSettings(); LoadSettings();
} }
@ -120,7 +120,7 @@ void MainWindow::LoadSettings()
} }
//some slots to respond to the NUS downloader //some slots to respond to the NUS downloader
void MainWindow::GetError( const QString &message, NusJob job ) void MainWindow::GetError( const QString &message, const NusJob &job )
{ {
QString dataStuff = QString( "%1 items:" ).arg( job.data.size() ); QString dataStuff = QString( "%1 items:" ).arg( job.data.size() );
for( int i = 0; i < job.data.size(); i++ ) for( int i = 0; i < job.data.size(); i++ )
@ -205,7 +205,7 @@ void MainWindow::NusIsDone()
ui->radioButton_wad->setEnabled( true ); ui->radioButton_wad->setEnabled( true );
} }
void MainWindow::ReceiveTitleFromNus( NusJob job ) void MainWindow::ReceiveTitleFromNus( const NusJob &job )
{ {
QString str = tr( "Received a completed download from NUS" ); QString str = tr( "Received a completed download from NUS" );
QString title = QString( "%1v%2" ).arg( job.tid, 16, 16, QChar( '0' ) ).arg( job.version ); QString title = QString( "%1v%2" ).arg( job.tid, 16, 16, QChar( '0' ) ).arg( job.version );

View File

@ -37,9 +37,9 @@ private:
public slots: public slots:
//slots for getting info from the NUS downloader //slots for getting info from the NUS downloader
void GetError( const QString &message, NusJob job ); void GetError( const QString &message, const NusJob &job );
void NusIsDone(); void NusIsDone();
void ReceiveTitleFromNus( NusJob job ); void ReceiveTitleFromNus( const NusJob &job );
private slots: private slots:

View File

@ -47,9 +47,9 @@ MainWindow::MainWindow( QWidget *parent ) : QMainWindow( parent ), ui( new Ui::M
connect( &nus, SIGNAL( SendTitleProgress( int ) ), ui->progressBar_title, SLOT( setValue( int ) ) ); connect( &nus, SIGNAL( SendTitleProgress( int ) ), ui->progressBar_title, SLOT( setValue( int ) ) );
connect( &nus, SIGNAL( SendTotalProgress( int ) ), ui->progressBar_whole, SLOT( setValue( int ) ) ); connect( &nus, SIGNAL( SendTotalProgress( int ) ), ui->progressBar_whole, SLOT( setValue( int ) ) );
connect( &nus, SIGNAL( SendText( QString ) ), ui->statusBar, SLOT( showMessage( QString ) ) ); connect( &nus, SIGNAL( SendText( QString ) ), ui->statusBar, SLOT( showMessage( QString ) ) );
connect( &nus, SIGNAL( SendError( const QString &, NusJob ) ), this, SLOT( GetError( const QString &, NusJob ) ) ); connect( &nus, SIGNAL( SendError( const QString &, const NusJob & ) ), this, SLOT( GetError( const QString &, const NusJob & ) ) );
connect( &nus, SIGNAL( SendDone() ), this, SLOT( NusIsDone() ) ); connect( &nus, SIGNAL( SendDone() ), this, SLOT( NusIsDone() ) );
connect( &nus, SIGNAL( SendData( NusJob ) ), this, SLOT( ReceiveTitleFromNus( NusJob ) ) ); connect( &nus, SIGNAL( SendData( const NusJob & ) ), this, SLOT( ReceiveTitleFromNus( const NusJob & ) ) );
//connect to the nand.bin to get text and crap from it //connect to the nand.bin to get text and crap from it
connect( &nand, SIGNAL( SendError( const QString & ) ), this, SLOT( GetError( const QString & ) ) ); connect( &nand, SIGNAL( SendError( const QString & ) ), this, SLOT( GetError( const QString & ) ) );
@ -109,7 +109,7 @@ void MainWindow::LoadSettings()
} }
//some slots to respond to the NUS downloader //some slots to respond to the NUS downloader
void MainWindow::GetError( const QString &message, NusJob job ) void MainWindow::GetError( const QString &message, const NusJob &job )
{ {
QString dataStuff = QString( "%1 items:" ).arg( job.data.size() ); QString dataStuff = QString( "%1 items:" ).arg( job.data.size() );
for( int i = 0; i < job.data.size(); i++ ) for( int i = 0; i < job.data.size(); i++ )
@ -190,7 +190,7 @@ void MainWindow::NusIsDone()
} }
} }
void MainWindow::ReceiveTitleFromNus( NusJob job ) void MainWindow::ReceiveTitleFromNus( const NusJob &job )
{ {
QString str = tr( "Received a completed download from NUS" ); QString str = tr( "Received a completed download from NUS" );
//QString title = QString( "%1v%2" ).arg( job.tid, 16, 16, QChar( '0' ) ).arg( job.version ); //QString title = QString( "%1v%2" ).arg( job.tid, 16, 16, QChar( '0' ) ).arg( job.version );

View File

@ -56,10 +56,10 @@ private:
public slots: public slots:
//slots for getting info from the NUS downloader //slots for getting info from the NUS downloader
void GetError( const QString &message, NusJob job ); void GetError( const QString &message, const NusJob &job );
void GetError( const QString &message ); void GetError( const QString &message );
void NusIsDone(); void NusIsDone();
void ReceiveTitleFromNus( NusJob job ); void ReceiveTitleFromNus( const NusJob &job );
private slots: private slots:
void on_actionFormat_triggered(); void on_actionFormat_triggered();