Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

port to Musescore 4 #14

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 23 additions & 4 deletions blacknotes.qml
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,26 @@ MuseScore {
description: "This plugin paints all chords and rests in black"
menuPath: "Plugins.Notes.Color Notes in Black"


Component.onCompleted : {
if (mscoreMajorVersion >= 4) {
title = qsTr("Black Notes") ;
// thumbnailName = ".png";
categoryCode = "color-notes";
}
}





MessageDialog {
id: versionError
visible: false
title: qsTr("Unsupported MuseScore Version")
text: qsTr("This plugin needs MuseScore 3.0.2 or later")
onAccepted: {
Qt.quit()
quit()
}
}

Expand Down Expand Up @@ -129,12 +142,18 @@ MuseScore {
}

onRun: {

curScore.startCmd()

console.log("Hello, Black Notes")
// check MuseScore version
if (mscoreMajorVersion == 3 && mscoreMinorVersion == 0 && mscoreUpdateVersion <= 1)
if ((mscoreMajorVersion < 3) || ((mscoreMajorVersion == 3 && mscoreMinorVersion == 0 && mscoreUpdateVersion <= 1)))
versionError.open()
else
applyToChordsAndRestsInSelection(blackenElement)
Qt.quit();
applyToChordsAndRestsInSelection(blackenElement)

curScore.endCmd()

quit();
}
}