OGS
ProcessView.h
Go to the documentation of this file.
1 
15 #pragma once
16 
17 #include <QContextMenuEvent>
18 #include <QTreeView>
19 
21 
22 class ConditionModel;
23 
29 class ProcessView final : public QTreeView
30 {
31  Q_OBJECT
32 
33 public:
35  explicit ProcessView(QWidget* parent = nullptr);
36 
38  void updateView();
39 
40 protected slots:
42  void selectionChanged(const QItemSelection& selected,
43  const QItemSelection& deselected) override;
44 
45 private:
48  void contextMenuEvent(QContextMenuEvent* e) override;
49  bool isProcessVarItem(const QModelIndex& idx) const;
50  bool isConditionItem(const QModelIndex& idx) const;
51 
52 private slots:
53  void on_Clicked(QModelIndex idx);
54  // void editCondition();
55  void removeCondition();
56  void removeProcessVar();
57  // void replaceCondition(std::vector<FEMCondition*> conditions);
58  // void saveConditions();
59 
60 signals:
61  void itemSelectionChanged(QItemSelection const& selected,
62  QItemSelection const& deselected);
63  void conditionRemoved(QString const&, QString const&);
64  void processVarRemoved(QString const&);
65  // void saveConditionsRequested();
69 };
Base class for boundary conditions, initial conditions and source terms.
Definition: FemCondition.h:40
A view for FEM-Conditions (Initial- & Boundary Conditions / Source Terms) with a number of additional...
Definition: ProcessView.h:30
void conditionSelected(DataHolderLib::FemCondition *cond)
void processVarRemoved(QString const &)
void on_Clicked(QModelIndex idx)
Definition: ProcessView.cpp:33
bool isProcessVarItem(const QModelIndex &idx) const
void conditionRemoved(QString const &, QString const &)
bool isConditionItem(const QModelIndex &idx) const
void updateView()
Update the view to visualise changes made to the underlying data.
Definition: ProcessView.cpp:25
void itemSelectionChanged(QItemSelection const &selected, QItemSelection const &deselected)
ProcessView(QWidget *parent=nullptr)
Constructor.
Definition: ProcessView.cpp:23
void removeProcessVar()
void processVarSelected(DataHolderLib::FemCondition *cond)
void contextMenuEvent(QContextMenuEvent *e) override
Definition: ProcessView.cpp:71
void removeCondition()
void clearConditionView()
void selectionChanged(const QItemSelection &selected, const QItemSelection &deselected) override
Instructions if the selection of items in the view has changed.
Definition: ProcessView.cpp:38