MuseScore  3.4
Music composition and notation
mcursor.h
Go to the documentation of this file.
1 //=============================================================================
2 // MuseScore
3 // Music Composition & Notation
4 //
5 // Copyright (C) 2012 Werner Schweer
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 // as published by the Free Software Foundation and appearing in
10 // the file LICENCE.GPL
11 //=============================================================================
12 
13 #ifndef __MCURSOR_H__
14 #define __MCURSOR_H__
15 
16 #include "fraction.h"
17 
18 namespace Ms {
19 
20 class MasterScore;
21 class Score;
22 class TDuration;
23 class Fraction;
24 class TimeSig;
25 class Chord;
26 enum class Key;
27 
28 //---------------------------------------------------------
29 // MCursor
30 //---------------------------------------------------------
31 
32 class MCursor {
35  int _track;
37 
38  void createMeasures();
39 
40  public:
41  MCursor(MasterScore* s = 0);
42  void createScore(const QString& s);
43  void saveScore();
44 
45  void addPart(const QString& instrument);
46  Chord* addChord(int pitch, const TDuration& duration);
47  void addKeySig(Key);
48  TimeSig* addTimeSig(const Fraction&);
49 
50  void move(int track, const Fraction& tick);
51  MasterScore* score() const { return _score; }
52  void setScore(MasterScore* s) { _score = s; }
53  void setTimeSig(Fraction f) { _sig = f; }
54  };
55 
56 
57 } // namespace Ms
58 #endif
59 
Definition: mcursor.h:32
Definition: durationtype.h:28
Key
Definition: key.h:28
This class represents a time signature.
Definition: timesig.h:41
Chord * addChord(int pitch, const TDuration &duration)
Definition: mcursor.cpp:68
void saveScore()
Definition: mcursor.cpp:172
Definition: score.h:1227
void move(int track, const Fraction &tick)
Definition: mcursor.cpp:143
void setScore(MasterScore *s)
Definition: mcursor.h:52
int _track
Definition: mcursor.h:35
void addPart(const QString &instrument)
Definition: mcursor.cpp:153
MasterScore * _score
Definition: mcursor.h:33
void addKeySig(Key)
Definition: mcursor.cpp:93
TimeSig * addTimeSig(const Fraction &)
Definition: mcursor.cpp:111
void createScore(const QString &s)
Definition: mcursor.cpp:131
Definition: aeolus.cpp:26
void setTimeSig(Fraction f)
Definition: mcursor.h:53
MCursor(MasterScore *s=0)
Definition: mcursor.cpp:35
Fraction _tick
Definition: mcursor.h:34
Graphic representation of a chord.
Definition: chord.h:55
Definition: fraction.h:46
void createMeasures()
Definition: mcursor.cpp:45
MasterScore * score() const
Definition: mcursor.h:51
Fraction _sig
Definition: mcursor.h:36