forked from musescore/MuseScore
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompatutils.h
More file actions
75 lines (70 loc) · 2.99 KB
/
compatutils.h
File metadata and controls
75 lines (70 loc) · 2.99 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
/*
* SPDX-License-Identifier: GPL-3.0-only
* MuseScore-Studio-CLA-applies
*
* MuseScore Studio
* Music Composition & Notation
*
* Copyright (C) 2021 MuseScore Limited
*
* 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/>.
*/
#pragma once
#include <vector>
#include <set>
#include "../../dom/articulation.h"
namespace mu::engraving {
class Dynamic;
class Excerpt;
class HarmonyInfo;
class MasterScore;
class Score;
enum class DynamicType : unsigned char;
enum class SymId;
}
namespace mu::engraving::compat {
class CompatUtils
{
public:
static void assignInitialPartToExcerpts(const std::vector<Excerpt*>& excerpts);
static void doCompatibilityConversions(MasterScore* masterScore);
static ArticulationAnchor translateToNewArticulationAnchor(int anchor);
static double convertChordExtModUnits(double val);
static void setHarmonyRootTpcFromFunction(HarmonyInfo* info, const Harmony* h, const muse::String& s);
static const std::set<SymId> ORNAMENT_IDS;
static const std::map<Sid, Sid> ALIGN_VALS_TO_CONVERT;
static Sid positionStyleFromAlign(Sid align);
static void setTextLineTextPositionFromAlign(TextLineBase* tl);
static void setMusicSymbolSize470(MStyle& style);
static Spatium convertPre470FrameRadius(double frameRadius);
static void convertPre470ImageSize(Image* image);
static void doMigrateNoteParens(EngravingItem* item);
private:
static void replaceStaffTextWithPlayTechniqueAnnotation(MasterScore* score);
static void replaceOldWithNewOrnaments(MasterScore* score);
static void replaceOldWithNewExpressions(MasterScore* score);
static void reconstructTypeOfCustomDynamics(MasterScore* score);
static void splitArticulations(MasterScore* score);
static DynamicType reconstructDynamicTypeFromString(Dynamic* dynamic);
static void resetRestVerticalOffset(MasterScore* masterScore);
static void resetArticulationOffsets(MasterScore* masterScore);
static void resetStemLengthsForTwoNoteTrems(MasterScore* masterScore);
static void replaceStaffTextWithCapo(MasterScore* masterScore);
static void addMissingInitKeyForTransposingInstrument(MasterScore* score);
static void resetFramesExclusionFromParts(MasterScore* masterScore);
static void mapHeaderFooterStyles(MasterScore* masterScore);
static NoteLine* createNoteLineFromTextLine(TextLine* textLine);
static void convertTextLineToNoteAnchoredLine(MasterScore* masterScore);
static void convertLaissezVibArticToTie(MasterScore* masterScore);
};
}