2013-08-22 12:18:14 +02:00
|
|
|
//=============================================================================
|
|
|
|
// MuseScore
|
|
|
|
// Music Composition & Notation
|
|
|
|
//
|
|
|
|
// Copyright (C) 2002-2013 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 __TIE_H__
|
|
|
|
#define __TIE_H__
|
|
|
|
|
|
|
|
#include "mscore.h"
|
|
|
|
#include "slur.h"
|
|
|
|
|
|
|
|
class QPainter;
|
|
|
|
|
|
|
|
namespace Ms {
|
|
|
|
|
|
|
|
class Note;
|
|
|
|
class Score;
|
|
|
|
class MuseScoreView;
|
|
|
|
struct SlurPos;
|
|
|
|
|
|
|
|
//---------------------------------------------------------
|
|
|
|
// @@ Tie
|
2014-05-16 13:44:32 +02:00
|
|
|
//! a Tie has a Note as startElement/endElement
|
2013-08-22 12:18:14 +02:00
|
|
|
//---------------------------------------------------------
|
|
|
|
|
|
|
|
class Tie : public SlurTie {
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
static Note* editStartNote;
|
|
|
|
static Note* editEndNote;
|
|
|
|
|
|
|
|
public:
|
|
|
|
Tie(Score* = 0);
|
2014-06-24 18:36:02 +02:00
|
|
|
virtual Tie* clone() const override { return new Tie(*this); }
|
|
|
|
virtual Element::Type type() const override { return Element::Type::TIE; }
|
2013-08-22 12:18:14 +02:00
|
|
|
void setStartNote(Note* note);
|
|
|
|
void setEndNote(Note* note) { setEndElement((Element*)note); }
|
2014-08-07 10:18:50 +02:00
|
|
|
Note* startNote() const;
|
|
|
|
Note* endNote() const;
|
2014-02-22 21:29:29 +01:00
|
|
|
void calculateDirection();
|
2013-08-22 12:18:14 +02:00
|
|
|
virtual void write(Xml& xml) const override;
|
|
|
|
virtual void read(XmlReader&) override;
|
|
|
|
virtual void layout() override;
|
|
|
|
virtual void slurPos(SlurPos*) override;
|
|
|
|
virtual void computeBezier(SlurSegment*, QPointF so = QPointF());
|
|
|
|
virtual void startEdit(MuseScoreView*, const QPointF&) override;
|
|
|
|
virtual void endEdit() override;
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace Ms
|
|
|
|
#endif
|
|
|
|
|