dogobject.h 819 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. #ifndef DOGOBJECT_H
  2. #define DOGOBJECT_H
  3. #include <QObject>
  4. #include <QSqlDatabase>
  5. #include <QSqlQuery>
  6. #include <QVariant>
  7. #include <QDateTime>
  8. #include <QTimer>
  9. #include <QList>
  10. #include <QString>
  11. #include "../include/YT_EHOME_shm.h"
  12. class DevConf{
  13. public:
  14. DevConf(QString id, quint8 type, QString path){
  15. DeviceId = id;
  16. CommType = type;
  17. rtspPath = path;
  18. }
  19. QString DeviceId;
  20. QString rtspPath;
  21. quint8 CommType;
  22. };
  23. class DogObject : public QObject
  24. {
  25. Q_OBJECT
  26. public:
  27. explicit DogObject(QObject *parent = 0);
  28. void start();
  29. bool load_shm();
  30. signals:
  31. public slots:
  32. void time_out();
  33. private:
  34. bool shmLoad;
  35. QTimer *timer;
  36. QSqlDatabase db;
  37. uint start_t;
  38. bool isWorking;
  39. QList<DevConf> devConfList;
  40. };
  41. #endif // DOGOBJECT_H