Skip to content
Snippets Groups Projects
Commit 7f60eeb5 authored by SeeLook's avatar SeeLook
Browse files

Added note prompt for single note to point where to select note, when score is...

Added note prompt for single note to point where to select note, when score is cleared clear key signature as well, when exam starts - revert colors of note 2 and 3
parent ea64ebcd
No related branches found
No related tags found
No related merge requests found
...@@ -787,8 +787,10 @@ void TscoreObject::deleteLastNote() { ...@@ -787,8 +787,10 @@ void TscoreObject::deleteLastNote() {
void TscoreObject::clearScore() { void TscoreObject::clearScore() {
if (notesCount() == 0) if (notesCount() == 0) {
return; setKeySignature(0);
return;
}
if (m_singleNote) { if (m_singleNote) {
setNote(note(0), Tnote()); setNote(note(0), Tnote());
...@@ -804,6 +806,7 @@ void TscoreObject::clearScore() { ...@@ -804,6 +806,7 @@ void TscoreObject::clearScore() {
setSelectedItem(nullptr); setSelectedItem(nullptr);
emit scoreWasCleared(); emit scoreWasCleared();
} }
setKeySignature(0);
} }
......
...@@ -230,6 +230,7 @@ void TmainScoreObject::isExamChangedSlot() { ...@@ -230,6 +230,7 @@ void TmainScoreObject::isExamChangedSlot() {
paletteSlot(); paletteSlot();
} }
} }
singleModeSlot();
} else { } else {
m_scoreActions << m_playAct << m_recModeAct << m_openXmlAct << m_saveXmlAct << m_showNamesAct << m_extraAccidsAct m_scoreActions << m_playAct << m_recModeAct << m_openXmlAct << m_saveXmlAct << m_showNamesAct << m_extraAccidsAct
<< m_zoomOutAct << m_zoomInAct << m_deleteLastAct << m_clearScoreAct; << m_zoomOutAct << m_zoomInAct << m_deleteLastAct << m_clearScoreAct;
......
...@@ -46,6 +46,7 @@ ...@@ -46,6 +46,7 @@
<file alias="Tie.qml">qml/score/Tie.qml</file> <file alias="Tie.qml">qml/score/Tie.qml</file>
<file alias="AddLine.qml">qml/score/AddLine.qml</file> <file alias="AddLine.qml">qml/score/AddLine.qml</file>
<file alias="NoteCursor.qml">qml/score/NoteCursor.qml</file> <file alias="NoteCursor.qml">qml/score/NoteCursor.qml</file>
<file alias="NotePrompt.qml">qml/score/NotePrompt.qml</file>
<file alias="AccidControl.qml">qml/score/AccidControl.qml</file> <file alias="AccidControl.qml">qml/score/AccidControl.qml</file>
<file alias="RhythmControl.qml">qml/score/RhythmControl.qml</file> <file alias="RhythmControl.qml">qml/score/RhythmControl.qml</file>
<file alias="ControlButton.qml">qml/score/ControlButton.qml</file> <file alias="ControlButton.qml">qml/score/ControlButton.qml</file>
......
...@@ -92,6 +92,7 @@ Score { ...@@ -92,6 +92,7 @@ Score {
// private // private
property var scordature: null property var scordature: null
property var notePrompt: null
Connections { Connections {
target: SOUND target: SOUND
...@@ -118,12 +119,20 @@ Score { ...@@ -118,12 +119,20 @@ Score {
} }
if (GLOB.tuning.scordature && GLOB.instrument.type !== Tinstrument.BassGuitar) { if (GLOB.tuning.scordature && GLOB.instrument.type !== Tinstrument.BassGuitar) {
var c = Qt.createComponent("qrc:/Scordature.qml") var c = Qt.createComponent("qrc:/Scordature.qml")
var scordature = c.createObject(firstStaff) scordature = c.createObject(firstStaff)
firstStaff.scordSpace = scordature.height firstStaff.scordSpace = scordature.height
} else } else
firstStaff.scordSpace = 0 firstStaff.scordSpace = 0
} }
onSingleNoteChanged: {
if (singleNote) {
var c = Qt.createComponent("qrc:/NotePrompt.qml")
notePrompt = c.createObject(scoreObj.note(0))
} else
notePrompt.destroy()
}
Rectangle { // note highlight Rectangle { // note highlight
id: noteHighlight id: noteHighlight
parent: currentNote parent: currentNote
......
/** This file is part of Nootka (http://nootka.sf.net) *
* Copyright (C) 2018 by Tomasz Bojczuk (seelook@gmail.com) *
* on the terms of GNU GPLv3 license (http://www.gnu.org/licenses) */
import QtQuick 2.9
import Score 1.0
Text {
parent: scoreObj.note(0)
text: "n"
font { pixelSize: parent.width * 2.2; family: "Nootka" }
color: Noo.alpha(GLOB.isExam ? GLOB.correctColor : GLOB.noteCursorColor, 50)
x: (parent.width - width) / 2 - 0.5; y: score.upperLine - 1.6
visible: !scoreObj.readOnly && parent.notePosY === 0 && !(score.cursor && score.cursor.parent)
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment