You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
45 lines
773 B
45 lines
773 B
#ifndef WIDGET_H
|
|
#define WIDGET_H
|
|
|
|
#include <QWidget>
|
|
#include <QVBoxLayout>
|
|
#include <QHBoxLayout>
|
|
#include <QComboBox>
|
|
#include <QPushButton>
|
|
#include <QVBoxLayout>
|
|
#include <QLabel>
|
|
#include <QScrollArea>
|
|
#include <QDebug>
|
|
|
|
QT_BEGIN_NAMESPACE
|
|
namespace Ui { class Widget; }
|
|
QT_END_NAMESPACE
|
|
class Camera;
|
|
|
|
class Widget : public QWidget
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
Widget(QWidget *parent = nullptr);
|
|
~Widget();
|
|
|
|
private:
|
|
Ui::Widget *ui;
|
|
/* 扫描是否存在摄像头 */
|
|
void scanCameraDevice();
|
|
/* 摄像头设备 */
|
|
Camera *camera;
|
|
|
|
/* 拍照保存的照片 */
|
|
QImage saveImage;
|
|
|
|
private slots:
|
|
/* 显示图像 */
|
|
void showImage(const QImage&);
|
|
|
|
/* 保存照片到本地 */
|
|
void saveImageToLocal();
|
|
};
|
|
#endif // WIDGET_H
|