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

SynapseParametersDialog Class Reference

#include <SynapseParametersDialog.h>

List of all members.

Public Member Functions

bool loadSynapseParameters ()
 SynapseParametersDialog (QWidget *parent, DBInterface *networkDBInterface, SimulationManager *simMan)
 ~SynapseParametersDialog ()

Private Slots

void applyButtonPressed ()
void cancelButtonPressed ()
void defaultsButtonPressed ()
void okButtonPressed ()
void parameterTableClicked (int row, int col, unsigned short typeID)
void parameterTableValueChanged (int row, int col, unsigned short typeID)

Private Member Functions

QString getNeuronGroupName (QString neurGrpID)
SynapseParametersDialog operator= (const SynapseParametersDialog &)
void storeSynapseParameters ()
 SynapseParametersDialog (const SynapseParametersDialog &)

Private Attributes

QPushButton * applyButton
map< unsigned short, map<
const char *, bool, charKeyCompare > > 
checkBoxMap
int connGrpIDColumn
map< unsigned short, map<
const char *, double, charKeyCompare > > 
defaultValueMap
map< unsigned short, map<
const char *, const char *,
charKeyCompare > > 
descParamMap
map< unsigned short, map<
const char *, int, charKeyCompare > > 
descriptionColumnMap
int editColumn
QPixmap * editPixmap
map< unsigned short, QStringList * > fieldNamesMap
int fromGrpColumn
DBInterface * networkDBInterface
map< unsigned short, map<
const char *, const char *,
charKeyCompare > > 
paramDescMap
bool parameterValuesChanged
int paramStartColumn
map< unsigned short, QHeader * > paramTableHeaderMap
map< unsigned short, ParameterTable * > paramTableMap
SimulationManagersimulationManager
map< unsigned short, QLabel * > tableLabelMap
int toGrpColumn
map< unsigned short, QStringList * > valueNamesMap


Detailed Description

Displays the synapse parameters in a table with an edit button that launches an edit synapse parameters dialog to change the values. The parameters are not changed until the ok or apply buttons are pressed.

Definition at line 45 of file SynapseParametersDialog.h.


Constructor & Destructor Documentation

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

Constructor.

Definition at line 42 of file SynapseParametersDialog.cpp.

References applyButton, applyButtonPressed(), cancelButtonPressed(), checkBoxMap, connGrpIDColumn, defaultsButtonPressed(), defaultValueMap, descParamMap, descriptionColumnMap, editColumn, editPixmap, fieldNamesMap, fromGrpColumn, networkDBInterface, okButtonPressed(), paramDescMap, parameterTableClicked(), parameterTableValueChanged(), paramStartColumn, paramTableHeaderMap, paramTableMap, simulationManager, tableLabelMap, toGrpColumn, valueNamesMap, and SpikeStreamMainWindow::workingDirectory.

SynapseParametersDialog::~SynapseParametersDialog  ) 
 

Destructor.

Definition at line 273 of file SynapseParametersDialog.cpp.

References editPixmap, fieldNamesMap, and valueNamesMap.

SynapseParametersDialog::SynapseParametersDialog const SynapseParametersDialog  )  [private]
 

Declare copy constructor private so it cannot be used inadvertently.


Member Function Documentation

void SynapseParametersDialog::applyButtonPressed  )  [private, slot]
 

Stores the parameters without closing the dialog.

Definition at line 421 of file SynapseParametersDialog.cpp.

References applyButton, parameterValuesChanged, SimulationManager::setSynapseParameters(), simulationManager, and storeSynapseParameters().

Referenced by SynapseParametersDialog().

void SynapseParametersDialog::cancelButtonPressed  )  [private, slot]
 

Hides the dialog when the cancel button is pressed.

Definition at line 435 of file SynapseParametersDialog.cpp.

Referenced by SynapseParametersDialog().

void SynapseParametersDialog::defaultsButtonPressed  )  [private, slot]
 

Loads the default parameters into the table.

Definition at line 442 of file SynapseParametersDialog.cpp.

Referenced by SynapseParametersDialog().

QString SynapseParametersDialog::getNeuronGroupName QString  neuronGrpID  )  [private]
 

Gets the name of the neuron group given the neuron group id.

Definition at line 533 of file SynapseParametersDialog.cpp.

References networkDBInterface.

Referenced by loadSynapseParameters().

bool SynapseParametersDialog::loadSynapseParameters  ) 
 

Loads up the synapse parameters into the table.

Definition at line 295 of file SynapseParametersDialog.cpp.

References applyButton, checkBoxMap, connGrpIDColumn, editColumn, editPixmap, fieldNamesMap, fromGrpColumn, getNeuronGroupName(), networkDBInterface, parameterValuesChanged, paramStartColumn, paramTableMap, tableLabelMap, and toGrpColumn.

Referenced by SimulationWidget::reloadConnectionGroups(), and SimulationWidget::synapseParamButtonPressed().

void SynapseParametersDialog::okButtonPressed  )  [private, slot]
 

Stores the parameters and closes the dialog.

Definition at line 447 of file SynapseParametersDialog.cpp.

References parameterValuesChanged, SimulationManager::setSynapseParameters(), simulationManager, and storeSynapseParameters().

Referenced by SynapseParametersDialog().

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

Declare assignment private so it cannot be used inadvertently.

void SynapseParametersDialog::parameterTableClicked int  row,
int  col,
unsigned short  typeID
[private, slot]
 

Launches a dialog to edit the parameters. This changes the values in the table, but they are not updated in the database until ok or apply is clicked.

Definition at line 462 of file SynapseParametersDialog.cpp.

References applyButton, checkBoxMap, connGrpIDColumn, defaultValueMap, descParamMap, descriptionColumnMap, editColumn, EditSynapseParametersDialog::getDescriptionLineEditMap(), parameterValuesChanged, paramStartColumn, paramTableHeaderMap, and paramTableMap.

Referenced by SynapseParametersDialog().

void SynapseParametersDialog::parameterTableValueChanged int  row,
int  col,
unsigned short  typeID
[private, slot]
 

Tracks whether a check box has been checked or cleared in the table.

Definition at line 521 of file SynapseParametersDialog.cpp.

References applyButton, and parameterValuesChanged.

Referenced by SynapseParametersDialog().

void SynapseParametersDialog::storeSynapseParameters  )  [private]
 

Stores the synapse parameters in the database.

Definition at line 573 of file SynapseParametersDialog.cpp.

References checkBoxMap, connGrpIDColumn, fieldNamesMap, networkDBInterface, paramStartColumn, paramTableMap, and valueNamesMap.

Referenced by applyButtonPressed(), and okButtonPressed().


Member Data Documentation

QPushButton* SynapseParametersDialog::applyButton [private]
 

Applies the parameters without closing the dialog.

Definition at line 77 of file SynapseParametersDialog.h.

Referenced by applyButtonPressed(), loadSynapseParameters(), parameterTableClicked(), parameterTableValueChanged(), and SynapseParametersDialog().

map<unsigned short, map<const char*, bool, charKeyCompare> > SynapseParametersDialog::checkBoxMap [private]
 

Records whether a value is a check box type. Only check box values are included in this map.

Definition at line 104 of file SynapseParametersDialog.h.

Referenced by loadSynapseParameters(), parameterTableClicked(), storeSynapseParameters(), and SynapseParametersDialog().

int SynapseParametersDialog::connGrpIDColumn [private]
 

Definition at line 81 of file SynapseParametersDialog.h.

Referenced by loadSynapseParameters(), parameterTableClicked(), storeSynapseParameters(), and SynapseParametersDialog().

map<unsigned short, map<const char*, double, charKeyCompare> > SynapseParametersDialog::defaultValueMap [private]
 

Links descriptions of the parameter with the default value.

Definition at line 97 of file SynapseParametersDialog.h.

Referenced by parameterTableClicked(), and SynapseParametersDialog().

map<unsigned short, map<const char*, const char*, charKeyCompare> > SynapseParametersDialog::descParamMap [private]
 

Stores the link between a description and a parameter name.

Definition at line 107 of file SynapseParametersDialog.h.

Referenced by parameterTableClicked(), and SynapseParametersDialog().

map<unsigned short, map<const char*, int, charKeyCompare> > SynapseParametersDialog::descriptionColumnMap [private]
 

Links descriptions of the parameter with a column for loading up parameters.

Definition at line 100 of file SynapseParametersDialog.h.

Referenced by parameterTableClicked(), and SynapseParametersDialog().

int SynapseParametersDialog::editColumn [private]
 

Definition at line 80 of file SynapseParametersDialog.h.

Referenced by loadSynapseParameters(), parameterTableClicked(), and SynapseParametersDialog().

QPixmap* SynapseParametersDialog::editPixmap [private]
 

Image displayed in the edit column.

Definition at line 87 of file SynapseParametersDialog.h.

Referenced by loadSynapseParameters(), SynapseParametersDialog(), and ~SynapseParametersDialog().

map<unsigned short, QStringList*> SynapseParametersDialog::fieldNamesMap [private]
 

List of all the field names of the parameters, used for loading them from the database.

Definition at line 91 of file SynapseParametersDialog.h.

Referenced by loadSynapseParameters(), storeSynapseParameters(), SynapseParametersDialog(), and ~SynapseParametersDialog().

int SynapseParametersDialog::fromGrpColumn [private]
 

Definition at line 82 of file SynapseParametersDialog.h.

Referenced by loadSynapseParameters(), and SynapseParametersDialog().

DBInterface* SynapseParametersDialog::networkDBInterface [private]
 

Store reference to database interfaces.

Definition at line 66 of file SynapseParametersDialog.h.

Referenced by getNeuronGroupName(), loadSynapseParameters(), storeSynapseParameters(), and SynapseParametersDialog().

map<unsigned short, map<const char*, const char*, charKeyCompare> > SynapseParametersDialog::paramDescMap [private]
 

Stores the link between a parameter name and a description.

Definition at line 110 of file SynapseParametersDialog.h.

Referenced by SynapseParametersDialog().

bool SynapseParametersDialog::parameterValuesChanged [private]
 

Variable recording whether the parameter table has been changed Used to enable or disable the apply button and prevent updating parameters unnecessarily.

Definition at line 115 of file SynapseParametersDialog.h.

Referenced by applyButtonPressed(), loadSynapseParameters(), okButtonPressed(), parameterTableClicked(), and parameterTableValueChanged().

int SynapseParametersDialog::paramStartColumn [private]
 

Definition at line 84 of file SynapseParametersDialog.h.

Referenced by loadSynapseParameters(), parameterTableClicked(), storeSynapseParameters(), and SynapseParametersDialog().

map<unsigned short, QHeader*> SynapseParametersDialog::paramTableHeaderMap [private]
 

Definition at line 73 of file SynapseParametersDialog.h.

Referenced by parameterTableClicked(), and SynapseParametersDialog().

map<unsigned short, ParameterTable*> SynapseParametersDialog::paramTableMap [private]
 

Definition at line 72 of file SynapseParametersDialog.h.

Referenced by loadSynapseParameters(), parameterTableClicked(), storeSynapseParameters(), and SynapseParametersDialog().

SimulationManager* SynapseParametersDialog::simulationManager [private]
 

Store reference to simulation manager to inform it about changes.

Definition at line 69 of file SynapseParametersDialog.h.

Referenced by applyButtonPressed(), okButtonPressed(), and SynapseParametersDialog().

map<unsigned short, QLabel*> SynapseParametersDialog::tableLabelMap [private]
 

Definition at line 74 of file SynapseParametersDialog.h.

Referenced by loadSynapseParameters(), and SynapseParametersDialog().

int SynapseParametersDialog::toGrpColumn [private]
 

Definition at line 83 of file SynapseParametersDialog.h.

Referenced by loadSynapseParameters(), and SynapseParametersDialog().

map<unsigned short, QStringList*> SynapseParametersDialog::valueNamesMap [private]
 

List of all the value names.

Definition at line 94 of file SynapseParametersDialog.h.

Referenced by storeSynapseParameters(), SynapseParametersDialog(), and ~SynapseParametersDialog().


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