OGS
ProcessModel.h
Go to the documentation of this file.
1
15#pragma once
16
18#include "Base/TreeModel.h"
19
20class FEMCondition;
21class ProcessVarItem;
22class CondObjectListItem;
23class vtkPolyDataAlgorithm;
24
25namespace GeoLib
26{
27struct GeoObject;
28}
29
35class ProcessModel final : public TreeModel
36{
37 Q_OBJECT
38
39public:
40 explicit ProcessModel(DataHolderLib::Project& project,
41 QObject* parent = nullptr);
42
43 int columnCount(const QModelIndex& parent = QModelIndex()) const override;
44
47 // vtkPolyDataAlgorithm* vtkSource(const FiniteElement::ProcessType
48 // pcs_type, const FEMCondition::CondType cond_type);
49
50public slots:
53 std::vector<std::unique_ptr<DataHolderLib::BoundaryCondition>> const&
54 conditions);
55
57 void addSourceTerms(
58 std::vector<std::unique_ptr<DataHolderLib::SourceTerm>> const&
59 conditions);
60
63
65 ProcessVarItem* addProcessVar(QString const& name);
66
68 void removeCondition(QString const& process_var, QString const& param);
69
71 void removeProcessVariable(QString const& name);
72
74 void clearModel();
75
77 void updateModel();
78
79private:
83
84 ProcessVarItem* getProcessVarItem(QString const& process_var_name) const;
85
87 void removeCondition(ProcessVarItem* process_var,
88 QString const& param_name);
89
91
92signals:
93};
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