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.

44 lines
748 B

#ifndef CAM_H
#define CAM_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 CAM; }
QT_END_NAMESPACE
class Camera;
class CAM : public QWidget
{
Q_OBJECT
public:
CAM(QWidget *parent = nullptr);
~CAM();
private:
Ui::CAM *ui;
/* 扫描是否存在摄像头 */
void scanCameraDevice();
/* 摄像头设备 */
Camera *camera;
/* 拍照保存的照片 */
QImage saveImage;
private slots:
/* 显示图像 */
void showImage(const QImage&);
/* 保存照片到本地 */
void saveImageToLocal();
};
#endif // CAM_H