MuseScore/libmscore/textline.h

71 lines
2.3 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 __TEXTLINE_H__
#define __TEXTLINE_H__
#include "textlinebase.h"
2012-05-26 14:26:10 +02:00
2013-05-13 18:49:17 +02:00
namespace Ms {
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
//---------------------------------------------------------
class TextLineSegment : public TextLineBaseSegment {
Q_GADGET
protected:
2012-05-26 14:26:10 +02:00
public:
TextLineSegment(Score* s);
2017-01-18 14:16:33 +01:00
virtual ElementType type() const override { return ElementType::TEXTLINE_SEGMENT; }
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;
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;
virtual QVariant propertyDefault(P_ID) const override;
2017-01-16 20:51:12 +01:00
virtual PropertyFlags propertyFlags(P_ID) const override;
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
//---------------------------------------------------------
class TextLine : public TextLineBase {
Q_GADGET
2012-05-26 14:26:10 +02:00
public:
TextLine(Score* s);
TextLine(const TextLine&);
~TextLine() {}
2012-05-26 14:26:10 +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; }
virtual void styleChanged() override;
virtual void reset() override;
2014-07-09 18:05:58 +02:00
virtual LineSegment* createLineSegment() override;
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;
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