26 auto const geoNames =
_geo_models->getGeometryNames();
29 for (
auto const& name : geoNames)
31 dataList.append(QString::fromStdString(name));
34 for (
int model_index = 0; model_index <
_mesh_model->rowCount();
39 dataList.append(QString::fromStdString(mesh->getName()));
44 this->selectDataButton->setDisabled(
true);
45 this->deselectDataButton->setDisabled(
true);
46 dataList.append(
"[No data available.]");
50 this->allDataView->setModel(&
_allData);
51 this->selectedDataView->setModel(&
_selData);
65 std::string
const& name)
67 std::vector<GeoLib::Point*>
const* point_vec =
69 if (point_vec ==
nullptr)
82 std::string
const& name)
92 mesh->
getNodes().end(), displacement);
104 QString
const xinput = this->xlineEdit->text();
105 QString
const yinput = this->ylineEdit->text();
106 QString
const zinput = this->zlineEdit->text();
109 if (!xinput.toDouble(&ok) or !yinput.toDouble(&ok) or !zinput.toDouble(&ok))
112 "If the x/y/z-input is 0, not specified or not a real number, it "
116 Eigen::Vector3d
const displacement{xinput.toDouble(), yinput.toDouble(),
119 INFO(
"translate model ({:f}, {:f}, {:f}).",
124 std::vector<std::string>
const selectedData =
127 auto const geoNames =
_geo_models->getGeometryNames();
129 for (
auto const& data_name : selectedData)
131 if (std::find(std::begin(geoNames), std::end(geoNames), data_name) !=
140 this->done(QDialog::Accepted);
void INFO(fmt::format_string< Args... > fmt, Args &&... args)
GEOModels connects the data management class GEOObjects and the GUI. It inherits from GeoLib::GEOObje...
std::vector< Node * > const & getNodes() const
Get the nodes-vector for the mesh.
static void box(const QString &e)
void accept() override
Instructions if the OK-Button has been pressed.
QStringListModel _allData
QStringListModel _selData
void moveGeometry(Eigen::Vector3d const &displacement, std::string const &name)
TranslateDataDialog(MeshModel *mesh_model, GEOModels *geo_models, QDialog *parent=nullptr)
void moveMesh(Eigen::Vector3d const &displacement, std::string const &name)
void on_deselectDataButton_pressed()
Instructions if the "<<-button" has been pressed.
void on_selectDataButton_pressed()
Instructions if the ">>-button" has been pressed.
std::vector< std::string > getSelectedObjects(QStringList const &list)
void moveSelectedItems(QListView *sourceView, QStringListModel &sourceModel, QStringListModel &targetModel)