Merge pull request #9147 from Eism/accessibility_preferences_other_pages

[MU4] Accessibility preferences. Other pages
This commit is contained in:
RomanPudashkin 2021-09-16 10:18:19 +02:00 committed by GitHub
commit 04217347bd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
44 changed files with 1034 additions and 483 deletions

View file

@ -84,7 +84,14 @@
<file>qml/Preferences/internal/RemoteControlSection.qml</file>
<file>qml/Preferences/internal/ProgrammeStartSection.qml</file>
<file>qml/Preferences/internal/FoldersSection.qml</file>
<file>qml/Preferences/internal/ResetThemeButtonSection.qml</file>
<file>qml/Preferences/internal/ThemeAdditionalOptionsSection.qml</file>
<file>qml/Preferences/internal/AdvancedTopSection.qml</file>
<file>qml/Preferences/internal/ZoomSection.qml</file>
<file>qml/Preferences/internal/ScrollPagesSection.qml</file>
<file>qml/Preferences/internal/NoteInputSection.qml</file>
<file>qml/Preferences/internal/NoteInputPlaySection.qml</file>
<file>qml/Preferences/internal/DefaultFilesSection.qml</file>
<file>qml/Preferences/internal/ScoreViewSection.qml</file>
<file>qml/Preferences/internal/AutomaticUpdateSection.qml</file>
</qresource>
</RCC>

View file

@ -42,7 +42,7 @@ PreferencesPage {
ColumnLayout {
anchors.fill: parent
spacing: 20
spacing: root.sectionsSpacing
AdvancedTopSection {
id: topSection

View file

@ -44,7 +44,7 @@ PreferencesPage {
id: content
width: parent.width
spacing: 24
spacing: root.sectionsSpacing
ThemesSection {
width: content.width
@ -171,17 +171,6 @@ PreferencesPage {
SeparatorLine {}
CheckBox {
id: scoreInversionEnable
checked: appearanceModel.scoreInversionEnabled
text: qsTrc("appshell", "Invert score colors")
onClicked: {
appearanceModel.scoreInversionEnabled = !checked
}
}
ColorAndWallpaperSection {
id: paperSettings
@ -220,7 +209,11 @@ PreferencesPage {
}
}
ResetThemeButtonSection {
SeparatorLine {}
ThemeAdditionalOptionsSection {
scoreInversionEnabled: appearanceModel.scoreInversionEnabled
navigation.section: root.navigationSection
navigation.order: root.navigationOrderStart + 7
@ -233,6 +226,10 @@ PreferencesPage {
root.ensureContentVisibleRequested(Qt.rect(x, y, width, height))
}
}
onScoreInversionEnableChangeRequested: {
appearanceModel.scoreInversionEnabled = enable
}
}
}
}

View file

@ -41,134 +41,44 @@ PreferencesPage {
Column {
anchors.fill: parent
spacing: 24
spacing: root.sectionsSpacing
Column {
anchors.left: parent.left
anchors.right: parent.right
spacing: 18
ZoomSection {
defaultZoom: preferencesModel.defaultZoom
zoomTypes: preferencesModel.zoomTypes()
mouseZoomPrecision: preferencesModel.mouseZoomPrecision
StyledTextLabel {
text: qsTrc("appshell", "Zoom")
font: ui.theme.bodyBoldFont
navigation.section: root.navigationSection
navigation.order: root.navigationOrderStart + 1
onDefaultZoomTypeChangeRequested: {
preferencesModel.setDefaultZoomType(zoomType)
}
Column {
spacing: 8
onDefaultZoomLevelChangeRequested: {
preferencesModel.setDefaultZoomLevel(zoomLevel)
}
Row {
spacing: 12
ComboBoxWithTitle {
title: qsTrc("appshell", "Default zoom:")
titleWidth: 210
control.textRole: "title"
control.valueRole: "value"
currentIndex: control.indexOfValue(preferencesModel.defaultZoom.type)
model: preferencesModel.zoomTypes()
onValueEdited: {
preferencesModel.setDefaultZoomType(newValue)
}
}
IncrementalPropertyControl {
id: defaultZoomControl
width: 64
maxValue: 1600
minValue: 10
step: 10
decimals: 0
measureUnitsSymbol: "%"
currentValue: preferencesModel.defaultZoom.level
enabled: preferencesModel.defaultZoom.isPercentage
onValueEdited: {
preferencesModel.setDefaultZoomLevel(newValue)
}
}
}
IncrementalPropertyControlWithTitle {
title: qsTrc("appshell", "Mouse zoom precision:")
titleWidth: 208
control.width: 60
minValue: 1
maxValue: 16
currentValue: preferencesModel.mouseZoomPrecision
onValueEdited: {
preferencesModel.mouseZoomPrecision = newValue
}
}
onMouseZoomPrecisionChangeRequested: {
preferencesModel.mouseZoomPrecision = zoomPrecision
}
}
SeparatorLine { }
Column {
anchors.left: parent.left
anchors.right: parent.right
spacing: 18
ScrollPagesSection {
orientation: preferencesModel.scrollPagesOrientation
limitScrollArea: preferencesModel.limitScrollArea
StyledTextLabel {
text: qsTrc("appshell", "Scroll pages")
font: ui.theme.bodyBoldFont
navigation.section: root.navigationSection
navigation.order: root.navigationOrderStart + 2
onOrientationChangeRequested: {
preferencesModel.scrollPagesOrientation = orientation
}
Column {
spacing: 16
RadioButtonGroup {
id: radioButtonList
width: 100
height: implicitHeight
spacing: 12
orientation: ListView.Vertical
model: [
{ title: qsTrc("appshell", "Horizontal"), value: Qt.Horizontal },
{ title: qsTrc("appshell", "Vertical"), value: Qt.Vertical }
]
delegate: RoundedRadioButton {
width: parent.width
leftPadding: 0
spacing: 6
ButtonGroup.group: radioButtonList.radioButtonGroup
checked: preferencesModel.scrollPagesOrientation === modelData["value"]
StyledTextLabel {
text: modelData["title"]
horizontalAlignment: Text.AlignLeft
}
onToggled: {
preferencesModel.scrollPagesOrientation = modelData["value"]
}
}
}
CheckBox {
text: qsTrc("appshell", "Limit scroll area to page borders")
checked: preferencesModel.limitScrollArea
onClicked: {
preferencesModel.limitScrollArea = !preferencesModel.limitScrollArea
}
}
onLimitScrollAreaChangeRequested: {
preferencesModel.limitScrollArea = limit
}
}
}

View file

@ -40,12 +40,17 @@ PreferencesPage {
foldersPreferencesModel.load()
}
FoldersSection {
id: content
Column {
anchors.fill: parent
spacing: root.sectionsSpacing
model: foldersPreferencesModel
FoldersSection {
id: content
navigation.section: root.navigationSection
navigation.order: root.navigationOrderStart + 1
model: foldersPreferencesModel
navigation.section: root.navigationSection
navigation.order: root.navigationOrderStart + 1
}
}
}

View file

@ -45,7 +45,7 @@ PreferencesPage {
id: content
width: parent.width
spacing: 24
spacing: root.sectionsSpacing
LanguagesSection {
languages: preferencesModel.languages

View file

@ -43,7 +43,7 @@ PreferencesPage {
id: content
width: parent.width
spacing: 24
spacing: root.sectionsSpacing
readonly property int firstColumnWidth: 220

View file

@ -45,40 +45,100 @@ PreferencesPage {
width: parent.width
height: childrenRect.height
spacing: 24
spacing: root.sectionsSpacing
ImportStyleSection {
anchors.left: parent.left
anchors.right: parent.right
styleFileImportPath: importPreferencesModel.styleFileImportPath
fileChooseTitle: importPreferencesModel.styleChooseTitle()
filePathFilter: importPreferencesModel.stylePathFilter()
fileDirectory: importPreferencesModel.fileDirectory(styleFileImportPath)
preferencesModel: importPreferencesModel
navigation.section: root.navigationSection
navigation.order: root.navigationOrderStart + 1
onStyleFileImportPathChangeRequested: {
importPreferencesModel.styleFileImportPath = path
}
onFocusChanged: {
if (activeFocus) {
root.ensureContentVisibleRequested(Qt.rect(x, y, width, height))
}
}
}
SeparatorLine { }
CharsetsSection {
anchors.left: parent.left
anchors.right: parent.right
charsets: importPreferencesModel.charsets()
currentGuitarProCharset: importPreferencesModel.currentGuitarProCharset
currentOvertuneCharset: importPreferencesModel.currentOvertuneCharset
preferencesModel: importPreferencesModel
navigation.section: root.navigationSection
navigation.order: root.navigationOrderStart + 2
onGuitarProCharsetChangeRequested: {
importPreferencesModel.currentGuitarProCharset = charset
}
onOvertuneCharsetChangeRequested: {
importPreferencesModel.currentOvertuneCharset = charset
}
onFocusChanged: {
if (activeFocus) {
root.ensureContentVisibleRequested(Qt.rect(x, y, width, height))
}
}
}
SeparatorLine { }
MusicXmlSection {
anchors.left: parent.left
anchors.right: parent.right
importLayout: importPreferencesModel.importLayout
importBreaks: importPreferencesModel.importBreaks
needUseDefaultFont: importPreferencesModel.needUseDefaultFont
preferencesModel: importPreferencesModel
navigation.section: root.navigationSection
navigation.order: root.navigationOrderStart + 3
onImportLayoutChangeRequested: {
importPreferencesModel.importLayout = importLayout
}
onImportBreaksChangeRequested: {
importPreferencesModel.importBreaks = importBreaks
}
onUseDefaultFontChangeRequested: {
importPreferencesModel.needUseDefaultFont = use
}
onFocusChanged: {
if (activeFocus) {
root.ensureContentVisibleRequested(Qt.rect(x, y, width, height))
}
}
}
SeparatorLine { }
MidiSection {
anchors.left: parent.left
anchors.right: parent.right
shortestNotes: importPreferencesModel.shortestNotes()
currentShortestNote: importPreferencesModel.currentShortestNote
preferencesModel: importPreferencesModel
navigation.section: root.navigationSection
navigation.order: root.navigationOrderStart + 4
onCurrentShortestNoteChangeRequested: {
importPreferencesModel.currentShortestNote = note
}
onFocusChanged: {
if (activeFocus) {
root.ensureContentVisibleRequested(Qt.rect(x, y, width, height))
}
}
}
}
}

View file

@ -37,94 +37,54 @@ PreferencesPage {
Column {
anchors.fill: parent
spacing: root.sectionsSpacing
spacing: 22
NoteInputSection {
advanceToNextNote: noteInputModel.advanceToNextNoteOnKeyRelease
colorNotes: noteInputModel.colorNotesOusideOfUsablePitchRange
delayBetweenNotes: noteInputModel.delayBetweenNotesInRealTimeModeMilliseconds
StyledTextLabel {
text: qsTrc("appshell", "Note input")
font: ui.theme.bodyBoldFont
}
navigation.section: root.navigationSection
navigation.order: root.navigationOrderStart + 1
CheckBox {
text: qsTrc("appshell", "Advance to next note on key release (MIDI)")
checked: noteInputModel.advanceToNextNoteOnKeyRelease
onClicked: {
noteInputModel.advanceToNextNoteOnKeyRelease = !checked
onAdvanceToNextNoteChangeRequested: {
noteInputModel.advanceToNextNoteOnKeyRelease = advance
}
}
CheckBox {
width: 170
text: qsTrc("appshell", "Colour notes outside of usable pitch range")
checked: noteInputModel.colorNotesOusideOfUsablePitchRange
onClicked: {
noteInputModel.colorNotesOusideOfUsablePitchRange = !checked
onColorNotesChangeRequested: {
noteInputModel.colorNotesOusideOfUsablePitchRange = color
}
}
IncrementalPropertyControlWithTitle {
title: qsTrc("appshell", "Delay between notes in automatic real time mode:")
titleWidth: 173
spacing: 46
currentValue: noteInputModel.delayBetweenNotesInRealTimeModeMilliseconds
measureUnitsSymbol: qsTrc("appshell", "ms")
onValueEdited: {
noteInputModel.delayBetweenNotesInRealTimeModeMilliseconds = newValue
onDelayBetweenNotesChangeRequested: {
noteInputModel.delayBetweenNotesInRealTimeModeMilliseconds = delay
}
}
SeparatorLine {}
CheckBox {
text: qsTrc("appshell", "Play notes when editing")
font: ui.theme.bodyBoldFont
NoteInputPlaySection {
playNotesWhenEditing: noteInputModel.playNotesWhenEditing
playChordWhenEditing: noteInputModel.playChordWhenEditing
playChordSymbolWhenEditing: noteInputModel.playChordSymbolWhenEditing
notePlayDurationMilliseconds: noteInputModel.notePlayDurationMilliseconds
checked: noteInputModel.playNotesWhenEditing
navigation.section: root.navigationSection
navigation.order: root.navigationOrderStart + 2
onClicked: {
noteInputModel.playNotesWhenEditing = !checked
onPlayNotesWhenEditingChangeRequested: {
noteInputModel.playChordWhenEditing = play
}
}
IncrementalPropertyControlWithTitle {
title: qsTrc("appshell", "Default duration:")
spacing: 126
currentValue: noteInputModel.notePlayDurationMilliseconds
measureUnitsSymbol: qsTrc("appshell", "ms")
onValueEdited: {
noteInputModel.notePlayDurationMilliseconds = newValue
onPlayChordWhenEditingChangeRequested: {
noteInputModel.playChordWhenEditing = play
}
}
CheckBox {
text: qsTrc("appshell", "Play chord when editing")
checked: noteInputModel.playChordWhenEditing
enabled: noteInputModel.playNotesWhenEditing
onClicked: {
noteInputModel.playChordWhenEditing = !checked
onPlayChordSymbolWhenEditingChangeRequested: {
noteInputModel.playChordSymbolWhenEditing = play
}
}
CheckBox {
text: qsTrc("appshell", "Play chord symbol when editing")
checked: noteInputModel.playChordSymbolWhenEditing
enabled: noteInputModel.playNotesWhenEditing
onClicked: {
noteInputModel.playChordSymbolWhenEditing = !checked
onNotePlayDurationChangeRequested: {
noteInputModel.notePlayDurationMilliseconds = duration
}
}
}

View file

@ -39,6 +39,8 @@ Flickable {
property NavigationSection navigationSection: null
property int navigationOrderStart: 0
readonly property int sectionsSpacing: 24
signal hideRequested()
function apply() {

View file

@ -34,24 +34,29 @@ PreferencesPage {
id: programmeStartModel
}
ProgrammeStartSection {
startupModes: programmeStartModel.startupModes
scorePathFilter: programmeStartModel.scorePathFilter()
panels: programmeStartModel.panels
Column {
anchors.fill: parent
spacing: root.sectionsSpacing
navigation.section: root.navigationSection
navigation.order: root.navigationOrderStart + 1
ProgrammeStartSection {
startupModes: programmeStartModel.startupModes
scorePathFilter: programmeStartModel.scorePathFilter()
panels: programmeStartModel.panels
onCurrentStartupModesChanged: {
programmeStartModel.setCurrentStartupMode(index)
}
navigation.section: root.navigationSection
navigation.order: root.navigationOrderStart + 1
onStartupScorePathChanged: {
programmeStartModel.setStartupScorePath(path)
}
onCurrentStartupModesChanged: {
programmeStartModel.setCurrentStartupMode(index)
}
onPanelsVisibleChanged: {
programmeStartModel.setPanelVisible(panelIndex, visible)
onStartupScorePathChanged: {
programmeStartModel.setStartupScorePath(path)
}
onPanelsVisibleChanged: {
programmeStartModel.setPanelVisible(panelIndex, visible)
}
}
}
}

View file

@ -25,6 +25,8 @@ import QtQuick.Layouts 1.15
import MuseScore.UiComponents 1.0
import MuseScore.Preferences 1.0
import "internal"
PreferencesPage {
id: root
@ -39,81 +41,28 @@ PreferencesPage {
}
Column {
anchors.fill: parent
spacing: 24
Column {
id: content
id: content
anchors.left: parent.left
anchors.right: parent.right
spacing: 18
width: parent.width
spacing: root.sectionsSpacing
StyledTextLabel {
text: qsTrc("appshell", "Default files")
font: ui.theme.bodyBoldFont
}
DefaultFilesSection {
model: scorePreferencesModel
ListView {
anchors.left: parent.left
anchors.right: parent.right
height: contentHeight
spacing: 4
model: scorePreferencesModel
delegate: RowLayout {
width: ListView.view.width
height: 30
spacing: 20
StyledTextLabel {
Layout.alignment: Qt.AlignLeft
text: model.title + ":"
}
FilePicker {
Layout.alignment: Qt.AlignRight
Layout.preferredWidth: 380
dialogTitle: model.chooseTitle
filter: model.pathFilter
dir: scorePreferencesModel.fileDirectory(model.path)
path: model.path
onPathEdited: {
model.path = newPath
}
}
}
}
navigation.section: root.navigationSection
navigation.order: root.navigationOrderStart + 1
}
SeparatorLine { }
Column {
anchors.left: parent.left
anchors.right: parent.right
spacing: 18
ScoreViewSection {
isShowMIDIControls: scorePreferencesModel.isShowMIDIControls
StyledTextLabel {
text: qsTrc("appshell", "View")
font: ui.theme.bodyBoldFont
}
navigation.section: root.navigationSection
navigation.order: root.navigationOrderStart + 2
CheckBox {
width: 216
text: qsTrc("appshell", "Show MIDI controls in mixer")
checked: scorePreferencesModel.isShowMIDIControls
onClicked: {
scorePreferencesModel.isShowMIDIControls = !scorePreferencesModel.isShowMIDIControls
}
onShowMIDIControlsChangeRequested: {
scorePreferencesModel.isShowMIDIControls = show
}
}
}

View file

@ -25,6 +25,8 @@ import MuseScore.Ui 1.0
import MuseScore.UiComponents 1.0
import MuseScore.Preferences 1.0
import "internal"
PreferencesPage {
id: root
@ -34,34 +36,22 @@ PreferencesPage {
Column {
anchors.fill: parent
spacing: root.sectionsSpacing
spacing: 18
AutomaticUpdateSection {
isAppUpdatable: updateModel.isAppUpdatable()
needCheckForNewAppVersion: updateModel.needCheckForNewAppVersion
needCheckForNewExtensionsVersion: updateModel.needCheckForNewExtensionsVersion
StyledTextLabel {
text: qsTrc("appshell", "Automatic update check")
font: ui.theme.bodyBoldFont
}
navigation.section: root.navigationSection
navigation.order: root.navigationOrderStart + 1
CheckBox {
text: qsTrc("appshell", "Check for new version of MuseScore")
visible: updateModel.isAppUpdatable()
checked: updateModel.needCheckForNewAppVersion
onClicked: {
updateModel.needCheckForNewAppVersion = !checked
onNeedCheckForNewAppVersionChangeRequested: {
updateModel.needCheckForNewAppVersion = check
}
}
CheckBox {
width: 200
text: qsTrc("appshell", "Check for new version of MuseScore extensions")
checked: updateModel.needCheckForNewExtensionsVersion
onClicked: {
updateModel.needCheckForNewExtensionsVersion = !checked
onNeedCheckForNewExtensionsVersionChangeRequested: {
updateModel.needCheckForNewExtensionsVersion = check
}
}
}

View file

@ -81,7 +81,7 @@ Row {
navigation.column: model.index
navigation.accessible.name: Utils.colorToString(accentColor)
onClicked: {
onToggled: {
root.accentColorChangeRequested(model.index)
}

View file

@ -0,0 +1,70 @@
/*
* SPDX-License-Identifier: GPL-3.0-only
* MuseScore-CLA-applies
*
* MuseScore
* Music Composition & Notation
*
* Copyright (C) 2021 MuseScore BVBA and others
*
* 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 MuseScore.Ui 1.0
import MuseScore.UiComponents 1.0
BaseSection {
id: root
title: qsTrc("appshell", "Automatic update check")
property bool isAppUpdatable: true
property alias needCheckForNewAppVersion: needCheckBox.checked
property alias needCheckForNewExtensionsVersion: needCheckForNewExtensionsVersionBox.checked
signal needCheckForNewAppVersionChangeRequested(bool check)
signal needCheckForNewExtensionsVersionChangeRequested(bool check)
CheckBox {
id: needCheckBox
text: qsTrc("appshell", "Check for new version of MuseScore")
visible: root.isAppUpdatable
navigation.name: "NeedCheckBox"
navigation.panel: root.navigation
navigation.row: 0
onClicked: {
root.needCheckForNewAppVersionChangeRequested(!checked)
}
}
CheckBox {
id: needCheckForNewExtensionsVersionBox
width: 200
text: qsTrc("appshell", "Check for new version of MuseScore extensions")
navigation.name: "NeedCheckExtensionsBox"
navigation.panel: root.navigation
navigation.row: 1
onClicked: {
root.needCheckForNewExtensionsVersionChangeRequested(!checked)
}
}
}

View file

@ -22,43 +22,48 @@
import QtQuick 2.15
import MuseScore.UiComponents 1.0
import MuseScore.Preferences 1.0
Column {
spacing: 18
BaseSection {
id: root
property var preferencesModel: null
title: qsTrc("appshell", "Character set used when importing binary files")
StyledTextLabel {
text: qsTrc("appshell", "Character set used when importing binary files")
font: ui.theme.bodyBoldFont
property var charsets: null
property string currentGuitarProCharset: ""
property string currentOvertuneCharset: ""
signal guitarProCharsetChangeRequested(string charset)
signal overtuneCharsetChangeRequested(string charset)
ComboBoxWithTitle {
title: qsTrc("appshell", "Guitar Pro import character set:")
titleWidth: 220
currentIndex: control.indexOfValue(root.currentGuitarProCharset)
model: root.charsets
navigation.name: "GuitarProBox"
navigation.panel: root.navigation
navigation.row: 0
onValueEdited: {
root.guitarProCharsetChangeRequested(newValue)
}
}
Column {
spacing: 12
ComboBoxWithTitle {
title: qsTrc("appshell", "Overture import character set:")
titleWidth: 220
ComboBoxWithTitle {
title: qsTrc("appshell", "Guitar Pro import character set:")
titleWidth: 220
currentIndex: control.indexOfValue(root.currentOvertuneCharset)
model: root.charsets
currentIndex: control.indexOfValue(preferencesModel.currentGuitarProCharset)
model: preferencesModel.charsets()
navigation.name: "OvertureBox"
navigation.panel: root.navigation
navigation.row: 1
onValueEdited: {
preferencesModel.currentGuitarProCharset = newValue
}
}
ComboBoxWithTitle {
title: qsTrc("appshell", "Overture import character set:")
titleWidth: 220
currentIndex: control.indexOfValue(preferencesModel.currentOvertuneCharset)
model: preferencesModel.charsets()
onValueEdited: {
preferencesModel.currentOvertuneCharset = newValue
}
onValueEdited: {
root.overtuneCharsetChangeRequested(newValue)
}
}
}

View file

@ -68,7 +68,7 @@ BaseSection {
navigation.row: 0
navigation.column: 0
onClicked: {
onToggled: {
root.useColorChangeRequested(true)
}
}
@ -101,7 +101,7 @@ BaseSection {
navigation.row: 1
navigation.column: 0
onClicked: {
onToggled: {
root.useColorChangeRequested(false)
}
}
@ -114,7 +114,7 @@ BaseSection {
enabled: !root.useColor
navigation: root.navigation
navigationRowOrder: 1
navigationRowOrderStart: 1
navigationColumnOrderStart: 1
onPathEdited: {

View file

@ -0,0 +1,81 @@
/*
* SPDX-License-Identifier: GPL-3.0-only
* MuseScore-CLA-applies
*
* MuseScore
* Music Composition & Notation
*
* Copyright (C) 2021 MuseScore BVBA and others
*
* 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 MuseScore.Ui 1.0
import MuseScore.UiComponents 1.0
BaseSection {
id: root
title: qsTrc("appshell", "Default files")
navigation.direction: NavigationPanel.Both
property alias model: view.model
ListView {
id: view
anchors.left: parent.left
anchors.right: parent.right
height: contentHeight
spacing: 4
delegate: RowLayout {
width: ListView.view.width
height: 30
spacing: 20
StyledTextLabel {
id: titleLabel
Layout.alignment: Qt.AlignLeft
text: model.title + ":"
}
FilePicker {
Layout.alignment: Qt.AlignRight
Layout.preferredWidth: 380
dialogTitle: model.chooseTitle
filter: model.pathFilter
dir: model.directory
path: model.path
navigation: root.navigation
navigationRowOrderStart: model.index
pathFieldTitle: titleLabel.text
onPathEdited: {
model.path = newPath
}
}
}
}
}

View file

@ -69,7 +69,7 @@ BaseSection {
path: model.path
navigation: root.navigation
navigationRowOrder: model.index
navigationRowOrderStart: model.index
pathFieldTitle: titleLabel.text
onPathEdited: {

View file

@ -21,76 +21,89 @@
*/
import QtQuick 2.15
import MuseScore.Ui 1.0
import MuseScore.UiComponents 1.0
import MuseScore.Preferences 1.0
Column {
spacing: 18
BaseSection {
id: root
property var preferencesModel: null
title: qsTrc("appshell", "Style used for import")
StyledTextLabel {
text: qsTrc("appshell", "Style used for import")
font: ui.theme.bodyBoldFont
navigation.direction: NavigationPanel.Both
property string styleFileImportPath: ""
property string fileChooseTitle: ""
property string filePathFilter: ""
property string fileDirectory: ""
signal styleFileImportPathChangeRequested(string path)
QtObject {
id: prv
property bool useStyleFile: root.styleFileImportPath !== ""
}
Column {
anchors.left: parent.left
anchors.right: parent.right
spacing: 12
RoundedRadioButton {
id: builtInStyleButton
width: 193
text: qsTrc("appshell", "Built-in style")
checked: !prv.useStyleFile
navigation.name: "BuiltInStyleButton"
navigation.panel: root.navigation
navigation.row: 0
navigation.column: 0
onToggled: {
prv.useStyleFile = false
root.styleFileImportPathChangeRequested("")
}
}
Row {
width: parent.width
RoundedRadioButton {
anchors.left: parent.left
anchors.right: parent.right
id: useStyleFileButton
checked: preferencesModel.styleFileImportPath === ""
width: 193
anchors.verticalCenter: parent.verticalCenter
StyledTextLabel {
text: qsTrc("appshell", "Built-in style")
horizontalAlignment: Text.AlignLeft
}
text: qsTrc("appshell", "Use style file:")
checked: prv.useStyleFile
navigation.name: "UseStyleButton"
navigation.panel: root.navigation
navigation.row: 1
navigation.column: 0
onToggled: {
preferencesModel.styleFileImportPath = ""
prv.useStyleFile = true
}
}
RoundedRadioButton {
anchors.left: parent.left
anchors.right: parent.right
FilePicker {
id: styleFilePicker
checked: preferencesModel.styleFileImportPath !== ""
width: 246
anchors.verticalCenter: parent.verticalCenter
onToggled: {
preferencesModel.styleFileImportPath = ""
}
dialogTitle: root.fileChooseTitle
filter: root.filePathFilter
dir: root.fileDirectory
Item {
StyledTextLabel {
id: title
path: root.styleFileImportPath
width: 193
anchors.verticalCenter: parent.verticalCenter
enabled: prv.useStyleFile
text: qsTrc("appshell", "Use style file:")
horizontalAlignment: Text.AlignLeft
}
navigation: root.navigation
navigationRowOrderStart: 1
navigationColumnOrderStart: 1
FilePicker {
anchors.left: title.right
width: 246
anchors.verticalCenter: parent.verticalCenter
dialogTitle: preferencesModel.styleChooseTitle()
filter: preferencesModel.stylePathFilter()
dir: preferencesModel.fileDirectory(preferencesModel.styleFileImportPath)
path: preferencesModel.styleFileImportPath
onPathEdited: {
preferencesModel.styleFileImportPath = newPath
}
}
onPathEdited: {
root.styleFileImportPathChangeRequested(newPath)
}
}
}

View file

@ -60,7 +60,7 @@ Row {
decimals: 0
step: 1
navigation.accessible.name: titleLabel.text + " " + currentValue
navigation.accessible.name: titleLabel.text + " " + currentValue + " " + measureUnitsSymbol
onValueEdited: {
root.valueEdited(newValue)

View file

@ -22,30 +22,34 @@
import QtQuick 2.15
import MuseScore.UiComponents 1.0
import MuseScore.Preferences 1.0
Column {
spacing: 18
BaseSection {
id: root
property var preferencesModel: null
title: qsTrc("appshell", "MIDI")
StyledTextLabel {
text: qsTrc("appshell", "MIDI")
font: ui.theme.bodyBoldFont
}
property alias shortestNotes: shortestNotesBox.model
property int currentShortestNote: 0
signal currentShortestNoteChangeRequested(int note)
ComboBoxWithTitle {
id: shortestNotesBox
title: qsTrc("appshell", "Shortest note:")
titleWidth: 220
currentIndex: control.indexOfValue(preferencesModel.currentShortestNote)
model: preferencesModel.shortestNotes()
currentIndex: control.indexOfValue(root.currentShortestNote)
control.textRole: "title"
control.valueRole: "value"
navigation.name: "ShortestNoteBox"
navigation.panel: root.navigation
navigation.row: 0
onValueEdited: {
preferencesModel.currentShortestNote = newValue
root.currentShortestNoteChangeRequested(newValue)
}
}
}

View file

@ -22,49 +22,62 @@
import QtQuick 2.15
import MuseScore.UiComponents 1.0
import MuseScore.Preferences 1.0
Column {
spacing: 18
BaseSection {
id: root
property var preferencesModel: null
title: qsTrc("appshell", "MusicXML")
StyledTextLabel {
text: qsTrc("appshell", "MusicXML")
font: ui.theme.bodyBoldFont
property alias importLayout: importLayoutBox.checked
property alias importBreaks: importBreaksBox.checked
property alias needUseDefaultFont: needUseDefaultFontBox.checked
signal importLayoutChangeRequested(bool importLayout)
signal importBreaksChangeRequested(bool importBreaks)
signal useDefaultFontChangeRequested(bool use)
CheckBox {
id: importLayoutBox
width: 208
text: qsTrc("appshell", "Import layout")
navigation.name: "ImportLayoutBox"
navigation.panel: root.navigation
navigation.row: 0
onClicked: {
root.importLayoutChangeRequested(!checked)
}
}
Column {
spacing: 12
CheckBox {
id: importBreaksBox
CheckBox {
width: 208
text: qsTrc("appshell", "Import layout")
checked: preferencesModel.importLayout
width: 208
text: qsTrc("appshell", "Import system and page breaks")
onClicked: {
preferencesModel.importLayout = !preferencesModel.importLayout
}
navigation.name: "ImportBreaksBox"
navigation.panel: root.navigation
navigation.row: 1
onClicked: {
root.importBreaksChangeRequested(!checked)
}
}
CheckBox {
width: 208
text: qsTrc("appshell", "Import system and page breaks")
checked: preferencesModel.importBreaks
CheckBox {
id: needUseDefaultFontBox
onClicked: {
preferencesModel.importBreaks = !preferencesModel.importBreaks
}
}
width: 208
text: qsTrc("appshell", "Apply default typeface (Edwin) to imported scores")
CheckBox {
width: 208
text: qsTrc("appshell", "Apply default typeface (Edwin) to imported scores")
checked: preferencesModel.needUseDefaultFont
navigation.name: "UseDefaultFontBox"
navigation.panel: root.navigation
navigation.row: 2
onClicked: {
preferencesModel.needUseDefaultFont = !preferencesModel.needUseDefaultFont
}
onClicked: {
root.useDefaultFontChangeRequested(!checked)
}
}
}

View file

@ -0,0 +1,104 @@
/*
* SPDX-License-Identifier: GPL-3.0-only
* MuseScore-CLA-applies
*
* MuseScore
* Music Composition & Notation
*
* Copyright (C) 2021 MuseScore BVBA and others
*
* 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 MuseScore.Ui 1.0
import MuseScore.UiComponents 1.0
BaseSection {
id: root
property alias playNotesWhenEditing: playNotesBox.checked
property alias playChordWhenEditing: playChordBox.checked
property alias playChordSymbolWhenEditing: playChordSymbolBox.checked
property alias notePlayDurationMilliseconds: notePlayDurationControl.currentValue
signal playNotesWhenEditingChangeRequested(bool play)
signal playChordWhenEditingChangeRequested(bool play)
signal playChordSymbolWhenEditingChangeRequested(bool play)
signal notePlayDurationChangeRequested(int duration)
CheckBox {
id: playNotesBox
text: qsTrc("appshell", "Play notes when editing")
font: ui.theme.bodyBoldFont
navigation.name: "PlayNotesBox"
navigation.panel: root.navigation
navigation.row: 0
onClicked: {
root.playNotesWhenEditingChangeRequested(!checked)
}
}
IncrementalPropertyControlWithTitle {
id: notePlayDurationControl
title: qsTrc("appshell", "Default duration:")
spacing: 126
measureUnitsSymbol: qsTrc("appshell", "ms")
navigation.name: "NotePlayDurationControl"
navigation.panel: root.navigation
navigation.row: 1
onValueEdited: {
root.notePlayDurationChangeRequested(newValue)
}
}
CheckBox {
id: playChordBox
text: qsTrc("appshell", "Play chord when editing")
enabled: root.playNotesWhenEditing
navigation.name: "PlayChordBox"
navigation.panel: root.navigation
navigation.row: 2
onClicked: {
root.playChordWhenEditingChangeRequested(!checked)
}
}
CheckBox {
id: playChordSymbolBox
text: qsTrc("appshell", "Play chord symbol when editing")
enabled: root.playNotesWhenEditing
navigation.name: "PlayChordSymbolBox"
navigation.panel: root.navigation
navigation.row: 3
onClicked: {
root.playChordSymbolWhenEditingChangeRequested(!checked)
}
}
}

View file

@ -0,0 +1,88 @@
/*
* SPDX-License-Identifier: GPL-3.0-only
* MuseScore-CLA-applies
*
* MuseScore
* Music Composition & Notation
*
* Copyright (C) 2021 MuseScore BVBA and others
*
* 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 MuseScore.Ui 1.0
import MuseScore.UiComponents 1.0
BaseSection {
id: root
title: qsTrc("appshell", "Note input")
property alias advanceToNextNote: advanceToNextNoteBox.checked
property alias colorNotes: colorNotesBox.checked
property alias delayBetweenNotes: delayBetweenNotesControl.currentValue
signal advanceToNextNoteChangeRequested(bool advance)
signal colorNotesChangeRequested(bool color)
signal delayBetweenNotesChangeRequested(int delay)
CheckBox {
id: advanceToNextNoteBox
text: qsTrc("appshell", "Advance to next note on key release (MIDI)")
navigation.name: "AdvanceToNextNoteBox"
navigation.panel: root.navigation
navigation.row: 0
onClicked: {
root.advanceToNextNoteOnKeyReleaseChangeRequested(!checked)
}
}
CheckBox {
id: colorNotesBox
width: 170
text: qsTrc("appshell", "Colour notes outside of usable pitch range")
navigation.name: "ColorNotesBox"
navigation.panel: root.navigation
navigation.row: 1
onClicked: {
root.colorNotesOusideOfUsablePitchRangeChangeRequested(!checked)
}
}
IncrementalPropertyControlWithTitle {
id: delayBetweenNotesControl
title: qsTrc("appshell", "Delay between notes in automatic real time mode:")
titleWidth: 173
spacing: 46
measureUnitsSymbol: qsTrc("appshell", "ms")
navigation.name: "DelayBetweenNotesControl"
navigation.panel: root.navigation
navigation.row: 2
onValueEdited: {
root.delayBetweenNotesChangeRequested(newValue)
}
}
}

View file

@ -64,7 +64,7 @@ BaseSection {
navigation.row: model.index
navigation.column: 0
onClicked: {
onToggled: {
root.currentStartupModesChanged(model.index)
}
}
@ -79,7 +79,7 @@ BaseSection {
path: modelData.scorePath
navigation: root.navigation
navigationRowOrder: model.index
navigationRowOrderStart: model.index
navigationColumnOrderStart: 1
onPathEdited: {

View file

@ -21,24 +21,29 @@
*/
import QtQuick 2.15
import MuseScore.Ui 1.0
import MuseScore.UiComponents 1.0
import MuseScore.Preferences 1.0
BaseSection {
id: root
signal resetThemeToDefaultRequested()
title: qsTrc("appshell", "View")
FlatButton {
text: qsTrc("appshell", "Reset theme to default")
property alias isShowMIDIControls: isShowMIDIControlsBox.checked
navigation.name: "ResetButton"
signal showMIDIControlsChangeRequested(bool show)
CheckBox {
id: isShowMIDIControlsBox
width: 216
text: qsTrc("appshell", "Show MIDI controls in mixer")
navigation.name: "ShowMIDIControlsBox"
navigation.panel: root.navigation
navigation.order: 1
navigation.row: 0
onClicked: {
root.resetThemeToDefaultRequested()
root.showMIDIControlsChangeRequested(!checked)
}
}
}

View file

@ -0,0 +1,96 @@
/*
* SPDX-License-Identifier: GPL-3.0-only
* MuseScore-CLA-applies
*
* MuseScore
* Music Composition & Notation
*
* Copyright (C) 2021 MuseScore BVBA and others
*
* 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.Controls 2.15
import MuseScore.UiComponents 1.0
BaseSection {
id: root
title: qsTrc("appshell", "Scroll pages")
property int orientation: Qt.Horizontal
property alias limitScrollArea: limitScrollAreaBox.checked
signal orientationChangeRequested(int orientation)
signal limitScrollAreaChangeRequested(bool limit)
Column {
spacing: 16
RadioButtonGroup {
id: radioButtonList
width: 100
height: implicitHeight
spacing: 12
orientation: ListView.Vertical
model: [
{ title: qsTrc("appshell", "Horizontal"), value: Qt.Horizontal },
{ title: qsTrc("appshell", "Vertical"), value: Qt.Vertical }
]
delegate: RoundedRadioButton {
width: parent.width
leftPadding: 0
spacing: 6
property string title: modelData["title"]
ButtonGroup.group: radioButtonList.radioButtonGroup
checked: root.orientation === modelData["value"]
navigation.name: "ScrollPagesOrientationButton"
navigation.panel: root.navigation
navigation.row: model.index
navigation.accessible.name: title
StyledTextLabel {
text: title
horizontalAlignment: Text.AlignLeft
}
onToggled: {
root.orientationChangeRequested(modelData["value"])
}
}
}
CheckBox {
id: limitScrollAreaBox
text: qsTrc("appshell", "Limit scroll area to page borders")
navigation.name: "LimitScrollAreaBox"
navigation.panel: root.navigation
navigation.row: radioButtonList.model.length
onClicked: {
root.limitScrollAreaChangeRequested(!checked)
}
}
}
}

View file

@ -0,0 +1,59 @@
/*
* SPDX-License-Identifier: GPL-3.0-only
* MuseScore-CLA-applies
*
* MuseScore
* Music Composition & Notation
*
* Copyright (C) 2021 MuseScore BVBA and others
*
* 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 MuseScore.UiComponents 1.0
BaseSection {
id: root
property alias scoreInversionEnabled: scoreInversionEnable.checked
signal resetThemeToDefaultRequested()
signal scoreInversionEnableChangeRequested(bool enable)
CheckBox {
id: scoreInversionEnable
text: qsTrc("appshell", "Invert score")
navigation.name: "ScoreInversionBox"
navigation.panel: root.navigation
navigation.row: 0
onClicked: {
root.scoreInversionEnableChangeRequested(!checked)
}
}
FlatButton {
text: qsTrc("appshell", "Reset to default")
navigation.name: "ResetButton"
navigation.panel: root.navigation
navigation.row: 1
onClicked: {
root.resetThemeToDefaultRequested()
}
}
}

View file

@ -104,7 +104,7 @@ BaseSection {
navigation.row: 1
navigation.column: index
onClicked: {
onToggled: {
root.themeChangeRequested(modelData.codeKey)
}
}

View file

@ -0,0 +1,116 @@
/*
* SPDX-License-Identifier: GPL-3.0-only
* MuseScore-CLA-applies
*
* MuseScore
* Music Composition & Notation
*
* Copyright (C) 2021 MuseScore BVBA and others
*
* 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.Controls 2.15
import MuseScore.Ui 1.0
import MuseScore.UiComponents 1.0
BaseSection {
id: root
title: qsTrc("appshell", "Zoom")
navigation.direction: NavigationPanel.Both
property var defaultZoom: null
property alias zoomTypes: defaultZoomTypesBox.model
property alias mouseZoomPrecision: mouseZoomPrecisionControl.currentValue
signal defaultZoomTypeChangeRequested(int zoomType)
signal defaultZoomLevelChangeRequested(int zoomLevel)
signal mouseZoomPrecisionChangeRequested(int zoomPrecision)
Column {
spacing: 8
Row {
spacing: 12
ComboBoxWithTitle {
id: defaultZoomTypesBox
title: qsTrc("appshell", "Default zoom:")
titleWidth: 210
control.textRole: "title"
control.valueRole: "value"
currentIndex: control.indexOfValue(root.defaultZoom.type)
navigation.name: "DefaultZoomBox"
navigation.panel: root.navigation
navigation.row: 0
navigation.column: 0
onValueEdited: {
root.defaultZoomTypeChangeRequested(newValue)
}
}
IncrementalPropertyControl {
id: defaultZoomControl
width: 64
maxValue: 1600
minValue: 10
step: 10
decimals: 0
measureUnitsSymbol: "%"
currentValue: root.defaultZoom.level
enabled: root.defaultZoom.isPercentage
navigation.name: "DefaultZoomControl"
navigation.panel: root.navigation
navigation.row: 0
navigation.column: 1
onValueEdited: {
root.defaultZoomLevelChangeRequested(newValue)
}
}
}
IncrementalPropertyControlWithTitle {
id: mouseZoomPrecisionControl
title: qsTrc("appshell", "Mouse zoom precision:")
titleWidth: 208
control.width: 60
minValue: 1
maxValue: 16
navigation.name: "MouseZoomPercisionControl"
navigation.panel: root.navigation
navigation.row: 1
navigation.column: 0
onValueEdited: {
root.mouseZoomPrecisionChangeRequested(newValue)
}
}
}
}

View file

@ -44,6 +44,7 @@ QVariant ScorePreferencesModel::data(const QModelIndex& index, int role) const
case PathRole: return file.path;
case PathFilterRole: return file.pathFilter;
case ChooseTitleRole: return file.chooseTitle;
case DirectoryRole: return fileDirectory(file.path);
}
return QVariant();
@ -75,7 +76,8 @@ QHash<int, QByteArray> ScorePreferencesModel::roleNames() const
{ TitleRole, "title" },
{ PathRole, "path" },
{ PathFilterRole, "pathFilter" },
{ ChooseTitleRole, "chooseTitle" }
{ ChooseTitleRole, "chooseTitle" },
{ DirectoryRole, "directory" }
};
return roles;
@ -103,11 +105,6 @@ void ScorePreferencesModel::load()
endResetModel();
}
QString ScorePreferencesModel::fileDirectory(const QString& filePath) const
{
return io::dirpath(filePath.toStdString()).toQString();
}
bool ScorePreferencesModel::isShowMIDIControls() const
{
return audioConfiguration()->isShowControlsInMixer();
@ -288,7 +285,7 @@ void ScorePreferencesModel::setPath(ScorePreferencesModel::DefaultFileType fileT
}
m_defaultFiles[index.row()].path = path;
emit dataChanged(index, index, { PathRole });
emit dataChanged(index, index, { PathRole, DirectoryRole });
}
QModelIndex ScorePreferencesModel::fileIndex(ScorePreferencesModel::DefaultFileType fileType)
@ -302,3 +299,8 @@ QModelIndex ScorePreferencesModel::fileIndex(ScorePreferencesModel::DefaultFileT
return QModelIndex();
}
QString ScorePreferencesModel::fileDirectory(const QString& filePath) const
{
return io::dirpath(filePath.toStdString()).toQString();
}

View file

@ -49,7 +49,6 @@ public:
QHash<int, QByteArray> roleNames() const override;
Q_INVOKABLE void load();
Q_INVOKABLE QString fileDirectory(const QString& filePath) const;
bool isShowMIDIControls() const;
@ -64,7 +63,8 @@ private:
TitleRole = Qt::UserRole + 1,
PathRole,
PathFilterRole,
ChooseTitleRole
ChooseTitleRole,
DirectoryRole
};
enum class DefaultFileType {
@ -114,6 +114,8 @@ private:
void setPath(DefaultFileType fileType, const QString& path);
QModelIndex fileIndex(DefaultFileType fileType);
QString fileDirectory(const QString& filePath) const;
QList<DefaultFileInfo> m_defaultFiles;
};
}

View file

@ -63,7 +63,8 @@ public:
Enabled,
Active,
Focused,
Selected
Selected,
Checked
};
enum class Property {

View file

@ -141,7 +141,7 @@ QAccessible::State AccessibleItemInterface::state() const
state.focused = item->accessibleState(IAccessible::State::Focused);
state.checkable = true;
state.checked = item->accessibleState(IAccessible::State::Selected);
state.checked = item->accessibleState(IAccessible::State::Checked);
} break;
case IAccessible::Role::EditableText: {
state.focusable = true;
@ -166,6 +166,13 @@ QAccessible::State AccessibleItemInterface::state() const
// state.checkable = true;
// state.checked = item->accessibleState(IAccessible::State::Selected);
} break;
case IAccessible::Role::CheckBox: {
state.focusable = true;
state.focused = item->accessibleState(IAccessible::State::Focused);
state.checkable = true;
state.checked = item->accessibleState(IAccessible::State::Checked);
} break;
default: {
LOGW() << "not handled role: " << static_cast<int>(r);
} break;

View file

@ -69,6 +69,8 @@ Item {
spacing: 20
MidiMappingTopPanel {
useRemoteControl: mappingsModel.useRemoteControl
navigation.section: root.navigationSection
navigation.order: root.navigationOrderStart + 1

View file

@ -82,6 +82,7 @@ public:
STATE_PROPERTY(selected, State::Selected)
STATE_PROPERTY(focused, State::Focused)
STATE_PROPERTY(checked, State::Checked)
AccessibleItem(QObject* parent = nullptr);
~AccessibleItem();

View file

@ -55,6 +55,7 @@ FocusScope {
enabled: root.enabled
accessible.role: MUAccessible.CheckBox
accessible.name: root.text
accessible.checked: root.checked
onActiveChanged: {
if (!root.activeFocus) {

View file

@ -41,7 +41,7 @@ Item {
property alias dir: filePickerModel.dir
property NavigationPanel navigation: null
property int navigationRowOrder: 0
property int navigationRowOrderStart: 0
property int navigationColumnOrderStart: 0
property string pathFieldTitle: qsTrc("uicomponents", "Current path:")
@ -65,7 +65,7 @@ Item {
navigation.name: "PathFieldBox"
navigation.panel: root.navigation
navigation.row: root.navigationRowOrder
navigation.row: root.navigationRowOrderStart
navigation.enabled: root.visible && root.enabled
navigation.column: root.navigationColumnOrderStart
navigation.accessible.name: root.pathFieldTitle + " " + pathField.currentText
@ -81,7 +81,7 @@ Item {
navigation.name: "FilePickerButton"
navigation.panel: root.navigation
navigation.row: root.navigationRowOrder
navigation.row: root.navigationRowOrderStart
navigation.enabled: root.visible && root.enabled
navigation.column: root.navigationColumnOrderStart + 1
accessible.name: root.pickerType === FilePicker.PickerType.File ? qsTrc("uicomponents", "File choose")

View file

@ -62,7 +62,7 @@ RadioDelegate {
accessible.role: MUAccessible.RadioButton
accessible.name: root.text
accessible.selected: root.checked
accessible.checked: root.checked
onTriggered: root.checked = !root.checked
}

View file

@ -55,7 +55,7 @@ RadioDelegate {
accessible.role: MUAccessible.RadioButton
accessible.name: root.title
accessible.selected: root.checked
accessible.checked: root.checked
onActiveChanged: {
if (keynavCtrl.active) {

View file

@ -51,7 +51,7 @@ RadioDelegate {
accessible.role: MUAccessible.RadioButton
accessible.name: root.text
accessible.selected: root.checked
accessible.checked: root.checked
onActiveChanged: {
if (keynavCtrl.active) {
@ -59,7 +59,7 @@ RadioDelegate {
}
}
onTriggered: root.clicked()
onTriggered: root.toggled()
}
contentItem: Item {
@ -119,11 +119,7 @@ RadioDelegate {
}
}
background: Rectangle {
anchors.fill: parent
color: ui.theme.backgroundSecondaryColor
}
background: Item { }
states: [
State {

View file

@ -60,7 +60,7 @@ TabButton {
accessible.role: MUAccessible.RadioButton
accessible.name: root.text
accessible.selected: root.isCurrent
accessible.checked: root.isCurrent
onActiveChanged: {
if (active) {

View file

@ -88,7 +88,7 @@ FocusScope {
enabled: root.enabled && root.visible
accessible.role: MUAccessible.EditableText
accessible.name: Boolean(valueInput.text) ? valueInput.text : valueInput.placeholderText
accessible.name: Boolean(valueInput.text) ? valueInput.text + " " + measureUnitsLabel.text : valueInput.placeholderText
accessible.visualItem: root
onActiveChanged: {