13 #ifndef __PIANOVIEW_H__ 14 #define __PIANOVIEW_H__ 55 void paintNoteBlock(QPainter* painter,
NoteEvent* evt);
58 bool intersectsBlock(
int startTick,
int endTick,
int highPitch,
int lowPitch,
NoteEvent* evt);
64 void paint(QPainter* painter);
65 bool intersects(
int startTick,
int endTick,
int highPitch,
int lowPitch);
107 virtual void drawBackground(QPainter* painter,
const QRectF& rect);
109 void addChord(
Chord* chord,
int voice);
110 void updateBoundingSize();
111 void clearNoteData();
112 void selectNotes(
int startTick,
int endTick,
int lowPitch,
int highPitch,
NoteSelectType selType);
113 void showPopupMenu(
const QPoint& pos);
119 virtual void wheelEvent(QWheelEvent* event);
120 virtual void mousePressEvent(QMouseEvent* event);
121 virtual void mouseReleaseEvent(QMouseEvent* event);
122 virtual void mouseMoveEvent(QMouseEvent* event);
123 virtual void leaveEvent(QEvent*);
124 virtual void contextMenuEvent(QContextMenuEvent *event);
127 void xZoomChanged(qreal);
128 void tupletChanged(
int);
129 void subdivChanged(
int);
130 void barPatternChanged(
int);
131 void noteHeightChanged(
int);
132 void pitchChanged(
int);
133 void trackingPosChanged(
const Pos&);
134 void selectionChanged();
137 void moveLocator(
int);
142 void setBarPattern(
int);
148 void setStaff(
Staff*,
Pos* locator);
149 void ensureVisible(
int tick);
155 QList<QGraphicsItem*>
items() {
return scene()->selectedItems(); }
157 int pixelXToTick(
int pixX);
158 int tickToPixelX(
int tick);
159 int pixelYToPitch(
int pixY) {
return (
int)floor(128 - pixY / (qreal)_noteHeight); }
161 PianoItem* pickNote(
int tick,
int pitch);
163 QList<PianoItem*> getSelectedItems();
164 QList<PianoItem*> getItems();
Note * _note
Definition: pianoview.h:52
int _noteHeight
Definition: pianoview.h:90
Pos trackingPos
Definition: pianoview.h:86
DragStyle
Definition: pianoview.h:36
bool dragStarted
Definition: pianoview.h:98
Global staff data not directly related to drawing.
Definition: staff.h:62
Definition: pianoview.h:76
qreal _xZoom
Definition: pianoview.h:91
Definition: noteevent.h:25
Definition: pianoview.h:42
int barPattern()
Definition: pianoview.h:154
bool inProgressUndoEvent
Definition: pianoview.h:103
int tuplet()
Definition: pianoview.h:152
Chord * chord
Definition: pianoview.h:84
~PianoItem()
Definition: pianoview.h:62
TType _timeType
Definition: pianoview.h:89
bool playEventsView()
Definition: pianoview.h:166
Pos * _locator
Definition: pianoview.h:87
int subdiv()
Definition: pianoview.h:153
int noteHeight()
Definition: pianoview.h:150
PianoView * _pianoView
Definition: pianoview.h:53
int pixelYToPitch(int pixY)
Definition: pianoview.h:159
bool mouseDown
Definition: pianoview.h:97
Definition: pianoview.h:51
QString name
Definition: pianoview.h:43
Definition: aeolus.cpp:26
bool _playEventsView
Definition: pianoview.h:96
int lastDragPitch
Definition: pianoview.h:102
Staff * staff()
Definition: pianoview.h:147
QList< QGraphicsItem * > items()
Definition: pianoview.h:155
int _subdiv
Definition: pianoview.h:93
NoteSelectType
Definition: pianoview.h:28
int ticks
Definition: pianoview.h:88
Graphic representation of a chord.
Definition: chord.h:55
QPointF mouseDownPos
Definition: pianoview.h:99
int _tuplet
Definition: pianoview.h:92
qreal xZoom()
Definition: pianoview.h:151
Definition: chordrest.h:48
Note * note()
Definition: pianoview.h:63
QAction * getAction(const char *)
Definition: shortcut.cpp:3952
DragStyle dragStyle
Definition: pianoview.h:101
Graphic representation of a note.
Definition: note.h:212
QPointF lastMousePos
Definition: pianoview.h:100
TType
Definition: pos.h:32
QList< PianoItem * > noteList
Definition: pianoview.h:105
int _barPattern
Definition: pianoview.h:94
Staff * _staff
Definition: pianoview.h:83