11 #include <ui_pickOneElementDlg.h>
15 const QString &windowTitle ,
17 : QDialog(parent, Qt::Tool), m_ui(new Ui_PickOneElementDialog) {
20 if (!windowTitle.isNull()) {
21 setWindowTitle(windowTitle);
24 m_ui->comboLabel->setText(label);
35 m_ui->comboBox->addItem(elementName);
39 m_ui->comboBox->setCurrentIndex(index);
43 return m_ui->comboBox->currentIndex();
~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.