1414// You should have received a copy of the GNU General Public License
1515// along with this program. If not, see <https://www.gnu.org/licenses/>.
1616
17- import QtQuick 2.2
18- import QtQuick . Controls 2.15
19- import QtQuick . Layouts 1.15
17+ import QtQuick
18+ import QtQuick . Controls
19+ import QtQuick . Layouts
2020
2121import MuseScore 3.0
2222import FileIO 3.0
@@ -30,7 +30,7 @@ MuseScore {
3030 thumbnailName : "modal_tuning.png"
3131
3232 width : 860
33- height : 722
33+ height : 740
3434
3535 property var offsetTextWidth : 40 ;
3636 property var offsetLabelAlignment : 0x02 | 0x40 ;
@@ -228,7 +228,7 @@ MuseScore {
228228 var selection = new scoreSelection ( )
229229 curScore . startCmd ( )
230230 selection . map ( filterNotes , reTune ( getFinalTuning ( ) ) )
231- if ( annotateValue . checkedState == Qt . Checked ) {
231+ if ( annotateValue . checked ) {
232232 selection . map ( filterNotes , annotate )
233233 }
234234 curScore . endCmd ( )
@@ -823,163 +823,144 @@ MuseScore {
823823 Item {
824824 anchors . fill : parent
825825
826+ ButtonGroup { id : temperamentTypeGroup }
827+
828+ component TuningItem: RadioButton {
829+ padding: 2
830+ ButtonGroup . group : temperamentTypeGroup
831+ }
832+
826833 GridLayout {
827834 columns: 2
828835 anchors . fill : parent
829836 anchors . margins : 10
830837 GroupBox {
831838 title: "Tuning"
832839 ColumnLayout {
833- ButtonGroup { id : tempamentTypeGroup }
834- RadioButton {
840+ TuningItem {
835841 id: equal_button
836842 text: "Equal"
837843 checked: true
838- ButtonGroup . group : tempamentTypeGroup
839844 onClicked: { temperamentClicked ( equal ) }
840845 }
841- RadioButton {
846+ TuningItem {
842847 id: tuning01_button
843848 text: "Melodic 1# 2b"
844- ButtonGroup . group : tempamentTypeGroup
845849 onClicked: { temperamentClicked ( tuning01 ) }
846850 }
847- RadioButton {
851+ TuningItem {
848852 id: tuning02_button
849853 text: "Harmonic 1# 2b"
850- ButtonGroup . group : tempamentTypeGroup
851854 onClicked: { temperamentClicked ( tuning02 ) }
852855 }
853- RadioButton {
856+ TuningItem {
854857 id: tuning03_button
855858 text: "Rast, Sikah"
856- ButtonGroup . group : tempamentTypeGroup
857859 onClicked: { temperamentClicked ( tuning03 ) }
858860 }
859- RadioButton {
861+ TuningItem {
860862 id: tuning04_button
861863 text: "Suznak, Huzam"
862- ButtonGroup . group : tempamentTypeGroup
863864 onClicked: { temperamentClicked ( tuning04 ) }
864865 }
865- RadioButton {
866+ TuningItem {
866867 id: tuning05_button
867868 text: "Nayruz"
868- ButtonGroup . group : tempamentTypeGroup
869869 onClicked: { temperamentClicked ( tuning05 ) }
870870 }
871- RadioButton {
871+ TuningItem {
872872 id: tuning06_button
873873 text: "Bayati, Kurd, Huseyni"
874- ButtonGroup . group : tempamentTypeGroup
875874 onClicked: { temperamentClicked ( tuning06 ) }
876875 }
877- RadioButton {
876+ TuningItem {
878877 id: tuning07_button
879878 text: "Qarjighar"
880- ButtonGroup . group : tempamentTypeGroup
881879 onClicked: { temperamentClicked ( tuning07 ) }
882880 }
883- RadioButton {
881+ TuningItem {
884882 id: tuning08_button
885883 text: "Saba, Basta Nikar, Zanjaran"
886- ButtonGroup . group : tempamentTypeGroup
887884 onClicked: { temperamentClicked ( tuning08 ) }
888885 }
889- RadioButton {
886+ TuningItem {
890887 id: tuning09_button
891888 text: "Hijaz, Nikriz"
892- ButtonGroup . group : tempamentTypeGroup
893889 onClicked: { temperamentClicked ( tuning09 ) }
894890 }
895- RadioButton {
891+ TuningItem {
896892 id: tuning10_button
897893 text: "Nawa'athar, Shad Araban"
898- ButtonGroup . group : tempamentTypeGroup
899894 onClicked: { temperamentClicked ( tuning10 ) }
900895 }
901- RadioButton {
896+ TuningItem {
902897 id: tuning11_button
903898 text: "Shehnaz"
904- ButtonGroup . group : tempamentTypeGroup
905899 onClicked: { temperamentClicked ( tuning11 ) }
906900 }
907- RadioButton {
901+ TuningItem {
908902 id: tuning12_button
909903 text: "Nahawand, Hijaz Kar"
910- ButtonGroup . group : tempamentTypeGroup
911904 onClicked: { temperamentClicked ( tuning12 ) }
912905 }
913- RadioButton {
906+ TuningItem {
914907 id: tuning13_button
915908 text: "Nahawand, Hijaz Kar Kurd"
916- ButtonGroup . group : tempamentTypeGroup
917909 onClicked: { temperamentClicked ( tuning13 ) }
918910 }
919- RadioButton {
911+ TuningItem {
920912 id: tuning14_button
921913 text: "Iraq, Yekah, Nawa"
922- ButtonGroup . group : tempamentTypeGroup
923914 onClicked: { temperamentClicked ( tuning14 ) }
924915 }
925- RadioButton {
916+ TuningItem {
926917 id: tuning15_button
927918 text: "Farahnak, Yekah, Nawa"
928- ButtonGroup . group : tempamentTypeGroup
929919 onClicked: { temperamentClicked ( tuning15 ) }
930920 }
931- RadioButton {
921+ TuningItem {
932922 id: tuning16_button
933923 text: "Jiharkah"
934- ButtonGroup . group : tempamentTypeGroup
935924 onClicked: { temperamentClicked ( tuning16 ) }
936925 }
937- RadioButton {
926+ TuningItem {
938927 id: tuning17_button
939928 text: "Ajam Ashyran, Shawq Afza"
940- ButtonGroup . group : tempamentTypeGroup
941929 onClicked: { temperamentClicked ( tuning17 ) }
942930 }
943- RadioButton {
931+ TuningItem {
944932 id: tuning18_button
945933 text: "Hisar"
946- ButtonGroup . group : tempamentTypeGroup
947934 onClicked: { temperamentClicked ( tuning18 ) }
948935 }
949- RadioButton {
936+ TuningItem {
950937 id: tuning19_button
951938 text: "Nishaburek (Rast in D & A)"
952- ButtonGroup . group : tempamentTypeGroup
953939 onClicked: { temperamentClicked ( tuning19 ) }
954940 }
955- RadioButton {
941+ TuningItem {
956942 id: tuning20_button
957943 text: "Nishaburek (Rast in D, Bayati in A)"
958- ButtonGroup . group : tempamentTypeGroup
959944 onClicked: { temperamentClicked ( tuning20 ) }
960945 }
961- RadioButton {
946+ TuningItem {
962947 id: tuning21_button
963948 text: "Saba Zamzam"
964- ButtonGroup . group : tempamentTypeGroup
965949 onClicked: { temperamentClicked ( tuning21 ) }
966950 }
967- RadioButton {
951+ TuningItem {
968952 id: tuning22_button
969953 text: "Rakb"
970- ButtonGroup . group : tempamentTypeGroup
971954 onClicked: { temperamentClicked ( tuning22 ) }
972955 }
973- RadioButton {
956+ TuningItem {
974957 id: tuning23_button
975958 text: "Sikah Baladi"
976- ButtonGroup . group : tempamentTypeGroup
977959 onClicked: { temperamentClicked ( tuning23 ) }
978960 }
979- RadioButton {
961+ TuningItem {
980962 id: tuning24_button
981963 text: "Iraq (Cadence)"
982- ButtonGroup . group : tempamentTypeGroup
983964 onClicked: { temperamentClicked ( tuning24 ) }
984965 }
985966 }
@@ -1421,7 +1402,6 @@ MuseScore {
14211402 id: annotateValue
14221403 text: qsTr ( "Annotate" )
14231404 checked: false
1424- onClicked: checked = ! checked
14251405 }
14261406 }
14271407 }
0 commit comments