32 lines
479 B
C++
32 lines
479 B
C++
#ifndef POSDEVICE_H
|
|
#define POSDEVICE_H
|
|
|
|
#include <QObject>
|
|
#include "QSerialPort"
|
|
#define COMNAME "com6"
|
|
#include "QDebug"
|
|
#include "QString"
|
|
#include "QVector"
|
|
|
|
|
|
|
|
class PosDevice : public QObject
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
explicit PosDevice(QObject *parent = nullptr);
|
|
bool open();
|
|
void close();
|
|
void readData();
|
|
|
|
signals:
|
|
void sendPosData(QVector<QString>);
|
|
|
|
private:
|
|
QSerialPort *serialHandler;
|
|
|
|
|
|
};
|
|
|
|
#endif // POSDEVICE_H
|