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

EditNeuronParametersDialog.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 EDITNEURONPARAMETERSDIALOG_H
00024 #define EDITNEURONPARAMETERSDIALOG_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 Neuron Parameters Dialog --------------------
00042 /*! Displays the neuron parameters for a layer so that they can be 
00043         edited.*/
00044 //-------------------------------------------------------------------------
00045 
00046 class EditNeuronParametersDialog : public QDialog {
00047         Q_OBJECT
00048 
00049         public:
00050                 EditNeuronParametersDialog(QWidget *parent, map<const char*, double, charKeyCompare> descValueMap, map<const char*, double, charKeyCompare> *defaultValueMap, unsigned int neuronGrpID);
00051                 ~EditNeuronParametersDialog();
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 parameters.*/
00065                 QDoubleValidator *paramValidator;
00066 
00067                 /*! Map holding all of the QLineEdits in the class. Used to access their
00068                         values when ok is pressed.*/
00069                 map<const char*, QLineEdit*, charKeyCompare> descriptionLineEditMap;
00070                 
00071                 /*! Pointer to the map holding the default values in the 
00072                         NeuronParametersDialog.*/
00073                 map<const char*, double, charKeyCompare> *defaultValueMap;
00074 
00075                 /*! Store list of field names so they are not deleted.*/
00076                 QStringList fieldNameStubList;
00077 
00078 
00079                 //=========================== METHODS ===============================
00080                 /*! Declare copy constructor private so it cannot be used inadvertently.*/
00081                 EditNeuronParametersDialog (const EditNeuronParametersDialog&);
00082 
00083                 /*! Declare assignment private so it cannot be used inadvertently.*/
00084                 EditNeuronParametersDialog operator = (const EditNeuronParametersDialog&);
00085 
00086                 void addNeuronParameter(QString labelText, QLineEdit *lineEdit, QVBoxLayout *vBox);
00087 
00088 };
00089 
00090 
00091 #endif //EDITNEURONPARAMETERSDIALOG_H
00092 

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