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

NeuronMonitor.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  *   SpikeStream Application                                               *
00003  *   Copyright (C) 2005 by David Gamez                                     *
00004  *   david@davidgamez.eu                                                   *
00005  *   Version 0.1                                                           *
00006  ***************************************************************************/
00007 
00008 /* ------------------------ Neuron Monitor ----------------------------------
00009         Displays graphs of parameters monitored by the neuron.
00010 ----------------------------------------------------------------------------*/
00011 
00012 #ifndef NEURONMONITOR_H
00013 #define NEURONMONITOR_H
00014 
00015 //SpikeStream includes
00016 #include "MonitorDataset.h"
00017 
00018 //Qt includes
00019 #include <qdialog.h>
00020 #include <qlabel.h>
00021 #include <qlayout.h>
00022 
00023 //Qwt includes
00024 #include <qwt_plot.h>
00025 
00026 //Other includes
00027 #include <vector>
00028 using namespace std;
00029 
00030 struct NewGraph {
00031         QString description;
00032         double rangeLow;
00033         double rangeHigh;
00034 };
00035 
00036 class NeuronMonitor : public QDialog {
00037         Q_OBJECT
00038 
00039         public: 
00040                 NeuronMonitor(QWidget *parent, QString neuronGrpDesc, unsigned int neurID, unsigned int neurGrpID);
00041                 ~NeuronMonitor();
00042                 void addGraph(NewGraph graph);
00043                 void closeDialog();
00044                 void loadingComplete();
00045                 void plotData(double msgTime, const double* dataArray, int arrayLength);
00046                 void setUpGraphs(const char* charArray);
00047 
00048 
00049         protected:
00050                 void closeEvent ( QCloseEvent * e );
00051 
00052 
00053         private:
00054                 //=============================== VARIABLES ===============================
00055                 /* Store a reference to the simulation widget to access simulation manager
00056                         Stored as a QWidget to avoid include problems. */
00057                 QWidget* simulationWidget;
00058 
00059                 //ID and group of neuron being monitored
00060                 unsigned int neuronID;
00061                 unsigned int neuronGrpID;
00062 
00063                 //Label to inform user that we are waiting for simulation manager
00064                 QLabel* loadingLabel;
00065 
00066                 //Layout of this widget, used to dynamically add graphs
00067                 QVBoxLayout *verticalBox;
00068 
00069                 //Holds references to all of the graphs in this widget
00070                 vector<QwtPlot*> plotVector;
00071 
00072                 //Holds references to all of the datasets plotted by the graphs
00073                 vector<MonitorDataset*> dataVector;
00074 
00075 };
00076 
00077 
00078 #endif//NEURONMONITOR_H
00079 
00080 

Generated on Mon Sep 3 22:29:04 2007 for SpikeStream Application by  doxygen 1.4.4