#pragma once #include #include 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 }; };