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__
|
|
|
|
|
2016-08-30 14:03:26 +02:00
|
|
|
#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
|
|
|
|
//---------------------------------------------------------
|
|
|
|
|
2017-12-21 14:03:45 +01:00
|
|
|
class PedalSegment final : public TextLineBaseSegment
|
|
|
|
{
|
2020-03-27 12:07:27 +01:00
|
|
|
Sid getPropertyStyle(Pid) const override;
|
2018-10-25 15:43:59 +02:00
|
|
|
|
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
|
|
|
//---------------------------------------------------------
|
|
|
|
|
2017-12-21 14:03:45 +01:00
|
|
|
class Pedal final : public TextLineBase
|
|
|
|
{
|
2020-03-27 12:07:27 +01:00
|
|
|
Sid getPropertyStyle(Pid) const override;
|
2018-10-25 15:43:59 +02:00
|
|
|
|
2014-05-27 17:09:27 +02:00
|
|
|
protected:
|
2015-01-19 12:37:17 +01:00
|
|
|
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
|