SpikeStream Application Library  0.2
MembranePotentialGraphDialog.cpp
Go to the documentation of this file.
00001 //SpikeStream includes
00002 #include "MembranePotentialGraphDialog.h"
00003 #include "SpikeStreamException.h"
00004 using namespace spikestream;
00005 
00006 //Qt includes
00007 #include <QDebug>
00008 #include <QLayout>
00009 
00010 
00012 MembranePotentialGraphDialog::MembranePotentialGraphDialog(neurid_t neuronID, QWidget* parent) : QDialog(parent){
00013         QVBoxLayout* mainVBox = new QVBoxLayout(this);
00014         this->setWindowTitle("Membrane Potential for Neuron " + QString::number(neuronID));
00015 
00016         try{
00017                 memPotWidget = new MembranePotentialGraphWidget(this);
00018                 mainVBox->addWidget(memPotWidget);
00019         }
00020         catch(SpikeStreamException& ex){
00021                 qCritical()<<"Membrane potential plot error: "<<ex.getMessage();
00022         }
00023         catch(...){
00024                 qCritical()<<"An unknown exception occurred";
00025         }
00026 }
00027 
00028 
00030 MembranePotentialGraphDialog::~MembranePotentialGraphDialog(){
00031 }
00032 
00033 
00034 /*----------------------------------------------------------*/
00035 /*------                PRIVATE SLOTS                 ------*/
00036 /*----------------------------------------------------------*/
00037 
00039 void MembranePotentialGraphDialog::addData(float membranePotential, timestep_t timeStep){
00040         memPotWidget->addData(membranePotential,timeStep);
00041 }
 All Classes Files Functions Variables Typedefs Friends Defines