MuseScore/libmscore/mcursor.h

61 lines
1.4 KiB
C
Raw Normal View History

2012-05-26 14:49:10 +02:00
//=============================================================================
// MuseScore
// Music Composition & Notation
// $Id:$
//
// Copyright (C) 2012 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 __MCURSOR_H__
#define __MCURSOR_H__
2013-05-13 18:49:17 +02:00
#include "fraction.h"
namespace Ms {
2016-03-10 10:41:31 +01:00
class MasterScore;
2012-05-26 14:49:10 +02:00
class Score;
class TDuration;
class Fraction;
class TimeSig;
class Chord;
2014-06-20 17:07:22 +02:00
enum class Key;
2013-04-29 16:34:05 +02:00
2012-05-26 14:49:10 +02:00
//---------------------------------------------------------
// MCursor
//---------------------------------------------------------
class MCursor {
2016-03-10 10:41:31 +01:00
MasterScore* _score;
2012-05-26 14:49:10 +02:00
int _tick;
int _track;
2013-04-29 16:34:05 +02:00
Fraction _sig;
2012-05-26 14:49:10 +02:00
void createMeasures();
public:
MCursor(Score* s = 0);
void createScore(const QString& s);
void saveScore();
void addPart(const QString& instrument);
Chord* addChord(int pitch, const TDuration& duration);
2014-06-20 17:07:22 +02:00
void addKeySig(Key);
TimeSig* addTimeSig(const Fraction&);
2012-05-26 14:49:10 +02:00
void move(int track, int tick);
2016-03-10 10:41:31 +01:00
MasterScore* score() const { return _score; }
void setScore(MasterScore* s) { _score = s; }
2013-04-30 18:39:39 +02:00
void setTimeSig(Fraction f) { _sig = f; }
2012-05-26 14:49:10 +02:00
};
2013-05-13 18:49:17 +02:00
} // namespace Ms
2012-05-26 14:49:10 +02:00
#endif