ENLIGHTEN
Cross-platform desktop GUI for Wasatch Photonics spectrometers
Loading...
Searching...
No Matches
backend.h
Go to the documentation of this file.
1
23
24#ifndef BACKEND_H
25#define BACKEND_H
26
27#include "acquisitionworker.h"
28
29#include <peak/peak.hpp>
30
31#include <QImage>
32#include <QObject>
33#include <QString>
34#include <QThread>
35
36
37class BackEnd : public QObject
38{
39 Q_OBJECT
40
41public:
42 explicit BackEnd(QObject* parent = nullptr);
43 ~BackEnd() override;
44
45 Q_INVOKABLE bool OpenDevice();
47
48 Q_INVOKABLE static QString Version() ;
49 Q_INVOKABLE static QString QtVersion() ;
50
51signals:
53 void imageReceived(QImage image);
54 void counterChanged(const unsigned int frameCounter, const unsigned int errorCounter);
55 void messageBoxTrigger(QString messageTitle, QString messageText, bool critical);
56
57private:
58 std::shared_ptr<peak::core::Device> m_device;
59 std::shared_ptr<peak::core::DataStream> m_dataStream;
60 std::shared_ptr<peak::core::NodeMap> m_nodemapRemoteDevice;
61
63 QThread m_acquisitionThread;
64};
65
66#endif // BACKEND_H
Definition acquisitionworker.h:41
Definition backend.h:38
void messageBoxTrigger(QString messageTitle, QString messageText, bool critical)
void CloseDevice()
void counterChanged(const unsigned int frameCounter, const unsigned int errorCounter)
~BackEnd() override
std::shared_ptr< peak::core::Device > m_device
Definition backend.h:100
std::shared_ptr< peak::core::NodeMap > m_nodemapRemoteDevice
Definition backend.h:102
std::shared_ptr< peak::core::DataStream > m_dataStream
Definition backend.h:101
void imageReceived(QImage image)
AcquisitionWorker * m_acquisitionWorker
Definition backend.h:111
static Q_INVOKABLE QString QtVersion()
QThread m_acquisitionThread
Definition backend.h:112
Q_INVOKABLE bool OpenDevice()
void acquisitionStarted()
BackEnd(QObject *parent=nullptr)
static Q_INVOKABLE QString Version()
The AcquisitionWorker class is used in a worker thread to capture images from the device continuously...