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

LayerWidget Class Reference

#include <LayerWidget.h>

List of all members.

Public Member Functions

 LayerWidget (QWidget *parent, DBInterface *netDBInter, DBInterface *devDBInter)
void reloadNeuronGroups ()
void setConnectionWidget (ConnectionWidget *)
void simulationDestroyed ()
void simulationInitialised ()
 ~LayerWidget ()

Private Slots

void deleteLayer ()
void editLayerProperties ()
void newLayer ()
void tableClicked (int, int, int, const QPoint &)
void tableHeaderClicked (int)

Private Member Functions

void addAllLayersToTable ()
void addLayerToTable (unsigned int)
void clearTable ()
string getNeuronTypeDescription (unsigned short)
 LayerWidget (const LayerWidget &)
LayerWidget operator= (const LayerWidget &)
void removeLayerFromTable (unsigned int)

Private Attributes

unsigned int activeRow
ConnectionWidgetconnectionWidget
QPushButton * deleteButt
DBInterface * deviceDBInterface
QPixmap * hidePixmap
LayerManagerlayerManager
QPopupMenu * layerPropertiesPopup
QTable * layerTable
DBInterface * networkDBInterface
QPushButton * newLayerButt
QPixmap * showPixmap
vector< unsigned int > viewVector
QPixmap * zoomAbovePixmapHighlight
int zoomClickCount
int zoomLayerRow
QPixmap * zoomToPixmap
QPixmap * zoomToPixmapHighlight


Detailed Description

Displays layers in a table and allows control over visibility and zooming. Initialises the creation, editing and deletion of layers.

Definition at line 47 of file LayerWidget.h.


Constructor & Destructor Documentation

LayerWidget::LayerWidget QWidget *  parent,
DBInterface *  netDBInter,
DBInterface *  devDBInter
 

Constructor.

Definition at line 49 of file LayerWidget.cpp.

References addAllLayersToTable(), deleteButt, deleteLayer(), deviceDBInterface, editLayerProperties(), hidePixmap, layerManager, layerPropertiesPopup, layerTable, networkDBInterface, newLayer(), newLayerButt, showPixmap, tableClicked(), tableHeaderClicked(), SpikeStreamMainWindow::workingDirectory, zoomAbovePixmapHighlight, zoomClickCount, zoomLayerRow, zoomToPixmap, and zoomToPixmapHighlight.

LayerWidget::~LayerWidget  ) 
 

Destructor.

Definition at line 139 of file LayerWidget.cpp.

References hidePixmap, layerManager, showPixmap, zoomAbovePixmapHighlight, zoomToPixmap, and zoomToPixmapHighlight.

LayerWidget::LayerWidget const LayerWidget  )  [private]
 

Declare copy constructor private so it cannot be used inadvertently.


Member Function Documentation

void LayerWidget::addAllLayersToTable  )  [private]
 

Works through all the layers and adds them to the table.

Definition at line 605 of file LayerWidget.cpp.

References addLayerToTable(), clearTable(), and networkDBInterface.

Referenced by LayerWidget(), and reloadNeuronGroups().

void LayerWidget::addLayerToTable unsigned int  neuronGrpID  )  [private]
 

Adds an individual layer to the table.

Definition at line 645 of file LayerWidget.cpp.

References getNeuronTypeDescription(), layerTable, networkDBInterface, showPixmap, viewVector, and zoomToPixmap.

Referenced by addAllLayersToTable(), editLayerProperties(), and newLayer().

void LayerWidget::clearTable  )  [private]
 

Clears the table and resets the appropriate variables.

Definition at line 719 of file LayerWidget.cpp.

References layerTable, viewVector, zoomClickCount, and zoomLayerRow.

Referenced by addAllLayersToTable().

void LayerWidget::deleteLayer  )  [private, slot]
 

Deletes a layer from the table and instructs connection manager to delete the layer from the database along with all associated connections.

Definition at line 191 of file LayerWidget.cpp.

References connectionWidget, ConnectionWidget::deleteLayerConnections(), LayerManager::deleteLayers(), NetworkViewer::deleteNeuronGroup(), SpikeStreamMainWindow::getNetworkViewer(), layerManager, layerTable, NetworkViewer::loadDefaultClippingVolume(), SpikeStreamMainWindow::reloadConnections(), SpikeStreamMainWindow::reloadNeuronGroups(), removeLayerFromTable(), NetworkViewer::resetView(), BusyDialog::showDialog(), SpikeStreamMainWindow::spikeStreamApplication, and SpikeStreamMainWindow::spikeStrMainWin.

Referenced by LayerWidget().

void LayerWidget::editLayerProperties  )  [private, slot]
 

Used to change the properties of a layer, except the width and length.

Definition at line 264 of file LayerWidget.cpp.

References activeRow, addLayerToTable(), connectionWidget, NetworkViewer::deleteNeuronGroup(), deviceDBInterface, ConnectionWidget::getConnectionViewVector(), SpikeStreamMainWindow::getNetworkViewer(), LayerPropertiesDialog::getNeuronGroup(), layerManager, layerTable, NeuronGroup::length, NetworkViewer::loadDefaultClippingVolume(), NetworkViewer::loadNeuronGroup(), NeuronGroup::name, networkDBInterface, NeuronGroup::neuronType, SpikeStreamMainWindow::reloadNeuronGroups(), removeLayerFromTable(), NetworkViewer::resetView(), NetworkViewer::setConnectionView(), NetworkViewer::setLayerView(), LayerManager::setNeuronGrpName(), LayerManager::setNeuronGrpSpacingPosition(), LayerManager::setNeuronGrpType(), NeuronGroup::spacing, SpikeStreamMainWindow::spikeStrMainWin, viewVector, NeuronGroup::width, NeuronGroup::xPos, NeuronGroup::yPos, and NeuronGroup::zPos.

Referenced by LayerWidget().

string LayerWidget::getNeuronTypeDescription unsigned short  neuronTypeID  )  [private]
 

Returns the description of a particular neuron type.

Definition at line 730 of file LayerWidget.cpp.

References networkDBInterface.

Referenced by addLayerToTable().

void LayerWidget::newLayer  )  [private, slot]
 

Creates a new layer.

Definition at line 414 of file LayerWidget.cpp.

References addLayerToTable(), LayerManager::createLayer(), deviceDBInterface, SpikeStreamMainWindow::getNetworkViewer(), LayerPropertiesDialog::getNeuronGroup(), layerManager, NetworkViewer::loadDefaultClippingVolume(), NetworkViewer::loadNeuronGroup(), networkDBInterface, SpikeStreamMainWindow::reloadNeuronGroups(), NetworkViewer::resetView(), and SpikeStreamMainWindow::spikeStrMainWin.

Referenced by LayerWidget().

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

Declare assignment private so it cannot be used inadvertently.

void LayerWidget::reloadNeuronGroups  ) 
 

Reloads neuron groups when database has changed.

Definition at line 158 of file LayerWidget.cpp.

References addAllLayersToTable().

Referenced by SpikeStreamMainWindow::reloadEverything().

void LayerWidget::removeLayerFromTable unsigned int  neuronGrpID  )  [private]
 

Removes the indicated neuronGrp from the table.

Definition at line 762 of file LayerWidget.cpp.

References layerTable, and viewVector.

Referenced by deleteLayer(), and editLayerProperties().

void LayerWidget::setConnectionWidget ConnectionWidget connWidg  ) 
 

Need communication between layer widget and connection widget to enable layer widget to delete connections to layers that are being deleted.

Definition at line 165 of file LayerWidget.cpp.

References connectionWidget, layerManager, and LayerManager::setConnectionWidget().

Referenced by SpikeStreamMainWindow::SpikeStreamMainWindow().

void LayerWidget::simulationDestroyed  ) 
 

Called when simulation is initialised to disable editing.

Definition at line 172 of file LayerWidget.cpp.

References deleteButt, and newLayerButt.

Referenced by SpikeStreamMainWindow::simulationDestroyed().

void LayerWidget::simulationInitialised  ) 
 

Called when simulation is destroyed to enable editing.

Definition at line 179 of file LayerWidget.cpp.

References deleteButt, and newLayerButt.

Referenced by SpikeStreamMainWindow::simulationInitialised().

void LayerWidget::tableClicked int  row,
int  col,
int  button,
const QPoint & 
[private, slot]
 

Displays the popup menu if the right mouse button has been clicked. Otherwise controls the zoom and viewing of the layer.

Definition at line 473 of file LayerWidget.cpp.

References activeRow, SpikeStreamMainWindow::getNetworkViewer(), hidePixmap, layerPropertiesPopup, layerTable, NetworkViewer::setLayerView(), showPixmap, SpikeStreamMainWindow::spikeStrMainWin, viewVector, NetworkViewer::zoomAboveLayer(), zoomAbovePixmapHighlight, zoomClickCount, zoomLayerRow, NetworkViewer::zoomToLayer(), zoomToPixmap, and zoomToPixmapHighlight.

Referenced by LayerWidget().

void LayerWidget::tableHeaderClicked int  colNumber  )  [private, slot]
 

Used to select all layers or deselect all layers for deletion or zooming.

Definition at line 552 of file LayerWidget.cpp.

References SpikeStreamMainWindow::getNetworkViewer(), hidePixmap, layerTable, NetworkViewer::setLayerView(), showPixmap, SpikeStreamMainWindow::spikeStrMainWin, and viewVector.

Referenced by LayerWidget().


Member Data Documentation

unsigned int LayerWidget::activeRow [private]
 

Definition at line 82 of file LayerWidget.h.

Referenced by editLayerProperties(), and tableClicked().

ConnectionWidget* LayerWidget::connectionWidget [private]
 

Definition at line 74 of file LayerWidget.h.

Referenced by deleteLayer(), editLayerProperties(), and setConnectionWidget().

QPushButton* LayerWidget::deleteButt [private]
 

Definition at line 86 of file LayerWidget.h.

Referenced by LayerWidget(), simulationDestroyed(), and simulationInitialised().

DBInterface* LayerWidget::deviceDBInterface [private]
 

Definition at line 71 of file LayerWidget.h.

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

QPixmap* LayerWidget::hidePixmap [private]
 

Definition at line 90 of file LayerWidget.h.

Referenced by LayerWidget(), tableClicked(), tableHeaderClicked(), and ~LayerWidget().

LayerManager* LayerWidget::layerManager [private]
 

Definition at line 75 of file LayerWidget.h.

Referenced by deleteLayer(), editLayerProperties(), LayerWidget(), newLayer(), setConnectionWidget(), and ~LayerWidget().

QPopupMenu* LayerWidget::layerPropertiesPopup [private]
 

Definition at line 81 of file LayerWidget.h.

Referenced by LayerWidget(), and tableClicked().

QTable* LayerWidget::layerTable [private]
 

Table holding all the information about the layers.

Definition at line 78 of file LayerWidget.h.

Referenced by addLayerToTable(), clearTable(), deleteLayer(), editLayerProperties(), LayerWidget(), removeLayerFromTable(), tableClicked(), and tableHeaderClicked().

DBInterface* LayerWidget::networkDBInterface [private]
 

Definition at line 70 of file LayerWidget.h.

Referenced by addAllLayersToTable(), addLayerToTable(), editLayerProperties(), getNeuronTypeDescription(), LayerWidget(), and newLayer().

QPushButton* LayerWidget::newLayerButt [private]
 

Definition at line 85 of file LayerWidget.h.

Referenced by LayerWidget(), simulationDestroyed(), and simulationInitialised().

QPixmap* LayerWidget::showPixmap [private]
 

Definition at line 89 of file LayerWidget.h.

Referenced by addLayerToTable(), LayerWidget(), tableClicked(), tableHeaderClicked(), and ~LayerWidget().

vector<unsigned int> LayerWidget::viewVector [private]
 

Contains the layer IDs of the visible layers. Should match the list of layer IDs in the network viewer.

Definition at line 97 of file LayerWidget.h.

Referenced by addLayerToTable(), clearTable(), editLayerProperties(), removeLayerFromTable(), tableClicked(), and tableHeaderClicked().

QPixmap* LayerWidget::zoomAbovePixmapHighlight [private]
 

Definition at line 93 of file LayerWidget.h.

Referenced by LayerWidget(), tableClicked(), and ~LayerWidget().

int LayerWidget::zoomClickCount [private]
 

Records how many clicks on a layer.

Definition at line 104 of file LayerWidget.h.

Referenced by clearTable(), LayerWidget(), and tableClicked().

int LayerWidget::zoomLayerRow [private]
 

Records which layer is highlighted.

Definition at line 101 of file LayerWidget.h.

Referenced by clearTable(), LayerWidget(), and tableClicked().

QPixmap* LayerWidget::zoomToPixmap [private]
 

Definition at line 91 of file LayerWidget.h.

Referenced by addLayerToTable(), LayerWidget(), tableClicked(), and ~LayerWidget().

QPixmap* LayerWidget::zoomToPixmapHighlight [private]
 

Definition at line 92 of file LayerWidget.h.

Referenced by LayerWidget(), tableClicked(), and ~LayerWidget().


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