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

ConnectionPropertiesDialog Class Reference

#include <ConnectionPropertiesDialog.h>

List of all members.

Public Member Functions

 ConnectionPropertiesDialog (QWidget *, const char *, DBInterface *netDBInter, unsigned int fromNeurGrpID, unsigned int toNeurGrpID, unsigned short connType)
 ConnectionPropertiesDialog (QWidget *, const char *, DBInterface *)
ConnectionHolder getConnectionHolder ()
map< string, double > getConnectionParameters ()
 ~ConnectionPropertiesDialog ()

Private Slots

void layerRadioStateChanged ()
void okButtonPressed ()
void paramSelectionChanged ()
void paramValueChanged (int, int)

Private Member Functions

bool checkConnection_INTER (unsigned int, unsigned int, unsigned short)
bool checkConnection_INTRA (unsigned short)
 ConnectionPropertiesDialog (const ConnectionPropertiesDialog &)
void constructDialog ()
void fillConnectionTypeCombo_INTER ()
void fillConnectionTypeCombo_INTRA ()
double getParameterValue (QString)
void loadLayerNames ()
void loadParameterTable (unsigned short)
ConnectionPropertiesDialog operator= (const ConnectionPropertiesDialog &)
void setParameterValue (QString, double)

Private Attributes

int connectionType
QComboBox * connectionTypeCombo
ConnectionParameterTableconnParamTable
DBInterface * dbInterface
QIntValidator * delayValidator
bool editMode
QComboBox * fromLayerCombo
QLabel * fromLayerLabel
int fromNeurGrpID
QRadioButton * interRadioButt
QComboBox * intraLayerCombo
QLabel * intraLayerLabel
QRadioButton * intraRadioButt
bool loadError
QLineEdit * maxDelayText
QLineEdit * minDelayText
bool parameterError
QDoubleValidator * paramValidator
QComboBox * synapseTypeCombo
map< int, unsigned short > synapseTypePositionMap
QComboBox * toLayerCombo
QLabel * toLayerLabel
int toNeurGrpID


Detailed Description

Dialog used to specify the properties for new connections. This contains quite a lot of complicated checking for the inter layer connections. At present edit mode is used when obtaining the parameters for a SIMNOS connection and has not been generalised from this.

Definition at line 57 of file ConnectionPropertiesDialog.h.


Constructor & Destructor Documentation

ConnectionPropertiesDialog::ConnectionPropertiesDialog QWidget *  parent,
const char *  name,
DBInterface *  dbInter
 

Constructor used for standard connections that allows user to select the connection type

Definition at line 47 of file ConnectionPropertiesDialog.cpp.

References connectionType, constructDialog(), dbInterface, editMode, fromNeurGrpID, loadError, parameterError, and toNeurGrpID.

ConnectionPropertiesDialog::ConnectionPropertiesDialog QWidget *  parent,
const char *  name,
DBInterface *  dbInter,
unsigned int  fNeurGrpID,
unsigned int  tNeurGrpID,
unsigned short  connType
 

Constructor used when creating SIMNOS component connections. In this case the from and to neuron group id are known along with the connection type. In this case this dialog is used to gather remaining information about the connection

Definition at line 93 of file ConnectionPropertiesDialog.cpp.

References connectionType, constructDialog(), dbInterface, editMode, fromNeurGrpID, loadError, and toNeurGrpID.

ConnectionPropertiesDialog::~ConnectionPropertiesDialog  ) 
 

Destructor Qt widgets created with this as a reference should be deleted automatically.

Definition at line 308 of file ConnectionPropertiesDialog.cpp.

ConnectionPropertiesDialog::ConnectionPropertiesDialog const ConnectionPropertiesDialog  )  [private]
 

Declare copy constructor private so it cannot be used inadvertently.


Member Function Documentation

bool ConnectionPropertiesDialog::checkConnection_INTER unsigned int  fromLayerID,
unsigned int  toLayerID,
unsigned short  connectionType
[private]
 

Checks the parameters of the connection for inter layer connection types Only need to check this for certain connection topologies.

Definition at line 523 of file ConnectionPropertiesDialog.cpp.

References dbInterface, fromLayerCombo, fromNeurGrpID, getParameterValue(), setParameterValue(), toLayerCombo, and toNeurGrpID.

Referenced by okButtonPressed().

bool ConnectionPropertiesDialog::checkConnection_INTRA unsigned short  connectionType  )  [private]
 

Checks the parametes for intra layer connections.

Definition at line 825 of file ConnectionPropertiesDialog.cpp.

References getParameterValue().

Referenced by okButtonPressed().

void ConnectionPropertiesDialog::constructDialog  )  [private]
 

Creates the dialog, either using the supplied neuron group ids or allowing the user to select the neuron group ids and connection type

Definition at line 136 of file ConnectionPropertiesDialog.cpp.

References connectionType, connectionTypeCombo, connParamTable, dbInterface, DEFAULT_MAX_DELAY, DEFAULT_MIN_DELAY, delayValidator, editMode, fillConnectionTypeCombo_INTRA(), fromLayerCombo, fromLayerLabel, interRadioButt, intraLayerCombo, intraLayerLabel, intraRadioButt, layerRadioStateChanged(), loadLayerNames(), loadParameterTable(), maxDelayText, minDelayText, okButtonPressed(), paramSelectionChanged(), paramValidator, paramValueChanged(), synapseTypeCombo, synapseTypePositionMap, toLayerCombo, and toLayerLabel.

Referenced by ConnectionPropertiesDialog().

void ConnectionPropertiesDialog::fillConnectionTypeCombo_INTER  )  [private]
 

Fills connection type combo with the connection types appropriate to inter layer connections and sets up the parameter table appropriately.

Definition at line 931 of file ConnectionPropertiesDialog.cpp.

References connectionTypeCombo, connParamTable, and loadParameterTable().

Referenced by layerRadioStateChanged().

void ConnectionPropertiesDialog::fillConnectionTypeCombo_INTRA  )  [private]
 

Fills the connection type combo with the connection types appropriate to intra layer connections.

Definition at line 954 of file ConnectionPropertiesDialog.cpp.

References connectionTypeCombo, connParamTable, and loadParameterTable().

Referenced by constructDialog(), and layerRadioStateChanged().

ConnectionHolder ConnectionPropertiesDialog::getConnectionHolder  ) 
 

Returns a connection holder containing all the critical information about a connection group.

Definition at line 320 of file ConnectionPropertiesDialog.cpp.

References connectionType, ConnectionHolder::connectionType, connectionTypeCombo, editMode, fromLayerCombo, ConnectionHolder::fromLayerID, fromNeurGrpID, getConnectionParameters(), intraLayerCombo, intraRadioButt, ConnectionHolder::maxDelay, maxDelayText, ConnectionHolder::minDelay, minDelayText, ConnectionHolder::paramMap, ConnectionHolder::synapseType, synapseTypeCombo, synapseTypePositionMap, toLayerCombo, ConnectionHolder::toLayerID, and toNeurGrpID.

Referenced by ConnectionWidget::createConnections().

map< string, double > ConnectionPropertiesDialog::getConnectionParameters  ) 
 

Returns a map containing all the connection parameters.

Definition at line 362 of file ConnectionPropertiesDialog.cpp.

References connectionType, connectionTypeCombo, editMode, and getParameterValue().

Referenced by getConnectionHolder().

double ConnectionPropertiesDialog::getParameterValue QString  paramName  )  [private]
 

Searches through the parameter table to get the latest value of a parameter.

Definition at line 975 of file ConnectionPropertiesDialog.cpp.

References connParamTable.

Referenced by checkConnection_INTER(), checkConnection_INTRA(), and getConnectionParameters().

void ConnectionPropertiesDialog::layerRadioStateChanged  )  [private, slot]
 

Sets up dialog depending on whether it is for intra or inter layer connections.

Definition at line 386 of file ConnectionPropertiesDialog.cpp.

References fillConnectionTypeCombo_INTER(), fillConnectionTypeCombo_INTRA(), fromLayerCombo, fromLayerLabel, interRadioButt, intraLayerCombo, intraLayerLabel, intraRadioButt, toLayerCombo, and toLayerLabel.

Referenced by constructDialog().

void ConnectionPropertiesDialog::loadLayerNames  )  [private]
 

Loads up the layer names into the combo boxes.

Definition at line 996 of file ConnectionPropertiesDialog.cpp.

References dbInterface, editMode, fromLayerCombo, fromNeurGrpID, intraLayerCombo, toLayerCombo, and toNeurGrpID.

Referenced by constructDialog().

void ConnectionPropertiesDialog::loadParameterTable unsigned short  connType  )  [private]
 

Loads parameter table from parameters specified in ConnectionType These should all be doubles.

Definition at line 1032 of file ConnectionPropertiesDialog.cpp.

References connParamTable.

Referenced by constructDialog(), fillConnectionTypeCombo_INTER(), fillConnectionTypeCombo_INTRA(), paramSelectionChanged(), and paramValueChanged().

void ConnectionPropertiesDialog::okButtonPressed  )  [private, slot]
 

Runs checks on parameters and delay, informing the user about any errors and changes.

Definition at line 409 of file ConnectionPropertiesDialog.cpp.

References checkConnection_INTER(), checkConnection_INTRA(), connectionType, connectionTypeCombo, connParamTable, editMode, ConnectionParameterTable::endAllEditing(), fromLayerCombo, fromNeurGrpID, interRadioButt, intraRadioButt, loadError, maxDelayText, minDelayText, parameterError, toLayerCombo, and toNeurGrpID.

Referenced by constructDialog().

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

Declare assignment private so it cannot be used inadvertently.

void ConnectionPropertiesDialog::paramSelectionChanged  )  [private, slot]
 

Changes the parameters displayed in the parameter table depending on the connection type selected.

Definition at line 495 of file ConnectionPropertiesDialog.cpp.

References connectionTypeCombo, and loadParameterTable().

Referenced by constructDialog().

void ConnectionPropertiesDialog::paramValueChanged int  row,
int  col
[private, slot]
 

When the user edits a parameter in the parameter table this method is called, which checks the new value for errors.

Definition at line 503 of file ConnectionPropertiesDialog.cpp.

References connectionTypeCombo, connParamTable, loadParameterTable(), parameterError, and paramValidator.

Referenced by constructDialog().

void ConnectionPropertiesDialog::setParameterValue QString  paramName,
double  value
[private]
 

Sets the value of a parameter.

Definition at line 1052 of file ConnectionPropertiesDialog.cpp.

References connParamTable.

Referenced by checkConnection_INTER().


Member Data Documentation

int ConnectionPropertiesDialog::connectionType [private]
 

Used in edit mode to hold the type of the connection, defined in ConnectionType.h

Definition at line 95 of file ConnectionPropertiesDialog.h.

Referenced by ConnectionPropertiesDialog(), constructDialog(), getConnectionHolder(), getConnectionParameters(), and okButtonPressed().

QComboBox* ConnectionPropertiesDialog::connectionTypeCombo [private]
 

Definition at line 111 of file ConnectionPropertiesDialog.h.

Referenced by constructDialog(), fillConnectionTypeCombo_INTER(), fillConnectionTypeCombo_INTRA(), getConnectionHolder(), getConnectionParameters(), okButtonPressed(), paramSelectionChanged(), and paramValueChanged().

ConnectionParameterTable* ConnectionPropertiesDialog::connParamTable [private]
 

Definition at line 114 of file ConnectionPropertiesDialog.h.

Referenced by constructDialog(), fillConnectionTypeCombo_INTER(), fillConnectionTypeCombo_INTRA(), getParameterValue(), loadParameterTable(), okButtonPressed(), paramValueChanged(), and setParameterValue().

DBInterface* ConnectionPropertiesDialog::dbInterface [private]
 

References to database handling class.

Definition at line 78 of file ConnectionPropertiesDialog.h.

Referenced by checkConnection_INTER(), ConnectionPropertiesDialog(), constructDialog(), and loadLayerNames().

QIntValidator* ConnectionPropertiesDialog::delayValidator [private]
 

Validator to check integer input.

Definition at line 81 of file ConnectionPropertiesDialog.h.

Referenced by constructDialog().

bool ConnectionPropertiesDialog::editMode [private]
 

Records whether the from and to neuron groups and connection type has already been determined at the launch of the dialog.

Definition at line 91 of file ConnectionPropertiesDialog.h.

Referenced by ConnectionPropertiesDialog(), constructDialog(), getConnectionHolder(), getConnectionParameters(), loadLayerNames(), and okButtonPressed().

QComboBox* ConnectionPropertiesDialog::fromLayerCombo [private]
 

Definition at line 108 of file ConnectionPropertiesDialog.h.

Referenced by checkConnection_INTER(), constructDialog(), getConnectionHolder(), layerRadioStateChanged(), loadLayerNames(), and okButtonPressed().

QLabel* ConnectionPropertiesDialog::fromLayerLabel [private]
 

Definition at line 105 of file ConnectionPropertiesDialog.h.

Referenced by constructDialog(), and layerRadioStateChanged().

int ConnectionPropertiesDialog::fromNeurGrpID [private]
 

Used in edit mode to hold the from neuron group.

Definition at line 98 of file ConnectionPropertiesDialog.h.

Referenced by checkConnection_INTER(), ConnectionPropertiesDialog(), getConnectionHolder(), loadLayerNames(), and okButtonPressed().

QRadioButton* ConnectionPropertiesDialog::interRadioButt [private]
 

Definition at line 112 of file ConnectionPropertiesDialog.h.

Referenced by constructDialog(), layerRadioStateChanged(), and okButtonPressed().

QComboBox* ConnectionPropertiesDialog::intraLayerCombo [private]
 

Definition at line 107 of file ConnectionPropertiesDialog.h.

Referenced by constructDialog(), getConnectionHolder(), layerRadioStateChanged(), and loadLayerNames().

QLabel* ConnectionPropertiesDialog::intraLayerLabel [private]
 

Definition at line 104 of file ConnectionPropertiesDialog.h.

Referenced by constructDialog(), and layerRadioStateChanged().

QRadioButton* ConnectionPropertiesDialog::intraRadioButt [private]
 

Definition at line 113 of file ConnectionPropertiesDialog.h.

Referenced by constructDialog(), getConnectionHolder(), layerRadioStateChanged(), and okButtonPressed().

bool ConnectionPropertiesDialog::loadError [private]
 

Records whether there was an error loading the dialog.

Definition at line 123 of file ConnectionPropertiesDialog.h.

Referenced by ConnectionPropertiesDialog(), and okButtonPressed().

QLineEdit* ConnectionPropertiesDialog::maxDelayText [private]
 

Definition at line 116 of file ConnectionPropertiesDialog.h.

Referenced by constructDialog(), getConnectionHolder(), and okButtonPressed().

QLineEdit* ConnectionPropertiesDialog::minDelayText [private]
 

Definition at line 115 of file ConnectionPropertiesDialog.h.

Referenced by constructDialog(), getConnectionHolder(), and okButtonPressed().

bool ConnectionPropertiesDialog::parameterError [private]
 

Tracks whether an error in the parameters has taken place after the ok button has been pressed.

Definition at line 120 of file ConnectionPropertiesDialog.h.

Referenced by ConnectionPropertiesDialog(), okButtonPressed(), and paramValueChanged().

QDoubleValidator* ConnectionPropertiesDialog::paramValidator [private]
 

Validator to check double input.

Definition at line 84 of file ConnectionPropertiesDialog.h.

Referenced by constructDialog(), and paramValueChanged().

QComboBox* ConnectionPropertiesDialog::synapseTypeCombo [private]
 

Definition at line 110 of file ConnectionPropertiesDialog.h.

Referenced by constructDialog(), and getConnectionHolder().

map<int, unsigned short> ConnectionPropertiesDialog::synapseTypePositionMap [private]
 

Stores link between a combo position and a synapse type ID.

Definition at line 87 of file ConnectionPropertiesDialog.h.

Referenced by constructDialog(), and getConnectionHolder().

QComboBox* ConnectionPropertiesDialog::toLayerCombo [private]
 

Definition at line 109 of file ConnectionPropertiesDialog.h.

Referenced by checkConnection_INTER(), constructDialog(), getConnectionHolder(), layerRadioStateChanged(), loadLayerNames(), and okButtonPressed().

QLabel* ConnectionPropertiesDialog::toLayerLabel [private]
 

Definition at line 106 of file ConnectionPropertiesDialog.h.

Referenced by constructDialog(), and layerRadioStateChanged().

int ConnectionPropertiesDialog::toNeurGrpID [private]
 

Used in edit mode to hold the to neuron group.

Definition at line 101 of file ConnectionPropertiesDialog.h.

Referenced by checkConnection_INTER(), ConnectionPropertiesDialog(), getConnectionHolder(), loadLayerNames(), and okButtonPressed().


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