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 __TEXTLINE_H__
|
|
|
|
#define __TEXTLINE_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 {
|
|
|
|
|
2016-08-30 14:03:26 +02:00
|
|
|
class Note;
|
2012-05-26 14:26:10 +02:00
|
|
|
|
|
|
|
//---------------------------------------------------------
|
2012-07-25 11:49:34 +02:00
|
|
|
// @@ TextLineSegment
|
2012-05-26 14:26:10 +02:00
|
|
|
//---------------------------------------------------------
|
|
|
|
|
2016-08-30 14:03:26 +02:00
|
|
|
class TextLineSegment : public TextLineBaseSegment {
|
2017-02-17 15:09:28 +01:00
|
|
|
Q_GADGET
|
2012-05-28 11:29:21 +02:00
|
|
|
|
2016-07-15 14:05:51 +02:00
|
|
|
protected:
|
2012-05-26 14:26:10 +02:00
|
|
|
|
|
|
|
public:
|
2016-08-30 14:03:26 +02:00
|
|
|
TextLineSegment(Score* s);
|
2017-01-18 14:16:33 +01:00
|
|
|
virtual ElementType type() const override { return ElementType::TEXTLINE_SEGMENT; }
|
2016-08-30 14:03:26 +02:00
|
|
|
virtual TextLineSegment* clone() const override { return new TextLineSegment(*this); }
|
|
|
|
TextLine* textLine() const { return (TextLine*)spanner(); }
|
2014-07-09 18:05:58 +02:00
|
|
|
virtual void layout() override;
|
2016-08-30 14:03:26 +02:00
|
|
|
virtual QVariant getProperty(P_ID propertyId) const override;
|
2014-07-09 18:05:58 +02:00
|
|
|
virtual bool setProperty(P_ID propertyId, const QVariant&) override;
|
2016-08-30 14:03:26 +02:00
|
|
|
virtual QVariant propertyDefault(P_ID) const override;
|
2017-01-16 20:51:12 +01:00
|
|
|
virtual PropertyFlags propertyFlags(P_ID) const override;
|
2016-08-30 14:03:26 +02:00
|
|
|
virtual void resetProperty(P_ID id) override;
|
|
|
|
virtual void styleChanged() override;
|
2012-05-26 14:26:10 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
//---------------------------------------------------------
|
2012-07-25 11:49:34 +02:00
|
|
|
// @@ TextLine
|
2012-05-26 14:26:10 +02:00
|
|
|
//---------------------------------------------------------
|
|
|
|
|
2016-08-30 14:03:26 +02:00
|
|
|
class TextLine : public TextLineBase {
|
2017-02-17 15:09:28 +01:00
|
|
|
Q_GADGET
|
2012-05-28 11:29:21 +02:00
|
|
|
|
2012-05-26 14:26:10 +02:00
|
|
|
public:
|
|
|
|
TextLine(Score* s);
|
|
|
|
TextLine(const TextLine&);
|
2016-08-30 14:03:26 +02:00
|
|
|
~TextLine() {}
|
2012-05-26 14:26:10 +02:00
|
|
|
|
2016-08-30 14:03:26 +02:00
|
|
|
virtual TextLine* clone() const { return new TextLine(*this); }
|
2017-01-18 14:16:33 +01:00
|
|
|
virtual ElementType type() const { return ElementType::TEXTLINE; }
|
2016-08-30 14:03:26 +02:00
|
|
|
virtual void styleChanged() override;
|
|
|
|
virtual void reset() override;
|
2014-07-09 18:05:58 +02:00
|
|
|
virtual LineSegment* createLineSegment() override;
|
2016-08-30 14:03:26 +02:00
|
|
|
virtual QVariant getProperty(P_ID propertyId) const override;
|
2014-07-09 18:05:58 +02:00
|
|
|
virtual bool setProperty(P_ID propertyId, const QVariant&) override;
|
2016-08-30 14:03:26 +02:00
|
|
|
virtual QVariant propertyDefault(P_ID) const override;
|
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
|
|
|
|
|