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 
17 class CADocument;
18 class CAPlayable;
19 class CATempo;
20 class CANoteCheckerError;
21 
22 class CASheet {
23 public:
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 
36  CAStaff *addStaff();
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 
55 private:
56  QList<CAContext *> _contextList;
58  QList<CANoteCheckerError*> _noteCheckerErrorList;
59 
60  QString _name;
61 };
62 #endif /*SHEET_H_*/
CAContext::Staff
@ Staff
Definition: context.h:23
CASheet::clear
void clear()
Definition: sheet.cpp:92
CASheet::insertContextAfter
void insertContextAfter(CAContext *after, CAContext *c)
Definition: sheet.cpp:172
CADocument
Class which represents the current document.
Definition: document.h:19
CASheet::addContext
void addContext(CAContext *c)
Definition: sheet.h:33
CAVoice
Class which represents a voice in the staff.
Definition: voice.h:23
CASheet::addStaff
CAStaff * addStaff()
Definition: sheet.cpp:83
document.h
CASheet::voiceList
QList< CAVoice * > voiceList()
Definition: sheet.cpp:148
CAPlayable
Playable instances of music elements.
Definition: playable.h:18
CASheet::findContext
CAContext * findContext(const QString name)
Definition: sheet.cpp:104
CASheet::getChord
QList< CAPlayable * > getChord(int time)
Definition: sheet.cpp:120
notecheckererror.h
CASheet::addNoteCheckerError
void addNoteCheckerError(CANoteCheckerError *nce)
Definition: sheet.h:49
CASheet::name
const QString name()
Definition: sheet.h:46
CASheet::~CASheet
~CASheet()
Definition: sheet.cpp:41
CASheet::noteCheckerErrorList
QList< CANoteCheckerError * > & noteCheckerErrorList()
Definition: sheet.h:51
CASheet::_contextList
QList< CAContext * > _contextList
Definition: sheet.h:56
CASheet::setDocument
void setDocument(CADocument *doc)
Definition: sheet.h:44
CAVoice::removeLyricsContext
bool removeLyricsContext(CALyricsContext *lc)
Definition: voice.h:117
CASheet::_name
QString _name
Definition: sheet.h:60
CATempo
Tempo mark.
Definition: tempo.h:14
CASheet::clone
CASheet * clone()
Definition: sheet.h:27
CAStaff
Represents a staff in the sheet.
Definition: staff.h:25
CASheet::setName
void setName(const QString name)
Definition: sheet.h:47
CAContext::contextType
CAContextType contextType()
Definition: context.h:32
CASheet::removeContext
void removeContext(CAContext *c)
Definition: sheet.h:34
CASheet::_noteCheckerErrorList
QList< CANoteCheckerError * > _noteCheckerErrorList
Definition: sheet.h:58
CASheet::clearNoteCheckerErrors
void clearNoteCheckerErrors()
Definition: sheet.cpp:186
CASheet::CASheet
CASheet(const QString name, CADocument *doc)
Definition: sheet.cpp:36
CASheet::insertContext
void insertContext(int pos, CAContext *c)
Definition: sheet.h:31
CASheet::contextList
const QList< CAContext * > & contextList()
Definition: sheet.h:29
CASheet::staffList
QList< CAStaff * > staffList()
Definition: sheet.cpp:157
CANoteCheckerError
Class representing the error produced by the note checker.
Definition: notecheckererror.h:13
sheet.h
CALyricsContext
One stanza line of lyrics.
Definition: lyricscontext.h:19
context.h
CAMusElement::timeStart
virtual int timeStart() const
Definition: muselement.h:51
CAContext
Line of music elements in the sheet.
Definition: context.h:16
CAStaff::addVoice
void addVoice(CAVoice *voice)
Definition: staff.h:36
CASheet::getTempo
CATempo * getTempo(int time)
Definition: sheet.cpp:133
CAContext::LyricsContext
@ LyricsContext
Definition: context.h:24
tempo.h
voice.h
CASheet::_document
CADocument * _document
Definition: sheet.h:57
CASheet
Represents a single sheet of paper in the document.
Definition: sheet.h:22
CASheet::document
CADocument * document()
Definition: sheet.h:43
staff.h
lyricscontext.h