26 setAlternatingRowColors(
true);
27 resizeColumnToContents(0);
28 setColumnWidth(1, 50);
29 setColumnWidth(2, 50);
34 qDebug(
"%d, %d", idx.parent().row(), idx.row());
38 const QItemSelection& deselected)
40 if (!selected.isEmpty())
43 const QModelIndex idx = *(selected.indexes().begin());
45 if (idx.parent().isValid())
48 static_cast<ProcessModel*
>(this->model())->getItem(idx));
67 QTreeView::selectionChanged(selected, deselected);
74 const QModelIndex idx(this->selectionModel()->currentIndex());
80 QAction* removeProcessVarAction =
81 menu.addAction(
"Remove process variable");
84 connect(removeProcessVarAction, SIGNAL(triggered()),
this,
89 QAction* removeCondAction = menu.addAction(
"Remove condition");
90 connect(removeCondAction, SIGNAL(triggered()),
this,
97 menu.exec(event->globalPos());
104 ->getItem(this->selectionModel()->currentIndex()));
118 ->getItem(this->selectionModel()->currentIndex()));
153 static_cast<ProcessModel*
>(this->model())->getItem(idx)) !=
160 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.
DataHolderLib::FemCondition * getCondition() const
Returns the FEM Condition associated with the item.
QString const getName() const
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.