21 #ifndef PARAMETERLISTMODEL_H
22 #define PARAMETERLISTMODEL_H
27 #include <tulip/TulipModel.h>
28 #include <tulip/WithParameter.h>
29 #include <tulip/DataSet.h>
33 class TLP_QT_SCOPE ParameterListModel :
public TulipModel {
34 std::vector<ParameterDescription> _params;
37 bool _showIcons, _darkBackground;
40 explicit ParameterListModel(
const tlp::ParameterDescriptionList ¶ms,
41 tlp::Graph *graph =
nullptr, QObject *parent =
nullptr,
42 bool showIcons =
false,
bool darkBackground =
false);
44 static ParameterListModel *configureTableView(QTableView *table,
45 const tlp::ParameterDescriptionList ¶ms,
47 QObject *parent =
nullptr,
bool showIcons =
false);
52 QModelIndex index(
int row,
int column,
const QModelIndex &parent = QModelIndex())
const override;
53 QModelIndex parent(
const QModelIndex &child)
const override;
54 int rowCount(
const QModelIndex &parent = QModelIndex())
const override;
55 int columnCount(
const QModelIndex &parent = QModelIndex())
const override;
56 QVariant data(
const QModelIndex &index,
int role = Qt::DisplayRole)
const override;
57 QVariant headerData(
int section, Qt::Orientation orientation,
int role)
const override;
58 Qt::ItemFlags flags(
const QModelIndex &index)
const override;
59 bool setData(
const QModelIndex &index,
const QVariant &value,
int role)
override;
60 QString getParameterName(
int section);
61 QString getParameterHelp(
int section);
62 bool isMandatory(
int section);
63 int parameterColumnMinWidth();
A container that can store data from any type.