16 : QDialog(app ? app->getActiveWindow() : 0),
20 buttonGroup->setExclusive(
true);
21 buttonGroup->setId(curvatureRadioButton, 0);
22 buttonGroup->setId(xRadioButton, 1);
23 buttonGroup->setId(yRadioButton, 2);
24 buttonGroup->setId(zRadioButton, 3);
26 buttonGroup_2->setExclusive(
true);
27 buttonGroup_2->setId(curvaturePassRadioButton, 0);
28 buttonGroup_2->setId(xPassRadioButton, 1);
29 buttonGroup_2->setId(yPassRadioButton, 2);
30 buttonGroup_2->setId(zPassRadioButton, 3);
35 if (selectPolylineCheckBox->isChecked()) {
36 return getPolylineFromCombo(polylineComboBox, m_app->
dbRootObject());
44 contour.push_back(
CCVector3(ltxDoubleSpinBox->value(),
45 ltyDoubleSpinBox->value(),
46 ltzDoubleSpinBox->value()));
47 contour.push_back(
CCVector3(rtxDoubleSpinBox->value(),
48 rtyDoubleSpinBox->value(),
49 rtzDoubleSpinBox->value()));
50 contour.push_back(
CCVector3(lbxDoubleSpinBox->value(),
51 lbyDoubleSpinBox->value(),
52 lbzDoubleSpinBox->value()));
53 contour.push_back(
CCVector3(rbxDoubleSpinBox->value(),
54 rbyDoubleSpinBox->value(),
55 rbzDoubleSpinBox->value()));
66 unsigned polylineCount = 0;
67 polylineComboBox->clear();
68 for (
size_t i = 0; i < labels.size(); ++i) {
72 QString
name = getEntityName(labels[i]);
73 QVariant uniqueID(labels[i]->getUniqueID());
74 polylineComboBox->addItem(
name, uniqueID);
79 if (polylineCount >= 1 && m_app) {
81 selectPolylineCheckBox->setChecked(
true);
82 polylineComboBox->setEnabled(
true);
84 selectPolylineCheckBox->setChecked(
false);
85 polylineComboBox->setEnabled(
false);
90 QString GeneralFiltersDlg::getEntityName(
ccHObject* obj) {
97 if (
name.isEmpty())
name = tr(
"unnamed");
103 ccPolyline* GeneralFiltersDlg::getPolylineFromCombo(QComboBox* comboBox,
105 assert(comboBox && dbRoot);
106 if (!comboBox || !dbRoot) {
111 int index = comboBox->currentIndex();
115 unsigned uniqueID = comboBox->itemData(index).toUInt();
125 int index = tab->currentIndex();
127 minValue =
static_cast<float>(minLimitSpinBox->value());
128 maxValue =
static_cast<float>(maxLimitSpinBox->value());
129 return buttonGroup_2->checkedButton()->text();
130 }
else if (index == 1) {
131 minValue =
static_cast<float>(minMagnitudeSpinBox->value());
132 maxValue =
static_cast<float>(maxMagnitudeSpinBox->value());
133 return buttonGroup->checkedButton()->text();
142 if (equalCheckBox->isChecked()) {
143 if (greaterCheckBox->isChecked()) {
147 if (lessThanCheckBox->isChecked()) {
151 if (!greaterCheckBox->isChecked() && !lessThanCheckBox->isChecked()) {
155 if (greaterCheckBox->isChecked()) {
159 if (lessThanCheckBox->isChecked()) {
Vector3Tpl< PointCoordinateType > CCVector3
Default 3D Vector.
void refreshPolylineComboBox()
void getComparisonTypes(QStringList &types)
void getContour(std::vector< CCVector3 > &contour)
ccPolyline * getPolyline()
const QString getComparisonField(float &minValue, float &maxValue)
GeneralFiltersDlg(ecvMainAppInterface *app)
Hierarchical CLOUDVIEWER Object.
ccHObject * find(unsigned uniqueID)
Finds an entity in this object hierarchy.
unsigned filterChildren(Container &filteredChildren, bool recursive=false, CV_CLASS_ENUM filter=CV_TYPES::OBJECT, bool strict=false) const
Collects the children corresponding to a certain pattern.
std::vector< ccHObject * > Container
Standard instances container (for children, etc.)
virtual QString getName() const
Returns object name.
virtual unsigned getUniqueID() const
Returns object unique ID.
bool isA(CV_CLASS_ENUM type) const
Main application interface (for plugins)
virtual ccHObject * dbRootObject()=0
Returns DB root (as a ccHObject)