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 "displaywindow.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
44// The members of this structure are important for the use of the camera
46{
47 std::shared_ptr<peak::core::Device> device{};
48 std::shared_ptr<peak::core::DataStream> dataStream{};
49 std::shared_ptr<peak::core::NodeMap> nodemapRemoteDevice{};
50 peak::ipl::PixelFormatName pixelFormat{};
51 std::unique_ptr<DisplayWindow> displayWindow{};
52 QSize imageSize{};
55};
56
57
58class MainWindow : public QMainWindow
59{
60 Q_OBJECT
61
62public:
63 explicit MainWindow(QWidget* parent = nullptr);
64 ~MainWindow() override;
65
66public slots:
67 void OnAboutQt(const QString& link);
68
69private:
70 bool OpenDevices();
71 void CloseDevices();
73
74 void closeEvent(QCloseEvent* event) override;
75
76 std::vector<std::unique_ptr<DeviceContext>> m_vecDevices{};
77
78 QWidget* m_centralWidget{};
79 QVBoxLayout* m_layout{};
80 QWidget* m_statusBar{};
81 QHBoxLayout* m_statusBarLayout{};
84
85 static constexpr int32_t m_max_number_of_devices{3};
86 static constexpr int64_t m_maximum_throughputlimit{125000000};
87};
88
89#endif // MAINWINDOW_H
Definition acquisitionworker.h:41
Definition mainwindow.h:47
void closeEvent(QCloseEvent *event) override
Definition mainwindow.cpp:143
bool OpenDevices()
Definition mainwindow.cpp:148
~MainWindow() override
std::vector< std::unique_ptr< DeviceContext > > m_vecDevices
Definition mainwindow.h:76
QVBoxLayout * m_layout
Definition mainwindow.h:66
void OnAboutQt(const QString &link)
Definition mainwindow.cpp:452
MainWindow(QWidget *parent=nullptr)
static constexpr int32_t m_max_number_of_devices
Definition mainwindow.h:85
QLabel * m_statusBarLabelAboutQt
Definition mainwindow.h:83
QWidget * m_centralWidget
Definition mainwindow.h:78
void CloseDevices()
Definition mainwindow.cpp:370
QWidget * m_statusBar
Definition mainwindow.h:80
QHBoxLayout * m_statusBarLayout
Definition mainwindow.h:81
QLabel * m_statusBarLabelVersion
Definition mainwindow.h:82
void CreateStatusBar()
static constexpr int64_t m_maximum_throughputlimit
Definition mainwindow.h:86
The DisplayWindow class implements an easy way to display images from a camera in a Qt widgets window...
The AcquisitionWorker class is used in a worker thread to capture images from the device continuously...
Definition mainwindow.h:46
std::shared_ptr< peak::core::Device > device
Definition mainwindow.h:47
AcquisitionWorker * acquisitionWorker
Definition mainwindow.h:53
QThread acquisitionThread
Definition mainwindow.h:54
std::shared_ptr< peak::core::DataStream > dataStream
Definition mainwindow.h:48
std::unique_ptr< DisplayWindow > displayWindow
Definition mainwindow.h:51
std::shared_ptr< peak::core::NodeMap > nodemapRemoteDevice
Definition mainwindow.h:49
QSize imageSize
Definition mainwindow.h:52
peak::ipl::PixelFormatName pixelFormat
Definition mainwindow.h:50