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

MonitorArea Class Reference

#include <MonitorArea.h>

List of all members.

Public Member Functions

void addMonitorWindow (NeuronGroup neurGrp)
void connectToManager ()
void dockMonitorWindows ()
void hideMonitorWindows ()
void loadSimulation ()
 MonitorArea (ArchiveManager *, QWidget *parent)
 MonitorArea (DBInterface *, SimulationManager *, QWidget *parent)
void resetMonitorWindows ()
void rewindNetworkMonitors ()
void showAllMonitorWindows (bool monitorType)
void showMonitorWindow (unsigned int neuronGrpID, bool monitorType)
void undockMonitorWindows ()
 ~MonitorArea ()

Private Member Functions

 MonitorArea (const MonitorArea &)
MonitorArea operator= (const MonitorArea &)

Private Attributes

ArchiveManagerarchiveManager
int endPos
bool firstTimeUndock
MonitorWindow ** monitorWindowArray
DBInterface * networkDBInterface
map< unsigned int, NetworkMonitor * > networkMonitorMap
SimulationManagersimulationManager
bool simulationMode
SpikeStreamApplicationspikeStrApp


Detailed Description

Extends QDockArea and holds a number of monitor windows with the possibility of arranging them and undocking them, etc.

NOTE Had problems creating QDockWindows at runtime, so instead create all of them at once and then add NetworkMonitors to them and hide/show them as required.This creates a limit on the number of monitoring windows that can be used at one time, which is set in GlobalVariables.h.

Definition at line 51 of file MonitorArea.h.


Constructor & Destructor Documentation

MonitorArea::MonitorArea DBInterface *  netDBInter,
SimulationManager simMan,
QWidget *  parent
 

Constructor for live monitoring a simulation.

Definition at line 41 of file MonitorArea.cpp.

References endPos, firstTimeUndock, monitorWindowArray, networkDBInterface, simulationManager, simulationMode, spikeStrApp, and SpikeStreamMainWindow::spikeStreamApplication.

MonitorArea::MonitorArea ArchiveManager archMan,
QWidget *  parent
 

Constructor for when the monitor area is being used to play back an archive.

Definition at line 66 of file MonitorArea.cpp.

References archiveManager, endPos, firstTimeUndock, monitorWindowArray, simulationMode, spikeStrApp, and SpikeStreamMainWindow::spikeStreamApplication.

MonitorArea::~MonitorArea  ) 
 

Destructor.

Definition at line 90 of file MonitorArea.cpp.

References monitorWindowArray.

MonitorArea::MonitorArea const MonitorArea  )  [private]
 

Declare copy constructor private so it cannot be used inadvertently.


Member Function Documentation

void MonitorArea::addMonitorWindow NeuronGroup  neuronGrp  ) 
 

Sets up network monitors and monitor windows ready for simulation monitoring or archive playback.

Definition at line 111 of file MonitorArea.cpp.

References endPos, monitorWindowArray, NeuronGroup::name, networkDBInterface, networkMonitorMap, NeuronGroup::neuronGrpID, MonitorWindow::setNeuronGrpID(), and simulationMode.

Referenced by NetworkModelXmlHandler::endElement(), and loadSimulation().

void MonitorArea::connectToManager  ) 
 

Called at the start of a simulation or archive playback to set the network monitors in the manager. This enables the network monitors to be directly updated from the manager.

Definition at line 146 of file MonitorArea.cpp.

References archiveManager, networkMonitorMap, ArchiveManager::setNetworkMonitors(), SimulationManager::setNetworkMonitors(), simulationManager, and simulationMode.

Referenced by SimulationWidget::initialiseButtonToggled(), and ArchiveWidget::loadArchive().

void MonitorArea::dockMonitorWindows  ) 
 

Docks all monitor windows.

Definition at line 155 of file MonitorArea.cpp.

References endPos, and monitorWindowArray.

Referenced by SimulationWidget::dockAllButtonClicked(), ArchiveWidget::dockAllButtonClicked(), SimulationWidget::hideOpenWindows(), and ArchiveWidget::hideOpenWindows().

void MonitorArea::hideMonitorWindows  ) 
 

Hides all monitor windows.

Definition at line 164 of file MonitorArea.cpp.

References endPos, and monitorWindowArray.

Referenced by resetMonitorWindows().

void MonitorArea::loadSimulation  ) 
 

Loads up the network monitors and adds them to the window ready to be hidden or shown during the simulation.

Definition at line 173 of file MonitorArea.cpp.

References addMonitorWindow(), NeuronGroup::length, NeuronGroup::name, networkDBInterface, NeuronGroup::neuronGrpID, and NeuronGroup::width.

Referenced by SimulationWidget::initialiseButtonToggled().

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

Declare assignment private so it cannot be used inadvertently.

void MonitorArea::resetMonitorWindows  ) 
 

Resets the monitor windows.

Definition at line 219 of file MonitorArea.cpp.

References endPos, hideMonitorWindows(), and networkMonitorMap.

Referenced by SimulationWidget::initialiseButtonToggled(), ArchiveWidget::loadArchive(), and ArchiveWidget::unloadArchive().

void MonitorArea::rewindNetworkMonitors  ) 
 

Rewinds network monitors back to zero time step.

Definition at line 234 of file MonitorArea.cpp.

References networkMonitorMap.

Referenced by ArchiveWidget::rewindButtonPressed().

void MonitorArea::showAllMonitorWindows bool  monitorNeurons  ) 
 

Shows all monitor windows.

Definition at line 241 of file MonitorArea.cpp.

References endPos, monitorWindowArray, and MonitorWindow::setMonitorType().

Referenced by SimulationWidget::monitorButtonPressed().

void MonitorArea::showMonitorWindow unsigned int  neurGrpID,
bool  monitorNeurons
 

Displays the monitor window with the neuron grp id. Linear search is a bit slow, This could be speeded up by using a map to store the link between a position in the array and the neuronGrpID, but it may not be necessary since it is not a frequent operation.

Definition at line 252 of file MonitorArea.cpp.

References endPos, MonitorWindow::getNeuronGrpID(), monitorWindowArray, and MonitorWindow::setMonitorType().

Referenced by SimulationWidget::monitorButtonPressed().

void MonitorArea::undockMonitorWindows  ) 
 

Undocks the monitor windows and lays them out within the window if this can be done easily. This is only done for the first undocking action since after this the user is presumed to have arranged the windows to their preference.

Definition at line 266 of file MonitorArea.cpp.

References endPos, firstTimeUndock, and monitorWindowArray.

Referenced by ArchiveWidget::loadArchive(), SimulationWidget::monitorButtonPressed(), SimulationWidget::undockAllButtonClicked(), and ArchiveWidget::undockAllButtonClicked().


Member Data Documentation

ArchiveManager* MonitorArea::archiveManager [private]
 

Definition at line 75 of file MonitorArea.h.

Referenced by connectToManager(), and MonitorArea().

int MonitorArea::endPos [private]
 

The insertion point in the monitorWindowArray

Definition at line 82 of file MonitorArea.h.

Referenced by addMonitorWindow(), dockMonitorWindows(), hideMonitorWindows(), MonitorArea(), resetMonitorWindows(), showAllMonitorWindows(), showMonitorWindow(), and undockMonitorWindows().

bool MonitorArea::firstTimeUndock [private]
 

Used to determine whether the windows should be arranged automatically, this records whether this is the first undock of the monitor area.

Definition at line 94 of file MonitorArea.h.

Referenced by MonitorArea(), and undockMonitorWindows().

MonitorWindow** MonitorArea::monitorWindowArray [private]
 

Array holding references to all the monitor windows.

Definition at line 79 of file MonitorArea.h.

Referenced by addMonitorWindow(), dockMonitorWindows(), hideMonitorWindows(), MonitorArea(), showAllMonitorWindows(), showMonitorWindow(), undockMonitorWindows(), and ~MonitorArea().

DBInterface* MonitorArea::networkDBInterface [private]
 

Definition at line 73 of file MonitorArea.h.

Referenced by addMonitorWindow(), loadSimulation(), and MonitorArea().

map<unsigned int, NetworkMonitor*> MonitorArea::networkMonitorMap [private]
 

Holds references to all the network monitors.

Definition at line 85 of file MonitorArea.h.

Referenced by addMonitorWindow(), connectToManager(), resetMonitorWindows(), and rewindNetworkMonitors().

SimulationManager* MonitorArea::simulationManager [private]
 

Definition at line 74 of file MonitorArea.h.

Referenced by connectToManager(), and MonitorArea().

bool MonitorArea::simulationMode [private]
 

Records whether this monitor area is monitoring a simulation or playing back an archive

Definition at line 89 of file MonitorArea.h.

Referenced by addMonitorWindow(), connectToManager(), and MonitorArea().

SpikeStreamApplication* MonitorArea::spikeStrApp [private]
 

Definition at line 76 of file MonitorArea.h.

Referenced by MonitorArea().


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