00001 /*************************************************************************** 00002 * SpikeStream Application * 00003 * Copyright (C) 2007 by David Gamez * 00004 * david@davidgamez.eu * 00005 * Version 0.1 * 00006 * * 00007 * This program is free software; you can redistribute it and/or modify * 00008 * it under the terms of the GNU General Public License as published by * 00009 * the Free Software Foundation; either version 2 of the License, or * 00010 * (at your option) any later version. * 00011 * * 00012 * This program is distributed in the hope that it will be useful, * 00013 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 00014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 00015 * GNU General Public License for more details. * 00016 * * 00017 * You should have received a copy of the GNU General Public License * 00018 * along with this program; if not, write to the * 00019 * Free Software Foundation, Inc., * 00020 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * 00021 ***************************************************************************/ 00022 00023 //SpikeStream includes 00024 #include "ParameterTable.h" 00025 #include "Debug.h" 00026 00027 //Other includes 00028 #include <iostream> 00029 using namespace std; 00030 00031 00032 /*! Constructor. */ 00033 ParameterTable::ParameterTable(QWidget* parent, unsigned short tID, string paramTableName) : QTable(parent) { 00034 //Store information about this neuron or synapse type 00035 typeID = tID; 00036 parameterTableName = paramTableName; 00037 00038 //Connect signals to slots 00039 connect (this, SIGNAL(clicked(int, int, int, const QPoint &)), this, SLOT(tableClicked(int, int, int, const QPoint &))); 00040 connect (this, SIGNAL(valueChanged(int, int)), this, SLOT(tableValueChanged(int, int))); 00041 } 00042 00043 00044 /*! Destructor. */ 00045 ParameterTable::~ParameterTable(){ 00046 #ifdef MEMORY_DEBUG 00047 cout<<"DELETING PARAMETER TABLE"<<endl; 00048 #endif//MEMORY_DEBUG 00049 } 00050 00051 00052 //------------------------------------------------------------------------ 00053 //-------------------------- PUBLIC METHODS ------------------------------ 00054 //------------------------------------------------------------------------ 00055 00056 /*! Returns the name of the database table that contains the parameters for this 00057 neuron or synapse type. */ 00058 string ParameterTable::getParameterTableName(){ 00059 return parameterTableName; 00060 } 00061 00062 00063 //------------------------------------------------------------------------ 00064 //------------------------------ SIGNALS --------------------------------- 00065 //------------------------------------------------------------------------ 00066 00067 /*! Emits a signals containing the id of the neuron or synapse type. */ 00068 void ParameterTable::tableClicked(int row, int col, int, const QPoint &){ 00069 emit parameterTableClicked(row, col, typeID); 00070 } 00071 00072 00073 /*! Emits a signal containing the id of the neuron or synapse type. */ 00074 void ParameterTable::tableValueChanged(int row, int col){ 00075 emit parameterTableValueChanged(row, col, typeID); 00076 } 00077 00078 00079
1.4.4