MuseScore  3.4
Music composition and notation
bagpembell.h
Go to the documentation of this file.
1 //=============================================================================
2 // MuseScore
3 // Music Composition & Notation
4 //
5 // Copyright (C) 2013 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 __BAGPEMBELL_H__
14 #define __BAGPEMBELL_H__
15 
16 #include "element.h"
17 
18 namespace Ms {
19 
20 typedef QList<int> noteList;
21 
22 //---------------------------------------------------------
23 // BagpipeEmbellishmentInfo
24 // name and notes for a BagpipeEmbellishment
25 //---------------------------------------------------------
26 
28  const char* name;
29  QString notes;
30  };
31 
32 //---------------------------------------------------------
33 // BagpipeEmbellishmentInfo
34 // name, staff line and pitch for a bagpipe note
35 //---------------------------------------------------------
36 
38  QString name;
39  int line;
40  int pitch;
41  };
42 
43 struct BEDrawingDataX;
44 struct BEDrawingDataY;
45 
46 //---------------------------------------------------------
47 // BagpipeEmbellishment
48 // dummy element, used for drag&drop
49 //---------------------------------------------------------
50 
51 class BagpipeEmbellishment final : public Element {
53  void drawGraceNote(QPainter*, const BEDrawingDataX&, const BEDrawingDataY&,
54  SymId, const qreal x, const bool drawFlag) const;
55 
56  public:
57  BagpipeEmbellishment(Score* s) : Element(s), _embelType(0) { }
58  virtual BagpipeEmbellishment* clone() const override { return new BagpipeEmbellishment(*this); }
59  virtual ElementType type() const override { return ElementType::BAGPIPE_EMBELLISHMENT; }
60  int embelType() const { return _embelType; }
61  void setEmbelType(int val) { _embelType = val; }
62  virtual qreal mag() const override;
63  virtual void write(XmlWriter&) const override;
64  virtual void read(XmlReader&) override;
65  virtual void layout() override;
66  virtual void draw(QPainter*) const override;
67  static BagpipeEmbellishmentInfo BagpipeEmbellishmentList[];
68  static int nEmbellishments();
69  static BagpipeNoteInfo BagpipeNoteInfoList[];
70  noteList getNoteList() const;
71  };
72 
73 
74 } // namespace Ms
75 #endif
76 
virtual BagpipeEmbellishment * clone() const override
Definition: bagpembell.h:58
Definition: bagpembell.h:51
Definition: xml.h:67
int _embelType
Definition: bagpembell.h:52
int embelType() const
Definition: bagpembell.h:60
int pitch
Definition: bagpembell.h:40
SymId
Definition: sym.h:30
void setEmbelType(int val)
Definition: bagpembell.h:61
Base class of score layout elements.
Definition: element.h:158
const char * name
Definition: bagpembell.h:28
QString notes
Definition: bagpembell.h:29
QString name
Definition: bagpembell.h:38
Definition: score.h:391
Definition: bagpembell.h:27
virtual ElementType type() const override
Definition: bagpembell.h:59
int line
Definition: bagpembell.h:39
Definition: aeolus.cpp:26
Definition: xml.h:218
BagpipeEmbellishment(Score *s)
Definition: bagpembell.h:57
Definition: bagpembell.cpp:386
Definition: bagpembell.h:37
ElementType
Definition: types.h:34
QList< int > noteList
Definition: bagpembell.h:20
Definition: bagpembell.cpp:418