31 : QDialog(parent),
34{
35 setupUi(this);
36
37
38 this->param1->setText("2");
39 this->param2->setText("0.3");
40 this->param3->setText("0.05");
41 this->param4->setText("0");
42
43
44 auto* max_number_of_points_in_quadtree_leaf_validator(
46 param1->setValidator(max_number_of_points_in_quadtree_leaf_validator);
47
48 auto* mesh_density_scaling_pnts_validator(
50 param2->setValidator(mesh_density_scaling_pnts_validator);
51
52 auto* mesh_density_scaling_stations_validator(
54 param3->setValidator(mesh_density_scaling_stations_validator);
55
56 auto geoNames = geoObjects.getGeometryNames();
57
58
59 std::vector<std::string> geo_station_names;
60 geoObjects.getStationVectorNames(geo_station_names);
61
62 std::copy(geo_station_names.begin(), geo_station_names.end(),
63 std::back_inserter(geoNames));
64
65 std::size_t nGeoObjects(geoNames.size());
66
67 QStringList list;
68 for (unsigned i = 0; i < nGeoObjects; ++i)
69 {
70 list.append(QString::fromStdString(geoNames[i]));
71 }
72
73 if (list.empty())
74 {
75 this->selectGeoButton->setDisabled(true);
76 this->deselectGeoButton->setDisabled(true);
77 list.append("[No geometry available.]");
78 }
80 this->allGeoView->setModel(
_allGeo);
81 this->selectedGeoView->setModel(
_selGeo);
82 this->radioAdaptive->toggle();
84}
void on_radioAdaptive_toggled(bool isTrue)
QStringListModel * _selGeo
QStringListModel * _allGeo
A validator for an input field which only accepts decimals. Source code adapted from StackOverflow
A validator for an input field which only accepts integers. Source code adapted from Qt developer faq...