-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSingleNote.h
More file actions
34 lines (26 loc) · 1.04 KB
/
Copy pathSingleNote.h
File metadata and controls
34 lines (26 loc) · 1.04 KB
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
/*
* File: SingleNote.h
* Author: astral
*
* Created on 21 Август 2012 г., 23:20
*/
#ifndef SINGLENOTE_H
#define SINGLENOTE_H
#include "Note.h"
class SingleNote : public Note {
public:
SingleNote(NoteLength nlength = nl1, unsigned nextension = 0, double npitch = 0);
virtual ~SingleNote();
void SetPitch (double np) { pitch = np; } // pitch = 0 => pauze (type/length is defined by nlength)
double GetPitch () { return pitch; }
// Graphics stuff
void AdjustNote(QPointF point, int clef);
void SetString (unsigned nstring) { string = nstring; }
unsigned GetString () { return string; }
QRectF boundingRect() const;
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
private:
double pitch;
unsigned string; // Forced binding with string: turns off positioning towards 0-th fret algorithm in GameMode (if possible). 0 = disabled, >=0 = fret num is set on given string
};
#endif /* SINGLENOTE_H */