summaryrefslogtreecommitdiff
path: root/noncore/multimedia/powerchord
Side-by-side diff
Diffstat (limited to 'noncore/multimedia/powerchord') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/powerchord/powerchordbase.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/noncore/multimedia/powerchord/powerchordbase.cpp b/noncore/multimedia/powerchord/powerchordbase.cpp
index 0b97984..7978426 100644
--- a/noncore/multimedia/powerchord/powerchordbase.cpp
+++ b/noncore/multimedia/powerchord/powerchordbase.cpp
@@ -339,103 +339,103 @@ PowerchordBase::PowerchordBase( QWidget* parent, const char* name, WFlags fl )
tuner_calib_freq->setWrapping( TRUE );
tuner_calib_freq->setMaxValue( 500 );
tuner_calib_freq->setMinValue( 300 );
tuner_calib_freq->setValue( 440 );
tuner_lab3 = new QLabel( Tuner, "tuner_lab3" );
tuner_lab3->setGeometry( QRect( 185, 225, 40, 21 ) );
tuner_lab3->setText( tr( "Pitch" ) );
tuner_pic1 = new QLabel( Tuner, "tuner_pic1" );
tuner_pic1->setGeometry( QRect( 195, 155, 31, 31 ) );
tuner_pic1->setFrameShape( QLabel::NoFrame );
tuner_pic1->setPixmap( image6 );
tuner_pic1->setScaledContents( TRUE );
tabs->insertTab( Tuner, tr( "Tuner" ) );
tab_3 = new QWidget( tabs, "tab_3" );
chordlistlab1 = new QLabel( tab_3, "chordlistlab1" );
chordlistlab1->setGeometry( QRect( 5, 5, 216, 16 ) );
chordlistlab1->setText( tr( "Chord list" ) );
chordlist = new QListBox( tab_3, "chordlist" );
chordlist->setGeometry( QRect( 5, 25, 220, 200 ) );
list_remove_btn = new QPushButton( tab_3, "list_remove_btn" );
list_remove_btn->setGeometry( QRect( 150, 230, 71, 25 ) );
list_remove_btn->setText( tr( "Remove" ) );
tabs->insertTab( tab_3, tr( "Chords" ) );
// hope this does what it's supposed to!!
// setPalette( QPalette( QColor( 232, 227, 215) ) );
// signals and slots connections
//cxm
connect( tuning, SIGNAL( activated(int) ), frets, SLOT( Tune(int) ) );
connect( span, SIGNAL( activated(int) ), frets, SLOT( Span(int) ) );
connect( transport_rec, SIGNAL( clicked() ), this, SLOT( transport_rec_cb() ));
connect( play_sound, SIGNAL( clicked() ), this, SLOT( play_chord_cb() ));
connect( tuner_start, SIGNAL( clicked() ), this, SLOT( tuner_start_cb() ));
connect( tuner_note, SIGNAL( textChanged(const QString&) ), vu, SLOT( AnnotL(const QString&) ));
connect( this, SIGNAL( frequency_change(int) ), vu, SLOT( Value(int) ));
connect( chordnote, SIGNAL( activated(int) ), frets, SLOT( Base(int) ) );
connect( chordkey, SIGNAL( activated(int) ), frets, SLOT( Chord(int) ) );
connect( chordfret, SIGNAL( activated(int) ), frets, SLOT( Fret(int) ) );
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&) ) );
+ 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.");
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();
delete(audio_timer);
audio_timer = 0;
}else{
// get notes from chord engine
int note;
int base;
int octave;
note = frets->ce.noteindex(0);
if (note >= 0){
// 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);
}