X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Finput%2Fbinarycontrol.cpp;h=b0148ccf5332f023d22c1a9dfe436ba94fe93783;hb=35d4d400521d30d84c20cd1434626e131cbf9304;hp=371de3c19f1a518afae93e7d329c3968c8c7a175;hpb=daf317db7a79a4c92880042125814ca942c3a6fa;p=libs%2Fgui.git diff --git a/source/input/binarycontrol.cpp b/source/input/binarycontrol.cpp index 371de3c..b0148cc 100644 --- a/source/input/binarycontrol.cpp +++ b/source/input/binarycontrol.cpp @@ -1,10 +1,3 @@ -/* $Id$ - -This file is part of libmspgbase -Copyright © 2007 Mikko Rasa, Mikkosoft Productions -Distributed under the LGPL -*/ - #include "binarycontrol.h" #include "device.h" @@ -28,16 +21,19 @@ BinaryControl::BinaryControl(Device &d, ControlSrcType t, unsigned i): threshold(0.5) { } +BinaryControl::~BinaryControl() +{ } + void BinaryControl::set_threshold(float t) { - threshold=t; + threshold = t; } void BinaryControl::on_press() { if(!state) { - state=true; + state = true; signal_press.emit(); } } @@ -46,7 +42,7 @@ void BinaryControl::on_release() { if(state) { - state=false; + state = false; signal_release.emit(); } }