Canorus
0.7
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
src
core
lyricscontext.h
Go to the documentation of this file.
1
8
#ifndef LYRICSCONTEXT_H_
9
#define LYRICSCONTEXT_H_
10
11
#include "
core/context.h
"
12
#include "
core/voice.h
"
13
14
#include <QList>
15
#include <QHash>
16
17
class
CASyllable
;
18
19
class
CALyricsContext
:
public
CAContext
{
20
public
:
21
CALyricsContext
(
const
QString
name
,
int
stanzaNumber
,
CAVoice
*v );
22
CALyricsContext
(
const
QString name,
int
stanzaNumber,
CASheet
*s );
23
~CALyricsContext
();
24
void
clear
();
25
CALyricsContext
*
clone
(
CASheet
*s );
26
void
cloneLyricsContextProperties
(
CALyricsContext
* );
27
28
void
repositSyllables
();
29
30
CAMusElement
*
next
(
CAMusElement
*);
31
CAMusElement
*
previous
(
CAMusElement
*);
32
QList<CAMusElement*>
musElementList
();
33
bool
remove
(
CAMusElement
* );
34
void
removeAt
(
int
i );
35
36
bool
addSyllable
(
CASyllable
*,
bool
replace=
true
);
37
bool
addEmptySyllable
(
int
timeStart,
int
timeLength );
38
CASyllable
*
removeSyllableAtTimeStart
(
int
timeStart );
39
CASyllable
*
syllableAt
(
int
idx ) {
return
_syllableList
[idx]; }
40
CASyllable
*
syllableAtTimeStart
(
int
timeStart );
41
inline
QList<CASyllable*>
syllableList
() {
return
_syllableList
; }
42
inline
int
syllableCount
() {
return
_syllableList
.size(); }
43
44
inline
CAVoice
*
associatedVoice
() {
return
_associatedVoice
; }
45
inline
void
setAssociatedVoice
(
CAVoice
*v ) {
46
if
(
_associatedVoice
)
47
_associatedVoice
->
removeLyricsContext
(
this
);
48
if
(v)
49
v->
addLyricsContext
(
this
);
50
_associatedVoice
= v;
51
repositSyllables
();
52
}
53
inline
int
stanzaNumber
() {
return
_stanzaNumber
; }
54
inline
void
setStanzaNumber
(
int
sn ) {
_stanzaNumber
= sn; }
55
inline
QString
customStanzaName
() {
return
_customStanzaName
; }
56
inline
void
setCustomStanzaName
( QString name ) {
_customStanzaName
=
name
; }
57
58
private
:
59
QList< CASyllable* >
_syllableList
;
60
CAVoice
*
_associatedVoice
;
61
int
_stanzaNumber
;
62
QString
_customStanzaName
;
63
};
64
65
#endif
/* LYRICSCONTEXT_H_ */
Generated on Fri Jan 11 2013 14:40:12 for Canorus by
1.8.3