-rw-r--r-- | noncore/multimedia/powerchord/powerchordbase.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/noncore/multimedia/powerchord/powerchordbase.cpp b/noncore/multimedia/powerchord/powerchordbase.cpp index 0694ba3..92198bf 100644 --- a/noncore/multimedia/powerchord/powerchordbase.cpp +++ b/noncore/multimedia/powerchord/powerchordbase.cpp @@ -383,33 +383,34 @@ PowerchordBase::PowerchordBase( QWidget* parent, const char* name, WFlags fl ) connect( list_remove_btn, SIGNAL( clicked() ), this, SLOT( list_remove_cb() ) ); connect( frets, SIGNAL( s1nameChanged(const QString&) ), s1_1, SLOT( setText(const QString&) ) ); connect( frets, SIGNAL( s2nameChanged(const QString&) ), s1_2, SLOT( setText(const QString&) ) ); connect( frets, SIGNAL( s3nameChanged(const QString&) ), s1_3, SLOT( setText(const QString&) ) ); connect( frets, SIGNAL( s4nameChanged(const QString&) ), s1_4, SLOT( setText(const QString&) ) ); connect( frets, SIGNAL( s5nameChanged(const QString&) ), s1_5, SLOT( setText(const QString&) ) ); connect( frets, SIGNAL( s6nameChanged(const QString&) ), s1_6, SLOT( setText(const QString&) ) ); connect( frets, SIGNAL( nameChanged(const QString&) ), chordname, SLOT( setText(const QString&) ) ); } static int known=0; #include <qmessagebox.h> void PowerchordBase::transport_rec_cb(){ chordlist->insertItem(chordname->text(),-1); if (!known){ - QMessageBox::information(this, "Powerchord", "This chord has been saved\ninto the list of chords,\nfor later playback."); + QMessageBox::information(this, tr("Powerchord"), + tr("<P>This chord has been saved into the list of chords, for later playback.<P>"); known = 1; } } void PowerchordBase::list_remove_cb(){ if (chordlist->count() > 0){ chordlist->removeItem(0); } } void PowerchordBase::play_chord_cb(){ // QMessageBox::information(this, "Coming soon!", "This button plays\nthe chord by synthesizing\nthe sound of the notes."); if (audio_timer){ audio_timer->stop(); // set pixmap? synth->Stop(); @@ -426,33 +427,34 @@ void PowerchordBase::play_chord_cb(){ // fprintf(stderr, "Note was %d\n", note); base = note % 12; octave = note / 12; synth->note_start(0, base, octave); }else{ // subtle bug here - replay second note if 1st one muted note = frets->ce.noteindex(1); base = note % 12; octave = note / 12; synth->note_start(1, base, octave); } // init synth if (synth->Play()){ // error - QMessageBox::information(this, "Powerchord", "Unable to open device for sound playback - check that no other application is using it."); + QMessageBox::information(this, tr("Powerchord"), + tr("<P>Unable to open device for sound playback - check that no other application is using it.</P>")); return; } synth->fill_buffer(); // start timer audio_timer = new QTimer(); connect(audio_timer, SIGNAL( timeout() ), this, SLOT( audio_cb() )); // set pixmap on player? audio_timer->start(19); // 19 msec (fudge factor!!) } } void PowerchordBase::audio_cb(){ // play the next bit of audio until quiet @@ -517,33 +519,35 @@ void PowerchordBase::tuner_cb(){ tuner->read_buffer(); tuner->process_buffer(); // update gui // do something with the note: tuner->Note() emit frequency_change(tuner->Tuning()); }else{ simulation_timer->stop(); tuner->Stop(); tuner_pic1->setPixmap( image6 ); } } void PowerchordBase::tuner_start_cb(){ - if (0 == QMessageBox::information(this, "Powerchord", "Using the microphone,\nthe note's frequency\nis analysed. This\nis a simulation.", "OK", "Cancel", 0, 1)){ + if (0 == QMessageBox::information(this, tr("Powerchord"), + tr("<P>Using the microphone, the note's frequency is analysed. This is a simulation.</P>"), + tr("OK"), tr("Cancel"), 0, 1)){ if (simulation_timer){ simulation_timer->stop(); }else{ simulation_timer = new QTimer(); connect(simulation_timer, SIGNAL( timeout() ), this, SLOT( tuner_simulation_cb() )); } simulation_x = -45; simulation_v = 0; simulation_iter = 0; tuner_pic1->setPixmap( image_open ); simulation_timer->start(100); } } |