MuseScore/libmscore/pedal.h

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

68 lines
1.9 KiB
C
Raw Normal View History

2012-05-26 14:26:10 +02:00
//=============================================================================
// 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 __PEDAL_H__
#define __PEDAL_H__
#include "textlinebase.h"
2012-05-26 14:26:10 +02:00
2013-05-13 18:49:17 +02:00
namespace Ms {
2013-08-09 11:42:24 +02:00
class Pedal;
2012-10-27 14:46:35 +02:00
//---------------------------------------------------------
// @@ PedalSegment
//---------------------------------------------------------
class PedalSegment final : public TextLineBaseSegment
{
2020-03-27 12:07:27 +01:00
Sid getPropertyStyle(Pid) const override;
2012-10-27 14:46:35 +02:00
public:
2020-05-29 18:47:27 +02:00
PedalSegment(Spanner* sp, Score* s)
: TextLineBaseSegment(sp, s, ElementFlag::MOVABLE | ElementFlag::ON_STAFF) {}
2020-03-27 12:07:27 +01:00
ElementType type() const override { return ElementType::PEDAL_SEGMENT; }
PedalSegment* clone() const override { return new PedalSegment(*this); }
Pedal* pedal() const { return toPedal(spanner()); }
void layout() override;
2014-05-27 17:09:27 +02:00
friend class Pedal;
2012-10-27 14:46:35 +02:00
};
2012-05-26 14:26:10 +02:00
//---------------------------------------------------------
2012-07-25 11:49:34 +02:00
// @@ Pedal
2012-05-26 14:26:10 +02:00
//---------------------------------------------------------
class Pedal final : public TextLineBase
{
2020-03-27 12:07:27 +01:00
Sid getPropertyStyle(Pid) const override;
2014-05-27 17:09:27 +02:00
protected:
QPointF linePos(Grip, System**) const override;
2014-05-27 17:09:27 +02:00
2012-05-26 14:26:10 +02:00
public:
Pedal(Score* s);
2020-03-27 12:07:27 +01:00
Pedal* clone() const override { return new Pedal(*this); }
ElementType type() const override { return ElementType::PEDAL; }
void read(XmlReader&) override;
void write(XmlWriter& xml) const override;
LineSegment* createLineSegment() override;
QVariant propertyDefault(Pid propertyId) const override;
2013-05-13 18:49:17 +02:00
2014-05-27 17:09:27 +02:00
friend class PedalLine;
2020-05-26 15:54:26 +02:00
};
2013-05-13 18:49:17 +02:00
} // namespace Ms
2012-05-26 14:26:10 +02:00
#endif