summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorUmang Jain <email@uajain.com>2020-04-30 16:00:01 +0000
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2020-04-30 19:04:47 +0300
commite5716bebb365c7c744ab1c3a9609b155ed48a251 (patch)
treeb316cd6608ae6bb598576301af78cf96d3edcb3f /src
parent81ac45ba6855f5a4a9a71bbda615770c1b2046b5 (diff)
qcam: main_window: Make cameraCombo_ private
This commit introduces no functional changes. This is required so that the combo-box list can be managed conveniently from various private functions in subsequent commit. Signed-off-by: Umang Jain <email@uajain.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'src')
-rw-r--r--src/qcam/main_window.cpp8
-rw-r--r--src/qcam/main_window.h2
2 files changed, 6 insertions, 4 deletions
diff --git a/src/qcam/main_window.cpp b/src/qcam/main_window.cpp
index d021fa95..c95d0973 100644
--- a/src/qcam/main_window.cpp
+++ b/src/qcam/main_window.cpp
@@ -114,14 +114,14 @@ int MainWindow::createToolbars()
connect(action, &QAction::triggered, this, &MainWindow::quit);
/* Camera selector. */
- QComboBox *cameraCombo = new QComboBox();
- connect(cameraCombo, QOverload<int>::of(&QComboBox::activated),
+ cameraCombo_ = new QComboBox();
+ connect(cameraCombo_, QOverload<int>::of(&QComboBox::activated),
this, &MainWindow::switchCamera);
for (const std::shared_ptr<Camera> &cam : cm_->cameras())
- cameraCombo->addItem(QString::fromStdString(cam->name()));
+ cameraCombo_->addItem(QString::fromStdString(cam->name()));
- toolbar_->addWidget(cameraCombo);
+ toolbar_->addWidget(cameraCombo_);
toolbar_->addSeparator();
diff --git a/src/qcam/main_window.h b/src/qcam/main_window.h
index 5d6251c8..4ec37d40 100644
--- a/src/qcam/main_window.h
+++ b/src/qcam/main_window.h
@@ -29,6 +29,7 @@
using namespace libcamera;
class QAction;
+class QComboBox;
enum {
OptCamera = 'c',
@@ -72,6 +73,7 @@ private:
/* UI elements */
QToolBar *toolbar_;
QAction *startStopAction_;
+ QComboBox *cameraCombo_;
ViewFinder *viewfinder_;
QIcon iconPlay_;