blob: 46fc969acec3596b1d6f0263407c3a90734dde95 (
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
/***************************************************************************
wwidget.h - description
-------------------
begin : Wed Jun 18 2003
copyright : (C) 2003 by Tue & Ken Haste Andersen
email : haste@diku.dk
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#ifndef WWIDGET_H
#define WWIDGET_H
#include <QWidget>
#include <QEvent>
#include <QString>
#include "configobject.h"
#include "widget/wbasewidget.h"
class ControlObjectSlave;
/**
* Abstract class used in widgets connected to ControlObjects. Derived
* widgets can implement the signal and slot for manipulating the widgets
* value. The widgets internal value should match that of a MIDI control.
* The ControlObject can contain another mapping of the MIDI/Widget
* value, but the mapping should always be done in the ControlObject.
*
*@author Tue & Ken Haste Andersen
*/
class WWidget : public QWidget, public WBaseWidget {
Q_OBJECT
public:
WWidget(QWidget *parent=0, Qt::WindowFlags flags=0);
virtual ~WWidget();
Q_PROPERTY(double value READ getControlParameterDisplay);
virtual void onConnectedControlChanged(double dParameter, double dValue);
protected:
bool touchIsRightButton();
bool event(QEvent* e);
enum Qt::MouseButton m_activeTouchButton;
private:
ControlObjectSlave* m_pTouchShift;
};
#endif
|