MuseScore/libmscore/keylist.h

44 lines
1.1 KiB
C
Raw Normal View History

2014-06-03 15:28:10 +02:00
//=============================================================================
// MuseScore
// Music Composition & Notation
//
// Copyright (C) 2014 Werner Schweer
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License version 2
// as published by the Free Software Foundation and appearing in
// the file LICENCE.GPL
//=============================================================================
#ifndef __KEYLIST_H__
#define __KEYLIST_H__
#include "key.h"
namespace Ms {
class XmlReader;
//---------------------------------------------------------
// KeyList
// this list is instantiated for every staff
// to keep track of key signature changes
//---------------------------------------------------------
class KeyList : public std::map<const int, KeySigEvent> {
2014-06-03 15:28:10 +02:00
public:
KeyList() {}
KeySigEvent key(int tick) const;
KeySigEvent prevKey(int tick) const;
void setKey(int tick, KeySigEvent);
2014-06-03 15:28:10 +02:00
int nextKeyTick(int tick) const;
int currentKeyTick(int tick) const;
void read(XmlReader&, Score*);
};
}
#endif