synthclone 0.3.0
Loading...
Searching...
No Matches
participant.h
Go to the documentation of this file.
1/*
2 * libsynthclone - a plugin API for `synthclone`
3 * Copyright (C) 2011 Devin Anderson
4 *
5 * This library is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU Lesser General Public License as published by the
7 * Free Software Foundation; either version 2.1 of the License, or (at your
8 * option) any later version.
9 *
10 * This library is distributed in the hope that it will be useful, but WITHOUT
11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
13 * for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public License
16 * along with this library; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18 */
19
20#ifndef __SYNTHCLONE_PARTICIPANT_H__
21#define __SYNTHCLONE_PARTICIPANT_H__
22
23#include <QtCore/QVariant>
24
25#include <synthclone/context.h>
26
27namespace synthclone {
28
33
34 class Participant: public QObject {
35
36 Q_OBJECT
37
38 public:
39
53
54 virtual void
55 activate(Context &context, const QVariant &state=QVariant());
56
65
66 virtual void
68
75
76 QString
77 getAuthor() const;
78
85
86 int
88
95
96 int
98
105
106 QString
107 getName() const;
108
115
116 int
117 getRevision() const;
118
127
128 virtual QVariant
129 getState() const;
130
143
144 virtual QVariant
145 getState(const synthclone::Effect *effect) const;
146
159
160 virtual QVariant
161 getState(const synthclone::Sampler *sampler) const;
162
175
176 virtual QVariant
177 getState(const synthclone::Target *target) const;
178
185
186 QString
187 getSummary() const;
188
197
198 virtual void
199 restoreEffect(const QVariant &state);
200
209
210 virtual void
211 restoreSampler(const QVariant &state);
212
221
222 virtual void
223 restoreTarget(const QVariant &state);
224
225 protected:
226
253
254 Participant(const QString &name, int majorVersion, int minorVersion,
255 int revision, const QString &author,
256 const QString &summary, QObject *parent=0);
257
261
262 virtual
264
265 private:
266
267 QString author;
268 int majorVersion;
269 int minorVersion;
270 QString name;
271 int revision;
272 QString summary;
273
274 };
275
276}
277
278#endif
Context objects allow Participant objects to interact with a synthclone session.
Definition context.h:45
Component capable of altering samples in some way.
Definition effect.h:34
virtual void restoreSampler(const QVariant &state)
Called to restore a Sampler.
int getRevision() const
Gets the revision portion of the Participant version.
virtual QVariant getState(const synthclone::Effect *effect) const
Gets the state of an Effect created by this Participant.
virtual ~Participant()
Destroys a participant.
virtual void restoreEffect(const QVariant &state)
Called to restore an Effect.
virtual void restoreTarget(const QVariant &state)
Called to restore a Target.
QString getName() const
Gets the translated name for this Participant.
virtual QVariant getState(const synthclone::Target *target) const
Gets the state of a Target created by this Participant.
Participant(const QString &name, int majorVersion, int minorVersion, int revision, const QString &author, const QString &summary, QObject *parent=0)
Constructs a new participant.
int getMinorVersion() const
Gets the minor version for this Participant.
virtual void activate(Context &context, const QVariant &state=QVariant())
Links the Participant with the application.
QString getSummary() const
Gets the translated summary for this participant.
virtual void deactivate(Context &context)
Unlinks the Participant from the application.
virtual QVariant getState(const synthclone::Sampler *sampler) const
Gets the state of a Sampler created by this Participant.
virtual QVariant getState() const
Gets the state of the Participant.
int getMajorVersion() const
Gets the major version for this Participant.
QString getAuthor() const
Gets the author of this Participant.
Component capable of capturing and playing back audio.
Definition sampler.h:33
Component capable of building a patch from a list of Zone objects.
Definition target.h:34
Definition component.h:26