summaryrefslogtreecommitdiff
path: root/src/qcam/viewfinder.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/qcam/viewfinder.h')
-rw-r--r--src/qcam/viewfinder.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/src/qcam/viewfinder.h b/src/qcam/viewfinder.h
new file mode 100644
index 00000000..df490169
--- /dev/null
+++ b/src/qcam/viewfinder.h
@@ -0,0 +1,34 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+/*
+ * Copyright (C) 2019, Google Inc.
+ *
+ * viewfinder.h - qcam - Viewfinder
+ */
+#ifndef __QCAM_VIEWFINDER_H__
+#define __QCAM_VIEWFINDER_H__
+
+#include <QLabel>
+
+#include "format_converter.h"
+
+class QImage;
+
+class ViewFinder : public QLabel
+{
+public:
+ ViewFinder(QWidget *parent);
+
+ int setFormat(unsigned int format, unsigned int width,
+ unsigned int height);
+ void display(const unsigned char *rgb);
+
+private:
+ unsigned int format_;
+ unsigned int width_;
+ unsigned int height_;
+
+ FormatConverter converter_;
+ QImage *image_;
+};
+
+#endif /* __QCAM_VIEWFINDER__ */