13 #include <QFileDialog>
27 setAlternatingRowColors(
true);
28 resizeColumnToContents(0);
29 setColumnWidth(1, 50);
30 setColumnWidth(2, 50);
35 qDebug(
"%d, %d", idx.parent().row(), idx.row());
39 const QItemSelection& deselected)
41 if (!selected.isEmpty())
44 const QModelIndex idx = *(selected.indexes().begin());
46 if (idx.parent().isValid())
49 static_cast<ProcessModel*
>(this->model())->getItem(idx));
68 QTreeView::selectionChanged(selected, deselected);
75 const QModelIndex idx(this->selectionModel()->currentIndex());
81 QAction* removeProcessVarAction =
82 menu.addAction(
"Remove process variable");
85 connect(removeProcessVarAction, SIGNAL(triggered()),
this,
90 QAction* removeCondAction = menu.addAction(
"Remove condition");
91 connect(removeCondAction, SIGNAL(triggered()),
this,
98 menu.exec(event->globalPos());
105 ->getItem(this->selectionModel()->currentIndex()));
119 ->getItem(this->selectionModel()->currentIndex()));
154 static_cast<ProcessModel*
>(this->model())->getItem(idx)) !=
161 static_cast<ProcessModel*
>(this->model())->getItem(idx)) !=
Definition of the ProcessModel class.
Definition of the ProcessView class.
Definition of the SelectMeshDialog class.
A TreeItem containing a boundary condition or source term.
QString const getName() const
DataHolderLib::FemCondition * getCondition() const
Returns the FEM Condition associated with the item.
std::string const getProcessVarName() const
Returns the name of the associated process variable.
A model implementing a tree structure for process-relevant information such as process types,...
A TreeItem representing process variable information.
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 processVarSelected(DataHolderLib::FemCondition *cond)
void contextMenuEvent(QContextMenuEvent *e) override
void clearConditionView()
void selectionChanged(const QItemSelection &selected, const QItemSelection &deselected) override
Instructions if the selection of items in the view has changed.