LCOV - code coverage report
Current view: top level - src/palette - ipaletteconfiguration.h Coverage Total Hit
Test: filtered_coverage.info Lines: 0.0 % 2 0
Test Date: 2026-11-05 04:07:02

            Line data    Source code
       1              : /*
       2              :  * SPDX-License-Identifier: GPL-3.0-only
       3              :  * MuseScore-Studio-CLA-applies
       4              :  *
       5              :  * MuseScore Studio
       6              :  * Music Composition & Notation
       7              :  *
       8              :  * Copyright (C) 2021 MuseScore Limited and others
       9              :  *
      10              :  * This program is free software: you can redistribute it and/or modify
      11              :  * it under the terms of the GNU General Public License version 3 as
      12              :  * published by the Free Software Foundation.
      13              :  *
      14              :  * This program is distributed in the hope that it will be useful,
      15              :  * but WITHOUT ANY WARRANTY; without even the implied warranty of
      16              :  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      17              :  * GNU General Public License for more details.
      18              :  *
      19              :  * You should have received a copy of the GNU General Public License
      20              :  * along with this program.  If not, see <https://www.gnu.org/licenses/>.
      21              :  */
      22              : #ifndef MU_PALETTE_IPALETTECONFIGURATION_H
      23              : #define MU_PALETTE_IPALETTECONFIGURATION_H
      24              : 
      25              : #include <QColor>
      26              : #include <QSize>
      27              : 
      28              : #include "modularity/imoduleinterface.h"
      29              : 
      30              : #include "types/retval.h"
      31              : #include "io/path.h"
      32              : 
      33              : namespace mu::palette {
      34              : class IPaletteConfiguration : MODULE_GLOBAL_INTERFACE
      35              : {
      36            0 :     INTERFACE_ID(IPaletteConfiguration)
      37              : 
      38              : public:
      39            0 :     virtual ~IPaletteConfiguration() = default;
      40              : 
      41              :     virtual double paletteSpatium() const = 0;
      42              : 
      43              :     virtual double paletteScaling() const = 0;
      44              :     virtual void setPaletteScaling(double scale) = 0;
      45              : 
      46              :     virtual muse::ValCh<bool> isSinglePalette() const = 0;
      47              :     virtual void setIsSinglePalette(bool isSingle) = 0;
      48              : 
      49              :     virtual muse::ValCh<bool> isSingleClickToOpenPalette() const = 0;
      50              :     virtual void setIsSingleClickToOpenPalette(bool isSingleClick) = 0;
      51              : 
      52              :     virtual muse::ValCh<bool> isPaletteDragEnabled() const = 0;
      53              :     virtual void setIsPaletteDragEnabled(bool enabled) = 0;
      54              : 
      55              :     virtual QColor elementsBackgroundColor() const = 0;
      56              :     virtual QColor elementsColor() const = 0;
      57              :     virtual QColor gridColor() const = 0;
      58              :     virtual QColor accentColor() const = 0;
      59              :     virtual muse::async::Notification colorsChanged() const = 0;
      60              : 
      61              :     virtual muse::io::path_t keySignaturesDirPath() const = 0;
      62              :     virtual muse::io::path_t timeSignaturesDirPath() const = 0;
      63              : 
      64              :     virtual bool useFactorySettings() const = 0;
      65              :     virtual bool enableExperimental() const = 0;
      66              : 
      67              :     struct PaletteConfig {
      68              :         QString name;
      69              :         QSize size;
      70              :         double elementOffset = 0;
      71              :         double scale = 0;
      72              :         bool showGrid = false;
      73              :     };
      74              : 
      75              :     struct PaletteCellConfig {
      76              :         QString name;
      77              :         double xOffset = 0;
      78              :         double yOffset = 0;
      79              :         double scale = 0;
      80              :         bool drawStaff = false;
      81              :     };
      82              : 
      83              :     virtual muse::ValCh<PaletteConfig> paletteConfig(const QString& paletteId) const = 0;
      84              :     virtual void setPaletteConfig(const QString& paletteId, const PaletteConfig& config) = 0;
      85              : 
      86              :     virtual muse::ValCh<PaletteCellConfig> paletteCellConfig(const QString& cellId) const = 0;
      87              :     virtual void setPaletteCellConfig(const QString& cellId, const PaletteCellConfig& config) = 0;
      88              : };
      89              : }
      90              : 
      91              : #endif // MU_PALETTE_IPALETTECONFIGURATION_H
        

Generated by: LCOV version 2.0-1