-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstaffscene.h
44 lines (35 loc) · 899 Bytes
/
staffscene.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#ifndef STAFFSCENE_H
#define STAFFSCENE_H
#include <QObject>
#include <QGraphicsScene>
#include <QGraphicsItem>
#include <QPixmap>
#include <QGraphicsPixmapItem>
#include "note.h"
#include "linemanager.h"
class StaffScene : public QGraphicsScene
{
Q_OBJECT
public:
explicit StaffScene(QGraphicsView* view, QObject *parent = 0);
void selectLine(int lineNumber);
void setCorrectState(int lineNumber, bool correctState);
StaffLine* line(int lineNumber)const;
signals:
void lineSelected(int lineNumber);
public slots:
private slots:
void unselectLine();
private:
void makeLine();
void makeNote();
void makeTrebleClef();
void setBoundries();
void setNoteY(int selectedLineNumber);
Note* m_note;
lineManager* m_lineManager;
int m_selectedLine;
QGraphicsPixmapItem* m_treble;
QGraphicsView* m_view;
};
#endif // STAFFSCENE_H