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

ConnectionWidget Class Reference

#include <ConnectionWidget.h>

List of all members.

Public Member Functions

 ConnectionWidget (QWidget *parent, DBInterface *netDBInter, DBInterface *devDBInter)
void createConnections (unsigned int fromNeurGrpID, unsigned int toNeurGrpID, unsigned int componentID, bool deviceIsFrom)
void deleteLayerConnections (unsigned int)
vector< unsigned int > getConnectionViewVector ()
void reloadConnections ()
void simulationDestroyed ()
void simulationInitialised ()
 ~ConnectionWidget ()

Private Slots

void deleteConnections ()
void newConnectionsButtonPressed ()
void tableClicked (int, int, int, const QPoint &)
void tableHeaderClicked (int)

Private Member Functions

 ConnectionWidget (const ConnectionWidget &)
string getSynapseTypeDescription (unsigned short synapseTypeID)
void loadAllConnections ()
void loadConnection (unsigned int)
ConnectionWidget operator= (const ConnectionWidget &)
void removeConnectionFromTable (unsigned int)

Private Attributes

BusyDialogbusyDialog
ConnectionManagerconnectionManager
int connGrpIDColumn
QTable * connTable
QPushButton * deleteConnButt
DBInterface * deviceDBInterface
QPixmap * hidePixmap
DBInterface * networkDBInterface
QPushButton * newConnButt
int paramCol
QPixmap * paramPixmap
QPixmap * showPixmap
vector< unsigned int > viewVector


Detailed Description

Displays table with details of all connection groups with controls for creating new connections, deleting connections and viewing connection groups. Interfaces with the connection manager, which does the actual adding and deleting from the database.

Definition at line 47 of file ConnectionWidget.h.


Constructor & Destructor Documentation

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

Constructor.

Definition at line 50 of file ConnectionWidget.cpp.

References busyDialog, connectionManager, connGrpIDColumn, connTable, deleteConnButt, deleteConnections(), deviceDBInterface, hidePixmap, loadAllConnections(), networkDBInterface, newConnButt, newConnectionsButtonPressed(), paramCol, paramPixmap, showPixmap, SpikeStreamMainWindow::spikeStrMainWin, tableClicked(), tableHeaderClicked(), and SpikeStreamMainWindow::workingDirectory.

ConnectionWidget::~ConnectionWidget  ) 
 

Destructor.

Definition at line 130 of file ConnectionWidget.cpp.

References connectionManager, hidePixmap, and showPixmap.

ConnectionWidget::ConnectionWidget const ConnectionWidget  )  [private]
 

Declare copy constructor private so it cannot be used inadvertently.


Member Function Documentation

void ConnectionWidget::createConnections unsigned int  fromNeurGrpID,
unsigned int  toNeurGrpID,
unsigned int  componentID,
bool  deviceIsFrom
 

Creates connections. This method can be called from outside or internally when the new connections button is pressed.

Definition at line 146 of file ConnectionWidget.cpp.

References ConnectionHolder::componentID, connectionManager, ConnectionManager::createConnections(), ConnectionHolder::deviceIsFrom, ConnectionHolder::fromLayerID, ConnectionPropertiesDialog::getConnectionHolder(), SpikeStreamMainWindow::getNetworkViewer(), loadConnection(), NetworkViewer::loadConnectionGroup(), NetworkViewer::loadNeuronGroup(), networkDBInterface, SpikeStreamMainWindow::reloadConnections(), SpikeStreamMainWindow::spikeStrMainWin, and ConnectionHolder::toLayerID.

Referenced by LayerManager::createSIMNOSComponentLayer(), and newConnectionsButtonPressed().

void ConnectionWidget::deleteConnections  )  [private, slot]
 

Deletes all selected connections Shows message box to confirm delete.

Definition at line 313 of file ConnectionWidget.cpp.

References busyDialog, ConnectionHolder::connectionGrpID, connectionManager, ConnectionHolder::connectionType, connGrpIDColumn, connTable, NetworkViewer::deleteConnectionGroup(), ConnectionManager::deleteConnections(), ConnectionHolder::fromLayerID, SpikeStreamMainWindow::getNetworkViewer(), SpikeStreamMainWindow::reloadConnections(), removeConnectionFromTable(), BusyDialog::showDialog(), SpikeStreamMainWindow::spikeStreamApplication, SpikeStreamMainWindow::spikeStrMainWin, and ConnectionHolder::toLayerID.

Referenced by ConnectionWidget().

void ConnectionWidget::deleteLayerConnections unsigned int  layerID  ) 
 

Deletes all connections to and from layer This method is usually called by the layerWidget when deleting a layer so that all the connections to the layer can be deleted.

Definition at line 225 of file ConnectionWidget.cpp.

References NetworkViewer::deleteConnectionGroup(), SpikeStreamMainWindow::getNetworkViewer(), networkDBInterface, removeConnectionFromTable(), and SpikeStreamMainWindow::spikeStrMainWin.

Referenced by LayerWidget::deleteLayer().

vector< unsigned int > ConnectionWidget::getConnectionViewVector  ) 
 

Returns the vector containing a list of visible connection group IDs.

Definition at line 282 of file ConnectionWidget.cpp.

References viewVector.

Referenced by LayerWidget::editLayerProperties().

string ConnectionWidget::getSynapseTypeDescription unsigned short  synapseTypeID  )  [private]
 

Gets the description of a particular synapse type from the synapse types database.

Definition at line 511 of file ConnectionWidget.cpp.

References networkDBInterface.

Referenced by loadConnection().

void ConnectionWidget::loadAllConnections  )  [private]
 

Loads all of the connection groups in the database into the table.

Definition at line 543 of file ConnectionWidget.cpp.

References connTable, loadConnection(), networkDBInterface, and viewVector.

Referenced by ConnectionWidget(), and reloadConnections().

void ConnectionWidget::loadConnection unsigned int  connectionGroupID  )  [private]
 

Loads a single connection group from the database Default is that connections are hidden by default so do not add to viewVector and use hide icon. Will not load temporary virtual connections.

Definition at line 583 of file ConnectionWidget.cpp.

References connGrpIDColumn, connTable, getSynapseTypeDescription(), hidePixmap, networkDBInterface, paramCol, and paramPixmap.

Referenced by createConnections(), and loadAllConnections().

void ConnectionWidget::newConnectionsButtonPressed  )  [private, slot]
 

Creates new connections using the connection properties dialog.

Definition at line 393 of file ConnectionWidget.cpp.

References createConnections().

Referenced by ConnectionWidget().

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

Declare assignment private so it cannot be used inadvertently.

void ConnectionWidget::reloadConnections  ) 
 

Reloads connections when changes have been made to them or to the neuron groups.

Definition at line 288 of file ConnectionWidget.cpp.

References loadAllConnections().

Referenced by SpikeStreamMainWindow::reloadEverything(), and SpikeStreamMainWindow::reloadNeuronGroups().

void ConnectionWidget::removeConnectionFromTable unsigned int  connectionGrpID  )  [private]
 

Removes the indicated connection group from the table.

Definition at line 646 of file ConnectionWidget.cpp.

References connGrpIDColumn, connTable, and viewVector.

Referenced by deleteConnections(), and deleteLayerConnections().

void ConnectionWidget::simulationDestroyed  ) 
 

Enables editing after simulation has been destroyed.

Definition at line 294 of file ConnectionWidget.cpp.

References deleteConnButt, and newConnButt.

Referenced by SpikeStreamMainWindow::simulationDestroyed().

void ConnectionWidget::simulationInitialised  ) 
 

Disables editing when simulation is initialised.

Definition at line 301 of file ConnectionWidget.cpp.

References deleteConnButt, and newConnButt.

Referenced by SpikeStreamMainWindow::simulationInitialised().

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

Adjusts the 3D view by making connection groups visible or invisible.

Definition at line 399 of file ConnectionWidget.cpp.

References connGrpIDColumn, connTable, SpikeStreamMainWindow::getNetworkViewer(), hidePixmap, ConnectionParameterViewer::loadError(), networkDBInterface, paramCol, NetworkViewer::setConnectionView(), showPixmap, SpikeStreamMainWindow::spikeStrMainWin, and viewVector.

Referenced by ConnectionWidget().

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

Makes all connection groups visible / invisible or selects/deselects all layers.

Definition at line 458 of file ConnectionWidget.cpp.

References connGrpIDColumn, connTable, SpikeStreamMainWindow::getNetworkViewer(), hidePixmap, NetworkViewer::setConnectionView(), showPixmap, SpikeStreamMainWindow::spikeStrMainWin, and viewVector.

Referenced by ConnectionWidget().


Member Data Documentation

BusyDialog* ConnectionWidget::busyDialog [private]
 

Dialog to inform user that a long operation is taking place.

Definition at line 99 of file ConnectionWidget.h.

Referenced by ConnectionWidget(), and deleteConnections().

ConnectionManager* ConnectionWidget::connectionManager [private]
 

References to class responsible for creating and deleting connections.

Definition at line 77 of file ConnectionWidget.h.

Referenced by ConnectionWidget(), createConnections(), deleteConnections(), and ~ConnectionWidget().

int ConnectionWidget::connGrpIDColumn [private]
 

Definition at line 88 of file ConnectionWidget.h.

Referenced by ConnectionWidget(), deleteConnections(), loadConnection(), removeConnectionFromTable(), tableClicked(), and tableHeaderClicked().

QTable* ConnectionWidget::connTable [private]
 

Definition at line 80 of file ConnectionWidget.h.

Referenced by ConnectionWidget(), deleteConnections(), loadAllConnections(), loadConnection(), removeConnectionFromTable(), tableClicked(), and tableHeaderClicked().

QPushButton* ConnectionWidget::deleteConnButt [private]
 

Definition at line 93 of file ConnectionWidget.h.

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

DBInterface* ConnectionWidget::deviceDBInterface [private]
 

Reference to class handling device database.

Definition at line 74 of file ConnectionWidget.h.

Referenced by ConnectionWidget().

QPixmap* ConnectionWidget::hidePixmap [private]
 

Definition at line 84 of file ConnectionWidget.h.

Referenced by ConnectionWidget(), loadConnection(), tableClicked(), tableHeaderClicked(), and ~ConnectionWidget().

DBInterface* ConnectionWidget::networkDBInterface [private]
 

Reference to class handling network database.

Definition at line 71 of file ConnectionWidget.h.

Referenced by ConnectionWidget(), createConnections(), deleteLayerConnections(), getSynapseTypeDescription(), loadAllConnections(), loadConnection(), and tableClicked().

QPushButton* ConnectionWidget::newConnButt [private]
 

Definition at line 92 of file ConnectionWidget.h.

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

int ConnectionWidget::paramCol [private]
 

Definition at line 89 of file ConnectionWidget.h.

Referenced by ConnectionWidget(), loadConnection(), and tableClicked().

QPixmap* ConnectionWidget::paramPixmap [private]
 

Definition at line 85 of file ConnectionWidget.h.

Referenced by ConnectionWidget(), and loadConnection().

QPixmap* ConnectionWidget::showPixmap [private]
 

Definition at line 83 of file ConnectionWidget.h.

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

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

Vector contains connection group IDS of the visible layers.

Definition at line 96 of file ConnectionWidget.h.

Referenced by getConnectionViewVector(), loadAllConnections(), removeConnectionFromTable(), tableClicked(), and tableHeaderClicked().


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