SpikeStream Application Library  0.2
SynapseParametersModel.h
Go to the documentation of this file.
00001 #ifndef SYNAPSEPARAMETERSMODEL_H
00002 #define SYNAPSEPARAMETERSMODEL_H
00003 
00004 //SpikeStream includes
00005 #include "ConnectionGroupInfo.h"
00006 #include "ParameterInfo.h"
00007 
00008 //Qt includes
00009 #include <QAbstractTableModel>
00010 
00011 namespace spikestream {
00012 
00017         class SynapseParametersModel : public QAbstractTableModel  {
00018                 Q_OBJECT
00019 
00020                 public:
00021                         SynapseParametersModel(unsigned int synapseTypeID);
00022                         ~SynapseParametersModel();
00023                         int columnCount(const QModelIndex& parent = QModelIndex()) const;
00024                         QVariant data(const QModelIndex & index, int role = Qt::DisplayRole) const;
00025                         ConnectionGroupInfo getConnectionGroupInfo(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  =======================
00043                         QList<ConnectionGroupInfo> conGrpInfoList;
00044 
00046                         unsigned int synapseTypeID;
00047 
00049                         QHash<unsigned int, QHash<QString, double> > parameterMap;
00050 
00053                         QList<ParameterInfo> parameterInfoList;
00054 
00055 
00056                         //=======================  METHODS  =========================
00057                         void checkParameters();
00058                         void loadParameters();
00059 
00060         };
00061 
00062 }
00063 
00064 #endif//SYNAPSEPARAMETERSMODEL_H
 All Classes Files Functions Variables Typedefs Friends Defines