MuseScore  3.4
Music composition and notation
keylist.h
Go to the documentation of this file.
1 //=============================================================================
2 // MuseScore
3 // Music Composition & Notation
4 //
5 // Copyright (C) 2014 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 __KEYLIST_H__
14 #define __KEYLIST_H__
15 
16 #include "key.h"
17 
18 namespace Ms {
19 
20 class XmlReader;
21 
22 //---------------------------------------------------------
23 // KeyList
24 // this list is instantiated for every staff
25 // to keep track of key signature changes
26 //---------------------------------------------------------
27 
28 class KeyList : public std::map<const int, KeySigEvent> {
29 
30  public:
31  KeyList() {}
32  KeySigEvent key(int tick) const;
33  KeySigEvent prevKey(int tick) const;
34  void setKey(int tick, KeySigEvent);
35  int nextKeyTick(int tick) const;
36  int currentKeyTick(int tick) const;
37  void read(XmlReader&, Score*);
38  };
39 
40 }
41 
42 #endif
43 
KeyList()
Definition: keylist.h:31
Definition: xml.h:67
int currentKeyTick(int tick) const
Definition: keylist.cpp:95
int nextKeyTick(int tick) const
Definition: keylist.cpp:58
void read(XmlReader &, Score *)
Definition: keylist.cpp:110
Definition: score.h:391
Definition: keylist.h:28
Definition: key.h:95
Definition: aeolus.cpp:26
KeySigEvent prevKey(int tick) const
Definition: keylist.cpp:72
void setKey(int tick, KeySigEvent)
Definition: keylist.cpp:42
KeySigEvent key(int tick) const
Definition: keylist.cpp:25
Definition: xmlreader.h:28