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

NeuronParametersDialog Class Reference

#include <NeuronParametersDialog.h>

List of all members.

Public Member Functions

bool loadNeuronParameters ()
 NeuronParametersDialog (QWidget *parent, DBInterface *networkDBInterface, SimulationManager *simMan)
 ~NeuronParametersDialog ()

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

 NeuronParametersDialog (const NeuronParametersDialog &)
NeuronParametersDialog operator= (const NeuronParametersDialog &)
void storeNeuronParameters ()

Private Attributes

QPushButton * applyButton
map< unsigned short, map<
const char *, bool, charKeyCompare > > 
checkBoxMap
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 nameColumn
DBInterface * networkDBInterface
int neurGrpIDColumn
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
map< unsigned short, QStringList * > valueNamesMap


Detailed Description

Displays all the neuron parameters in a table with an edit button that launches an edit neuron parameters dialog. The parameters are changed in the dialog by EditNeuronParameters, but they are only saved when ok, or apply are pressed.

Definition at line 47 of file NeuronParametersDialog.h.


Constructor & Destructor Documentation

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

Constructor.

Definition at line 43 of file NeuronParametersDialog.cpp.

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

NeuronParametersDialog::~NeuronParametersDialog  ) 
 

Destructor.

Definition at line 264 of file NeuronParametersDialog.cpp.

References editPixmap, fieldNamesMap, and valueNamesMap.

NeuronParametersDialog::NeuronParametersDialog const NeuronParametersDialog  )  [private]
 

Declare copy constructor private so it cannot be used inadvertently.


Member Function Documentation

void NeuronParametersDialog::applyButtonPressed  )  [private, slot]
 

Stores the parameters and instructs tasks to reload them without closing the dialog.

Definition at line 412 of file NeuronParametersDialog.cpp.

References applyButton, parameterValuesChanged, SimulationManager::setNeuronParameters(), simulationManager, and storeNeuronParameters().

Referenced by NeuronParametersDialog().

void NeuronParametersDialog::cancelButtonPressed  )  [private, slot]
 

Hides the dialog without storing parameters.

Definition at line 426 of file NeuronParametersDialog.cpp.

Referenced by NeuronParametersDialog().

void NeuronParametersDialog::defaultsButtonPressed  )  [private, slot]
 

Loads up the default neuron parameters.

Definition at line 433 of file NeuronParametersDialog.cpp.

Referenced by NeuronParametersDialog().

bool NeuronParametersDialog::loadNeuronParameters  ) 
 

Loads the neuron parameters into the table.

Definition at line 286 of file NeuronParametersDialog.cpp.

References applyButton, checkBoxMap, editColumn, editPixmap, fieldNamesMap, nameColumn, networkDBInterface, neurGrpIDColumn, parameterValuesChanged, paramStartColumn, paramTableMap, and tableLabelMap.

Referenced by SimulationWidget::neuronParamButtonPressed(), and SimulationWidget::reloadNeuronGroups().

void NeuronParametersDialog::okButtonPressed  )  [private, slot]
 

Stores the parameters, instructs tasks to reload parameters and hides dialog.

Definition at line 439 of file NeuronParametersDialog.cpp.

References parameterValuesChanged, SimulationManager::setNeuronParameters(), simulationManager, and storeNeuronParameters().

Referenced by NeuronParametersDialog().

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

Declare assignment private so it cannot be used inadvertently.

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

Called when the parameter table is clicked. Launches edit parameters dialog if it has been clicked in the edit column.

Definition at line 453 of file NeuronParametersDialog.cpp.

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

Referenced by NeuronParametersDialog().

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

Called when a value has been changed in the tables. Generally called when a check box has been checked or unchecked. Records that the table state has changed.

Definition at line 513 of file NeuronParametersDialog.cpp.

References applyButton, and parameterValuesChanged.

Referenced by NeuronParametersDialog().

void NeuronParametersDialog::storeNeuronParameters  )  [private]
 

Stores the neuron parameters in the database.

Definition at line 525 of file NeuronParametersDialog.cpp.

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

Referenced by applyButtonPressed(), and okButtonPressed().


Member Data Documentation

QPushButton* NeuronParametersDialog::applyButton [private]
 

Applies the parameters without closing the dialog.

Definition at line 79 of file NeuronParametersDialog.h.

Referenced by applyButtonPressed(), loadNeuronParameters(), NeuronParametersDialog(), parameterTableClicked(), and parameterTableValueChanged().

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

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

Definition at line 105 of file NeuronParametersDialog.h.

Referenced by loadNeuronParameters(), NeuronParametersDialog(), parameterTableClicked(), and storeNeuronParameters().

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

Links descriptions of the parameter with the default value.

Definition at line 98 of file NeuronParametersDialog.h.

Referenced by NeuronParametersDialog(), and parameterTableClicked().

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

Stores the link between a description and a parameter name.

Definition at line 108 of file NeuronParametersDialog.h.

Referenced by NeuronParametersDialog(), and parameterTableClicked().

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

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

Definition at line 101 of file NeuronParametersDialog.h.

Referenced by NeuronParametersDialog(), and parameterTableClicked().

int NeuronParametersDialog::editColumn [private]
 

Definition at line 82 of file NeuronParametersDialog.h.

Referenced by loadNeuronParameters(), NeuronParametersDialog(), and parameterTableClicked().

QPixmap* NeuronParametersDialog::editPixmap [private]
 

Image displayed in the edit column.

Definition at line 88 of file NeuronParametersDialog.h.

Referenced by loadNeuronParameters(), NeuronParametersDialog(), and ~NeuronParametersDialog().

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

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

Definition at line 92 of file NeuronParametersDialog.h.

Referenced by loadNeuronParameters(), NeuronParametersDialog(), storeNeuronParameters(), and ~NeuronParametersDialog().

int NeuronParametersDialog::nameColumn [private]
 

Definition at line 84 of file NeuronParametersDialog.h.

Referenced by loadNeuronParameters(), and NeuronParametersDialog().

DBInterface* NeuronParametersDialog::networkDBInterface [private]
 

Store reference to database interfaces.

Definition at line 68 of file NeuronParametersDialog.h.

Referenced by loadNeuronParameters(), NeuronParametersDialog(), and storeNeuronParameters().

int NeuronParametersDialog::neurGrpIDColumn [private]
 

Definition at line 83 of file NeuronParametersDialog.h.

Referenced by loadNeuronParameters(), NeuronParametersDialog(), parameterTableClicked(), and storeNeuronParameters().

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

Stores the link between a parameter name and a description.

Definition at line 111 of file NeuronParametersDialog.h.

Referenced by NeuronParametersDialog().

bool NeuronParametersDialog::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 116 of file NeuronParametersDialog.h.

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

int NeuronParametersDialog::paramStartColumn [private]
 

Definition at line 85 of file NeuronParametersDialog.h.

Referenced by loadNeuronParameters(), NeuronParametersDialog(), parameterTableClicked(), and storeNeuronParameters().

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

Definition at line 75 of file NeuronParametersDialog.h.

Referenced by NeuronParametersDialog(), and parameterTableClicked().

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

Definition at line 74 of file NeuronParametersDialog.h.

Referenced by loadNeuronParameters(), NeuronParametersDialog(), parameterTableClicked(), and storeNeuronParameters().

SimulationManager* NeuronParametersDialog::simulationManager [private]
 

Store reference to simulation manager to inform tasks about changes.

Definition at line 71 of file NeuronParametersDialog.h.

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

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

Definition at line 76 of file NeuronParametersDialog.h.

Referenced by loadNeuronParameters(), and NeuronParametersDialog().

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

List of all the value names.

Definition at line 95 of file NeuronParametersDialog.h.

Referenced by NeuronParametersDialog(), storeNeuronParameters(), and ~NeuronParametersDialog().


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