LCOV - code coverage report
Current view: top level - src/importexport/lyricsexport/internal - lyricsexportconfiguration.cpp Coverage Total Hit
Test: filtered_coverage.info Lines: 30.8 % 13 4
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) 2025 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              : 
      23              : #include "lyricsexportconfiguration.h"
      24              : 
      25              : #include "settings.h"
      26              : 
      27              : using namespace muse;
      28              : using namespace mu::iex::lrcexport;
      29              : 
      30              : static const std::string module_name("iex_lyricsexport");
      31              : 
      32              : static const Settings::Key LRC_USE_ENHANCED_FORMAT_KEY(module_name, "export/lrc/useEnhancedFormat");
      33              : 
      34            1 : void LyricsExportConfiguration::init()
      35              : {
      36            1 :     settings()->setDefaultValue(LRC_USE_ENHANCED_FORMAT_KEY, Val(true));
      37            1 :     settings()->valueChanged(LRC_USE_ENHANCED_FORMAT_KEY).onReceive(this, [this](const Val& val) {
      38            0 :         m_lrcUseEnhancedFormatChanged.send(val.toBool());
      39            0 :     });
      40            1 : }
      41              : 
      42            0 : bool LyricsExportConfiguration::lrcUseEnhancedFormat() const
      43              : {
      44            0 :     return settings()->value(LRC_USE_ENHANCED_FORMAT_KEY).toBool();
      45              : }
      46              : 
      47            0 : void LyricsExportConfiguration::setLrcUseEnhancedFormat(bool value)
      48              : {
      49            0 :     settings()->setSharedValue(LRC_USE_ENHANCED_FORMAT_KEY, Val(value));
      50            0 : }
      51              : 
      52            0 : async::Channel<bool> LyricsExportConfiguration::lrcUseEnhancedFormatChanged() const
      53              : {
      54            0 :     return m_lrcUseEnhancedFormatChanged;
      55              : }
        

Generated by: LCOV version 2.0-1