fix 24491: disable even dialog part
when not using the Odd/Even setting
This commit is contained in:
parent
0378b8b08f
commit
0a8cf7fe17
2 changed files with 47 additions and 0 deletions
|
@ -112,6 +112,8 @@ EditStyle::EditStyle(Score* s, QWidget* parent)
|
|||
|
||||
setValues();
|
||||
connect(buttonBox, SIGNAL(clicked(QAbstractButton*)), SLOT(buttonClicked(QAbstractButton*)));
|
||||
connect(headerOddEven, SIGNAL(toggled(bool)), SLOT(toggleHeaderOddEven(bool)));
|
||||
connect(footerOddEven, SIGNAL(toggled(bool)), SLOT(toggleFooterOddEven(bool)));
|
||||
connect(chordDescriptionFileButton, SIGNAL(clicked()), SLOT(selectChordDescriptionFile()));
|
||||
connect(chordsStandard, SIGNAL(toggled(bool)), SLOT(setChordStyle(bool)));
|
||||
connect(chordsJazz, SIGNAL(toggled(bool)), SLOT(setChordStyle(bool)));
|
||||
|
@ -622,6 +624,7 @@ void EditStyle::setValues()
|
|||
headerStyled->setChecked(lstyle.value(ST_headerStyled).toBool());
|
||||
showHeaderFirstPage->setChecked(lstyle.value(ST_headerFirstPage).toBool());
|
||||
headerOddEven->setChecked(lstyle.value(ST_headerOddEven).toBool());
|
||||
toggleHeaderOddEven(lstyle.value(ST_headerOddEven).toBool());
|
||||
if (headerStyled->isChecked()) {
|
||||
evenHeaderL->setPlainText(lstyle.value(ST_evenHeaderL).toString());
|
||||
evenHeaderC->setPlainText(lstyle.value(ST_evenHeaderC).toString());
|
||||
|
@ -643,6 +646,7 @@ void EditStyle::setValues()
|
|||
footerStyled->setChecked(lstyle.value(ST_footerStyled).toBool());
|
||||
showFooterFirstPage->setChecked(lstyle.value(ST_footerFirstPage).toBool());
|
||||
footerOddEven->setChecked(lstyle.value(ST_footerOddEven).toBool());
|
||||
toggleFooterOddEven(lstyle.value(ST_footerOddEven).toBool());
|
||||
if (footerStyled->isChecked()) {
|
||||
evenFooterL->setPlainText(lstyle.value(ST_evenFooterL).toString());
|
||||
evenFooterC->setPlainText(lstyle.value(ST_evenFooterC).toString());
|
||||
|
@ -743,6 +747,47 @@ void EditStyle::setChordStyle(bool checked)
|
|||
}
|
||||
}
|
||||
|
||||
//---------------------------------------------------------
|
||||
// toggleHeaderOddEven
|
||||
//---------------------------------------------------------
|
||||
|
||||
void EditStyle::toggleHeaderOddEven(bool checked)
|
||||
{
|
||||
label_67->setEnabled(checked); // "Even"
|
||||
if (checked)
|
||||
label_66->setText(tr("Odd"));
|
||||
else
|
||||
label_66->setText(tr("Even/Odd"));
|
||||
evenHeaderL->setEnabled(checked);
|
||||
editEvenHeaderL->setEnabled(checked);
|
||||
evenHeaderC->setEnabled(checked);
|
||||
editEvenHeaderC->setEnabled(checked);
|
||||
evenHeaderR->setEnabled(checked);
|
||||
editEvenHeaderR->setEnabled(checked);
|
||||
return;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------
|
||||
// toggleFooterOddEven
|
||||
//---------------------------------------------------------
|
||||
|
||||
void EditStyle::toggleFooterOddEven(bool checked)
|
||||
{
|
||||
label_80->setEnabled(checked); // "Even"
|
||||
if (checked)
|
||||
label_65->setText(tr("Odd"));
|
||||
else
|
||||
label_65->setText(tr("Even/Odd"));
|
||||
|
||||
evenFooterL->setEnabled(checked);
|
||||
editEvenFooterL->setEnabled(checked);
|
||||
evenFooterC->setEnabled(checked);
|
||||
editEvenFooterC->setEnabled(checked);
|
||||
evenFooterR->setEnabled(checked);
|
||||
editEvenFooterR->setEnabled(checked);
|
||||
return;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------
|
||||
// editTextClicked
|
||||
//---------------------------------------------------------
|
||||
|
|
|
@ -49,6 +49,8 @@ class EditStyle : public QDialog, private Ui::EditStyleBase {
|
|||
private slots:
|
||||
void selectChordDescriptionFile();
|
||||
void setChordStyle(bool);
|
||||
void toggleHeaderOddEven(bool);
|
||||
void toggleFooterOddEven(bool);
|
||||
void buttonClicked(QAbstractButton*);
|
||||
void editTextClicked(int id);
|
||||
void resetStyleValue(int i);
|
||||
|
|
Loading…
Reference in a new issue