2021-04-19 16:06:08 +02:00
|
|
|
/*
|
|
|
|
* 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/>.
|
|
|
|
*/
|
2020-08-27 13:20:03 +02:00
|
|
|
#ifndef MU_NOTATION_INOTATIONCONFIGURATION_H
|
|
|
|
#define MU_NOTATION_INOTATIONCONFIGURATION_H
|
2020-06-16 11:36:39 +02:00
|
|
|
|
|
|
|
#include <QColor>
|
|
|
|
|
|
|
|
#include "modularity/imoduleexport.h"
|
2020-08-27 11:09:44 +02:00
|
|
|
#include "async/channel.h"
|
2022-07-22 17:35:12 +02:00
|
|
|
#include "types/retval.h"
|
2020-08-27 18:40:26 +02:00
|
|
|
#include "io/path.h"
|
2020-12-26 09:56:40 +01:00
|
|
|
#include "notationtypes.h"
|
2021-01-20 12:31:14 +01:00
|
|
|
#include "global/globaltypes.h"
|
2020-06-16 11:36:39 +02:00
|
|
|
|
2020-11-25 12:44:08 +01:00
|
|
|
namespace mu::notation {
|
2020-06-16 11:36:39 +02:00
|
|
|
class INotationConfiguration : MODULE_EXPORT_INTERFACE
|
|
|
|
{
|
|
|
|
INTERFACE_ID(INotationConfiguration)
|
|
|
|
|
|
|
|
public:
|
|
|
|
virtual ~INotationConfiguration() = default;
|
|
|
|
|
2020-08-27 11:09:44 +02:00
|
|
|
virtual QColor backgroundColor() const = 0;
|
2021-03-16 12:46:25 +01:00
|
|
|
virtual void setBackgroundColor(const QColor& color) = 0;
|
|
|
|
|
2022-05-23 12:34:38 +02:00
|
|
|
virtual io::path_t backgroundWallpaperPath() const = 0;
|
2022-04-25 17:41:44 +02:00
|
|
|
virtual const QPixmap& backgroundWallpaper() const = 0;
|
2022-05-23 12:34:38 +02:00
|
|
|
virtual void setBackgroundWallpaperPath(const io::path_t& path) = 0;
|
2021-03-16 12:46:25 +01:00
|
|
|
|
2021-03-16 13:19:43 +01:00
|
|
|
virtual bool backgroundUseColor() const = 0;
|
|
|
|
virtual void setBackgroundUseColor(bool value) = 0;
|
2022-10-01 19:30:53 +02:00
|
|
|
|
|
|
|
virtual void resetBackground() = 0;
|
|
|
|
|
2021-03-16 12:46:25 +01:00
|
|
|
virtual async::Notification backgroundChanged() const = 0;
|
2020-08-27 11:09:44 +02:00
|
|
|
|
2021-03-16 13:19:43 +01:00
|
|
|
virtual QColor foregroundColor() const = 0;
|
|
|
|
virtual void setForegroundColor(const QColor& color) = 0;
|
|
|
|
|
2022-05-23 12:34:38 +02:00
|
|
|
virtual io::path_t foregroundWallpaperPath() const = 0;
|
2022-04-25 17:41:44 +02:00
|
|
|
virtual const QPixmap& foregroundWallpaper() const = 0;
|
2022-05-23 12:34:38 +02:00
|
|
|
virtual void setForegroundWallpaperPath(const io::path_t& path) = 0;
|
2020-10-26 12:18:51 +01:00
|
|
|
|
2020-08-31 14:16:44 +02:00
|
|
|
virtual bool foregroundUseColor() const = 0;
|
2021-03-16 13:19:43 +01:00
|
|
|
virtual void setForegroundUseColor(bool value) = 0;
|
2022-10-01 19:30:53 +02:00
|
|
|
|
|
|
|
virtual void resetForeground() = 0;
|
|
|
|
|
2021-03-16 13:19:43 +01:00
|
|
|
virtual async::Notification foregroundChanged() const = 0;
|
|
|
|
|
2022-05-23 12:34:38 +02:00
|
|
|
virtual io::path_t wallpapersDefaultDirPath() const = 0;
|
2021-03-18 17:42:18 +01:00
|
|
|
|
2021-03-16 13:19:43 +01:00
|
|
|
virtual QColor borderColor() const = 0;
|
|
|
|
virtual int borderWidth() const = 0;
|
2020-08-27 11:09:44 +02:00
|
|
|
|
2020-08-31 14:16:44 +02:00
|
|
|
virtual QColor anchorLineColor() const = 0;
|
2020-12-21 12:26:03 +01:00
|
|
|
|
2020-08-27 11:09:44 +02:00
|
|
|
virtual QColor playbackCursorColor() const = 0;
|
2021-02-09 17:39:29 +01:00
|
|
|
virtual QColor loopMarkerColor() const = 0;
|
2020-12-21 12:26:03 +01:00
|
|
|
virtual int cursorOpacity() const = 0;
|
|
|
|
|
2022-04-29 08:32:14 +02:00
|
|
|
virtual QColor selectionColor(engraving::voice_idx_t voiceIndex = 0) const = 0;
|
2020-12-26 09:56:40 +01:00
|
|
|
|
2022-05-31 18:13:09 +02:00
|
|
|
virtual QColor dropRectColor() const = 0;
|
|
|
|
|
2020-08-27 11:09:44 +02:00
|
|
|
virtual int selectionProximity() const = 0;
|
2022-05-15 16:35:32 +02:00
|
|
|
virtual void setSelectionProximity(int proximity) = 0;
|
2021-03-24 11:04:05 +01:00
|
|
|
|
|
|
|
virtual ZoomType defaultZoomType() const = 0;
|
|
|
|
virtual void setDefaultZoomType(ZoomType zoomType) = 0;
|
|
|
|
|
|
|
|
virtual int defaultZoom() const = 0;
|
|
|
|
virtual void setDefaultZoom(int zoomPercentage) = 0;
|
2020-08-27 11:09:44 +02:00
|
|
|
|
2021-06-01 16:50:23 +02:00
|
|
|
virtual QList<int> possibleZoomPercentageList() const = 0;
|
|
|
|
|
2022-02-27 16:11:03 +01:00
|
|
|
virtual qreal scalingFromZoomPercentage(int zoomPercentage) const = 0;
|
|
|
|
virtual int zoomPercentageFromScaling(qreal scaling) const = 0;
|
|
|
|
|
2021-03-24 11:04:05 +01:00
|
|
|
virtual int mouseZoomPrecision() const = 0;
|
|
|
|
virtual void setMouseZoomPrecision(int precision) = 0;
|
|
|
|
|
2020-12-26 09:56:40 +01:00
|
|
|
virtual std::string fontFamily() const = 0;
|
2020-08-27 11:09:44 +02:00
|
|
|
virtual int fontSize() const = 0;
|
|
|
|
|
2022-05-23 12:34:38 +02:00
|
|
|
virtual io::path_t userStylesPath() const = 0;
|
|
|
|
virtual void setUserStylesPath(const io::path_t& path) = 0;
|
|
|
|
virtual async::Channel<io::path_t> userStylesPathChanged() const = 0;
|
2020-08-24 14:02:47 +02:00
|
|
|
|
2022-05-23 12:34:38 +02:00
|
|
|
virtual io::path_t defaultStyleFilePath() const = 0;
|
|
|
|
virtual void setDefaultStyleFilePath(const io::path_t& path) = 0;
|
2021-03-28 17:55:57 +02:00
|
|
|
|
2022-05-23 12:34:38 +02:00
|
|
|
virtual io::path_t partStyleFilePath() const = 0;
|
|
|
|
virtual void setPartStyleFilePath(const io::path_t& path) = 0;
|
2021-03-28 17:55:57 +02:00
|
|
|
|
2020-08-24 14:02:47 +02:00
|
|
|
virtual bool isMidiInputEnabled() const = 0;
|
2021-01-28 16:45:03 +01:00
|
|
|
virtual void setIsMidiInputEnabled(bool enabled) = 0;
|
2020-10-15 16:29:59 +02:00
|
|
|
|
2021-02-02 16:56:03 +01:00
|
|
|
virtual bool isAutomaticallyPanEnabled() const = 0;
|
|
|
|
virtual void setIsAutomaticallyPanEnabled(bool enabled) = 0;
|
|
|
|
|
|
|
|
virtual bool isPlayRepeatsEnabled() const = 0;
|
|
|
|
virtual void setIsPlayRepeatsEnabled(bool enabled) = 0;
|
2022-03-01 19:01:55 +01:00
|
|
|
virtual async::Notification isPlayRepeatsChanged() const = 0;
|
2021-02-02 16:56:03 +01:00
|
|
|
|
2022-09-07 14:55:19 +02:00
|
|
|
virtual bool isPlayChordSymbolsEnabled() const = 0;
|
|
|
|
virtual void setIsPlayChordSymbolsEnabled(bool enabled) = 0;
|
|
|
|
virtual async::Notification isPlayChordSymbolsChanged() const = 0;
|
|
|
|
|
2021-02-02 16:56:03 +01:00
|
|
|
virtual bool isMetronomeEnabled() const = 0;
|
|
|
|
virtual void setIsMetronomeEnabled(bool enabled) = 0;
|
|
|
|
|
|
|
|
virtual bool isCountInEnabled() const = 0;
|
|
|
|
virtual void setIsCountInEnabled(bool enabled) = 0;
|
|
|
|
|
2021-07-28 00:05:01 +02:00
|
|
|
virtual double guiScaling() const = 0;
|
|
|
|
virtual double notationScaling() const = 0;
|
2020-11-25 12:44:08 +01:00
|
|
|
|
2021-02-17 18:14:32 +01:00
|
|
|
virtual ValCh<framework::Orientation> canvasOrientation() const = 0;
|
|
|
|
virtual void setCanvasOrientation(framework::Orientation orientation) = 0;
|
2021-03-22 18:10:02 +01:00
|
|
|
|
2021-03-24 11:04:05 +01:00
|
|
|
virtual bool isLimitCanvasScrollArea() const = 0;
|
|
|
|
virtual void setIsLimitCanvasScrollArea(bool limited) = 0;
|
2021-10-10 20:53:10 +02:00
|
|
|
virtual async::Notification isLimitCanvasScrollAreaChanged() const = 0;
|
2021-03-24 11:04:05 +01:00
|
|
|
|
2022-05-15 16:35:32 +02:00
|
|
|
virtual bool colorNotesOutsideOfUsablePitchRange() const = 0;
|
|
|
|
virtual void setColorNotesOutsideOfUsablePitchRange(bool value) = 0;
|
2021-03-22 18:10:02 +01:00
|
|
|
|
|
|
|
virtual int delayBetweenNotesInRealTimeModeMilliseconds() const = 0;
|
|
|
|
virtual void setDelayBetweenNotesInRealTimeModeMilliseconds(int delayMs) = 0;
|
|
|
|
|
|
|
|
virtual int notePlayDurationMilliseconds() const = 0;
|
|
|
|
virtual void setNotePlayDurationMilliseconds(int durationMs) = 0;
|
2021-06-21 17:44:26 +02:00
|
|
|
|
2022-05-15 16:35:32 +02:00
|
|
|
virtual void setTemplateModeEnabled(bool enabled) = 0;
|
2021-06-21 17:44:26 +02:00
|
|
|
virtual void setTestModeEnabled(bool enabled) = 0;
|
2021-07-13 10:08:54 +02:00
|
|
|
|
2022-10-24 15:11:45 +02:00
|
|
|
virtual io::path_t instrumentListPath() const = 0;
|
2021-07-13 10:08:54 +02:00
|
|
|
|
2022-05-23 12:34:38 +02:00
|
|
|
virtual io::paths_t scoreOrderListPaths() const = 0;
|
2021-07-13 10:08:54 +02:00
|
|
|
virtual async::Notification scoreOrderListPathsChanged() const = 0;
|
|
|
|
|
2022-05-23 12:34:38 +02:00
|
|
|
virtual io::paths_t userScoreOrderListPaths() const = 0;
|
|
|
|
virtual void setUserScoreOrderListPaths(const io::paths_t& paths) = 0;
|
2021-09-08 12:02:33 +02:00
|
|
|
|
|
|
|
virtual bool isSnappedToGrid(framework::Orientation gridOrientation) const = 0;
|
|
|
|
virtual void setIsSnappedToGrid(framework::Orientation gridOrientation, bool isSnapped) = 0;
|
|
|
|
|
|
|
|
virtual int gridSizeSpatium(framework::Orientation gridOrientation) const = 0;
|
|
|
|
virtual void setGridSize(framework::Orientation gridOrientation, int sizeSpatium) = 0;
|
2022-01-12 10:46:33 +01:00
|
|
|
|
|
|
|
virtual bool needToShowAddTextErrorMessage() const = 0;
|
|
|
|
virtual void setNeedToShowAddTextErrorMessage(bool show) = 0;
|
|
|
|
|
|
|
|
virtual bool needToShowAddFiguredBassErrorMessage() const = 0;
|
|
|
|
virtual void setNeedToShowAddFiguredBassErrorMessage(bool show) = 0;
|
|
|
|
|
2022-11-18 15:39:50 +01:00
|
|
|
virtual bool needToShowMScoreError(const std::string& errorKey) const = 0;
|
|
|
|
virtual void setNeedToShowMScoreError(const std::string& errorKey, bool show) = 0;
|
2022-03-26 21:11:52 +01:00
|
|
|
|
|
|
|
virtual ValCh<int> pianoKeyboardNumberOfKeys() const = 0;
|
|
|
|
virtual void setPianoKeyboardNumberOfKeys(int number) = 0;
|
2022-07-02 13:36:53 +02:00
|
|
|
|
|
|
|
virtual io::path_t styleFileImportPath() const = 0;
|
|
|
|
virtual void setStyleFileImportPath(const io::path_t& path) = 0;
|
2020-06-16 11:36:39 +02:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2020-08-27 13:20:03 +02:00
|
|
|
#endif // MU_NOTATION_INOTATIONCONFIGURATION_H
|