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) diff --git a/movable-do.qml b/movable-do.qml index b872f02..67c014f 100644 --- a/movable-do.qml +++ b/movable-do.qml @@ -8,18 +8,31 @@ // 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 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" menuPath: "Plugins.MovableDo" + Component.onCompleted: { + if (mscoreMajorVersion >= 4) { + title = "Movable Do"; + } + } + + property int tonalityIndex: -1 + property int notationIndex: -1 + // Small note name size is fraction of the full font size. property real fontSizeMini: 0.7 @@ -307,7 +320,7 @@ MuseScore { id: form width: exporterColumn.width + 30 height: exporterColumn.height + 30 - color: "lightgray" + color: (mscoreMajorVersion < 4 ? "lightgray" : "#F5F5F6") ColumnLayout { id: exporterColumn GridLayout { @@ -318,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: { @@ -342,7 +363,7 @@ MuseScore { notation.currentIndex) curScore.endCmd() tonalityDialog.visible = false - Qt.quit() + quit() } } }