OGS
ProcessModel.h
Go to the documentation of this file.
1
14#pragma once
15
17#include "Base/TreeModel.h"
18
19class FEMCondition;
20class ProcessVarItem;
21class CondObjectListItem;
22class vtkPolyDataAlgorithm;
23
24namespace GeoLib
25{
26struct GeoObject;
27}
28
34class ProcessModel final : public TreeModel
35{
36 Q_OBJECT
37
38public:
39 explicit ProcessModel(DataHolderLib::Project& project,
40 QObject* parent = nullptr);
41
42 int columnCount(const QModelIndex& parent = QModelIndex()) const override;
43
46 // vtkPolyDataAlgorithm* vtkSource(const FiniteElement::ProcessType
47 // pcs_type, const FEMCondition::CondType cond_type);
48
49public slots:
52 std::vector<std::unique_ptr<DataHolderLib::BoundaryCondition>> const&
53 conditions);
54
56 void addSourceTerms(
57 std::vector<std::unique_ptr<DataHolderLib::SourceTerm>> const&
58 conditions);
59
62
64 ProcessVarItem* addProcessVar(QString const& name);
65
67 void removeCondition(QString const& process_var, QString const& param);
68
70 void removeProcessVariable(QString const& name);
71
73 void clearModel();
74
76 void updateModel();
77
78private:
82
83 ProcessVarItem* getProcessVarItem(QString const& process_var_name) const;
84
86 void removeCondition(ProcessVarItem* process_var,
87 QString const& param_name);
88
90
91signals:
92};
Definition of the TreeModel class.
Base class for boundary conditions, initial conditions and source terms.
A model implementing a tree structure for process-relevant information such as process types,...
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 &param)
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.
A hierarchical model for a tree implemented as a double-linked list.
Definition TreeModel.h:30
QModelIndex parent(const QModelIndex &index) const override
Definition TreeModel.cpp:81