MuseScore/libmscore/sticking.h

50 lines
1.6 KiB
C
Raw Normal View History

2019-06-08 10:38:28 +02:00
//=============================================================================
// MuseScore
// Music Composition & Notation
//
// Copyright (C) 2019 Werner Schweer and others
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License version 2.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
//=============================================================================
#ifndef __STICKING_H__
#define __STICKING_H__
#include "textbase.h"
namespace Ms {
//-----------------------------------------------------------------------------
// @@ Sticking
/// Drum sticking
//-----------------------------------------------------------------------------
2020-05-26 15:54:26 +02:00
class Sticking final : public TextBase
{
QVariant propertyDefault(Pid id) const override;
2020-03-27 12:07:27 +01:00
2020-05-26 15:54:26 +02:00
public:
Sticking(Score*);
2020-03-27 12:07:27 +01:00
2020-05-26 15:54:26 +02:00
Sticking* clone() const override { return new Sticking(*this); }
ElementType type() const override { return ElementType::STICKING; }
2020-03-27 12:07:27 +01:00
2020-05-26 15:54:26 +02:00
Segment* segment() const { return (Segment*)parent(); }
Measure* measure() const { return (Measure*)parent()->parent(); }
2019-06-08 10:38:28 +02:00
2020-05-26 15:54:26 +02:00
void layout() override;
void write(XmlWriter& xml) const override;
void read(XmlReader&) override;
};
2019-06-08 10:38:28 +02:00
} // namespace Ms
#endif