forked from musescore/MuseScore
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1b559a6
commit da03ffc
Showing
16 changed files
with
568 additions
and
210 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
141 changes: 141 additions & 0 deletions
141
src/appshell/qml/Preferences/internal/NoteInput/MidiInputSection.qml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,141 @@ | ||
/* | ||
* SPDX-License-Identifier: GPL-3.0-only | ||
* MuseScore-Studio-CLA-applies | ||
* | ||
* MuseScore Studio | ||
* Music Composition & Notation | ||
* | ||
* Copyright (C) 2025 MuseScore Limited | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License version 3 as | ||
* published by the Free Software Foundation. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program. If not, see <https://www.gnu.org/licenses/>. | ||
*/ | ||
import QtQuick 2.15 | ||
import QtQuick.Layouts 1.15 | ||
|
||
import Muse.Ui 1.0 | ||
import Muse.UiComponents 1.0 | ||
|
||
import "../../internal" | ||
|
||
BaseSection { | ||
id: root | ||
|
||
title: qsTrc("appshell/preferences", "MIDI devices") | ||
|
||
property alias midiInputEnabled: enableMidiInputToggle.checked | ||
property alias startNoteInputWhenPressingKey: startNoteInputWhenPressingKeyBox.checked | ||
property bool advanceToNextNote: false | ||
property int delayBetweenNotes: 0 | ||
|
||
signal midiInputEnabledChangeRequested(bool enabled) | ||
signal startNoteInputWhenPressingKeyChangeRequested(bool start) | ||
signal advanceToNextNoteChangeRequested(bool advance) | ||
signal delayBetweenNotesChangeRequested(int delay) | ||
|
||
Row { | ||
width: parent.width | ||
height: enableMidiInputToggle.height | ||
|
||
spacing: 6 | ||
|
||
ToggleButton { | ||
id: enableMidiInputToggle | ||
|
||
navigation.name: "EnableMidiInputToggle" | ||
navigation.panel: root.navigation | ||
navigation.row: 0 | ||
|
||
onToggled: { | ||
root.midiInputEnabledChangeRequested(!checked) | ||
} | ||
} | ||
|
||
StyledTextLabel { | ||
height: parent.height | ||
|
||
horizontalAlignment: Text.AlignLeft | ||
verticalAlignment: Text.AlignVCenter | ||
|
||
text: qsTrc("appshell/preferences", "Enable MIDI input") | ||
} | ||
} | ||
|
||
CheckBox { | ||
id: startNoteInputWhenPressingKeyBox | ||
width: parent.width | ||
|
||
enabled: root.midiInputEnabled | ||
text: qsTrc("appshell/preferences", "When pressing a key, begin note input at the selected measure, note, or rest") | ||
|
||
navigation.name: "StartNoteInputWhenPressingKeyBox" | ||
navigation.panel: root.navigation | ||
navigation.row: 1 | ||
|
||
onClicked: { | ||
root.startNoteInputWhenPressingKeyChangeRequested(!checked) | ||
} | ||
} | ||
|
||
ExpandableBlank { | ||
width: parent.width | ||
|
||
enabled: root.midiInputEnabled | ||
title: qsTrc("appshell/preferences", "Real-time input modes") | ||
|
||
contentItemComponent: Column { | ||
width: parent.width | ||
|
||
spacing: root.spacing | ||
|
||
CheckBox { | ||
id: advanceToNextNoteBox | ||
width: parent.width | ||
|
||
enabled: root.midiInputEnabled | ||
text: qsTrc("appshell/preferences", "Advance to next note on key release") | ||
|
||
checked: root.advanceToNextNote | ||
|
||
navigation.name: "AdvanceToNextNoteBox" | ||
navigation.panel: root.navigation | ||
navigation.row: 2 | ||
|
||
onClicked: { | ||
root.advanceToNextNoteChangeRequested(!checked) | ||
} | ||
} | ||
|
||
IncrementalPropertyControlWithTitle { | ||
id: delayBetweenNotesControl | ||
|
||
enabled: root.midiInputEnabled | ||
title: qsTrc("appshell/preferences", "Delay between notes") | ||
|
||
currentValue: root.delayBetweenNotes | ||
|
||
columnWidth: root.columnWidth | ||
spacing: root.columnSpacing | ||
|
||
measureUnitsSymbol: qsTrc("global", "ms") | ||
|
||
navigation.name: "DelayBetweenNotesControl" | ||
navigation.panel: root.navigation | ||
navigation.row: 3 | ||
|
||
onValueEdited: function(newValue) { | ||
root.delayBetweenNotesChangeRequested(newValue) | ||
} | ||
} | ||
} | ||
} | ||
} |
68 changes: 68 additions & 0 deletions
68
src/appshell/qml/Preferences/internal/NoteInput/NoteColorsSection.qml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
/* | ||
* SPDX-License-Identifier: GPL-3.0-only | ||
* MuseScore-Studio-CLA-applies | ||
* | ||
* MuseScore Studio | ||
* Music Composition & Notation | ||
* | ||
* Copyright (C) 2025 MuseScore Limited | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License version 3 as | ||
* published by the Free Software Foundation. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program. If not, see <https://www.gnu.org/licenses/>. | ||
*/ | ||
import QtQuick 2.15 | ||
|
||
import Muse.UiComponents 1.0 | ||
|
||
import "../../internal" | ||
|
||
BaseSection { | ||
id: root | ||
|
||
property alias colorNotes: colorNotesBox.checked | ||
property alias warnGuitarBends: warnBendsBox.checked | ||
|
||
signal colorNotesChangeRequested(bool color) | ||
signal warnGuitarBendsChangeRequested(bool warn) | ||
|
||
title: qsTrc("appshell/preferences", "Note colors") | ||
|
||
CheckBox { | ||
id: colorNotesBox | ||
width: parent.width | ||
|
||
text: qsTrc("appshell/preferences", "Color notes outside of usable pitch range") | ||
|
||
navigation.name: "ColorNotesBox" | ||
navigation.panel: root.navigation | ||
navigation.row: 0 | ||
|
||
onClicked: { | ||
root.colorNotesChangeRequested(!checked) | ||
} | ||
} | ||
|
||
CheckBox { | ||
id: warnBendsBox | ||
width: parent.width | ||
|
||
text: qsTrc("appshell/preferences", "Color guitar bends outside of playable range") | ||
|
||
navigation.name: "WarnBendBox" | ||
navigation.panel: root.navigation | ||
navigation.row: 1 | ||
|
||
onClicked: { | ||
root.warnGuitarBendsChangeRequested(!checked) | ||
} | ||
} | ||
} |
Oops, something went wrong.