LCOV - code coverage report
Current view: top level - src/preferences/qml/MuseScore/Preferences - preferencepageitem.cpp Coverage Total Hit
Test: filtered_coverage.info Lines: 0.0 % 31 0
Test Date: 2026-11-19 04:14:36

            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              : #include "preferencepageitem.h"
      23              : 
      24              : #include "translation.h"
      25              : 
      26              : using namespace mu::preferences;
      27              : 
      28            0 : PreferencePageItem::PreferencePageItem(QObject* parent)
      29            0 :     : QObject(parent)
      30              : {
      31            0 : }
      32              : 
      33            0 : QString PreferencePageItem::id() const
      34              : {
      35            0 :     return m_id;
      36              : }
      37              : 
      38            0 : QString PreferencePageItem::title() const
      39              : {
      40            0 :     return muse::qtrc("preferences", m_title.toUtf8());
      41              : }
      42              : 
      43            0 : int PreferencePageItem::icon() const
      44              : {
      45            0 :     return static_cast<int>(m_icon);
      46              : }
      47              : 
      48            0 : QString PreferencePageItem::path() const
      49              : {
      50            0 :     return m_path;
      51              : }
      52              : 
      53            0 : void PreferencePageItem::setId(QString id)
      54              : {
      55            0 :     if (m_id == id) {
      56            0 :         return;
      57              :     }
      58              : 
      59            0 :     m_id = id;
      60            0 :     emit idChanged(m_id);
      61              : }
      62              : 
      63            0 : void PreferencePageItem::setTitle(QString title)
      64              : {
      65            0 :     if (m_title == title) {
      66            0 :         return;
      67              :     }
      68              : 
      69            0 :     m_title = title;
      70            0 :     emit titleChanged(m_title);
      71              : }
      72              : 
      73            0 : void PreferencePageItem::setIcon(muse::ui::IconCode::Code icon)
      74              : {
      75            0 :     if (m_icon == icon) {
      76            0 :         return;
      77              :     }
      78              : 
      79            0 :     m_icon = icon;
      80            0 :     emit iconChanged(this->icon());
      81              : }
      82              : 
      83            0 : void PreferencePageItem::setPath(QString path)
      84              : {
      85            0 :     if (m_path == path) {
      86            0 :         return;
      87              :     }
      88              : 
      89            0 :     m_path = path;
      90            0 :     emit pathChanged(m_path);
      91              : }
        

Generated by: LCOV version 2.0-1