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
mark.h
Go to the documentation of this file.
1
8
#ifndef MARK_H_
9
#define MARK_H_
10
11
#include "
core/muselement.h
"
12
13
class
CAContext
;
14
15
class
CAMark
:
public
CAMusElement
{
16
public
:
17
enum
CAMarkType
{
18
Undefined
= -1,
19
Text
,
20
Tempo
,
21
Ritardando
,
22
Dynamic
,
23
Crescendo
,
24
Pedal
,
25
InstrumentChange
,
26
BookMark
,
27
RehersalMark
,
28
Fermata
,
29
RepeatMark
,
30
Articulation
,
31
Fingering
32
};
33
34
CAMark
(
CAMarkType
type,
CAMusElement
*associatedElt,
int
timeStart
=-1,
int
timeLength
=-1 );
35
CAMark
(
CAMarkType
type,
CAContext
*
context
,
int
timeStart
,
int
timeLength
);
36
virtual
~CAMark
();
37
38
virtual
CAMark
*
clone
(
CAContext
*
context
) {
CAMark
* c =
clone
(); c->
setContext
(context); }
39
virtual
CAMark
*
clone
(
CAMusElement
* elt=0);
40
virtual
int
compare
(
CAMusElement
* elt );
41
42
inline
CAMusElement
*
associatedElement
() {
return
_associatedElt
; }
43
inline
void
setAssociatedElement
(
CAMusElement
* elt ) {
_associatedElt
= elt;
if
(elt)
_context
= elt->
context
(); }
44
45
inline
CAMarkType
markType
() {
return
_markType
; }
46
inline
void
setMarkType
(
CAMarkType
type ) {
_markType
= type; }
47
48
inline
bool
isCommon
() {
return
_common
; }
49
50
static
const
QString
markTypeToString
(
CAMarkType
t );
51
static
CAMarkType
markTypeFromString
(
const
QString s );
52
53
protected
:
54
inline
void
setCommon
(
bool
c ) {
_common
=c; }
55
56
private
:
57
CAMusElement
*
_associatedElt
;
58
CAMarkType
_markType
;
59
bool
_common
;
// is mark assigned to a single element only or the whole chord - depends who deletes it!
60
};
61
62
#endif
/* MARK_H_ */
CAMark::markTypeToString
static const QString markTypeToString(CAMarkType t)
Definition:
mark.cpp:44
CAMark::setAssociatedElement
void setAssociatedElement(CAMusElement *elt)
Definition:
mark.h:43
CAMusElement::_context
CAContext * _context
Definition:
muselement.h:78
CAMark::BookMark
Definition:
mark.h:26
CAMusElement::setContext
CAContext * setContext(CAContext *context)
Definition:
muselement.h:46
CAMark::Pedal
Definition:
mark.h:24
CAMark
Marks that depend on other music elements.
Definition:
mark.h:15
CAMark::RepeatMark
Definition:
mark.h:29
CAMark::markType
CAMarkType markType()
Definition:
mark.h:45
CAMark::Fermata
Definition:
mark.h:28
CAMark::Ritardando
Definition:
mark.h:21
CAMusElement::timeStart
virtual int timeStart()
Definition:
muselement.h:48
CAMark::Tempo
Definition:
mark.h:20
CAMark::_common
bool _common
Definition:
mark.h:59
CAMark::Articulation
Definition:
mark.h:30
CAMark::~CAMark
virtual ~CAMark()
Definition:
mark.cpp:126
CAMark::Dynamic
Definition:
mark.h:22
CAMark::markTypeFromString
static CAMarkType markTypeFromString(const QString s)
Definition:
mark.cpp:82
CAMark::RehersalMark
Definition:
mark.h:27
CAMark::CAMarkType
CAMarkType
Definition:
mark.h:17
CAMark::Crescendo
Definition:
mark.h:23
CAMark::_associatedElt
CAMusElement * _associatedElt
Definition:
mark.h:57
CAMusElement::timeLength
virtual int timeLength()
Definition:
muselement.h:50
CAMark::InstrumentChange
Definition:
mark.h:25
CAMusElement
An abstract class which represents every music element in the score.
Definition:
muselement.h:20
CAMark::Text
Definition:
mark.h:19
CAMark::setMarkType
void setMarkType(CAMarkType type)
Definition:
mark.h:46
CAMark::isCommon
bool isCommon()
Definition:
mark.h:48
CAMark::CAMark
CAMark(CAMarkType type, CAMusElement *associatedElt, int timeStart=-1, int timeLength=-1)
Definition:
mark.cpp:19
CAMark::Undefined
Definition:
mark.h:18
CAMark::Fingering
Definition:
mark.h:31
CAMark::_markType
CAMarkType _markType
Definition:
mark.h:58
CAMark::setCommon
void setCommon(bool c)
Definition:
mark.h:54
CAMusElement::context
CAContext * context()
Definition:
muselement.h:45
CAMark::clone
virtual CAMark * clone(CAContext *context)
Definition:
mark.h:38
CAMark::compare
virtual int compare(CAMusElement *elt)
Definition:
mark.cpp:136
CAMark::associatedElement
CAMusElement * associatedElement()
Definition:
mark.h:42
CAContext
Line of music elements in the sheet.
Definition:
context.h:16
muselement.h
Generated on Tue Oct 22 2013 07:30:40 for Canorus by
1.8.5