Canorus  0.7
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
/home/iurt/rpm/BUILD/canorus-0.7.R1002/src/core/rest.h
Go to the documentation of this file.
00001 
00008 #ifndef REST_H_
00009 #define REST_H_
00010 
00011 #include "core/playable.h"
00012 
00013 class CAStaff;
00014 
00015 class CARest : public CAPlayable {
00016 public:
00017         enum CARestType {
00018                 Undefined=-1,
00019                 Normal,
00020                 Hidden
00021         };
00022 
00023         CARest(CARestType type, CAPlayableLength length, CAVoice *voice, int timeStart, int timeLength=-1);
00024         ~CARest();
00025 
00026         CARest *clone(CAVoice* voice = 0);
00027 
00028         CARestType restType() { return _restType; }
00029         void setRestType( CARestType type ) { _restType = type; }
00030 
00031         int compare(CAMusElement *elt);
00032 
00033         static const QString restTypeToString(CARestType);
00034         static CARestType restTypeFromString(const QString);
00035         static QList<CARest*> composeRests( int timeLength, int timeStart, CAVoice* voice=0, CARestType=Hidden );
00036 
00037 private:
00038         CARestType _restType;
00039 };
00040 #endif /* REST_H_ */