Canorus 0.0
sheet.h
Go to the documentation of this file.
1
8#ifndef SHEET_H_
9#define SHEET_H_
10
11#include <QString>
12#include <QList>
13
14#include "score/context.h"
15#include "score/staff.h"
16
17class CADocument;
18class CAPlayable;
19class CATempo;
21
22class CASheet {
23public:
24 CASheet( const QString name, CADocument *doc );
25 ~CASheet();
26 CASheet *clone( CADocument *doc );
27 inline CASheet *clone() { return clone( document() ); }
28
29 inline const QList<CAContext*>& contextList() { return _contextList; }
30 CAContext *findContext(const QString name);
31 inline void insertContext( int pos, CAContext *c) { _contextList.insert( pos, c ); }
32 void insertContextAfter( CAContext *after, CAContext *c );
33 inline void addContext( CAContext* c ) { _contextList << c; }
34 inline void removeContext( CAContext* c ) { _contextList.removeAll(c); }
35
37 QList<CAStaff*> staffList(); // generated list
38 QList<CAVoice*> voiceList(); // generated list
39
40 QList<CAPlayable*> getChord(int time);
41 CATempo *getTempo(int time);
42
43 inline CADocument *document() { return _document; }
44 inline void setDocument(CADocument *doc) { _document = doc; }
45
46 inline const QString name() { return _name; }
47 inline void setName(const QString name) { _name = name; }
48
51 inline QList<CANoteCheckerError*>& noteCheckerErrorList() { return _noteCheckerErrorList; }
52
53 void clear();
54
55private:
56 QList<CAContext *> _contextList;
58 QList<CANoteCheckerError*> _noteCheckerErrorList;
59
60 QString _name;
61};
62#endif /*SHEET_H_*/
Line of music elements in the sheet.
Definition: context.h:16
Class which represents the current document.
Definition: document.h:19
Class representing the error produced by the note checker.
Definition: notecheckererror.h:13
Playable instances of music elements.
Definition: playable.h:18
Represents a single sheet of paper in the document.
Definition: sheet.h:22
QString _name
Definition: sheet.h:60
QList< CAVoice * > voiceList()
Definition: sheet.cpp:148
QList< CAPlayable * > getChord(int time)
Definition: sheet.cpp:120
QList< CAContext * > _contextList
Definition: sheet.h:56
CADocument * _document
Definition: sheet.h:57
QList< CANoteCheckerError * > _noteCheckerErrorList
Definition: sheet.h:58
void insertContext(int pos, CAContext *c)
Definition: sheet.h:31
CATempo * getTempo(int time)
Definition: sheet.cpp:133
void setName(const QString name)
Definition: sheet.h:47
void clearNoteCheckerErrors()
Definition: sheet.cpp:186
CASheet * clone()
Definition: sheet.h:27
const QList< CAContext * > & contextList()
Definition: sheet.h:29
CAStaff * addStaff()
Definition: sheet.cpp:83
~CASheet()
Definition: sheet.cpp:41
CADocument * document()
Definition: sheet.h:43
QList< CAStaff * > staffList()
Definition: sheet.cpp:157
void clear()
Definition: sheet.cpp:92
CAContext * findContext(const QString name)
Definition: sheet.cpp:104
void addContext(CAContext *c)
Definition: sheet.h:33
void insertContextAfter(CAContext *after, CAContext *c)
Definition: sheet.cpp:172
void removeContext(CAContext *c)
Definition: sheet.h:34
void setDocument(CADocument *doc)
Definition: sheet.h:44
const QString name()
Definition: sheet.h:46
QList< CANoteCheckerError * > & noteCheckerErrorList()
Definition: sheet.h:51
CASheet(const QString name, CADocument *doc)
Definition: sheet.cpp:36
void addNoteCheckerError(CANoteCheckerError *nce)
Definition: sheet.h:49
Represents a staff in the sheet.
Definition: staff.h:25
Tempo mark.
Definition: tempo.h:14