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
|
|
|
|
//---------------------------------------------------------
|
|
|
|
|
2014-12-08 18:02:17 +01:00
|
|
|
class KeyList : public std::map<const int, KeySigEvent> {
|
2014-06-03 15:28:10 +02:00
|
|
|
|
|
|
|
public:
|
|
|
|
KeyList() {}
|
2014-12-08 18:02:17 +01:00
|
|
|
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
|
|
|
|
|