13#include <vtkPolyDataAlgorithm.h>
27 QList<QVariant> rootData;
47 QList<QVariant> item_data;
49 item_data << QString::fromStdString(cond->
getParamName())
53 parent->appendChild(cond_item);
60 if (process_var ==
nullptr)
68 std::vector<std::unique_ptr<DataHolderLib::BoundaryCondition>>
const&
71 for (
auto& cond : conditions)
78 std::vector<std::unique_ptr<DataHolderLib::SourceTerm>>
const& conditions)
80 for (
auto& cond : conditions)
89 QList<QVariant> process_var_data;
90 process_var_data << QVariant(name) <<
"";
100 for (
int i = 0; i < n_children; ++i)
103 if (item !=
nullptr && item->getName() == name)
112 QString
const& param_name)
114 int const n_conditions = process_var->
childCount();
115 for (
int i = 0; i < n_conditions; ++i)
130 QString
const& param)
134 if (pv_item ==
nullptr)
141 param.toStdString());
150 if (pv_item ==
nullptr)
156 for (
int i = n_conds - 1; i >= 0; --i)
163 int const idx = pv_item->
row();
171 for (
int i = n_process_vars; i >= 0; --i)
Definition of the GEOObjects class.
Base class for classes Point, Polyline, Surface.
Definition of the GEOTYPE enumeration.
Definition of the ProcessModel class.
A TreeItem containing a boundary condition or source term.
DataHolderLib::FemCondition * getCondition() const
Returns the FEM Condition associated with the item.
QString const getName() const
Base class for boundary conditions, initial conditions and source terms.
virtual std::string const getConditionClassStr() const =0
Returns the type of condition for displaying purposes.
std::string const getProcessVarName() const
Returns the name of the associated process variable.
std::string const getParamName() const
Returns the name of the parameter associated with the condition.
void removeSourceTerm(std::string const &primary_var_name, std::string const ¶m_name)
Remove one source term.
void removePrimaryVariable(std::string const &primary_var_name)
Removes a primary variable incl. all associated conditions.
std::vector< std::unique_ptr< SourceTerm > > const & getSourceTerms() const
Returns the vector of source terms.
std::vector< std::unique_ptr< BoundaryCondition > > const & getBoundaryConditions() const
Returns the vector of boundary conditions.
void removeBoundaryCondition(std::string const &primary_var_name, std::string const ¶m_name)
Removes one boundary condition.
void removeProcessVariable(QString const &name)
Removes a process variable incl all associated conditions from the model.
int columnCount(const QModelIndex &parent=QModelIndex()) const override
void updateModel()
Updates the model based on the ProjectData-object.
ProcessVarItem * addProcessVar(QString const &name)
Adds a process to the model.
void addBoundaryConditions(std::vector< std::unique_ptr< DataHolderLib::BoundaryCondition > > const &conditions)
Adds vector of Boundary Conditions to the model.
void clearModel()
Removes the complete content from the model.
void addCondition(DataHolderLib::FemCondition *condition)
Adds a single FEM Conditions to the model.
ProcessVarItem * getProcessVarItem(QString const &process_var_name) const
ProcessModel(DataHolderLib::Project &project, QObject *parent=nullptr)
DataHolderLib::Project & _project
void addConditionItem(DataHolderLib::FemCondition *cond, ProcessVarItem *parent)
Adds a new FEM condition to the condition tree model.
void removeCondition(QString const &process_var, QString const ¶m)
Removes FEMConditions from the the model.
void addSourceTerms(std::vector< std::unique_ptr< DataHolderLib::SourceTerm > > const &conditions)
Adds vector of Source Terms to the model.
A TreeItem representing process variable information.
Objects nodes for the TreeModel.
virtual int childCount() const
void appendChild(TreeItem *item)
TreeItem * child(int row) const
bool removeChildren(int position, int count)
A hierarchical model for a tree implemented as a double-linked list.
QModelIndex parent(const QModelIndex &index) const override