![]() |
Tulip
4.6.0
Better Visualization Through Research
|
00001 /* 00002 * 00003 * This file is part of Tulip (www.tulip-software.org) 00004 * 00005 * Authors: David Auber and the Tulip development Team 00006 * from LaBRI, University of Bordeaux 00007 * 00008 * Tulip is free software; you can redistribute it and/or modify 00009 * it under the terms of the GNU Lesser General Public License 00010 * as published by the Free Software Foundation, either version 3 00011 * of the License, or (at your option) any later version. 00012 * 00013 * Tulip is distributed in the hope that it will be useful, 00014 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 00016 * See the GNU General Public License for more details. 00017 * 00018 */ 00019 ///@cond DOXYGEN_HIDDEN 00020 00021 #ifndef PARAMETERLISTMODEL_H 00022 #define PARAMETERLISTMODEL_H 00023 00024 #include <tulip/TulipModel.h> 00025 #include <tulip/WithParameter.h> 00026 #include <tulip/DataSet.h> 00027 00028 00029 #include <QVector> 00030 00031 namespace tlp { 00032 00033 class TLP_QT_SCOPE ParameterListModel : public TulipModel { 00034 QVector<ParameterDescription> _params; 00035 tlp::DataSet _data; 00036 tlp::Graph* _graph; 00037 00038 public: 00039 explicit ParameterListModel(const tlp::ParameterDescriptionList ¶ms, tlp::Graph *graph=NULL, QObject *parent=NULL); 00040 tlp::DataSet parametersValues() const; 00041 void setParametersValues(const tlp::DataSet& data); 00042 00043 QModelIndex index(int row, int column,const QModelIndex &parent = QModelIndex()) const; 00044 QModelIndex parent(const QModelIndex &child) const; 00045 int rowCount(const QModelIndex &parent = QModelIndex()) const; 00046 int columnCount(const QModelIndex &parent = QModelIndex()) const; 00047 QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const; 00048 QVariant headerData(int section, Qt::Orientation orientation, int role) const; 00049 Qt::ItemFlags flags(const QModelIndex &index) const; 00050 bool setData(const QModelIndex &index, const QVariant &value, int role); 00051 }; 00052 00053 } 00054 00055 #endif // PARAMETERLISTMODEL_H 00056 ///@endcond