xref: /OK3568_Linux_fs/app/forlinx/flapp/src/plugins/allwinner/camera/camera/Camera.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1 #ifndef USBCAMERA_H
2 #define USBCAMERA_H
3 
4 #include <QWidget>
5 #include <QMainWindow>
6 #include <QThread>
7 #include "videocapture.h"
8 #include "iwidget.h"
9 
10 QT_BEGIN_NAMESPACE
11 namespace Ui { class Camera; }
12 QT_END_NAMESPACE
13 
14 class Camera : public IWidget
15 {
16     Q_OBJECT
17  Q_PLUGIN_METADATA(IID PLUGIN_INTERFACE_iid FILE "camera.json")
18 public:
19     Camera(QWidget *parent = nullptr);
20     ~Camera();
21 
22     QString id();
23 private:
24     int threadStatus;
25     VideoCapture *capture;
26     char DevName[100];
27     char DevResolution[100];
28 private slots:
29     void StartWorkThread();
30     void StopWorkThread();
31     void ApplictionQuit();
32     void SaveImge(void);
33     void ShowImage(uchar *, int , int );
34     void GetVideoDevName(const QString &);
35     void GetVideoResolution(const QString &);
36 
37 private:
38     Ui::Camera *ui;
39 };
40 #endif // USBCAMERA_H
41