fix timesig wizard

This commit is contained in:
Werner Schweer 2012-07-26 14:55:30 +02:00
parent bb9a10e3b9
commit 0e5beae309
2 changed files with 54 additions and 45 deletions

View file

@ -450,7 +450,7 @@ int TimesigWizard::measures() const
Fraction TimesigWizard::timesig() const
{
if (tsFraction->isChecked())
return Fraction(timesigZ->value(), timesigN->value());
return Fraction(timesigZ->value(), 1 << timesigN->currentIndex());
else if (tsCommonTime->isChecked())
return Fraction(4, 4);
else
@ -464,7 +464,7 @@ Fraction TimesigWizard::timesig() const
bool TimesigWizard::pickup(int* z, int* n) const
{
*z = pickupTimesigZ->value();
*n = pickupTimesigN->value();
*n = 1 << timesigN->currentIndex();
return pickupMeasure->isChecked();
}

View file

@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>613</width>
<height>322</height>
<width>426</width>
<height>311</height>
</rect>
</property>
<property name="windowTitle">
@ -74,39 +74,47 @@
</widget>
</item>
<item>
<widget class="QComboBox" name="TimesigN">
<item>
<property name="text">
<string>1</string>
</property>
<widget class="QComboBox" name="timesigN">
<property name="currentIndex">
<number>2</number>
</property>
<item>
<property name="text">
<string>1</string>
</property>
</item>
<item>
<property name="text">
<string>2</string>
</property>
</item>
<item>
<property name="text">
<string>4</string>
</property>
</item>
<item>
<property name="text">
<string>8</string>
</property>
</item>
<item>
<property name="text">
<string>16</string>
</property>
</item>
<item>
<property name="text">
<string>32</string>
</property>
</item>
<item>
<property name="text">
<string>64</string>
</property>
</item>
</widget>
</item>
<item>
<property name="text">
<string>2</string>
</property>
</item>
<item>
<property name="text">
<string>4</string>
</property>
</item>
<item>
<property name="text">
<string>8</string>
</property>
</item>
<item>
<property name="text">
<string>16</string>
</property>
</item>
<item>
<property name="text">
<string>32</string>
</property>
</item>
</widget>
</item>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
@ -192,6 +200,9 @@
</item>
<item>
<widget class="QComboBox" name="pickupTimesigN">
<property name="currentIndex">
<number>2</number>
</property>
<item>
<property name="text">
<string>1</string>
@ -212,16 +223,21 @@
<string>8</string>
</property>
</item>
<item>
<item>
<property name="text">
<string>16</string>
</property>
</item>
<item>
<item>
<property name="text">
<string>32</string>
</property>
</item>
<item>
<property name="text">
<string>64</string>
</property>
</item>
</widget>
</item>
<item>
@ -318,13 +334,6 @@ p, li { white-space: pre-wrap; }
</item>
</layout>
</widget>
<customwidgets>
<customwidget>
<class>Awl::DenominatorSpinBox</class>
<extends>QSpinBox</extends>
<header>awl/denomspinbox.h</header>
</customwidget>
</customwidgets>
<resources/>
<connections/>
</ui>