Skip to content

Commit

Permalink
Merge pull request #253 from mgavioli/TAB_edit_staff_type_dlg_box
Browse files Browse the repository at this point in the history
TAB: edit staff type dlg box.
  • Loading branch information
mgavioli committed Mar 11, 2013
2 parents 296bd13 + 5592965 commit 9a73ba6
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 27 deletions.
16 changes: 10 additions & 6 deletions mscore/editstafftype.cpp
Expand Up @@ -109,10 +109,10 @@ EditStaffType::EditStaffType(QWidget* parent, Staff* st)
connect(genTimesig, SIGNAL(toggled(bool)), SLOT(updateTabPreview()));
connect(noteValuesSymb, SIGNAL(toggled(bool)), SLOT(updateTabPreview()));
connect(noteValuesStems,SIGNAL(toggled(bool)), SLOT(on_tabStemsToggled(bool)));
connect(stemAboveRadio, SIGNAL(toggled(bool)), SLOT(updateTabPreview()));
connect(stemBelowRadio, SIGNAL(toggled(bool)), SLOT(updateTabPreview()));
connect(stemBesideRadio,SIGNAL(toggled(bool)), SLOT(updateTabPreview()));
connect(stemThroughRadio,SIGNAL(toggled(bool)), SLOT(on_tabStemThroughToggled(bool)));
connect(stemAboveRadio, SIGNAL(toggled(bool)), SLOT(updateTabPreview()));
connect(stemBelowRadio, SIGNAL(toggled(bool)), SLOT(updateTabPreview()));
// connect(minimNoneRadio, SIGNAL(toggled(bool)), SLOT(updateTabPreview()));
connect(minimShortRadio,SIGNAL(toggled(bool)), SLOT(on_tabMinimShortToggled(bool)));
connect(minimSlashedRadio,SIGNAL(toggled(bool)), SLOT(updateTabPreview()));
Expand Down Expand Up @@ -569,8 +569,8 @@ void EditStaffType::blockTabPreviewSignals(bool block)

void EditStaffType::tabStemsCompatibility(bool checked)
{
stemAboveRadio->setEnabled(checked);
stemBelowRadio->setEnabled(checked);
stemAboveRadio->setEnabled(checked && !stemThroughRadio->isChecked());
stemBelowRadio->setEnabled(checked && !stemThroughRadio->isChecked());
stemBesideRadio->setEnabled(checked);
stemThroughRadio->setEnabled(checked && !minimShortRadio->isChecked());
minimNoneRadio->setEnabled(checked);
Expand Down Expand Up @@ -602,6 +602,7 @@ void EditStaffType::tabMinimShortCompatibility(bool checked)
//
// Setting "stems through" is incompatible with "minim short":
// if checking and "minim short" is checked, move check to "minim slashed"
// It also make "Stems above" and "Stems below" meaningless: disable them
//---------------------------------------------------------

void EditStaffType::tabStemThroughCompatibility(bool checked)
Expand All @@ -612,8 +613,11 @@ void EditStaffType::tabStemThroughCompatibility(bool checked)
minimSlashedRadio->setChecked(true);
}
}
// disable / enable "minim short" according "stems through" is checked / unchecked
minimShortRadio->setEnabled(!checked && noteValuesStems->isChecked());
// disable / enable "minim short" and "stems above/below" according "stems through" is checked / unchecked
bool enab = !checked && noteValuesStems->isChecked();
minimShortRadio->setEnabled(enab);
stemAboveRadio->setEnabled(enab);
stemBelowRadio->setEnabled(enab);
}

//---------------------------------------------------------
Expand Down
42 changes: 21 additions & 21 deletions mscore/stafftype.ui
Expand Up @@ -756,52 +756,52 @@
</widget>
</item>
<item>
<widget class="QFrame" name="frame_5">
<widget class="QFrame" name="frame_6">
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Plain</enum>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_15">
<layout class="QHBoxLayout" name="horizontalLayout_17">
<property name="margin">
<number>0</number>
</property>
<item>
<widget class="QLabel" name="stemPosLabel">
<widget class="QLabel" name="stemStyleLabel">
<property name="minimumSize">
<size>
<width>120</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>Stem position:</string>
<string>Stem style:</string>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="stemAboveRadio">
<widget class="QRadioButton" name="stemBesideRadio">
<property name="minimumSize">
<size>
<width>110</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>Above</string>
<string>Beside staff</string>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="stemBelowRadio">
<widget class="QRadioButton" name="stemThroughRadio">
<property name="text">
<string>Below</string>
<string>Through staff</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_10">
<spacer name="horizontalSpacer_11">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
Expand All @@ -817,52 +817,52 @@
</widget>
</item>
<item>
<widget class="QFrame" name="frame_6">
<widget class="QFrame" name="frame_5">
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Plain</enum>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_17">
<layout class="QHBoxLayout" name="horizontalLayout_15">
<property name="margin">
<number>0</number>
</property>
<item>
<widget class="QLabel" name="stemStyleLabel">
<widget class="QLabel" name="stemPosLabel">
<property name="minimumSize">
<size>
<width>120</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>Stem style:</string>
<string>Stem position:</string>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="stemBesideRadio">
<widget class="QRadioButton" name="stemAboveRadio">
<property name="minimumSize">
<size>
<width>110</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>Beside staff</string>
<string>Above</string>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="stemThroughRadio">
<widget class="QRadioButton" name="stemBelowRadio">
<property name="text">
<string>Through staff</string>
<string>Below</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_11">
<spacer name="horizontalSpacer_10">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
Expand Down Expand Up @@ -1248,7 +1248,6 @@
<tabstop>presetTablatureCombo</tabstop>
<tabstop>pushFullConfig</tabstop>
<tabstop>upsideDown</tabstop>
<tabstop>pushQuickConfig</tabstop>
<tabstop>fretFontName</tabstop>
<tabstop>fretFontSize</tabstop>
<tabstop>fretY</tabstop>
Expand All @@ -1261,17 +1260,18 @@
<tabstop>noteValuesNone</tabstop>
<tabstop>noteValuesSymb</tabstop>
<tabstop>noteValuesStems</tabstop>
<tabstop>stemAboveRadio</tabstop>
<tabstop>stemBelowRadio</tabstop>
<tabstop>stemBesideRadio</tabstop>
<tabstop>stemThroughRadio</tabstop>
<tabstop>stemAboveRadio</tabstop>
<tabstop>stemBelowRadio</tabstop>
<tabstop>minimNoneRadio</tabstop>
<tabstop>minimShortRadio</tabstop>
<tabstop>minimSlashedRadio</tabstop>
<tabstop>showRests</tabstop>
<tabstop>durFontName</tabstop>
<tabstop>durFontSize</tabstop>
<tabstop>durY</tabstop>
<tabstop>pushQuickConfig</tabstop>
<tabstop>newTypeTablature</tabstop>
<tabstop>showLedgerLinesPercussion</tabstop>
<tabstop>genKeysigPercussion</tabstop>
Expand Down

0 comments on commit 9a73ba6

Please sign in to comment.