summaryrefslogtreecommitdiff
path: root/src/qcam/main_window.cpp
diff options
context:
space:
mode:
authorShow Liu <show.liu@linaro.org>2020-09-11 16:55:12 +0800
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2020-09-15 05:10:35 +0300
commit2daa704c968c8aa7a4b209450f228b41e9d42d85 (patch)
treeb11e6376432fedeac964858e1019166bd379a569 /src/qcam/main_window.cpp
parent4a4a3e715b8314c56a2a32788d92fdec464af7b7 (diff)
qcam: New viewfinder hierarchy
Create ViewFinder base class and rename the original ViewFinder as QPainter-based ViewFinder. Signed-off-by: Show Liu <show.liu@linaro.org> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'src/qcam/main_window.cpp')
-rw-r--r--src/qcam/main_window.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/qcam/main_window.cpp b/src/qcam/main_window.cpp
index 612d978a..7406f0bd 100644
--- a/src/qcam/main_window.cpp
+++ b/src/qcam/main_window.cpp
@@ -28,6 +28,7 @@
#include <libcamera/version.h>
#include "dng_writer.h"
+#include "viewfinder_qt.h"
using namespace libcamera;
@@ -105,10 +106,11 @@ MainWindow::MainWindow(CameraManager *cm, const OptionsParser::Options &options)
setWindowTitle(title_);
connect(&titleTimer_, SIGNAL(timeout()), this, SLOT(updateTitle()));
- viewfinder_ = new ViewFinder(this);
- connect(viewfinder_, &ViewFinder::renderComplete,
+ ViewFinderQt *viewfinder = new ViewFinderQt(this);
+ connect(viewfinder, &ViewFinderQt::renderComplete,
this, &MainWindow::queueRequest);
- setCentralWidget(viewfinder_);
+ viewfinder_ = viewfinder;
+ setCentralWidget(viewfinder);
adjustSize();
/* Hotplug/unplug support */