#ifndef ADCINTERFACE_H #define ADCINTERFACE_H #include class QFile; class QSocketNotifier; class ADCInterface : public QObject { Q_OBJECT public: explicit ADCInterface(const QString &devName, QObject *parent = nullptr); ~ADCInterface(); bool open(); void close(); int adcIndex(); Q_SIGNALS: void readRead(int v); private: void open(bool bOpen); private: QString m_devName; QFile *m_file; QSocketNotifier *m_notfier; int m_index; }; #endif // ADCINTERFACE_H