OGS
FemConditionView.cpp
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#include "FemConditionView.h"
5
6#include <QModelIndex>
7
8#include "CondItem.h"
9#include "FemConditionModel.h"
10
11FemConditionView::FemConditionView(QWidget* parent) : QTreeView(parent) {}
12
14{
15 setAlternatingRowColors(true);
16 setColumnWidth(0, 200);
17 std::size_t nColumns =
18 (this->model() != nullptr) ? this->model()->columnCount() : 0;
19 for (std::size_t i = 1; i < nColumns; i++)
20 {
21 resizeColumnToContents(i);
22 }
23 this->expandAll();
24}
25
26void FemConditionView::selectionChanged(const QItemSelection& selected,
27 const QItemSelection& deselected)
28{
29 Q_UNUSED(selected);
30 Q_UNUSED(deselected);
31}
FemConditionView(QWidget *parent=nullptr)
Constructor.
void selectionChanged(const QItemSelection &selected, const QItemSelection &deselected) override
Is called when the selection of this view changes.