ENLIGHTEN
Cross-platform desktop GUI for Wasatch Photonics spectrometers
Loading...
Searching...
No Matches
mainwindow.h
Go to the documentation of this file.
1
23
24#ifndef MAINWINDOW_H
25#define MAINWINDOW_H
26
27#include "acquisitionworker.h"
28#include "display.h"
29
30#include <peak_ipl/peak_ipl.hpp>
31
32#include <peak/peak.hpp>
33
34#include <QLabel>
35#include <QMainWindow>
36#include <QMessageBox>
37#include <QThread>
38#include <QVBoxLayout>
39#include <QWidget>
40
41#include <cstdint>
42
43
44class MainWindow : public QMainWindow
45{
46 Q_OBJECT
47
48public:
49 explicit MainWindow(QWidget* parent = nullptr);
50 ~MainWindow() override;
51
52private:
53 std::shared_ptr<peak::core::Device> m_device;
54 std::shared_ptr<peak::core::DataStream> m_dataStream;
55 std::shared_ptr<peak::core::NodeMap> m_nodemapRemoteDevice;
56
58 QLabel* m_labelInfo{};
59 QVBoxLayout* m_layout{};
60
61 AcquisitionWorker* m_acquisitionWorker{};
62 QThread m_acquisitionThread;
63
64 void DestroyAll();
65
66 bool OpenDevice();
68
70
71public slots:
72 void onCounterChanged(unsigned int frameCounter, unsigned int errorCounter);
73 void onAboutQtLinkActivated(const QString& link);
74};
75
76#endif // MAINWINDOW_H
Definition display.h:57
Definition mainwindow.h:47
void onCounterChanged(unsigned int frameCounter, unsigned int errorCounter)
~MainWindow() override
QThread m_acquisitionThread
Definition mainwindow.h:72
void CloseDevice()
std::shared_ptr< peak::core::DataStream > m_dataStream
Definition mainwindow.h:57
QVBoxLayout * m_layout
Definition mainwindow.h:66
void onAboutQtLinkActivated(const QString &link)
std::shared_ptr< peak::core::NodeMap > m_nodemapRemoteDevice
Definition mainwindow.h:58
MainWindow(QWidget *parent=nullptr)
void DestroyAll()
bool OpenDevice()
AcquisitionWorker * m_acquisitionWorker
Definition mainwindow.h:71
std::unique_ptr< Device > m_device
Definition mainwindow.h:58
CustomDisplay * m_display
Definition mainwindow.h:64
QLabel * m_labelInfo
Definition mainwindow.h:65
void createStatusBar()
The AcquisitionWorker class is used in a worker thread to capture images from the device continuously...
The Display class implements an easy way to display images from a camera in a QT widgets window....