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>
31 class TLP_QT_SCOPE ParameterListModel :
public TulipModel {
33 inline ParamInfos() {}
34 inline ParamInfos(
bool m,
const QString &n,
const QString &d,
const std::string& t): mandatory(m), name(n),desc(d), type(t) {}
40 QString getNameForDisplay() {
42 int pos = name.indexOf(
"::");
45 return name.mid(pos + 2);
51 struct ParamInfosSorter {
52 bool operator()(ParamInfos a, ParamInfos b);
55 QVector<ParamInfos> _params;
64 QModelIndex index(
int row,
int column,
const QModelIndex &parent = QModelIndex())
const;
65 QModelIndex parent(
const QModelIndex &child)
const;
66 int rowCount(
const QModelIndex &parent = QModelIndex())
const;
67 int columnCount(
const QModelIndex &parent = QModelIndex())
const;
68 QVariant data(
const QModelIndex &index,
int role = Qt::DisplayRole)
const;
69 QVariant headerData(
int section, Qt::Orientation orientation,
int role)
const;
70 Qt::ItemFlags flags(
const QModelIndex &index)
const;
71 bool setData(
const QModelIndex &index,
const QVariant &value,
int role);
76 #endif // PARAMETERLISTMODEL_H