MuseScore  3.4
Music composition and notation
harmonycanvas.h
Go to the documentation of this file.
1 //=============================================================================
2 // MuseScore
3 // Linux Music Score Editor
4 //
5 // Copyright (C) 2009-2011 Werner Schweer and others
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 //
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
14 //
15 // You should have received a copy of the GNU General Public License
16 // along with this program; if not, write to the Free Software
17 // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18 //=============================================================================
19 
20 #ifndef __HARMONYCANVAS_H__
21 #define __HARMONYCANVAS_H__
22 
23 #include "libmscore/harmony.h"
24 
25 namespace Ms {
26 
27 struct TextSegment;
28 struct ChordDescription;
29 class ChordList;
30 
31 //---------------------------------------------------------
32 // HarmonyCanvas
33 //---------------------------------------------------------
34 
35 class HarmonyCanvas : public QFrame {
36  Q_OBJECT
37 
38  QList<TextSegment*> textList; // rendered chord
41  QTransform _matrix, imatrix;
42  double extraMag;
43  QPointF startMove;
45 
47 
48  virtual void paintEvent(QPaintEvent*);
49  virtual void mousePressEvent(QMouseEvent*);
50  virtual void mouseMoveEvent(QMouseEvent*);
51  virtual void mouseReleaseEvent(QMouseEvent*);
52  virtual void dropEvent(QDropEvent*);
53  virtual void dragEnterEvent(QDragEnterEvent*);
54  virtual void dragLeaveEvent(QDragLeaveEvent*);
55  virtual void dragMoveEvent(QDragMoveEvent*);
56 
57  void render(const QList<RenderAction>&, double&, double&, int, NoteSpellingType, NoteCaseType);
58 
59  private slots:
60  void deleteAction();
61 
62  public:
63  HarmonyCanvas(QWidget* parent = 0);
65  const QList<TextSegment*>& getTextList() const { return textList; }
67  };
68 
69 
70 } // namespace Ms
71 #endif
72 
Definition: chordlist.h:174
Definition: harmony.h:28
QTransform _matrix
Definition: harmonycanvas.h:41
void setChordDescription(ChordDescription *sd, ChordList *cl)
Definition: harmonyedit.cpp:441
virtual void mouseMoveEvent(QMouseEvent *)
Definition: harmonyedit.cpp:417
double extraMag
Definition: harmonycanvas.h:42
Definition: chordlist.h:230
void deleteAction()
Definition: harmonyedit.cpp:555
Base class of score layout elements.
Definition: element.h:158
NoteCaseType
Definition: pitchspelling.h:68
virtual void dragEnterEvent(QDragEnterEvent *)
Definition: harmonyedit.cpp:507
virtual void dragLeaveEvent(QDragLeaveEvent *)
Definition: harmonyedit.cpp:531
NoteSpellingType
Definition: pitchspelling.h:67
void render(const QList< RenderAction > &, double &, double &, int, NoteSpellingType, NoteCaseType)
Definition: harmonyedit.cpp:306
virtual void mousePressEvent(QMouseEvent *)
Definition: harmonyedit.cpp:400
virtual void mouseReleaseEvent(QMouseEvent *)
Definition: harmonyedit.cpp:433
Definition: harmonycanvas.h:35
virtual void dropEvent(QDropEvent *)
Definition: harmonyedit.cpp:470
Definition: aeolus.cpp:26
virtual void dragMoveEvent(QDragMoveEvent *)
Definition: harmonyedit.cpp:542
Element * dragElement
Definition: harmonycanvas.h:46
TextSegment * moveElement
Definition: harmonycanvas.h:44
QPointF startMove
Definition: harmonycanvas.h:43
virtual void paintEvent(QPaintEvent *)
Definition: harmonyedit.cpp:246
ChordList * chordList
Definition: harmonycanvas.h:40
QTransform imatrix
Definition: harmonycanvas.h:41
ChordDescription * chordDescription
Definition: harmonycanvas.h:39
QList< TextSegment * > textList
Definition: harmonycanvas.h:38
HarmonyCanvas(QWidget *parent=0)
Definition: harmonyedit.cpp:227
const QList< TextSegment * > & getTextList() const
Definition: harmonycanvas.h:65
void updateChordDescription()
Definition: harmonyedit.cpp:592