|
@@ -7460,10 +7460,12 @@ of data.
|
7460
|
7460
|
class ZeroEmitter : public QObject@/
|
7461
|
7461
|
{@t\1@>@/
|
7462
|
7462
|
Q_OBJECT@;
|
|
7463
|
+ Q_PROPERTY(int column READ column WRITE setColumn)
|
7463
|
7464
|
int col;
|
7464
|
7465
|
double temp;
|
|
7466
|
+ Units::Unit scale;
|
7465
|
7467
|
public:@/
|
7466
|
|
- ZeroEmitter(int tempcolumn);
|
|
7468
|
+ ZeroEmitter(int tempcolumn = 1);
|
7467
|
7469
|
int column();
|
7468
|
7470
|
double lastTemperature();@/
|
7469
|
7471
|
@t\4@>public slots@t\kern-3pt@>:@;
|
|
@@ -7496,6 +7498,7 @@ double ZeroEmitter::lastTemperature()
|
7496
|
7498
|
void ZeroEmitter::newMeasurement(Measurement measure)
|
7497
|
7499
|
{
|
7498
|
7500
|
temp = measure.temperature();
|
|
7501
|
+ scale = measure.scale();
|
7499
|
7502
|
}
|
7500
|
7503
|
|
7501
|
7504
|
void ZeroEmitter::setColumn(int column)
|
|
@@ -7505,7 +7508,7 @@ void ZeroEmitter::setColumn(int column)
|
7505
|
7508
|
|
7506
|
7509
|
void ZeroEmitter::emitZero()
|
7507
|
7510
|
{
|
7508
|
|
- emit measurement(Measurement(temp, QTime(0, 0, 0, 0)), col);
|
|
7511
|
+ emit measurement(Measurement(temp, QTime(0, 0, 0, 0), scale), col);
|
7509
|
7512
|
}
|
7510
|
7513
|
|
7511
|
7514
|
@ Making this class available to scripts requires only two functions.
|