Frapper
1.0a
Main Page
Namespaces
Classes
Files
File List
File Members
core
ParameterGroup.h
Go to the documentation of this file.
1
/*
2
-----------------------------------------------------------------------------
3
This source file is part of FRAPPER
4
research.animationsinstitut.de
5
sourceforge.net/projects/frapper
6
7
Copyright (c) 2008-2009 Filmakademie Baden-Wuerttemberg, Institute of Animation
8
9
This program is free software; you can redistribute it and/or modify it under
10
the terms of the GNU Lesser General Public License as published by the Free Software
11
Foundation; version 2.1 of the License.
12
13
This program is distributed in the hope that it will be useful, but WITHOUT
14
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
15
FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
16
17
You should have received a copy of the GNU Lesser General Public License along with
18
this program; if not, write to the Free Software Foundation, Inc., 59 Temple
19
Place - Suite 330, Boston, MA 02111-1307, USA, or go to
20
http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html
21
-----------------------------------------------------------------------------
22
*/
23
34
35
#ifndef PARAMETERGROUP_H
36
#define PARAMETERGROUP_H
37
38
#include "
AbstractParameter.h
"
39
#include "
Parameter.h
"
40
#include "
InstanceCounterMacros.h
"
41
42
namespace
Frapper {
43
47
class
FRAPPER_CORE_EXPORT
ParameterGroup
:
public
AbstractParameter
48
{
49
50
ADD_INSTANCE_COUNTER
51
52
public
:
// constructors and destructors
53
59
ParameterGroup
(
const
QString &name =
""
);
60
62
// //! Copy Constructor of the ParameterGroup class.
63
// //!
64
// //! \param parameterGroup The parameter group to copy.
65
// //!
66
// ParameterGroup ( const ParameterGroup ¶meterGroup );
67
71
virtual
~
ParameterGroup
();
72
73
74
public
:
// value setter functions
75
84
void
setValue (
const
QString &name,
const
QVariant &value,
bool
triggerDirtying =
false
);
85
94
void
setValue (
const
QString &name,
bool
value,
bool
triggerDirtying =
false
);
95
104
void
setValue (
const
QString &name,
int
value,
bool
triggerDirtying =
false
);
105
114
void
setValue (
const
QString &name,
unsigned
int
value,
bool
triggerDirtying =
false
);
115
125
void
setValue (
const
QString &name,
double
value,
bool
triggerDirtying =
false
);
126
135
void
setValue (
const
QString &name,
char
*value,
bool
triggerDirtying =
false
);
136
145
void
setValue (
const
QString &name,
const
char
*value,
bool
triggerDirtying =
false
);
146
158
void
setValue (
const
QString &name,
const
QString &value,
bool
triggerDirtying =
false
);
159
168
void
setValue (
const
QString &name,
const
QColor &value,
bool
triggerDirtying =
false
);
169
178
void
setValue (
const
QString &name,
const
Ogre::Vector3 &value,
bool
triggerDirtying =
false
);
179
188
void
setValue (
const
QString &name,
Ogre::SceneNode
*value,
bool
triggerDirtying =
false
);
189
198
void
setValue (
const
QString &name,
const
Ogre::TexturePtr value,
bool
triggerDirtying =
false
);
199
208
void
setValue (
const
QString &name,
ParameterGroup
*value,
bool
triggerDirtying =
false
);
209
216
void
setParameterEnabled (
const
QString &name,
bool
enabled );
217
228
virtual
void
setEnabled (
bool
enabled,
bool
propagate =
true
);
229
241
virtual
void
setEnabled (
bool
enabled,
bool
propagate,
bool
diveInGroups );
242
251
virtual
void
setNode (
Node
*node );
252
253
public
:
// functions
254
260
virtual
AbstractParameter
* clone ();
261
268
virtual
bool
isGroup ()
const
;
269
273
virtual
void
reset ();
274
281
void
disconnectParameters ( QObject *receiver );
282
286
void
clear ();
287
291
void
destroyAllParameters ();
292
302
QList<Parameter *> filterParameters ( QString searchText,
bool
diveInChildGroups,
bool
getAll =
false
)
const
;
303
310
bool
containsGroup (
const
QString &name )
const
;
311
318
bool
contains (
const
QString &name )
const
;
319
326
bool
contains (
Parameter
*parameter )
const
;
327
334
bool
contains (
Parameter::Type
parameterType )
const
;
335
342
bool
contains (
Parameter::PinType
pinType )
const
;
343
352
bool
contains (
Parameter::PinType
pinType,
bool
connected )
const
;
353
358
bool
isEmpty ( )
const
;
359
366
void
addParameter (
AbstractParameter
*parameter,
bool
prepend =
false
);
367
374
Parameter
* getParameter (
const
QString &name )
const
;
375
383
Parameter
* removeParameter (
const
QString &name,
bool
diveInGroups =
true
);
384
391
Parameter
* removeParameter (
Parameter
*parameter,
bool
diveInGroups =
true
);
392
398
void
removeParameterGroup (
const
QString &name );
399
406
ParameterGroup
* getParameterGroup (
const
QString &name,
bool
recursive =
true
)
const
;
407
414
AbstractParameter::List
* getParameterList ();
415
422
AbstractParameter::Map
* getParameterMap ();
423
424
425
private
:
// data
426
430
AbstractParameter::List
m_parameterList
;
431
435
AbstractParameter::Map
m_parameterMap
;
436
};
437
438
}
// end namespace Frapper
439
440
441
#endif
Generated on Tue Sep 18 2012 11:43:03 for Frapper by
1.8.2