MuseScore
3.4
Music composition and notation
aeolus
sparm.h
Go to the documentation of this file.
1
//=============================================================================
2
// MusE Score
3
// Linux Music Score Editor
4
//
5
// Copyright (C) 2010 Werner Schweer and others
6
//
7
// This program is free software; you can redistribute it and/or modify
8
// it under the terms of the GNU General Public License version 2.
9
//
10
// This program is distributed in the hope that it will be useful,
11
// but WITHOUT ANY WARRANTY; without even the implied warranty of
12
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
// GNU General Public License for more details.
14
//
15
// You should have received a copy of the GNU General Public License
16
// along with this program; if not, write to the Free Software
17
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18
//=============================================================================
19
20
#ifndef __SPARM_H__
21
#define __SPARM_H__
22
23
namespace
Ms
{
24
class
Xml;
25
class
Synth;
26
}
27
28
class
SyntiParameterData
;
29
30
//---------------------------------------------------------
31
// SyntiParameterType
32
//---------------------------------------------------------
33
34
enum
SyntiParameterType
{
35
SP_FLOAT
,
SP_STRING
36
};
37
38
//---------------------------------------------------------
39
// SyntiParameter
40
//---------------------------------------------------------
41
42
class
SyntiParameter
{
43
QSharedDataPointer<SyntiParameterData>
d
;
44
45
public
:
46
SyntiParameter
();
47
~
SyntiParameter
();
48
SyntiParameter
(
const
SyntiParameter
&);
49
SyntiParameter
& operator=(
const
SyntiParameter
&);
50
SyntiParameter
(
const
QString& name,
float
val);
51
SyntiParameter
(
int
id
,
const
QString& name,
float
);
52
SyntiParameter
(
int
id
,
const
QString& name,
const
QString& val);
53
SyntiParameter
(
const
QString& name,
const
QString& val);
54
55
SyntiParameterType
type()
const
;
56
57
void
write(Ms::Xml&)
const
;
58
59
const
QString& name()
const
;
60
void
setName(
const
QString& s);
61
62
int
id()
const
;
63
void
setId(
int
v);
64
65
QString sval()
const
;
66
float
fval()
const
;
67
void
set
(
const
QString& s);
68
void
set
(
float
v);
69
void
set
(
const
QString& s, float, float, float);
70
float
min()
const
;
71
float
max()
const
;
72
void
setRange(
float
a,
float
b);
73
74
bool
operator==(
const
SyntiParameter
&)
const
;
75
void
print()
const
;
76
};
77
78
#endif
79
SP_FLOAT
Definition:
sparm.h:35
SyntiParameterType
SyntiParameterType
Definition:
sparm.h:34
SyntiParameter::d
QSharedDataPointer< SyntiParameterData > d
Definition:
sparm.h:43
SP_STRING
Definition:
sparm.h:35
Ms
Definition:
aeolus.cpp:26
SyntiParameter
Definition:
sparm.h:42
SyntiParameterData
Definition:
sparm_p.h:56
Generated by
1.8.13