MuseScore  3.4
Music composition and notation
musicxmlfonthandler.h
Go to the documentation of this file.
1 //=============================================================================
2 // MusE Score
3 // Linux Music Score Editor
4 //
5 // Copyright (C) 2014 Werner Schweer and others
6 //
7 // This program is free software; you can redistribute it and/or modify
8 // it under the terms of the GNU General Public License version 2.
9 //
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
14 //
15 // You should have received a copy of the GNU General Public License
16 // along with this program; if not, write to the Free Software
17 // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18 //=============================================================================
19 
20 #ifndef __MUSICXMLFONTHANDLER_H__
21 #define __MUSICXMLFONTHANDLER_H__
22 
23 #include "libmscore/text.h"
24 
25 namespace Ms {
26 
27 //---------------------------------------------------------
28 // MScoreTextToMXML
29 //---------------------------------------------------------
30 
32 
33 public:
34  MScoreTextToMXML(const QString& tag, const QString& attr, const CharFormat& defFmt, const QString& mtf);
35  static QString toPlainText(const QString& text);
36  static QString toPlainTextPlusSymbols(const QList<TextFragment>& list);
37  static bool split(const QList<TextFragment>& in, const int pos, const int len,
38  QList<TextFragment>& left, QList<TextFragment>& mid, QList<TextFragment>& right);
39  void writeTextFragments(const QList<TextFragment>& fr, XmlWriter& xml);
40 
41 private:
42  QString updateFormat();
43  QString attribs;
44  QString tagname;
47  QString musicalTextFont;
48 };
49 
50 } // namespace Ms
51 
52 #endif
static QString toPlainText(const QString &text)
Definition: musicxmlfonthandler.cpp:96
QString tagname
Definition: musicxmlfonthandler.h:44
static QString toPlainTextPlusSymbols(const QList< TextFragment > &list)
Definition: musicxmlfonthandler.cpp:119
Definition: textbase.h:64
CharFormat oldFormat
Definition: musicxmlfonthandler.h:45
void writeTextFragments(const QList< TextFragment > &fr, XmlWriter &xml)
Definition: musicxmlfonthandler.cpp:232
static bool split(const QList< TextFragment > &in, const int pos, const int len, QList< TextFragment > &left, QList< TextFragment > &mid, QList< TextFragment > &right)
Split in into left, mid and right.
Definition: musicxmlfonthandler.cpp:160
QString updateFormat()
Definition: musicxmlfonthandler.cpp:267
Definition: musicxmlfonthandler.h:31
Definition: aeolus.cpp:26
Definition: xml.h:218
CharFormat newFormat
Definition: musicxmlfonthandler.h:46
MScoreTextToMXML(const QString &tag, const QString &attr, const CharFormat &defFmt, const QString &mtf)
Definition: musicxmlfonthandler.cpp:78
QString attribs
Definition: musicxmlfonthandler.h:43
QString musicalTextFont
Definition: musicxmlfonthandler.h:47