OGS
|
A model implementing a tree structure for process-relevant information such as process types, FEM-Conditions (BCs, ICs, STs), etc. as a double-linked list.
Definition at line 34 of file ProcessModel.h.
#include <ProcessModel.h>
Public Slots | |
void | addBoundaryConditions (std::vector< std::unique_ptr< DataHolderLib::BoundaryCondition > > const &conditions) |
Adds vector of Boundary Conditions to the model. | |
void | addSourceTerms (std::vector< std::unique_ptr< DataHolderLib::SourceTerm > > const &conditions) |
Adds vector of Source Terms to the model. | |
void | addCondition (DataHolderLib::FemCondition *condition) |
Adds a single FEM Conditions to the model. | |
ProcessVarItem * | addProcessVar (QString const &name) |
Adds a process to the model. | |
void | removeCondition (QString const &process_var, QString const ¶m) |
Removes FEMConditions from the the model. | |
void | removeProcessVariable (QString const &name) |
Removes a process variable incl all associated conditions from the model. | |
void | clearModel () |
Removes the complete content from the model. | |
void | updateModel () |
Updates the model based on the ProjectData-object. | |
Public Slots inherited from TreeModel | |
void | updateData () |
Public Member Functions | |
ProcessModel (DataHolderLib::Project &project, QObject *parent=nullptr) | |
int | columnCount (const QModelIndex &parent=QModelIndex()) const override |
Public Member Functions inherited from TreeModel | |
TreeModel (QObject *parent=nullptr) | |
~TreeModel () override | |
QVariant | data (const QModelIndex &index, int role) const override |
bool | setData (const QModelIndex &index, const QVariant &value, int role) override |
Qt::ItemFlags | flags (const QModelIndex &index) const override |
TreeItem * | getItem (const QModelIndex &index) const |
QVariant | headerData (int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const override |
QModelIndex | index (int row, int column, const QModelIndex &parent=QModelIndex()) const override |
QModelIndex | parent (const QModelIndex &index) const override |
bool | removeRows (int position, int count, const QModelIndex &parent) override |
int | rowCount (const QModelIndex &parent=QModelIndex()) const override |
int | columnCount (const QModelIndex &parent=QModelIndex()) const override |
TreeItem * | rootItem () const |
Private Member Functions | |
void | addConditionItem (DataHolderLib::FemCondition *cond, ProcessVarItem *parent) |
Adds a new FEM condition to the condition tree model. | |
ProcessVarItem * | getProcessVarItem (QString const &process_var_name) const |
void | removeCondition (ProcessVarItem *process_var, QString const ¶m_name) |
Removes FEMConditions from the the model. | |
Private Attributes | |
DataHolderLib::Project & | _project |
Additional Inherited Members | |
Protected Attributes inherited from TreeModel | |
TreeItem * | _rootItem |
|
explicit |
Definition at line 24 of file ProcessModel.cpp.
References TreeModel::_rootItem.
|
slot |
Adds vector of Boundary Conditions to the model.
Returns the vtk source object for the specified subtree of a process with the given name.
Definition at line 67 of file ProcessModel.cpp.
References addCondition().
Referenced by updateModel().
|
slot |
Adds a single FEM Conditions to the model.
Definition at line 56 of file ProcessModel.cpp.
References addConditionItem(), addProcessVar(), getProcessVarItem(), and DataHolderLib::FemCondition::getProcessVarName().
Referenced by addBoundaryConditions(), and addSourceTerms().
|
private |
Adds a new FEM condition to the condition tree model.
Definition at line 44 of file ProcessModel.cpp.
References DataHolderLib::FemCondition::getConditionClassStr(), DataHolderLib::FemCondition::getParamName(), and TreeModel::parent().
Referenced by addCondition().
|
slot |
Adds a process to the model.
Definition at line 86 of file ProcessModel.cpp.
References TreeModel::_rootItem, and TreeItem::appendChild().
Referenced by addCondition().
|
slot |
Adds vector of Source Terms to the model.
Definition at line 77 of file ProcessModel.cpp.
References addCondition().
Referenced by updateModel().
|
slot |
Removes the complete content from the model.
Definition at line 168 of file ProcessModel.cpp.
References TreeModel::_rootItem, TreeItem::child(), TreeItem::childCount(), and removeProcessVariable().
|
override |
Definition at line 37 of file ProcessModel.cpp.
References TreeModel::parent().
|
private |
Definition at line 97 of file ProcessModel.cpp.
References TreeModel::_rootItem, TreeItem::child(), and TreeItem::childCount().
Referenced by addCondition(), removeCondition(), and removeProcessVariable().
|
private |
Removes FEMConditions from the the model.
Definition at line 111 of file ProcessModel.cpp.
References TreeItem::child(), TreeItem::childCount(), CondItem::getCondition(), DataHolderLib::FemCondition::getParamName(), and TreeItem::removeChildren().
|
slot |
Removes FEMConditions from the the model.
Definition at line 129 of file ProcessModel.cpp.
References _project, getProcessVarItem(), DataHolderLib::Project::removeBoundaryCondition(), removeCondition(), and DataHolderLib::Project::removeSourceTerm().
Referenced by removeCondition(), and removeProcessVariable().
|
slot |
Removes a process variable incl all associated conditions from the model.
Definition at line 146 of file ProcessModel.cpp.
References _project, TreeModel::_rootItem, TreeItem::child(), TreeItem::childCount(), CondItem::getName(), getProcessVarItem(), TreeItem::removeChildren(), removeCondition(), DataHolderLib::Project::removePrimaryVariable(), and TreeItem::row().
Referenced by clearModel().
|
slot |
Updates the model based on the ProjectData-object.
Definition at line 178 of file ProcessModel.cpp.
References _project, addBoundaryConditions(), addSourceTerms(), DataHolderLib::Project::getBoundaryConditions(), and DataHolderLib::Project::getSourceTerms().
|
private |
Definition at line 89 of file ProcessModel.h.
Referenced by removeCondition(), removeProcessVariable(), and updateModel().