1 #ifndef CAMERA_H 2 #define CAMERA_H 3 4 #include <QMainWindow> 5 #include <QTimer> 6 #include <QImage> 7 #include <QPixmap> 8 #include <QDebug> 9 #include <QStringList> 10 #include <QByteArray> 11 #include <QComboBox> 12 13 namespace Ui { 14 class camera; 15 } 16 17 struct bufinfor{ 18 void *start; 19 unsigned int length; 20 }; 21 22 class camera : public QMainWindow 23 { 24 Q_OBJECT 25 26 public: 27 explicit camera(QWidget *parent = 0); 28 29 ~camera(); 30 31 protected: 32 void moveEvent(QMoveEvent *); 33 void resizeEvent(QResizeEvent *); 34 35 private slots: 36 int camera_init(void); 37 void on_pushButton_2_clicked(); 38 void show_(); 39 void take_photo(); 40 void on_comboBox_activated(const QString &arg1); 41 42 private: 43 Ui::camera *ui; 44 int fd; 45 int camera_flag; 46 struct bufinfor *bufinf; 47 }; 48 49 #endif // CAMERA_H 50