3 This file is part of libmspgbase
4 Copyright © 2007 Mikko Rasa, Mikkosoft Productions
5 Distributed under the LGPL
8 #include "smoothcontrol.h"
13 SmoothControl::SmoothControl():
18 SmoothControl::SmoothControl(const ControlSource &s):
24 SmoothControl::SmoothControl(Device &d, ControlSrcType t, unsigned i):
30 void SmoothControl::pair(SmoothControl *ctrl)
44 paired_ctrl->pair(this);
47 void SmoothControl::on_press()
49 on_motion(1, 1-value);
52 void SmoothControl::on_release()
57 void SmoothControl::on_motion(float v, float)
60 signal_motion.emit(value);
63 paired_ctrl->signal_motion.emit(-value);