diff options
Diffstat (limited to 'src/printerclient.h')
| -rw-r--r-- | src/printerclient.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/printerclient.h b/src/printerclient.h new file mode 100644 index 0000000..d1266dd --- /dev/null +++ b/src/printerclient.h @@ -0,0 +1,30 @@ +#pragma once + +#include <QObject> + +#include <QSerialPort> + +class QSerialPort; + +class PrinterClient : public QObject +{ + // Q_OBJECT + +public: + explicit PrinterClient(QObject *parent = nullptr); + // ~PrinterClient() override = default; + // ~PrinterClient + + // signals: + // void newData(const QString output); + +public: + void sendCommand(const QString command); + +private: + void onReadyRead(); + void onErrorOccured(QSerialPort::SerialPortError error); + +private: + QSerialPort* m_serialPort { nullptr }; +}; |
