MuseScore  3.4
Music composition and notation
musedata.h
Go to the documentation of this file.
1 //=============================================================================
2 // MuseScore
3 // Linux Music Score Editor
4 //
5 // Copyright (C) 2002-2009 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 __MUSEDATA_H__
21 #define __MUSEDATA_H__
22 
23 #include "libmscore/fraction.h"
24 
25 namespace Ms {
26 
27 class Staff;
28 class Part;
29 class Score;
30 class ChordRest;
31 class Measure;
32 class Slur;
33 
34 //---------------------------------------------------------
35 // MuseData
36 // used importing Musedata files
37 //---------------------------------------------------------
38 
39 class MuseData {
40  int _division;
42  QList<QStringList> parts;
45  int ntuplet;
47  int voice;
48  Slur* slur[4];
49 
50  void musicalAttribute(QString s, Part*);
51  void readPart(QStringList sl, Part*);
52  void readNote(Part*, const QString& s);
53  void readChord(Part*, const QString& s);
54  void readRest(Part*, const QString& s);
55  void readBackup(const QString& s);
57  int countStaves(const QStringList& sl);
58  void openSlur(int idx, const Fraction& tick, Staff* staff, int voice);
59  void closeSlur(int idx, const Fraction& tick, Staff* staff, int voice);
60  QString diacritical(QString);
61 
62  public:
63  MuseData(Score* s) { score = s; }
64  bool read(const QString&);
65  void convert();
66  };
67 
68 
69 } // namespace Ms
70 #endif
71 
void musicalAttribute(QString s, Part *)
Definition: musedata.cpp:49
void readRest(Part *, const QString &s)
Definition: musedata.cpp:444
Global staff data not directly related to drawing.
Definition: staff.h:62
Slur * slur[4]
Definition: musedata.h:48
void closeSlur(int idx, const Fraction &tick, Staff *staff, int voice)
Definition: musedata.cpp:174
Fraction curTick
Definition: musedata.h:41
one measure in a system
Definition: measure.h:65
Definition: slur.h:55
void readPart(QStringList sl, Part *)
Definition: musedata.cpp:544
void convert()
Definition: musedata.cpp:712
int countStaves(const QStringList &sl)
Definition: musedata.cpp:615
Measure * measure
Definition: musedata.h:46
int voice
Definition: musedata.h:47
void openSlur(int idx, const Fraction &tick, Staff *staff, int voice)
Definition: musedata.cpp:157
Definition: score.h:391
Score * score
Definition: musedata.h:43
int _division
Definition: musedata.h:40
QList< QStringList > parts
Definition: musedata.h:42
int ntuplet
Definition: musedata.h:45
void readChord(Part *, const QString &s)
Definition: musedata.cpp:116
Definition: aeolus.cpp:26
void readNote(Part *, const QString &s)
Definition: musedata.cpp:190
QString diacritical(QString)
Definition: musedata.cpp:417
Definition: chordrest.h:48
void readBackup(const QString &s)
Definition: musedata.cpp:487
bool read(const QString &)
Definition: musedata.cpp:650
Definition: musedata.h:39
MuseData(Score *s)
Definition: musedata.h:63
Definition: fraction.h:46
ChordRest * chordRest
Definition: musedata.h:44
Definition: part.h:47
Measure * createMeasure()
Definition: musedata.cpp:500