SpikeStream Application Library  0.2
NeuronParametersModel.h
Go to the documentation of this file.
00001 #ifndef NEURONPARAMETERSMODEL_H
00002 #define NEURONPARAMETERSMODEL_H
00003 
00004 //SpikeStream includes
00005 #include "NeuronGroupInfo.h"
00006 #include "ParameterInfo.h"
00007 
00008 //Qt includes
00009 #include <QAbstractTableModel>
00010 
00011 namespace spikestream {
00012 
00017         class NeuronParametersModel : public QAbstractTableModel  {
00018                 Q_OBJECT
00019 
00020                 public:
00021                         NeuronParametersModel(unsigned int neuronTypeID);
00022                         ~NeuronParametersModel();
00023                         int columnCount(const QModelIndex& parent = QModelIndex()) const;
00024                         QVariant data(const QModelIndex & index, int role = Qt::DisplayRole) const;
00025                         NeuronGroupInfo getNeuronGroupInfo(int row);
00026                         QList<ParameterInfo> getParameterInfoList();
00027                         QHash<QString, double> getParameterValues(int row);
00028                         QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
00029                         void reload();
00030                         int rowCount(const QModelIndex& parent = QModelIndex()) const;
00031                         bool setData(const QModelIndex& index, const QVariant& value, int role=Qt::EditRole);
00032 
00033 
00034                 private slots:
00035                         void networkChanged();
00036 
00037 
00038                 private:
00039                         //======================  VARIABLES  =======================
00042                         QList<NeuronGroupInfo> neurGrpInfoList;
00043 
00045                         unsigned int neuronTypeID;
00046 
00048                         QHash<unsigned int, QHash<QString, double> > parameterMap;
00049 
00052                         QList<ParameterInfo> parameterInfoList;
00053 
00054 
00055                         //=======================  METHODS  =========================
00056                         void checkParameters();
00057                         void loadParameters();
00058 
00059         };
00060 
00061 }
00062 
00063 #endif//NEURONPARAMETERSMODEL_H
 All Classes Files Functions Variables Typedefs Friends Defines