ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
ecvPickOneElementDlg.h
Go to the documentation of this file.
1 // ----------------------------------------------------------------------------
2 // - CloudViewer: www.cloudViewer.org -
3 // ----------------------------------------------------------------------------
4 // Copyright (c) 2018-2024 www.cloudViewer.org
5 // SPDX-License-Identifier: MIT
6 // ----------------------------------------------------------------------------
7 
8 #pragma once
9 
10 #include "CVAppCommon.h"
11 
12 // Qt
13 #include <QDialog>
14 
15 class Ui_PickOneElementDialog;
16 
18 class CVAPPCOMMON_LIB_API ccPickOneElementDlg : public QDialog {
19  Q_OBJECT
20 
21 public:
23  ccPickOneElementDlg(const QString &label,
24  const QString &windowTitle = QString(),
25  QWidget *parent = nullptr);
26 
29 
31  void addElement(const QString &elementName);
33  void setDefaultIndex(int index);
36 
37 protected:
39  Ui_PickOneElementDialog *m_ui;
40 };
#define CVAPPCOMMON_LIB_API
Definition: CVAppCommon.h:15
Minimal dialog to pick one element in a list (combox box)
~ccPickOneElementDlg() override
Destructor.
void addElement(const QString &elementName)
Add an element to the combo box.
ccPickOneElementDlg(const QString &label, const QString &windowTitle=QString(), QWidget *parent=nullptr)
Default constructor.
int getSelectedIndex()
Returns the combo box current index (after completion)
Ui_PickOneElementDialog * m_ui
Associated UI.
void setDefaultIndex(int index)
Sets the combo box default index.