Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Class Members | File Members

MonitorDataPlotter Class Reference

#include <MonitorDataPlotter.h>

List of all members.

Public Member Functions

void addGraph (NewGraph graph)
void closeDialog (bool stopMon)
void loadingComplete ()
 MonitorDataPlotter (QWidget *parent, unsigned int neurGrpID, unsigned int fromNeurID, unsigned int toNeurID)
 MonitorDataPlotter (QWidget *parent, QString neuronGrpDesc, unsigned int neurGrpID, unsigned int neurID)
void plotData (double msgTime, const double *dataArray, int arrayLength)
void setUpGraphs (const char *charArray)
bool showDialog ()
 ~MonitorDataPlotter ()

Protected Member Functions

void closeEvent (QCloseEvent *e)

Private Member Functions

 MonitorDataPlotter (const MonitorDataPlotter &)
MonitorDataPlotter operator= (const MonitorDataPlotter &)
void stopMonitoring ()

Private Attributes

QFont * axisFont
QFont * axisTitleFont
vector< MonitorDataset * > dataVector
unsigned int fromNeuronID
QLabel * loadingLabel
unsigned int neuronGrpID
unsigned int neuronID
bool neuronMonitoring
bool parseError
vector< QwtPlot * > plotVector
QWidget * simulationWidget
unsigned int toNeuronID
QVBoxLayout * verticalBox


Detailed Description

Displays graphs of parameters monitored in a neuron or synapse.

Definition at line 55 of file MonitorDataPlotter.h.


Constructor & Destructor Documentation

MonitorDataPlotter::MonitorDataPlotter QWidget *  parent,
QString  neuronGrpDesc,
unsigned int  neurGrpID,
unsigned int  neurID
 

Constructor for monitoring neuron data The main initialisation work is done when the setUpGraphs method is called after the information about the monitored data has been received by the simulationManager.

Definition at line 77 of file MonitorDataPlotter.cpp.

References axisFont, axisTitleFont, loadingLabel, neuronGrpID, neuronID, neuronMonitoring, parseError, simulationWidget, and verticalBox.

MonitorDataPlotter::MonitorDataPlotter QWidget *  parent,
unsigned int  neurGrpID,
unsigned int  fromNeurID,
unsigned int  toNeurID
 

Constructor for monitoring synapse data The main initialisation work is done when the setUpGraphs method is called after the information about the monitored data has been received by the simulationManager.

Definition at line 114 of file MonitorDataPlotter.cpp.

References axisFont, axisTitleFont, fromNeuronID, loadingLabel, neuronGrpID, neuronMonitoring, parseError, simulationWidget, toNeuronID, and verticalBox.

MonitorDataPlotter::~MonitorDataPlotter  ) 
 

Destructor.

Definition at line 151 of file MonitorDataPlotter.cpp.

References dataVector, and plotVector.

MonitorDataPlotter::MonitorDataPlotter const MonitorDataPlotter  )  [private]
 

Declare copy constructor private so it cannot be used inadvertently.


Member Function Documentation

void MonitorDataPlotter::addGraph NewGraph  newGraph  ) 
 

Adds a graph to the display. Usually called by MonitorXmlHandler, which in turn is invoked by simulationManager running as a separate thread.

Definition at line 174 of file MonitorDataPlotter.cpp.

References axisFont, axisTitleFont, dataVector, DEFAULT_MONITOR_DATASET_SIZE, NewGraph::description, plotVector, NewGraph::rangeHigh, NewGraph::rangeLow, SpikeStreamMainWindow::spikeStreamApplication, and verticalBox.

Referenced by MonitorXmlHandler::endElement().

void MonitorDataPlotter::closeDialog bool  stopMon  ) 
 

Called when the dialog needs to be closed by an external class. Variable stopMon determines whether monitoring will be stopped when dialog is closed.

Definition at line 245 of file MonitorDataPlotter.cpp.

References stopMonitoring().

void MonitorDataPlotter::closeEvent QCloseEvent *  e  )  [protected]
 

Called when user closes the dialog. Instructs simulation to stop sending monitor data. Dialog is closed programmatically by the closeDialog() method.

Definition at line 398 of file MonitorDataPlotter.cpp.

References stopMonitoring().

void MonitorDataPlotter::loadingComplete  ) 
 

Called when all graphs have been loaded so that loading label can be hidden.

Definition at line 257 of file MonitorDataPlotter.cpp.

References loadingLabel.

Referenced by MonitorXmlHandler::endElement().

MonitorDataPlotter MonitorDataPlotter::operator= const MonitorDataPlotter  )  [private]
 

Declare assignment private so it cannot be used inadvertently.

void MonitorDataPlotter::plotData double  time,
const double *  dataArray,
int  arrayLength
 

Adds the data in the float array to the graphs.

Definition at line 267 of file MonitorDataPlotter.cpp.

References dataVector, plotVector, and SpikeStreamMainWindow::spikeStreamApplication.

void MonitorDataPlotter::setUpGraphs const char *  charArray  ) 
 

The char array is an XML file containing the set up information for the graphs. This method parses the information and creates the graphs.

Definition at line 333 of file MonitorDataPlotter.cpp.

References MonitorXmlHandler::getParseError(), MonitorXmlHandler::getParseErrorString(), parseError, SpikeStreamMainWindow::spikeStreamApplication, and stopMonitoring().

bool MonitorDataPlotter::showDialog  ) 
 

Used by other methods to make the dialog visible and restart the monitoring.

Definition at line 295 of file MonitorDataPlotter.cpp.

References fromNeuronID, neuronGrpID, neuronID, neuronMonitoring, parseError, simulationWidget, SpikeStreamMainWindow::spikeStreamApplication, and toNeuronID.

void MonitorDataPlotter::stopMonitoring  )  [private]
 

Stops the monitoring associated with this dialog.

Definition at line 413 of file MonitorDataPlotter.cpp.

References fromNeuronID, neuronGrpID, neuronID, neuronMonitoring, simulationWidget, SpikeStreamMainWindow::spikeStreamApplication, and toNeuronID.

Referenced by closeDialog(), closeEvent(), and setUpGraphs().


Member Data Documentation

QFont* MonitorDataPlotter::axisFont [private]
 

Definition at line 111 of file MonitorDataPlotter.h.

Referenced by addGraph(), and MonitorDataPlotter().

QFont* MonitorDataPlotter::axisTitleFont [private]
 

Definition at line 112 of file MonitorDataPlotter.h.

Referenced by addGraph(), and MonitorDataPlotter().

vector<MonitorDataset*> MonitorDataPlotter::dataVector [private]
 

Holds references to all of the datasets plotted by the graphs.

Definition at line 105 of file MonitorDataPlotter.h.

Referenced by addGraph(), plotData(), and ~MonitorDataPlotter().

unsigned int MonitorDataPlotter::fromNeuronID [private]
 

Presynaptic ID of synapse being monitored.

Definition at line 90 of file MonitorDataPlotter.h.

Referenced by MonitorDataPlotter(), showDialog(), and stopMonitoring().

QLabel* MonitorDataPlotter::loadingLabel [private]
 

Label to inform user that we are waiting for simulation manager.

Definition at line 96 of file MonitorDataPlotter.h.

Referenced by loadingComplete(), and MonitorDataPlotter().

unsigned int MonitorDataPlotter::neuronGrpID [private]
 

Neuron group.

Definition at line 81 of file MonitorDataPlotter.h.

Referenced by MonitorDataPlotter(), showDialog(), and stopMonitoring().

unsigned int MonitorDataPlotter::neuronID [private]
 

ID of neuron being monitored.

Definition at line 87 of file MonitorDataPlotter.h.

Referenced by MonitorDataPlotter(), showDialog(), and stopMonitoring().

bool MonitorDataPlotter::neuronMonitoring [private]
 

Are we monitoring a neuron or a synapse?.

Definition at line 84 of file MonitorDataPlotter.h.

Referenced by MonitorDataPlotter(), showDialog(), and stopMonitoring().

bool MonitorDataPlotter::parseError [private]
 

Records if there has been an error in parsing.

Definition at line 108 of file MonitorDataPlotter.h.

Referenced by MonitorDataPlotter(), setUpGraphs(), and showDialog().

vector<QwtPlot*> MonitorDataPlotter::plotVector [private]
 

Holds references to all of the graphs in this widget.

Definition at line 102 of file MonitorDataPlotter.h.

Referenced by addGraph(), plotData(), and ~MonitorDataPlotter().

QWidget* MonitorDataPlotter::simulationWidget [private]
 

Store a reference to the simulation widget to access simulation manager Stored as a QWidget to avoid include problems.

Definition at line 78 of file MonitorDataPlotter.h.

Referenced by MonitorDataPlotter(), showDialog(), and stopMonitoring().

unsigned int MonitorDataPlotter::toNeuronID [private]
 

Postsynpatic ID of synapse being monitored.

Definition at line 93 of file MonitorDataPlotter.h.

Referenced by MonitorDataPlotter(), showDialog(), and stopMonitoring().

QVBoxLayout* MonitorDataPlotter::verticalBox [private]
 

Layout of this widget, used to dynamically add graphs.

Definition at line 99 of file MonitorDataPlotter.h.

Referenced by addGraph(), and MonitorDataPlotter().


The documentation for this class was generated from the following files:
Generated on Mon Sep 3 22:29:05 2007 for SpikeStream Application by  doxygen 1.4.4