OGS
FemConditionView.cpp
Go to the documentation of this file.
1
12#include "FemConditionView.h"
13
14#include <QModelIndex>
15
16#include "CondItem.h"
17#include "FemConditionModel.h"
18
19FemConditionView::FemConditionView(QWidget* parent) : QTreeView(parent) {}
20
22{
23 setAlternatingRowColors(true);
24 setColumnWidth(0, 200);
25 std::size_t nColumns =
26 (this->model() != nullptr) ? this->model()->columnCount() : 0;
27 for (std::size_t i = 1; i < nColumns; i++)
28 {
29 resizeColumnToContents(i);
30 }
31 this->expandAll();
32}
33
34void FemConditionView::selectionChanged(const QItemSelection& selected,
35 const QItemSelection& deselected)
36{
37 Q_UNUSED(selected);
38 Q_UNUSED(deselected);
39}
FemConditionView(QWidget *parent=nullptr)
Constructor.
void selectionChanged(const QItemSelection &selected, const QItemSelection &deselected) override
Is called when the selection of this view changes.