Object Detection  5.0
Image Processing Using Qt and Opencv
abstractdevicewriter.h
1 #ifndef ABSTRACTDEVICEWRITER_H
2 #define ABSTRACTDEVICEWRITER_H
3 
4 #include <QObject>
5 #include "observer.h"
6 #include "exception"
7 #include "QIODevice"
8 #include "devicehandler_global.h"
9 
10 namespace Devices {
11  class DECLARE_LIB AbstractDeviceWriter;
12 }
13 using namespace Devices;
15 {
16  Q_OBJECT
17 public:
18  virtual void writeToDevice(const QString&) = 0;
19  virtual void openDevice() = 0;
20  virtual void closeDevice() = 0;
21 protected:
22  explicit AbstractDeviceWriter(QObject *parent = nullptr);
23 
24 signals:
25  void errorIODevice(const QString&);
26 public slots:
27 private:
28 
29  // Devices::Observer interface
30 public slots:
31  virtual void onNotified(const ObservableData &dt) override;
32 };
33 
34 
35 #endif // ABSTRACTDEVICEWRITER_H