summaryrefslogtreecommitdiffstats
path: root/src/widget/wkey.h
blob: 9f66437e803be4c7b53a6530dfa6e955137c167a (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
#ifndef WKEY_H
#define WKEY_H

#include <QLabel>

#include "widget/wlabel.h"
#include "control/controlproxy.h"

class WKey : public WLabel  {
    Q_OBJECT
  public:
    explicit WKey(const char* group, QWidget* pParent=nullptr);

    void onConnectedControlChanged(double dParameter, double dValue) override;
    void setup(const QDomNode& node, const SkinContext& context) override;

  private slots:
    void setValue(double dValue);
    void preferencesUpdated(double dValue);
    void setCents();

  private:
    double m_dOldValue;
    bool m_displayCents;
    ControlProxy m_preferencesUpdated;
    ControlProxy m_engineKeyDistance;
};

#endif /* WKEY_H */