|
Canorus
0.7
|
00001 00008 #ifndef TUPLET_H_ 00009 #define TUPLET_H_ 00010 00011 #include "core/muselement.h" 00012 00013 class CAContext; 00014 class CAVoice; 00015 00016 class CATuplet : public CAMusElement { 00017 public: 00018 CATuplet( int number, int actualNumber, QList<CAPlayable*> noteList ); 00019 CATuplet( int number, int actualNumber ); 00020 virtual ~CATuplet(); 00021 00022 CATuplet* clone(CAContext* context=0); 00023 CATuplet* clone(QList<CAPlayable*> newList); 00024 int compare(CAMusElement*); 00025 00026 inline int number() { return _number; } 00027 inline void setNumber( int n ) { _number = n; } 00028 00029 inline int actualNumber() { return _actualNumber; } 00030 inline void setActualNumber( int n ) { _actualNumber = n; } 00031 00032 inline QList<CAPlayable*>& noteList() { return _noteList; } 00033 void addNote( CAPlayable* p ); 00034 inline void addNotes( QList<CAPlayable*> l ) { noteList() << l; } 00035 inline void removeNote( CAPlayable* p ) { noteList().removeAll(p); } 00036 inline CAPlayable *firstNote() { return noteList().front(); } 00037 inline CAPlayable *lastNote() { return noteList().back(); } 00038 inline bool containsNote( CAPlayable *p ) { return noteList().contains(p); } 00039 CAPlayable *nextTimed( CAPlayable *p ); 00040 00041 int timeLength(); 00042 int timeStart(); 00043 00044 void assignTimes(); 00045 00046 private: 00047 void resetTimes(); 00048 00049 int _number; 00050 int _actualNumber; 00051 00052 QList<CAPlayable*> _noteList; 00053 }; 00054 00055 #endif /* TUPLET_H_ */
1.8.0