41
42
//---------------------------------------------------------
43
44
static QToolButton* newButton(QWidget* parent, const QString& s,
44
const QString& tt, bool toggle=false)
45
const QString& tt, bool toggle=false, int height=25)
46
47
QToolButton* button = new QToolButton(parent);
47
button->setFixedHeight(25);
48
button->setFixedHeight(height);
48
49
button->setText(s);
49
50
button->setToggleButton(toggle);
50
51
QToolTip::add(button, tt);
338
339
//-----------------------------------------------------
340
341
QVBox* button1 = new QVBox(this);
341
button1->setMargin(3);
342
button1->setMargin(1);
343
quantizeButton = newButton(button1, tr("AC"), tr("quantize during record"), true);
344
clickButton = newButton(button1, tr("Click"), tr("metronom click on/off"), true);
344
quantizeButton = newButton(button1, tr("AC"), tr("quantize during record"), true,19);
345
clickButton = newButton(button1, tr("Click"), tr("metronom click on/off"), true,19);
345
346
clickButton->setAccel(shortcuts[SHRT_TOGGLE_METRO].key);
347
syncButton = newButton(button1, tr("Sync"), tr("external sync on/off"), true);
348
syncButton = newButton(button1, tr("Sync"), tr("external sync on/off"), true,19);
349
jackTransportButton = newButton(button1, tr("Jack"), tr("Jack transport sync on/off"), true,19);
349
351
quantizeButton->setOn(song->quantize());
350
352
clickButton->setOn(song->click());
351
353
syncButton->setOn(extSyncFlag.value());
354
jackTransportButton->setOn(useJackTransport.value());
353
356
connect(quantizeButton, SIGNAL(toggled(bool)), song, SLOT(setQuantize(bool)));
354
357
connect(clickButton, SIGNAL(toggled(bool)), song, SLOT(setClick(bool)));
355
359
connect(syncButton, SIGNAL(toggled(bool)), &extSyncFlag, SLOT(setValue(bool)));
360
connect(jackTransportButton, SIGNAL(toggled(bool)),&useJackTransport, SLOT(setValue(bool)));
356
361
connect(&extSyncFlag, SIGNAL(valueChanged(bool)), SLOT(syncChanged(bool)));
362
connect(&useJackTransport, SIGNAL(valueChanged(bool)), SLOT(jackSyncChanged(bool)));
358
364
connect(song, SIGNAL(quantizeChanged(bool)), this, SLOT(setQuantizeFlag(bool)));
359
365
connect(song, SIGNAL(clickChanged(bool)), this, SLOT(setClickFlag(bool)));