MuseScore/libmscore/repeat.h
ws ec3be9a99a Replacd integer midi tick values by fractions.
- tick names a position on the time axis
- tick is always a Fraction()
- only Measure() and Segment() (and Tuplet?) have a tick value
- tick() for an generic element return only a sensible value if isMeasure() or isSegment() or isSegment(parent())

- "ticks" names a duration stored in a Fraction()
- the tick value for an Segment is relative to its measure

- rename "duration" to "ticks"
- rename afrac() to tick()
- rename rfrac() to rtick()
- rename some variables, changing "fraction" into "tick"
  (example: actualFraction() into actualTicks())

- Lyrics ticks are written as Fraction, on read if xmlreader sees a "/" it reads a fraction
  else midi ticks for backwards compatibility
2019-02-18 11:46:05 +01:00

48 lines
1.5 KiB
C++

//=============================================================================
// MuseScore
// Music Composition & Notation
//
// Copyright (C) 2002-2011 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 __REPEAT_H__
#define __REPEAT_H__
#include "text.h"
#include "rest.h"
namespace Ms {
class Score;
class Segment;
//---------------------------------------------------------
// @@ RepeatMeasure
//---------------------------------------------------------
class RepeatMeasure final : public Rest {
QPainterPath path;
public:
RepeatMeasure(Score*);
RepeatMeasure &operator=(const RepeatMeasure&) = delete;
virtual RepeatMeasure* clone() const override { return new RepeatMeasure(*this); }
virtual Element* linkedClone() override { return Element::linkedClone(); }
virtual ElementType type() const override { return ElementType::REPEAT_MEASURE; }
virtual void draw(QPainter*) const override;
virtual void layout() override;
virtual Fraction ticks() const override;
Fraction actualTicks() const { return Rest::ticks(); }
virtual QString accessibleInfo() const override;
};
} // namespace Ms
#endif