summaryrefslogtreecommitdiffstats
path: root/src/effects/effectparameterslotbase.h
blob: 576d84d211159adb7c07747644c0ae9857caf174 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#pragma once

#include <QObject>
#include <QVariant>
#include <QString>

#include "control/controlobject.h"
#include "effects/effect.h"
#include "util/class.h"

class ControlObject;
class ControlPushButton;

class EffectParameterSlotBase : public QObject {
    Q_OBJECT
  public:
    EffectParameterSlotBase(const QString& group, const unsigned int iParameterSlotNumber);
    virtual ~EffectParameterSlotBase();

    QString name() const;
    QString shortName() const;
    QString description() const;
    EffectManifestParameterPointer getManifest();

    virtual QDomElement toXml(QDomDocument* doc) const = 0;
    virtual void loadParameterSlotFromXml(const QDomElement& parameterElement) = 0;

  signals:
    // Signal that indicates that the EffectParameterSlotBase has been updated.
    void updated();

  protected:
    const unsigned int m_iParameterSlotNumber;
    const QString m_group;
    EffectPointer m_pEffect;
    EffectParameter* m_pEffectParameter;

    // Controls exposed to the rest of Mixxx
    ControlObject* m_pControlLoaded;
    ControlObject* m_pControlType;
    double m_dChainParameter;

    DISALLOW_COPY_AND_ASSIGN(EffectParameterSlotBase);
};