forked from CodElecCz/CameraUIv1
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCameraView.h
50 lines (38 loc) · 1.13 KB
/
CameraView.h
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
#ifndef CAMERAVIEW_H
#define CAMERAVIEW_H
#include <QWidget>
#include <QHBoxLayout>
#include <QMap>
#include "CameraViewSingle.h"
namespace Ui {
class CameraView;
}
class CameraView : public QWidget
{
Q_OBJECT
public:
explicit CameraView(QWidget *parent = nullptr);
~CameraView();
public:
void addView(QString name);
void removeView();
QStringList getViewNames();
void updateImage(QString name, const QImage& image);
bool saveImage(QString name, QString filePath, QString imageFormat = "PNG", int imageQuality = -1);
void setError(QString name, QString msg);
QString getError(QString name);
void clearError(QString name);
bool isError(QString name);
void setPath(QString name, QString path);
QString getPath(QString name);
public slots:
void updateImage(QString name, QImage* image);
private:
Ui::CameraView *ui;
QHBoxLayout *controlsLayout1;
QHBoxLayout *controlsLayout2;
QVBoxLayout *centralLayout;
int cntLayout;
QMap<QString, CameraViewSingle*> views;
};
#endif // CAMERAVIEW_H