-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #26291 from RomanPudashkin/input_by_duration_mode
Input by duration mode
- Loading branch information
Showing
76 changed files
with
2,472 additions
and
722 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
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
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
142 changes: 142 additions & 0 deletions
142
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,142 @@ | ||
/* | ||
* 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") | ||
isExpanded: false | ||
|
||
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) | ||
} | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.