MuseScore  3.4
Music composition and notation
lasso.h
Go to the documentation of this file.
1 //=============================================================================
2 // MuseScore
3 // Music Composition & Notation
4 //
5 // Copyright (C) 2010-2011 Werner Schweer
6 //
7 // This program is free software; you can redistribute it and/or modify
8 // it under the terms of the GNU General Public License version 2
9 // as published by the Free Software Foundation and appearing in
10 // the file LICENCE.GPL
11 //=============================================================================
12 
13 #ifndef __LASSO_H__
14 #define __LASSO_H__
15 
16 #include "element.h"
17 
18 namespace Ms {
19 
20 //---------------------------------------------------------
21 // Lasso
22 //---------------------------------------------------------
23 
24 class Lasso : public Element {
25  public:
26  Lasso(Score*);
27  virtual Lasso* clone() const override { return new Lasso(*this); }
28  ElementType type() const final { return ElementType::LASSO; }
29  virtual void draw(QPainter*) const override;
30  virtual bool isEditable() const override { return true; }
31  virtual void editDrag(EditData&) override;
32  virtual void endDrag(EditData&) {}
33 
34  virtual QVariant getProperty(Pid propertyId) const override;
35  virtual bool setProperty(Pid propertyId, const QVariant&) override;
36 
37  int gripsCount() const override { return 8; }
38  Grip initialEditModeGrip() const override { return Grip(7); }
39  Grip defaultGrip() const override { return Grip(7); }
40  std::vector<QPointF> gripsPositions(const EditData&) const override;
41  };
42 
43 
44 } // namespace Ms
45 #endif
46 
Pid
Definition: property.h:62
std::vector< QPointF > gripsPositions(const EditData &) const override
Definition: lasso.cpp:91
virtual void endDrag(EditData &)
Definition: lasso.h:32
Base class of score layout elements.
Definition: element.h:158
Definition: score.h:391
virtual Pid propertyId(const QStringRef &xmlName) const override
Definition: element.cpp:1326
ElementType type() const final
Definition: lasso.h:28
Grip
Definition: element.h:43
virtual bool isEditable() const override
Definition: lasso.h:30
virtual void draw(QPainter *) const override
Definition: lasso.cpp:34
Definition: lasso.h:24
Definition: aeolus.cpp:26
Lasso(Score *)
Definition: lasso.cpp:24
Grip defaultGrip() const override
Definition: lasso.h:39
Definition: element.h:111
virtual QVariant getProperty(Pid propertyId) const override
Definition: lasso.cpp:132
virtual Lasso * clone() const override
Definition: lasso.h:27
ElementType
Definition: types.h:34
Grip initialEditModeGrip() const override
Definition: lasso.h:38
virtual void editDrag(EditData &) override
Definition: lasso.cpp:47
virtual bool setProperty(Pid propertyId, const QVariant &) override
Definition: lasso.cpp:110
int gripsCount() const override
Definition: lasso.h:37