diff options
| author | Nikita Kostovsky <luntik2012@gmail.com> | 2024-11-24 19:54:52 +0100 |
|---|---|---|
| committer | Nikita Kostovsky <luntik2012@gmail.com> | 2024-11-24 19:54:52 +0100 |
| commit | 53979d9d26c5bb51e86e70eb9c3a998bc50f713c (patch) | |
| tree | 4ab3fb55d37db89a8f0e61135efc69d89d2e4f11 /printerclient.h | |
| parent | e21934bca43b8dc68bbcf37e2ad1da6bd5ac6db6 (diff) | |
implement printer controls; implement calibration data collection
Diffstat (limited to 'printerclient.h')
| -rw-r--r-- | printerclient.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/printerclient.h b/printerclient.h new file mode 100644 index 0000000..5f4f2a3 --- /dev/null +++ b/printerclient.h @@ -0,0 +1,29 @@ +#pragma once + +#include <QObject> + +#include <QSerialPort> + +class QSerialPort; + +class PrinterClient : public QObject +{ + Q_OBJECT + +public: + explicit PrinterClient(QObject *parent = nullptr); + ~PrinterClient() override = default; + +signals: + void newData(const QString output); + +public slots: + void sendCommand(const QString command); + +private slots: + void onReadyRead(); + void onErrorOccured(QSerialPort::SerialPortError error); + +private: + QSerialPort* m_serialPort { nullptr }; +}; |
