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) 2026 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 : #pragma once
24 :
25 : #include "../dom/staff.h"
26 : #include "../dom/stafftype.h"
27 :
28 : namespace mu::engraving {
29 : struct StaffConfig
30 : {
31 : bool visible = false;
32 : Spatium userDistance = Spatium(0.0);
33 : bool cutaway = false;
34 : bool hideSystemBarline = false;
35 : AutoOnOff mergeMatchingRests = AutoOnOff::AUTO;
36 : bool reflectTranspositionInLinkedTab = false;
37 : ClefTypeList clefTypeList;
38 : StaffType staffType;
39 :
40 0 : bool operator==(const StaffConfig& conf) const
41 : {
42 0 : bool equal = visible == conf.visible;
43 0 : equal &= userDistance == conf.userDistance;
44 0 : equal &= cutaway == conf.cutaway;
45 0 : equal &= hideSystemBarline == conf.hideSystemBarline;
46 0 : equal &= mergeMatchingRests == conf.mergeMatchingRests;
47 0 : equal &= clefTypeList == conf.clefTypeList;
48 0 : equal &= staffType == conf.staffType;
49 0 : equal &= reflectTranspositionInLinkedTab == conf.reflectTranspositionInLinkedTab;
50 :
51 0 : return equal;
52 : }
53 :
54 : bool operator!=(const StaffConfig& conf) const
55 : {
56 : return !(*this == conf);
57 : }
58 : };
59 : }
|