OGS
ProcessView.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) OpenGeoSys Community (opengeosys.org)
2// SPDX-License-Identifier: BSD-3-Clause
3
4#pragma once
5
6#include <QContextMenuEvent>
7#include <QTreeView>
8
10
11class ConditionModel;
12
18class ProcessView final : public QTreeView
19{
20 Q_OBJECT
21
22public:
24 explicit ProcessView(QWidget* parent = nullptr);
25
27 void updateView();
28
29protected slots:
31 void selectionChanged(const QItemSelection& selected,
32 const QItemSelection& deselected) override;
33
34private:
37 void contextMenuEvent(QContextMenuEvent* e) override;
38 bool isProcessVarItem(const QModelIndex& idx) const;
39 bool isConditionItem(const QModelIndex& idx) const;
40
41private slots:
42 void on_Clicked(QModelIndex idx);
43 // void editCondition();
44 void removeCondition();
45 void removeProcessVar();
46 // void replaceCondition(std::vector<FEMCondition*> conditions);
47 // void saveConditions();
48
49signals:
50 void itemSelectionChanged(QItemSelection const& selected,
51 QItemSelection const& deselected);
52 void conditionRemoved(QString const&, QString const&);
53 void processVarRemoved(QString const&);
54 // void saveConditionsRequested();
58};
Base class for boundary conditions, initial conditions and source terms.
void conditionSelected(DataHolderLib::FemCondition *cond)
void processVarRemoved(QString const &)
void on_Clicked(QModelIndex idx)
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.
void itemSelectionChanged(QItemSelection const &selected, QItemSelection const &deselected)
ProcessView(QWidget *parent=nullptr)
Constructor.
void removeProcessVar()
void processVarSelected(DataHolderLib::FemCondition *cond)
void contextMenuEvent(QContextMenuEvent *e) override
void removeCondition()
void clearConditionView()
void selectionChanged(const QItemSelection &selected, const QItemSelection &deselected) override
Instructions if the selection of items in the view has changed.