Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
14 lines (10 sloc) 346 Bytes
#include "myproximitysensor.h"
#include "QDebug"
MyProximitySensor::MyProximitySensor(QObject *parent) :
QProximitySensor(parent)
{
QObject::connect(this,SIGNAL(readingChanged()),this,SLOT(changeNotifier()));
}
void MyProximitySensor::changeNotifier() {
if (this->reading()->close()) emit sensorClosed(); else emit sensorOpen();
}