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
|
|
|
|
//---------------------------------------------------------
|
|
|
|
|
2016-08-30 14:03:26 +02:00
|
|
|
class PedalSegment : public TextLineBaseSegment {
|
2017-02-17 15:09:28 +01:00
|
|
|
Q_GADGET
|
2012-10-27 14:46:35 +02:00
|
|
|
|
|
|
|
protected:
|
|
|
|
|
|
|
|
public:
|
2016-08-30 14:03:26 +02:00
|
|
|
PedalSegment(Score* s) : TextLineBaseSegment(s) {}
|
2017-02-07 18:48:23 +01:00
|
|
|
virtual ElementType type() const override { return ElementType::PEDAL_SEGMENT; }
|
|
|
|
virtual PedalSegment* clone() const override { return new PedalSegment(*this); }
|
|
|
|
Pedal* pedal() const { return (Pedal*)spanner(); }
|
2013-08-09 11:42:24 +02:00
|
|
|
virtual 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
|
|
|
//---------------------------------------------------------
|
|
|
|
|
2016-08-30 14:03:26 +02:00
|
|
|
class Pedal : public TextLineBase {
|
2017-02-17 15:09:28 +01:00
|
|
|
Q_GADGET
|
2012-05-28 11:29:21 +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);
|
2017-02-07 18:48:23 +01:00
|
|
|
virtual Pedal* clone() const override { return new Pedal(*this); }
|
2017-01-18 14:16:33 +01:00
|
|
|
virtual ElementType type() const override { return ElementType::PEDAL; }
|
2013-08-09 11:42:24 +02:00
|
|
|
virtual void read(XmlReader&) override;
|
2012-10-27 14:46:35 +02:00
|
|
|
LineSegment* createLineSegment();
|
2013-08-09 11:42:24 +02:00
|
|
|
virtual void setYoff(qreal) override;
|
|
|
|
virtual QVariant propertyDefault(P_ID propertyId) const override;
|
2014-05-27 17:09:27 +02:00
|
|
|
|
|
|
|
friend class PedalLine;
|
2012-05-26 14:26:10 +02:00
|
|
|
};
|
2013-05-13 18:49:17 +02:00
|
|
|
|
|
|
|
} // namespace Ms
|
2012-05-26 14:26:10 +02:00
|
|
|
#endif
|
|
|
|
|