2019-06-05 18:19:08 +02:00
|
|
|
#pragma once
|
|
|
|
|
2014-02-19 21:52:37 +01:00
|
|
|
// Qt includes
|
|
|
|
#include <QObject>
|
2016-12-16 19:48:43 +01:00
|
|
|
#include <QRectF>
|
2014-02-19 21:52:37 +01:00
|
|
|
|
|
|
|
// hyperionincludes
|
|
|
|
#include <utils/Image.h>
|
|
|
|
#include <utils/ColorRgb.h>
|
|
|
|
|
|
|
|
/// This class handles callbacks from the V4L2 grabber
|
|
|
|
class ScreenshotHandler : public QObject
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
2016-12-16 19:48:43 +01:00
|
|
|
ScreenshotHandler(const QString & filename, const QRectF & signalDetectionOffset);
|
2014-02-19 21:52:37 +01:00
|
|
|
virtual ~ScreenshotHandler();
|
|
|
|
|
|
|
|
public slots:
|
|
|
|
/// Handle a single image
|
|
|
|
/// @param image The image to process
|
|
|
|
void receiveImage(const Image<ColorRgb> & image);
|
|
|
|
|
|
|
|
private:
|
2016-12-18 00:47:53 +01:00
|
|
|
bool findNoSignalSettings(const Image<ColorRgb> & image);
|
|
|
|
|
2016-08-28 15:10:43 +02:00
|
|
|
const QString _filename;
|
2016-12-16 19:48:43 +01:00
|
|
|
const QRectF _signalDetectionOffset;
|
2014-02-19 21:52:37 +01:00
|
|
|
};
|