SpikeStream Application Library  0.2
SynapseParametersDialog.cpp
Go to the documentation of this file.
00001 //SpikeStream includes
00002 #include "ConnectionGroupInfo.h"
00003 #include "Globals.h"
00004 #include "SynapseParametersDialog.h"
00005 #include "SynapseParametersModel.h"
00006 #include "SynapseParametersView.h"
00007 using namespace spikestream;
00008 
00009 
00011 SynapseParametersDialog::SynapseParametersDialog(QWidget *parent) : QDialog(parent) {
00012         //Set title
00013         this->setWindowTitle("Synapse Parameters");
00014 
00015         //Get a list of the connection groups in the network
00016         QList<ConnectionGroupInfo> infoList = Globals::getNetwork()->getConnectionGroupsInfo();
00017 
00018         //Create a tab for each synapse type in the network
00019         QTabWidget* tabWidget = new QTabWidget(this);
00020         QHash<unsigned int, bool> synTypeMap;
00021         foreach(ConnectionGroupInfo conGrpInfo, infoList){
00022                 unsigned int tmpSynTypeID = conGrpInfo.getSynapseTypeID();
00023                 if(!synTypeMap.contains(tmpSynTypeID)){
00024                         SynapseParametersModel* synapseParametersModel = new SynapseParametersModel(tmpSynTypeID);
00025                         QTableView* synapseParametersView = new SynapseParametersView(tabWidget, synapseParametersModel);
00026                         SynapseType synType = Globals::getNetworkDao()->getSynapseType(tmpSynTypeID);
00027                         tabWidget->addTab(synapseParametersView, synType.getDescription());
00028                         synTypeMap[tmpSynTypeID] = true;
00029                 }
00030         }
00031 
00032         tabWidget->setMinimumSize(600, 400);
00033 }
00034 
00035 
00036 
00038 SynapseParametersDialog::~SynapseParametersDialog(){
00039 }
00040 
 All Classes Files Functions Variables Typedefs Friends Defines