Skip to content

Commit

Permalink
Degree as (optional) Lyrics
Browse files Browse the repository at this point in the history
  • Loading branch information
laurent committed Apr 2, 2022
1 parent bc0655b commit 3552c1c
Show file tree
Hide file tree
Showing 4 changed files with 204 additions and 90 deletions.
102 changes: 65 additions & 37 deletions soloanalyser-interactive.qml
Original file line number Diff line number Diff line change
Expand Up @@ -51,18 +51,19 @@ MuseScore {
}

// 1) Read config file
// AUTOMATIC
// AUTOMATIC

// 2) push to screen

select(lstColorNote, settings.colorNotes);
select(lstNameNote, settings.nameNotes);
select(lstFormText, settings.textType);

rootColorChosser.color = settings.rootColor;
bassColorChosser.color = settings.bassColor;
chordColorChosser.color = settings.chordColor;
scaleColorChosser.color = settings.scaleColor;
errorColorChosser.color = settings.errorColor;
// errorColorChosser.color = settings.errorColor;

}

Expand Down Expand Up @@ -93,6 +94,7 @@ MuseScore {
property var errorColor: Core.defErrorColor
property var colorNotes: Core.defColorNotes
property var nameNotes: Core.defNameNotes
property var textType: Core.defTextType
}

ColumnLayout {
Expand Down Expand Up @@ -227,22 +229,39 @@ MuseScore {
}
}

Label {
text: "Invalid:"
/*Label {
text: "Invalid:"
}
Rectangle {
id: errorColorChosser
width: 50
height: 30
color: "gray"
MouseArea {
anchors.fill: parent
onClicked: {
colorDialog.color = errorColorChosser.color
colorDialog.target = errorColorChosser;
colorDialog.open();
id: errorColorChosser
width: 50
height: 30
color: "gray"
MouseArea {
anchors.fill: parent
onClicked: {
colorDialog.color = errorColorChosser.color
colorDialog.target = errorColorChosser;
colorDialog.open();
}
}
}*/

Label {
text: "Text form"
}

NiceComboBox {
id: lstFormText
model: [{
value: "fingering",
text: "As fingering"
}, {
value: "lyrics",
text: "As lyrics"
}
}
]

}
}

Expand All @@ -261,26 +280,25 @@ MuseScore {

text: "Reset"
onClicked: {
settings.rootColor= Core.defRootColor
settings.bassColor= Core.defBassColor
settings.chordColor= Core.defChordColor
settings.scaleColor= Core.defScaleColor
settings.errorColor= Core.defErrorColor
settings.colorNotes= Core.defColorNotes
settings.nameNotes= Core.defNameNotes
select(lstColorNote, settings.colorNotes);
select(lstNameNote, settings.nameNotes);

rootColorChosser.color = settings.rootColor;
bassColorChosser.color = settings.bassColor;
chordColorChosser.color = settings.chordColor;
scaleColorChosser.color = settings.scaleColor;
errorColorChosser.color = settings.errorColor;


settings.rootColor = Core.defRootColor;
settings.bassColor = Core.defBassColor;
settings.chordColor = Core.defChordColor;
settings.scaleColor = Core.defScaleColor;
settings.errorColor = Core.defErrorColor;
settings.colorNotes = Core.defColorNotes;
settings.nameNotes = Core.defNameNotes;
settings.textType = Core.defTextType;

select(lstColorNote, settings.colorNotes);
select(lstNameNote, settings.nameNotes);
select(lstFormText, settings.textType);

rootColorChosser.color = settings.rootColor;
bassColorChosser.color = settings.bassColor;
chordColorChosser.color = settings.chordColor;
scaleColorChosser.color = settings.scaleColor;
// errorColorChosser.color = settings.errorColor;
}

ToolTip.text: "Reset to default values"
hoverEnabled: true
}
Expand All @@ -302,6 +320,7 @@ MuseScore {
}
Button {
text: "Clear"
id: btnClear
DialogButtonBox.buttonRole: DialogButtonBox.ResetRole
}

Expand All @@ -311,19 +330,28 @@ MuseScore {
settings.bassColor = bassColorChosser.color;
settings.chordColor = chordColorChosser.color;
settings.scaleColor = scaleColorChosser.color;
settings.errorColor = errorColorChosser.color;
// settings.errorColor = errorColorChosser.color;

settings.colorNotes = get(lstColorNote);
settings.nameNotes = get(lstNameNote);
settings.textType = get(lstFormText);

// save values
// AUTOMATIC
// AUTOMATIC

// execute
Core.analyse();
Core.doAnalyse();
Qt.quit();

}

onClicked: {
console.log("~~~~~~~~~~~~" + button.text + "~~~~~~~~~~~~");
if (button == btnClear) {
Core.clearAnalyse();
Qt.quit();
}
}
onRejected: Qt.quit()

}
Expand Down
4 changes: 3 additions & 1 deletion soloanalyser.qml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ MuseScore {
return;
}

Core.analyse();

Core.doAnalyse();

Qt.quit();
}
Expand All @@ -58,6 +59,7 @@ MuseScore {
property var errorColor: Core.defErrorColor
property var colorNotes: Core.defColorNotes
property var nameNotes: Core.defNameNotes
property var textType : Core.defTextType
}

MessageDialog {
Expand Down
2 changes: 1 addition & 1 deletion soloanalyser/NiceComboBox.qml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ ComboBox {

contentItem: Text {

text: control.model[control.currentIndex].text
text: (control.model[control.currentIndex])?control.model[control.currentIndex].text:"--"
anchors.verticalCenter: parent.verticalCenter
leftPadding: 10
rightPadding: 10
Expand Down
Loading

0 comments on commit 3552c1c

Please sign in to comment.