#ifndef GRABBER_H #define GRABBER_H #include #include #include "pylonwrapper.h" #include "imagebuffer.h" class Grabber : public QThread { Q_OBJECT public: Grabber(PylonWrapper *camera, ImageBuffer*buffer, int framerate, QObject *parent = nullptr) : QThread(parent), camera(camera), buffer(buffer), framerate(framerate) {} void run() override; void stop(); int currentFramerate() { return framerate; } double currentExposureTime() { return exposure; } double currentGain() { return gain; } private: bool stop_request = false; PylonWrapper *camera; ImageBuffer *buffer; int framerate; double exposure, gain; public slots: void requestStop() { stop_request=true; } void setFrameRate(int newFramerate) { framerate = newFramerate; } void setExposureTime(double newExposureTime) { exposure = newExposureTime; } void setGain(double gain_db) { gain = gain_db; } signals: void terminated(); }; #endif // GRABBER_H