From 0667f3d4000e0550bf878013d3bd063dee67ed7b Mon Sep 17 00:00:00 2001 From: pklion <78145811+pklion@users.noreply.github.com> Date: Sun, 31 Dec 2023 21:14:43 +0900 Subject: [PATCH 1/5] Add codes for MuseScore 4 --- movable-do.qml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/movable-do.qml b/movable-do.qml index b872f02..88ca63d 100644 --- a/movable-do.qml +++ b/movable-do.qml @@ -16,10 +16,17 @@ import QtQuick.Dialogs 1.2 import MuseScore 3.0 MuseScore { + version: "1.4" description: "This plugin inserts movable do texts derived from the given tonality" menuPath: "Plugins.MovableDo" + Component.onCompleted: { + if (mscoreMajorVersion >= 4) { + title = "Movable Do"; + } + } + // Small note name size is fraction of the full font size. property real fontSizeMini: 0.7 @@ -307,7 +314,7 @@ MuseScore { id: form width: exporterColumn.width + 30 height: exporterColumn.height + 30 - color: "lightgray" + color: (mscoreMajorVersion < 4? "lightgray" : "#F5F5F6") ColumnLayout { id: exporterColumn GridLayout { @@ -342,7 +349,7 @@ MuseScore { notation.currentIndex) curScore.endCmd() tonalityDialog.visible = false - Qt.quit() + return } } } From 49acb5b225f8b11ace0e54137b209cfaac695680 Mon Sep 17 00:00:00 2001 From: pklion <78145811+pklion@users.noreply.github.com> Date: Sun, 31 Dec 2023 21:22:50 +0900 Subject: [PATCH 2/5] Update description --- README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 4b1bcc3..367e27c 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,13 @@ -# Movable Do Plugin for MuseScore 3 +# Movable Do Plugin for MuseScore 3 / 4 -指定された調性をもとに移動ドを振る MuseScore 3 のプラグインです。 +指定された調性をもとに移動ドを振る MuseScore 3 / 4 のプラグインです。 ## インストール `movable-do.qml` を[ダウンロード](https://github.com/nozomu-y/MovableDo/releases/download/v1.4/movable-do.qml)し、[MuseScore のハンドブック](https://musescore.org/ja/%E3%83%8F%E3%83%B3%E3%83%89%E3%83%96%E3%83%83%E3%82%AF/furakuin#installation)を参考にインストールしてください。 +MuseScore 4 での導入の際は、「プラグイン」フォルダ内に**更にもう一階層フォルダを作成**し、その中に `movable-do.qml` を移動してください。 + ## デモ ![demo](https://github.com/nozomu-y/MovableDo/blob/media/demo.gif?raw=true) From 9dd10afb8b23ff3e53bc1f196ee8dc044d319933 Mon Sep 17 00:00:00 2001 From: pklion <78145811+pklion@users.noreply.github.com> Date: Wed, 3 Jan 2024 14:08:10 +0900 Subject: [PATCH 3/5] Beautify Ternary Operator Co-authored-by: Nozomu <46639706+nozomu-y@users.noreply.github.com> --- movable-do.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/movable-do.qml b/movable-do.qml index 88ca63d..9335e34 100644 --- a/movable-do.qml +++ b/movable-do.qml @@ -314,7 +314,7 @@ MuseScore { id: form width: exporterColumn.width + 30 height: exporterColumn.height + 30 - color: (mscoreMajorVersion < 4? "lightgray" : "#F5F5F6") + color: (mscoreMajorVersion < 4 ? "lightgray" : "#F5F5F6") ColumnLayout { id: exporterColumn GridLayout { From c4235013c9862874fb4b73e425940854fd4da70e Mon Sep 17 00:00:00 2001 From: pklion <78145811+pklion@users.noreply.github.com> Date: Thu, 4 Jan 2024 20:21:56 +0900 Subject: [PATCH 4/5] Adjust UI for MuseScore 4 (1) Apply suggestions from code review (Thx @nozomu-y) Co-authored-by: Nozomu <46639706+nozomu-y@users.noreply.github.com> --- movable-do.qml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/movable-do.qml b/movable-do.qml index 9335e34..491a067 100644 --- a/movable-do.qml +++ b/movable-do.qml @@ -14,8 +14,10 @@ import QtQuick.Layouts 1.1 import QtQuick.Dialogs 1.2 import MuseScore 3.0 +import MuseScore.UiComponents 1.0 MuseScore { + id: root version: "1.4" description: "This plugin inserts movable do texts derived from the given tonality" @@ -27,6 +29,9 @@ MuseScore { } } + property int tonalityIndex: -1 + property int notationIndex: -1 + // Small note name size is fraction of the full font size. property real fontSizeMini: 0.7 From 0db97a2a6c29afc1a451fd5e18678b3f33d01748 Mon Sep 17 00:00:00 2001 From: pklion <78145811+pklion@users.noreply.github.com> Date: Thu, 4 Jan 2024 20:32:59 +0900 Subject: [PATCH 5/5] Adjust UI for MuseScore 4 (2) --- movable-do.qml | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/movable-do.qml b/movable-do.qml index 491a067..67c014f 100644 --- a/movable-do.qml +++ b/movable-do.qml @@ -8,8 +8,8 @@ // License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher //============================================================================= -import QtQuick 2.2 -import QtQuick.Controls 1.1 +import QtQuick 2.9 +import QtQuick.Controls 2.2 import QtQuick.Layouts 1.1 import QtQuick.Dialogs 1.2 @@ -17,6 +17,7 @@ import MuseScore 3.0 import MuseScore.UiComponents 1.0 MuseScore { + id: root version: "1.4" @@ -330,21 +331,29 @@ MuseScore { Label { text: qsTr('調性') } - ComboBox { + StyledDropdown { id: tonality model: [ "C-Dur", "G-Dur", "D-Dur", "A-Dur", "E-Dur", "H-Dur", "Fis-Dur", "Cis-Dur", "F-Dur", "B-Dur", "Es-Dur", "As-Dur", "Des-Dur", "Ges-Dur", "Ces-Dur", "a-moll", "e-moll", "h-moll", "fis-moll", "cis-moll", "gis-moll", "dis-moll", "ais-moll", "d-moll", "g-moll", "c-moll", "f-moll", "b-moll", "es-moll", "as-moll" ] + currentIndex: root.tonalityIndex + onActivated: function(index) { + root.tonalityIndex = index + } } Label { text: qsTr('表記') } - ComboBox { + StyledDropdown { id: notation model: ["d r m", "ド レ ミ"] + currentIndex: root.notationIndex + onActivated: function(index) { + root.notationIndex = index + } } - Button { + FlatButton { id: button text: qsTr("決定") onClicked: { @@ -354,7 +363,7 @@ MuseScore { notation.currentIndex) curScore.endCmd() tonalityDialog.visible = false - return + quit() } } }