Canorus 0.0
tuplet.h
Go to the documentation of this file.
1
8#ifndef TUPLET_H_
9#define TUPLET_H_
10
11#include "score/muselement.h"
12
13class CAContext;
14class CAVoice;
15class CASlur;
16
17class CATuplet : public CAMusElement {
18public:
19 CATuplet( int number, int actualNumber, QList<CAPlayable*> noteList );
20 CATuplet( int number, int actualNumber );
21 virtual ~CATuplet();
22
24 CATuplet* clone(QList<CAPlayable*> newList);
26
27 inline int number() { return _number; }
28 inline void setNumber( int n ) { _number = n; }
29
30 inline int actualNumber() { return _actualNumber; }
31 inline void setActualNumber( int n ) { _actualNumber = n; }
32
33 inline const QList<CAPlayable*>& noteList() { return _noteList; }
34 void addNote( CAPlayable* p );
35 inline void addNotes( QList<CAPlayable*> l ) { _noteList << l; }
36 inline void removeNote( CAPlayable* p ) { _noteList.removeAll(p); }
39 inline bool containsNote( CAPlayable *p ) { return noteList().contains(p); }
41
42 int timeLength();
43 int timeStart();
44
45 void assignTimes();
46
47private:
48 void resetTimes();
49 QList< QList<CASlur*> > getNoteSlurs();
50 void assignNoteSlurs( QList< QList<CASlur*> > );
51
54
55 QList<CAPlayable*> _noteList;
56};
57
58#endif /* TUPLET_H_ */
Line of music elements in the sheet.
Definition: context.h:16
An abstract class which represents every music element in the score.
Definition: muselement.h:21
CAContext * context()
Definition: muselement.h:48
Playable instances of music elements.
Definition: playable.h:18
Slur, Tie, Phrasing slur and Laissez vibrer tie This class represents any type of slur....
Definition: slur.h:18
Class used for tuplets (triplets, duols etc.)
Definition: tuplet.h:17
int _actualNumber
Definition: tuplet.h:53
QList< CAPlayable * > _noteList
Definition: tuplet.h:55
const QList< CAPlayable * > & noteList()
Definition: tuplet.h:33
void resetTimes()
Definition: tuplet.cpp:225
void removeNote(CAPlayable *p)
Definition: tuplet.h:36
void addNotes(QList< CAPlayable * > l)
Definition: tuplet.h:35
int actualNumber()
Definition: tuplet.h:30
CATuplet(int number, int actualNumber, QList< CAPlayable * > noteList)
Definition: tuplet.cpp:34
void setNumber(int n)
Definition: tuplet.h:28
void setActualNumber(int n)
Definition: tuplet.h:31
int timeStart()
Definition: tuplet.cpp:334
int _number
Definition: tuplet.h:52
void addNote(CAPlayable *p)
Definition: tuplet.cpp:279
int number()
Definition: tuplet.h:27
virtual ~CATuplet()
Definition: tuplet.cpp:52
bool containsNote(CAPlayable *p)
Definition: tuplet.h:39
CATuplet * clone(CAContext *context=0)
Definition: tuplet.cpp:56
QList< QList< CASlur * > > getNoteSlurs()
Definition: tuplet.cpp:86
int compare(CAMusElement *)
Definition: tuplet.cpp:64
void assignNoteSlurs(QList< QList< CASlur * > >)
Definition: tuplet.cpp:114
void assignTimes()
Definition: tuplet.cpp:159
CAPlayable * lastNote()
Definition: tuplet.cpp:315
CAPlayable * firstNote()
Definition: tuplet.cpp:301
CAPlayable * nextTimed(CAPlayable *p)
Definition: tuplet.cpp:290
int timeLength()
Definition: tuplet.cpp:326
Class which represents a voice in the staff.
Definition: voice.h:23