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

EditSynapseParametersDialog.h

Go to the documentation of this file.
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 #ifndef EDITSYNAPSEPARAMETERSDIALOG_H
00024 #define EDITSYNAPSEPARAMETERSDIALOG_H
00025 
00026 //SpikeStream includes
00027 #include "GlobalVariables.h"
00028 
00029 //Qt includes
00030 #include <qdialog.h>
00031 #include <qlayout.h>
00032 #include <qstringlist.h>
00033 #include <qlineedit.h>
00034 #include <qvalidator.h>
00035 
00036 //Other includes
00037 #include <map>
00038 using namespace std;
00039 
00040 
00041 //---------------------- Edit Synapse Parameters Dialog -------------------
00042 /*! Displays the synapse parameters for connection group so they can be 
00043         edited.*/
00044 //---------------------------------------------------------------------------*/
00045 
00046 class EditSynapseParametersDialog : public QDialog {
00047         Q_OBJECT
00048         
00049         public:
00050                 EditSynapseParametersDialog(QWidget *parent, map<const char*, double, charKeyCompare> descValueMap, map<const char*, double, charKeyCompare> *defaultValueMap, unsigned int neuronGrpID);
00051                 ~EditSynapseParametersDialog();
00052                 map<const char*, QLineEdit*, charKeyCompare>* getDescriptionLineEditMap();
00053 
00054         
00055         private slots:
00056                 void cancelButtonPressed();
00057                 void loadDefaultsButtonPressed();
00058                 void makeDefaultsButtonPressed();
00059                 void okButtonPressed();
00060 
00061 
00062         private:
00063                 //============================ VARIABLES ================================
00064                 /*! Validator for the synapse parameters.*/
00065                 QDoubleValidator *paramValidator;
00066 
00067                 /*! Map containing the line edits. Used when storing the parameters.*/
00068                 map<const char*, QLineEdit*, charKeyCompare> descriptionLineEditMap;
00069                 
00070                 /*! Pointer to the map holding the default values in the 
00071                         SynapseParametersDialog.*/
00072                 map<const char*, double, charKeyCompare> *defaultValueMap;
00073 
00074                 /*! Store list of field names so they are not deleted.*/
00075                 QStringList fieldNameStubList;
00076 
00077 
00078                 //============================ METHODS ==================================
00079                 /*! Declare copy constructor private so it cannot be used inadvertently.*/
00080                 EditSynapseParametersDialog (const EditSynapseParametersDialog&);
00081 
00082                 /*! Declare assignment private so it cannot be used inadvertently.*/
00083                 EditSynapseParametersDialog operator = (const EditSynapseParametersDialog&);
00084 
00085                 void addSynapseParameter(QString labelText, QLineEdit *lineEdit, QVBoxLayout *vBox);
00086 
00087 };
00088 
00089 
00090 #endif //EDITSYNAPSEPARAMETERSDIALOG_H
00091 

Generated on Mon Sep 3 22:29:04 2007 for SpikeStream Application by  doxygen 1.4.4