-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathLesson.h
52 lines (39 loc) · 1.46 KB
/
Lesson.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
45
46
47
48
49
50
51
52
/*
* File: Lesson.h
* Author: astral
*
* Created on 22 Август 2012 г., 21:52
*/
#ifndef LESSON_H
#define LESSON_H
#include "Track.h"
#include "Note.h"
/* For test only; TODO dispose */
#include "Bar.h"
#include "SingleNote.h"
#include "Chord.h"
class Lesson {
public:
Lesson();
virtual ~Lesson();
void LoadLesson(QFile f); // TODO
void SetTrack(Track *t) { track = t; }
void DeleteTrack() { if (track) track->ClearBars(); delete track; }
Track* GetTrack() { return track; }
void SetBPM (unsigned bpm) { this->bpm = bpm; }
unsigned GetBPM () { return bpm; }
std::vector<QGraphicsItem*> GetVisualParts();
qreal GetVisualLength() { return (track ? track->GetVisualLength() : 0); }
// TODO sync Carriage w/ 1-st bar's 1-st note
QPointF GetStartingPos() { return (track ? track->GetStartingPos() : QPointF(0, 0)); }
unsigned GetBeatCount () { return (track ? track->GetBeatCount() : 0); }
unsigned GetBeatLength() { return (track ? track->GetBeatLength() : 0); }
private:
Track *track;
unsigned bpm;
// TODO
// Soundtrack soundtrack; // background sound; sync. with track
// AVHelper helper; // Audio-visual helper, i.e. video of hand position
// int avhelper_sync; // lesson and AVH sync: <0 - video first, then lesson, >0 - video shows during lesson track, =0 - sync. start
};
#endif /* LESSON_H */