21 #ifndef PARAMETERLISTMODEL_H
22 #define PARAMETERLISTMODEL_H
24 #include "tulip/TulipModel.h"
25 #include <tulip/WithParameter.h>
26 #include <tulip/DataSet.h>
27 #include <tulip/TulipMetaTypes.h>
28 #include <QtCore/QVector>
32 class TLP_QT_SCOPE ParameterListModel :
public TulipModel {
34 inline ParamInfos() {}
35 inline ParamInfos(
bool m,
const QString &n,
const QString &d,
const std::string& t): mandatory(m), name(n),desc(d), type(t) {}
41 QString getNameForDisplay() {
43 int pos = name.indexOf(
"::");
46 return name.mid(pos + 2);
52 struct ParamInfosSorter {
53 bool operator()(ParamInfos a, ParamInfos b);
56 QVector<ParamInfos> _params;
65 QModelIndex index(
int row,
int column,
const QModelIndex &parent = QModelIndex())
const;
66 QModelIndex parent(
const QModelIndex &child)
const;
67 int rowCount(
const QModelIndex &parent = QModelIndex())
const;
68 int columnCount(
const QModelIndex &parent = QModelIndex())
const;
69 QVariant data(
const QModelIndex &index,
int role = Qt::DisplayRole)
const;
70 QVariant headerData(
int section, Qt::Orientation orientation,
int role)
const;
71 Qt::ItemFlags flags(
const QModelIndex &index)
const;
72 bool setData(
const QModelIndex &index,
const QVariant &value,
int role);
77 #endif // PARAMETERLISTMODEL_H