Canorus  0.0
rest.h
Go to the documentation of this file.
1 
8 #ifndef REST_H_
9 #define REST_H_
10 
11 #include "score/playable.h"
12 
13 class CAStaff;
14 
15 class CARest : public CAPlayable {
16 public:
17  enum CARestType {
20  Hidden
21  };
22 
23  CARest(CARestType type, CAPlayableLength length, CAVoice *voice, int timeStart, int timeLength=-1);
24  ~CARest();
25 
26  CARest *clone(CAVoice* voice = 0);
27 
29  void setRestType( CARestType type ) { _restType = type; }
30 
31  int compare(CAMusElement *elt);
32 
33  static const QString restTypeToString(CARestType);
34  static CARestType restTypeFromString(const QString);
35  static QList<CARest*> composeRests( int timeLength, int timeStart, CAVoice* voice=0, CARestType=Hidden );
36 
37 private:
39 };
40 #endif /* REST_H_ */
rest.h
CARest
Represents a rest in the score.
Definition: rest.h:15
playable.h
CAVoice
Class which represents a voice in the staff.
Definition: voice.h:23
CAPlayableLength::Breve
@ Breve
Definition: playablelength.h:20
CAMusElement::markList
const QList< CAMark * > markList()
Definition: muselement.h:70
CAPlayable
Playable instances of music elements.
Definition: playable.h:18
CARest::Normal
@ Normal
Definition: rest.h:19
CARest::clone
CARest * clone(CAVoice *voice=0)
Definition: rest.cpp:37
CARest::Hidden
@ Hidden
Definition: rest.h:20
CAMusElement::timeLength
virtual int timeLength() const
Definition: muselement.h:53
CAMusElement::addMark
void addMark(CAMark *mark)
Definition: muselement.cpp:135
CARest::restTypeToString
static const QString restTypeToString(CARestType)
Definition: rest.cpp:64
CAStaff
Represents a staff in the sheet.
Definition: staff.h:25
CAMusElement
An abstract class which represents every music element in the score.
Definition: muselement.h:21
CAMusElement::Rest
@ Rest
Definition: muselement.h:26
CARest::restTypeFromString
static CARestType restTypeFromString(const QString)
Definition: rest.cpp:78
CARest::_restType
CARestType _restType
Definition: rest.h:38
CAPlayableLength
Musical length of notes and rests.
Definition: playablelength.h:16
CARest::composeRests
static QList< CARest * > composeRests(int timeLength, int timeStart, CAVoice *voice=0, CARestType=Hidden)
Definition: rest.cpp:96
CARest::compare
int compare(CAMusElement *elt)
Definition: rest.cpp:48
CARest::~CARest
~CARest()
Definition: rest.cpp:34
CAMusElement::timeStart
virtual int timeStart() const
Definition: muselement.h:51
CARest::Undefined
@ Undefined
Definition: rest.h:18
CARest::CARestType
CARestType
Definition: rest.h:17
CAMusElement::_musElementType
CAMusElementType _musElementType
Definition: muselement.h:87
CAMark
Marks that depend on other music elements.
Definition: mark.h:15
CARest::CARest
CARest(CARestType type, CAPlayableLength length, CAVoice *voice, int timeStart, int timeLength=-1)
Definition: rest.cpp:25
staff.h
CARest::restType
CARestType restType()
Definition: rest.h:28
CARest::setRestType
void setRestType(CARestType type)
Definition: rest.h:29
CAMusElement::musElementType
CAMusElementType musElementType()
Definition: muselement.h:46
mark.h
CAPlayable::voice
CAVoice * voice()
Definition: playable.h:31
CAPlayable::playableLength
CAPlayableLength & playableLength()
Definition: playable.h:23