-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathCameraViewSingle.h
More file actions
54 lines (43 loc) · 1.38 KB
/
CameraViewSingle.h
File metadata and controls
54 lines (43 loc) · 1.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#ifndef CAMERAVIEWSINGLE_H
#define CAMERAVIEWSINGLE_H
#include <QWidget>
#include <QGraphicsView>
#include <QButtonGroup>
#include <QLabel>
namespace Ui {
class CameraViewSingle;
}
class CameraViewSingle : public QWidget
{
Q_OBJECT
public:
explicit CameraViewSingle(QWidget *parent = nullptr, QString name = "");
~CameraViewSingle();
public:
void setViewName(QString name);
void updateImage(const QImage& image);
void updateImage(QImage *image);
bool saveImage(QString filePath, QString imageFormat = "PNG", int imageQuality = -1);
//store last snap error
void setError(QString msg);
QString getError() { return error; }
void clearError() { error.clear(); }
bool isError() { return (error.length()>0); }
void setPath(QString path) { filePath = path; }
QString getPath() { return filePath; }
private slots:
void buttonClicked(int id);
private:
Ui::CameraViewSingle *ui;
QGraphicsView *view;
QGraphicsScene *scene;
QButtonGroup *toolbox;
QLabel *cameraName;
QLabel *cameraInfo;
bool initFitInView;
QString error;
QString filePath;
QPixmap pixMap;
QImage qImage;
};
#endif // CAMERAVIEWSINGLE_H