MuseScore/libmscore/pedal.h

61 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 {
2012-10-27 14:46:35 +02:00
public:
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
//---------------------------------------------------------
class Pedal final : public TextLineBase {
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);
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;
2017-06-08 15:43:05 +02:00
virtual StyleIdx getPropertyStyle(P_ID) 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