Canorus  0.7
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
/home/iurt/rpm/BUILD/canorus-0.7.R1002/src/core/sheet.h
Go to the documentation of this file.
00001 
00008 #ifndef SHEET_H_
00009 #define SHEET_H_
00010 
00011 #include <QString>
00012 #include <QList>
00013 
00014 #include "core/context.h"
00015 #include "core/staff.h"
00016 
00017 class CADocument;
00018 class CAPlayable;
00019 
00020 class CASheet {
00021 public:
00022         CASheet( const QString name, CADocument *doc );
00023         ~CASheet();
00024         CASheet *clone( CADocument *doc );
00025         inline CASheet *clone() { return clone( document() ); }
00026 
00027         CAContext *contextAt(int i) { return _contextList[i]; }
00028         CAContext *context(const QString name);
00029         inline QList<CAContext*>& contextList() { return _contextList; }
00030         inline int contextIndex(CAContext* context) { return _contextList.indexOf(context); }
00031         void insertContextAfter( CAContext *after, CAContext *c);
00032         void addContext(CAContext *);
00033         inline void removeContext(CAContext* c) { _contextList.removeAll(c); }
00034         inline int contextCount() { return _contextList.size(); }
00035 
00036         CAStaff *addStaff();
00037         int staffCount();
00038         CAStaff *staffAt(int i);
00039         QList<CAStaff*> staffList();
00040 
00041         QList<CAVoice*> voiceList();
00042         inline CAVoice *voiceAt(int i) { return voiceList().at(i); }
00043         inline int voiceCount() { return voiceList().size(); }
00044 
00045         QList<CAPlayable*> getChord(int time);
00046 
00047         inline CADocument *document() { return _document; }
00048         inline void setDocument(CADocument *doc) { _document = doc; }
00049 
00050         inline const QString name() { return _name; }
00051         inline void setName(const QString name) { _name = name; }
00052 
00053         void clear();
00054 
00055 private:
00056         QList<CAContext *> _contextList;
00057         CADocument *_document;
00058 
00059         QString _name;
00060 };
00061 #endif /*SHEET_H_*/