#pragma once #include #include #include class SerialPort : public QObject { Q_OBJECT public: SerialPort(); ~SerialPort(); bool openPort(); void closePort(); public slots: void sendCommand(const QByteArray &command); QByteArray readResponse(); private: QSerialPort *mSerialPort; };