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
drawable
drawablefunctionmarkcontext.h
Go to the documentation of this file.
1
8
#ifndef DRAWABLEFUNCTIONMARKCONTEXT_H_
9
#define DRAWABLEFUNCTIONMARKCONTEXT_H_
10
11
#include "
drawable/drawablecontext.h
"
12
13
class
CAFunctionMarkContext
;
14
15
class
CADrawableFunctionMarkContext
:
public
CADrawableContext
{
16
public
:
17
CADrawableFunctionMarkContext
(
CAFunctionMarkContext
*c,
double
x,
double
y,
int
numberOfLines
=2);
18
~CADrawableFunctionMarkContext
();
19
20
void
draw
(QPainter *p,
const
CADrawSettings
s);
21
CADrawableFunctionMarkContext
*
clone
();
22
23
void
setNumberOfLines
(
int
number) {
_numberOfLines
= number; }
24
int
numberOfLines
() {
return
_numberOfLines
; }
25
26
enum
CAFunctionMarkLine
{
27
Upper
,
// used for function name in tonicization
28
Middle
,
// used for general function names
29
Lower
// used for chord areas, ellipse sign etc.
30
};
31
32
double
yPosLine
(
CAFunctionMarkLine
part);
// Returns the Y coordinate of the top of the given line
33
void
nextLine
() {
_currentLineIdx
= ++
_currentLineIdx
%
_numberOfLines
; }
34
int
currentLineIdx
() {
return
_currentLineIdx
; }
35
36
private
:
37
int
_numberOfLines
;
// Number of lines the context can consist. Usually, this number is 2. But when doing research on scores, this could be expanded
38
int
_currentLineIdx
;
39
};
40
41
#endif
/* DRAWABLEFUNCTIONMARKCONTEXT_H_ */
Generated on Fri Jan 11 2013 14:40:12 for Canorus by
1.8.3