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

LayerPropertiesDialog Class Reference

#include <LayerPropertiesDialog.h>

List of all members.

Public Member Functions

NeuronGroup getNeuronGroup ()
 LayerPropertiesDialog (QWidget *parent, const char *name, bool editMode, NeuronGroup &, DBInterface *netDBInter, DBInterface *devDBInter)
 ~LayerPropertiesDialog ()

Private Slots

void componentComboChanged (int comboIndex)
void inputLayerComboChanged (int)
void neuronGrpTypeChanged (int currentSelection)
void okButtonPressed ()

Private Member Functions

void fillNeurGrpTypeCombo ()
 LayerPropertiesDialog (const LayerPropertiesDialog &)
void loadInputLayers ()
LayerPropertiesDialog operator= (const LayerPropertiesDialog &)

Private Attributes

QComboBox * componentCombo
QLabel * componentLabel
map< unsigned int, unsigned
int > 
componentLengthMap
map< unsigned int, unsigned
int > 
componentWidthMap
DBInterface * deviceDBInterface
bool editMode
QComboBox * inputLayerCombo
QLabel * inputLayerLabel
QLineEdit * lengthText
QLineEdit * nameText
DBInterface * networkDBInterface
QComboBox * neurGrpTypeCombo
QLabel * neuronSpacingLabel
QLineEdit * neuronSpacingText
QComboBox * neuronTypeCombo
map< int, unsigned short > neuronTypePositionMap
bool noComponents
bool noInputLayers
int unknownNeuronTypeIndex
QLineEdit * widthText
QLineEdit * xPosText
QLineEdit * yPosText
QLineEdit * zPosText


Detailed Description

In non-editing mode this gathers information about the layer to be created. In editing mode it displays information about a layer so that it can be changed. This dialog is also used to create layers for SIMNOS components that are designed to connect to an input or output layer of sensors.

Definition at line 48 of file LayerPropertiesDialog.h.


Constructor & Destructor Documentation

LayerPropertiesDialog::LayerPropertiesDialog QWidget *  parent,
const char *  name,
bool  edMode,
NeuronGroup neuronGrp,
DBInterface *  netDBInter,
DBInterface *  devDBInter
 

Constructor.

Definition at line 51 of file LayerPropertiesDialog.cpp.

References componentCombo, componentLabel, DEFAULT_NEURON_SPACING, deviceDBInterface, editMode, fillNeurGrpTypeCombo(), inputLayerCombo, inputLayerComboChanged(), inputLayerLabel, NeuronGroup::length, lengthText, loadInputLayers(), NeuronGroup::name, nameText, networkDBInterface, neurGrpTypeCombo, neuronGrpTypeChanged(), neuronSpacingLabel, neuronSpacingText, NeuronGroup::neuronType, neuronTypeCombo, neuronTypePositionMap, okButtonPressed(), NeuronGroup::spacing, unknownNeuronTypeIndex, NeuronGroup::width, widthText, NeuronGroup::xPos, xPosText, NeuronGroup::yPos, yPosText, NeuronGroup::zPos, and zPosText.

LayerPropertiesDialog::~LayerPropertiesDialog  ) 
 

Destructor. Qt widgets should be deleted automatically since they are all created with a reference to this.

Definition at line 294 of file LayerPropertiesDialog.cpp.

LayerPropertiesDialog::LayerPropertiesDialog const LayerPropertiesDialog  )  [private]
 

Declare copy constructor private so it cannot be used inadvertently.


Member Function Documentation

void LayerPropertiesDialog::componentComboChanged int  comboIndex  )  [private, slot]
 

Called when the component combo selection is changed.

Definition at line 352 of file LayerPropertiesDialog.cpp.

References componentLengthMap, componentWidthMap, lengthText, neurGrpTypeCombo, noComponents, and widthText.

Referenced by inputLayerComboChanged().

void LayerPropertiesDialog::fillNeurGrpTypeCombo  )  [private]
 

Loads up all the available neuron types from the neuron type database.

Definition at line 607 of file LayerPropertiesDialog.cpp.

References neurGrpTypeCombo.

Referenced by LayerPropertiesDialog().

NeuronGroup LayerPropertiesDialog::getNeuronGroup  ) 
 

Returns the structure NeuronGrpHolder containing all the information about the layer.

Definition at line 306 of file LayerPropertiesDialog.cpp.

References componentCombo, NeuronGroup::componentID, NeuronGroup::deviceNeuronGrpID, editMode, inputLayerCombo, NeuronGroup::length, lengthText, NeuronGroup::name, nameText, neurGrpTypeCombo, NeuronGroup::neuronGrpType, neuronSpacingText, NeuronGroup::neuronType, neuronTypeCombo, neuronTypePositionMap, NeuronGroup::spacing, NeuronGroup::width, widthText, NeuronGroup::xPos, xPosText, NeuronGroup::yPos, yPosText, NeuronGroup::zPos, and zPosText.

Referenced by LayerWidget::editLayerProperties(), and LayerWidget::newLayer().

void LayerPropertiesDialog::inputLayerComboChanged int   )  [private, slot]
 

Called when the input layer combo is changed. This method sets the available SIMNOS components.

Definition at line 366 of file LayerPropertiesDialog.cpp.

References componentCombo, componentComboChanged(), componentLengthMap, componentWidthMap, deviceDBInterface, inputLayerCombo, lengthText, networkDBInterface, noComponents, noInputLayers, and widthText.

Referenced by LayerPropertiesDialog(), loadInputLayers(), and neuronGrpTypeChanged().

void LayerPropertiesDialog::loadInputLayers  )  [private]
 

Loads up a list of all the available input layers. These must match the width and length of at least one device.

Definition at line 618 of file LayerPropertiesDialog.cpp.

References deviceDBInterface, inputLayerCombo, inputLayerComboChanged(), networkDBInterface, and noInputLayers.

Referenced by LayerPropertiesDialog().

void LayerPropertiesDialog::neuronGrpTypeChanged int  currentSelection  )  [private, slot]
 

Called when the neuron group type is changed and hides and shows appropriate widgets.

Definition at line 486 of file LayerPropertiesDialog.cpp.

References componentCombo, componentLabel, inputLayerCombo, inputLayerComboChanged(), inputLayerLabel, lengthText, neurGrpTypeCombo, neuronSpacingLabel, neuronSpacingText, and widthText.

Referenced by LayerPropertiesDialog().

void LayerPropertiesDialog::okButtonPressed  )  [private, slot]
 

This method validates the input from the fields. If everything is ok, accept() is called. Otherwise an alert is shown about the missing fields.

Definition at line 534 of file LayerPropertiesDialog.cpp.

References DEFAULT_NEURON_SPACING, editMode, lengthText, nameText, neurGrpTypeCombo, neuronSpacingText, neuronTypeCombo, noComponents, noInputLayers, unknownNeuronTypeIndex, widthText, xPosText, yPosText, and zPosText.

Referenced by LayerPropertiesDialog().

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

Declare assignment private so it cannot be used inadvertently.


Member Data Documentation

QComboBox* LayerPropertiesDialog::componentCombo [private]
 

Definition at line 88 of file LayerPropertiesDialog.h.

Referenced by getNeuronGroup(), inputLayerComboChanged(), LayerPropertiesDialog(), and neuronGrpTypeChanged().

QLabel* LayerPropertiesDialog::componentLabel [private]
 

Definition at line 91 of file LayerPropertiesDialog.h.

Referenced by LayerPropertiesDialog(), and neuronGrpTypeChanged().

map<unsigned int, unsigned int> LayerPropertiesDialog::componentLengthMap [private]
 

Map holding the lengths of SIMNOS components.

Definition at line 97 of file LayerPropertiesDialog.h.

Referenced by componentComboChanged(), and inputLayerComboChanged().

map<unsigned int, unsigned int> LayerPropertiesDialog::componentWidthMap [private]
 

Map holding the widths of SIMNOS components.

Definition at line 94 of file LayerPropertiesDialog.h.

Referenced by componentComboChanged(), and inputLayerComboChanged().

DBInterface* LayerPropertiesDialog::deviceDBInterface [private]
 

Definition at line 72 of file LayerPropertiesDialog.h.

Referenced by inputLayerComboChanged(), LayerPropertiesDialog(), and loadInputLayers().

bool LayerPropertiesDialog::editMode [private]
 

Controls whether data from an existing layer is displayed or layer data is gathered from scratch.

Definition at line 68 of file LayerPropertiesDialog.h.

Referenced by getNeuronGroup(), LayerPropertiesDialog(), and okButtonPressed().

QComboBox* LayerPropertiesDialog::inputLayerCombo [private]
 

Definition at line 89 of file LayerPropertiesDialog.h.

Referenced by getNeuronGroup(), inputLayerComboChanged(), LayerPropertiesDialog(), loadInputLayers(), and neuronGrpTypeChanged().

QLabel* LayerPropertiesDialog::inputLayerLabel [private]
 

Definition at line 90 of file LayerPropertiesDialog.h.

Referenced by LayerPropertiesDialog(), and neuronGrpTypeChanged().

QLineEdit* LayerPropertiesDialog::lengthText [private]
 

Definition at line 81 of file LayerPropertiesDialog.h.

Referenced by componentComboChanged(), getNeuronGroup(), inputLayerComboChanged(), LayerPropertiesDialog(), neuronGrpTypeChanged(), and okButtonPressed().

QLineEdit* LayerPropertiesDialog::nameText [private]
 

Definition at line 78 of file LayerPropertiesDialog.h.

Referenced by getNeuronGroup(), LayerPropertiesDialog(), and okButtonPressed().

DBInterface* LayerPropertiesDialog::networkDBInterface [private]
 

Definition at line 71 of file LayerPropertiesDialog.h.

Referenced by inputLayerComboChanged(), LayerPropertiesDialog(), and loadInputLayers().

QComboBox* LayerPropertiesDialog::neurGrpTypeCombo [private]
 

Definition at line 79 of file LayerPropertiesDialog.h.

Referenced by componentComboChanged(), fillNeurGrpTypeCombo(), getNeuronGroup(), LayerPropertiesDialog(), neuronGrpTypeChanged(), and okButtonPressed().

QLabel* LayerPropertiesDialog::neuronSpacingLabel [private]
 

Definition at line 84 of file LayerPropertiesDialog.h.

Referenced by LayerPropertiesDialog(), and neuronGrpTypeChanged().

QLineEdit* LayerPropertiesDialog::neuronSpacingText [private]
 

Definition at line 83 of file LayerPropertiesDialog.h.

Referenced by getNeuronGroup(), LayerPropertiesDialog(), neuronGrpTypeChanged(), and okButtonPressed().

QComboBox* LayerPropertiesDialog::neuronTypeCombo [private]
 

Definition at line 80 of file LayerPropertiesDialog.h.

Referenced by getNeuronGroup(), LayerPropertiesDialog(), and okButtonPressed().

map<int, unsigned short> LayerPropertiesDialog::neuronTypePositionMap [private]
 

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

Definition at line 75 of file LayerPropertiesDialog.h.

Referenced by getNeuronGroup(), and LayerPropertiesDialog().

bool LayerPropertiesDialog::noComponents [private]
 

Tracks whether there are any available components.

Definition at line 104 of file LayerPropertiesDialog.h.

Referenced by componentComboChanged(), inputLayerComboChanged(), and okButtonPressed().

bool LayerPropertiesDialog::noInputLayers [private]
 

Tracks when inputLayerCombo does not have any valid input layers (only text).

Definition at line 101 of file LayerPropertiesDialog.h.

Referenced by inputLayerComboChanged(), loadInputLayers(), and okButtonPressed().

int LayerPropertiesDialog::unknownNeuronTypeIndex [private]
 

When neuron type cannot be recognized for an existing layer store index of it here.

Definition at line 108 of file LayerPropertiesDialog.h.

Referenced by LayerPropertiesDialog(), and okButtonPressed().

QLineEdit* LayerPropertiesDialog::widthText [private]
 

Definition at line 82 of file LayerPropertiesDialog.h.

Referenced by componentComboChanged(), getNeuronGroup(), inputLayerComboChanged(), LayerPropertiesDialog(), neuronGrpTypeChanged(), and okButtonPressed().

QLineEdit* LayerPropertiesDialog::xPosText [private]
 

Definition at line 85 of file LayerPropertiesDialog.h.

Referenced by getNeuronGroup(), LayerPropertiesDialog(), and okButtonPressed().

QLineEdit* LayerPropertiesDialog::yPosText [private]
 

Definition at line 86 of file LayerPropertiesDialog.h.

Referenced by getNeuronGroup(), LayerPropertiesDialog(), and okButtonPressed().

QLineEdit* LayerPropertiesDialog::zPosText [private]
 

Definition at line 87 of file LayerPropertiesDialog.h.

Referenced by getNeuronGroup(), LayerPropertiesDialog(), 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