MuseScore/libmscore/mcursor.h

60 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 {
2012-05-26 14:49:10 +02:00
class Score;
class TDuration;
class Fraction;
class TimeSig;
class Chord;
2012-05-26 14:49:10 +02:00
2013-04-29 16:34:05 +02:00
2012-05-26 14:49:10 +02:00
//---------------------------------------------------------
// MCursor
//---------------------------------------------------------
class MCursor {
Score* _score;
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);
2012-05-26 14:49:10 +02:00
void addKeySig(int);
TimeSig* addTimeSig(const Fraction&);
2012-05-26 14:49:10 +02:00
void move(int track, int tick);
Score* score() const { return _score; }
void setScore(Score* 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