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>
This commit is contained in:
parent
81ac45ba68
commit
e5716bebb3
2 changed files with 6 additions and 4 deletions
|
@ -114,14 +114,14 @@ int MainWindow::createToolbars()
|
||||||
connect(action, &QAction::triggered, this, &MainWindow::quit);
|
connect(action, &QAction::triggered, this, &MainWindow::quit);
|
||||||
|
|
||||||
/* Camera selector. */
|
/* Camera selector. */
|
||||||
QComboBox *cameraCombo = new QComboBox();
|
cameraCombo_ = new QComboBox();
|
||||||
connect(cameraCombo, QOverload<int>::of(&QComboBox::activated),
|
connect(cameraCombo_, QOverload<int>::of(&QComboBox::activated),
|
||||||
this, &MainWindow::switchCamera);
|
this, &MainWindow::switchCamera);
|
||||||
|
|
||||||
for (const std::shared_ptr<Camera> &cam : cm_->cameras())
|
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();
|
toolbar_->addSeparator();
|
||||||
|
|
||||||
|
|
|
@ -29,6 +29,7 @@
|
||||||
using namespace libcamera;
|
using namespace libcamera;
|
||||||
|
|
||||||
class QAction;
|
class QAction;
|
||||||
|
class QComboBox;
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
OptCamera = 'c',
|
OptCamera = 'c',
|
||||||
|
@ -72,6 +73,7 @@ private:
|
||||||
/* UI elements */
|
/* UI elements */
|
||||||
QToolBar *toolbar_;
|
QToolBar *toolbar_;
|
||||||
QAction *startStopAction_;
|
QAction *startStopAction_;
|
||||||
|
QComboBox *cameraCombo_;
|
||||||
ViewFinder *viewfinder_;
|
ViewFinder *viewfinder_;
|
||||||
|
|
||||||
QIcon iconPlay_;
|
QIcon iconPlay_;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue