1
/***************************************************************************
2
controlpushbutton.h - description
4
begin : Wed Feb 20 2002
5
copyright : (C) 2002 by Tue and Ken Haste Andersen
7
***************************************************************************/
9
/***************************************************************************
11
* This program is free software; you can redistribute it and/or modify *
12
* it under the terms of the GNU General Public License as published by *
13
* the Free Software Foundation; either version 2 of the License, or *
14
* (at your option) any later version. *
16
***************************************************************************/
18
#ifndef CONTROLPUSHBUTTON_H
19
#define CONTROLPUSHBUTTON_H
21
#include <controlobject.h>
23
#include "midiobject.h"
24
#include <sys/timeb.h>
27
*@author Tue and Ken Haste Andersen
30
enum positionType {up,down};
31
enum valueType {off,on};
32
enum buttonType {latching, momentaneous, simulated_latching};
34
class ControlPushButton : public ControlObject {
37
valueType value; // the value (on or off)
38
char* name; // The name of the button
39
buttonType kind; // Determine whether the button is latching or not.
40
valueType invert(valueType value);
43
positionType position; // position of the button (up or down)
46
ControlPushButton(char*, buttonType, int, int, MidiObject *);
49
short int getmidino();
51
positionType getPosition();
53
void setValue(valueType);
55
void slotSetPosition(positionType);
59
void valueChanged(valueType);