10 #include "ui_selectChildrenDlg.h"
20 : QDialog(parent, Qt::Tool), mUI(new
Ui::SelectChildrenDialog) {
29 connect(mUI->buttonBox, &QDialogButtonBox::accepted,
this,
39 mUI->typeComboBox->addItem(typeName, QVariant::fromValue<qint64>(
type));
43 mUI->typeComboBox->setCurrentIndex(mUI->typeComboBox->count() - 1);
57 if (!mUI->typeCheckBox->isChecked()) {
61 int currentIndex = mUI->typeComboBox->currentIndex();
63 mUI->typeComboBox->itemData(currentIndex).value<qint64>());
67 if (!mUI->nameCheckBox->isChecked()) {
71 return mUI->nameLineEdit->text();
75 return mUI->typeStrictCheckBox->isChecked();
79 return mUI->typeCheckBox->isChecked();
83 return mUI->checkBoxRegex->isChecked();
87 return mUI->nameCheckBox->isChecked();
int64_t CV_CLASS_ENUM
Type of object type flags (64 bits)
bool getNameMatchIsUsed() const
if performing name-match (regex or not)
bool getNameIsRegex() const
if the name must be considered as regex
bool getStrictMatchState() const
Returns the state of the strict type checkbox.
bool getTypeIsUsed() const
void onAccept()
Called when the dialog is accepted.
~ccSelectChildrenDlg() override
ccSelectChildrenDlg(QWidget *parent=nullptr)
Default constructor.
CV_CLASS_ENUM getSelectedType()
Returns the selected type.
void addType(QString typeName, CV_CLASS_ENUM type)
Add an element to the 'type' combo box.
QString getSelectedName()
Returns the selected name (if any)
static bool s_lastNameState
static QString s_lastName
static bool s_lastUseRegex
static CV_CLASS_ENUM s_lastType
static bool s_lastTypeStrictState
static bool s_lastTypeState