-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add: UI changes for ScoreAccessibility panel in the properties sectio…
…n & initial necessary settings model files
- Loading branch information
Showing
8 changed files
with
218 additions
and
1 deletion.
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
68 changes: 68 additions & 0 deletions
68
src/inspector/models/score/scoreaccessibilitysettingsmodel.cpp
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) 2021 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/>. | ||
*/ | ||
#include "scoreaccessibilitysettingsmodel.h" | ||
|
||
#include "engraving/style/defaultstyle.h" | ||
#include "translation.h" | ||
|
||
using namespace mu::inspector; | ||
using namespace mu::notation; | ||
|
||
ScoreAccessibilitySettingsModel::ScoreAccessibilitySettingsModel(QObject* parent, IElementRepositoryService* repository) | ||
: AbstractInspectorModel(parent, repository) | ||
{ | ||
setSectionType(InspectorSectionType::SECTION_SCORE_ACCESSIBILITY); | ||
setTitle(muse::qtrc("inspector", "Accessibility")); | ||
} | ||
|
||
PropertyItem* ScoreAccessibilitySettingsModel::scoreStylePreset() const | ||
{ | ||
return m_scoreStylePreset; | ||
} | ||
|
||
void ScoreAccessibilitySettingsModel::setScoreStylePreset(PropertyItem* item) | ||
{ | ||
if (m_scoreStylePreset != item) { | ||
m_scoreStylePreset = item; | ||
emit scoreStylePresetChanged(); | ||
} | ||
} | ||
|
||
void ScoreAccessibilitySettingsModel::createProperties() | ||
{ | ||
// Placeholder | ||
} | ||
|
||
void ScoreAccessibilitySettingsModel::requestElements() | ||
{ | ||
// Placeholder | ||
} | ||
|
||
void ScoreAccessibilitySettingsModel::loadProperties() | ||
{ | ||
// Placeholder | ||
} | ||
|
||
void ScoreAccessibilitySettingsModel::resetProperties() | ||
{ | ||
// Placeholder | ||
} |
55 changes: 55 additions & 0 deletions
55
src/inspector/models/score/scoreaccessibilitysettingsmodel.h
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,55 @@ | ||
/* | ||
* SPDX-License-Identifier: GPL-3.0-only | ||
* MuseScore-Studio-CLA-applies | ||
* | ||
* MuseScore Studio | ||
* Music Composition & Notation | ||
* | ||
* Copyright (C) 2021 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/>. | ||
*/ | ||
#ifndef MU_INSPECTOR_SCOREACCESSIBILITYSETTINGSMODEL_H | ||
#define MU_INSPECTOR_SCOREACCESSIBILITYSETTINGSMODEL_H | ||
|
||
#include "models/abstractinspectormodel.h" | ||
#include "models/propertyitem.h" | ||
#include "async/asyncable.h" | ||
|
||
namespace mu::inspector { | ||
class ScoreAccessibilitySettingsModel : public AbstractInspectorModel | ||
{ | ||
Q_OBJECT | ||
|
||
Q_PROPERTY(PropertyItem * scoreStylePreset READ scoreStylePreset CONSTANT) | ||
|
||
public: | ||
explicit ScoreAccessibilitySettingsModel(QObject* parent, IElementRepositoryService* repository); | ||
|
||
void createProperties() override; | ||
void requestElements() override; | ||
void loadProperties() override; | ||
void resetProperties() override; | ||
|
||
PropertyItem* scoreStylePreset() const; | ||
void setScoreStylePreset(PropertyItem* item); | ||
|
||
signals: | ||
void scoreStylePresetChanged(); | ||
|
||
private: | ||
PropertyItem* m_scoreStylePreset = nullptr; | ||
}; | ||
} | ||
|
||
#endif // MU_INSPECTOR_SCOREACCESSIBILITYSETTINGSMODEL_H |
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
64 changes: 64 additions & 0 deletions
64
src/inspector/view/qml/MuseScore/Inspector/score/ScoreAccessibilityInspectorView.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,64 @@ | ||
/* | ||
* SPDX-License-Identifier: GPL-3.0-only | ||
* MuseScore-Studio-CLA-applies | ||
* | ||
* MuseScore Studio | ||
* Music Composition & Notation | ||
* | ||
* Copyright (C) 2021 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.Controls 2.15 | ||
import QtQuick.Layouts 1.15 | ||
|
||
import MuseScore.Inspector 1.0 | ||
import Muse.UiComponents 1.0 | ||
import Muse.Ui 1.0 | ||
|
||
import "../common" | ||
|
||
InspectorSectionView { | ||
id: root | ||
implicitHeight: contentColumn.implicitHeight | ||
|
||
Column { | ||
id: contentColumn | ||
width: parent.width | ||
spacing: 8 | ||
|
||
DropdownPropertyView { | ||
id: scoreStylePreset | ||
|
||
titleText: qsTrc("inspector", "Score style preset") | ||
propertyItem: null | ||
visible: true | ||
|
||
model: [ | ||
{ text: qsTrc("inspector", "Default") }, | ||
{ text: qsTrc("inspector", "16mm MSN") }, | ||
{ text: qsTrc("inspector", "18mm MSN") }, | ||
{ text: qsTrc("inspector", "20mm MSN") }, | ||
{ text: qsTrc("inspector", "24mm MSN") }, | ||
{ text: qsTrc("inspector", "25mm MSN") } | ||
] | ||
} | ||
|
||
FlatButton { | ||
width: parent.width | ||
text: qsTrc("inspector", "Customize shapes & colours") | ||
onClicked: console.log("Customize shapes & colours button clicked") | ||
} | ||
} | ||
} |