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

NoiseParametersDialog.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 NOISEPARAMETERSDIALOG_H
00024 #define NOISEPARAMETERSDIALOG_H
00025 
00026 //SpikeStream includes
00027 #include "DBInterface.h"
00028 #include "SimulationManager.h"
00029 
00030 //Other includes
00031 #include <qdialog.h>
00032 #include <qpushbutton.h>
00033 #include <qtable.h>
00034 
00035 
00036 //-------------------------- Noise Parameters Dialog -----------------------
00037 /*! Displays all the noise parameters in a table with combo boxes and check
00038         boxes to edit them. */
00039 //--------------------------------------------------------------------------
00040 
00041 class NoiseParametersDialog : public QDialog {
00042         Q_OBJECT
00043         
00044         public:
00045                 NoiseParametersDialog(QWidget *parent, DBInterface* networkDBInterface, SimulationManager* simMan);
00046                 ~NoiseParametersDialog();
00047                 bool loadParameters();
00048 
00049         
00050         private slots:
00051                 void applyButtonPressed();
00052                 void cancelButtonPressed();
00053                 void defaultsButtonPressed();
00054                 void okButtonPressed();
00055                 void paramValueChanged(int row, int col);
00056         
00057 
00058         private:
00059                 //============================= VARIABLES ==============================
00060                 /*! Store reference to database interfaces.*/
00061                 DBInterface *networkDBInterface;
00062 
00063                 /*! Store reference to simulation manager to inform tasks about changes.*/
00064                 SimulationManager *simulationManager;
00065                 
00066                 //Table and its header for displaying parameters
00067                 QTable* paramTable;
00068                 QHeader* paramTableHeader;
00069 
00070                 /*! Applies the parameters without closing the dialog.*/
00071                 QPushButton *applyButton;
00072 
00073                 //Store column numbers for data that we want to access
00074                 int neurGrpCol;
00075                 int noiseModeCol;
00076                 int neuronPercentCol;
00077                 int firingModeCol;
00078 
00079                 /*! Variable recording whether the parameter table has been changed
00080                         Used to enable or disable the apply button and prevent updating parameters 
00081                         unnecessarily.*/
00082                 bool paramValuesChanged;
00083 
00084 
00085                 //========================== METHODS ================================
00086                 /*! Declare copy constructor private so it cannot be used inadvertently.*/
00087                 NoiseParametersDialog (const NoiseParametersDialog&);
00088 
00089                 /*! Declare assignment private so it cannot be used inadvertently.*/
00090                 NoiseParametersDialog operator = (const NoiseParametersDialog&);
00091 
00092                 void storeParameters();
00093 
00094 };
00095 
00096 
00097 #endif //NOISEPARAMETERSDIALOG_H
00098 

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