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

ArchiveStatisticsDialog.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 ARCHIVESTATISTICSDIALOG_H
00024 #define ARCHIVESTATISTICSDIALOG_H
00025 
00026 //SpikeStream includes
00027 #include "NeuronGroup.h"
00028 #include "ArchiveStatistic.h"
00029 
00030 //Qt includes
00031 #include <qdialog.h>
00032 #include <qwidget.h>
00033 #include <qcombobox.h>
00034 #include <qradiobutton.h>
00035 #include <qtextedit.h>
00036 #include <qstring.h>
00037 #include <qlineedit.h>
00038 
00039 //Other includes
00040 #include <vector>
00041 using namespace std;
00042 
00043 
00044 //---------------------- Archive Statistics Dialog -------------------------
00045 /*! Selects an aspect of the current archive to monitor for statistics,
00046         for example, the number of times a neuron with a particular ID has
00047         fired. 
00048         In this widget, neuron IDs should be added in as a comma separated list.
00049         Or, And and range operations are supported, for example:
00050                 12121 & 12121, 1323-56565, 123213|098098 */
00051 //--------------------------------------------------------------------------
00052 class ArchiveStatisticsDialog : public QDialog {
00053         Q_OBJECT
00054 
00055         public:
00056                 ArchiveStatisticsDialog(QWidget* parent, vector<NeuronGroup*> neurGrpVect);
00057                 ArchiveStatisticsDialog(QWidget* parent, vector<NeuronGroup*> neurGrpVect, ArchiveStatisticsHolder* archStatHold);
00058                 ~ArchiveStatisticsDialog();
00059                 ArchiveStatisticsHolder* getArchiveStatistics();
00060 
00061 
00062         private slots:
00063                 void cancelButtonPressed();
00064                 void neurGrpRadioButtonClicked();
00065                 void neurIDRadioButtonClicked();
00066                 void okButtonPressed();
00067 
00068         private:
00069                 //============================ VARIABLES ===============================
00070                 /*! Vector holding details of the neuron groups.*/
00071                 vector<NeuronGroup*> neuronGrpVector;
00072 
00073                 /*! Holds the selected statistical information.*/
00074                 ArchiveStatisticsHolder* archStatsHolder;
00075 
00076                 /*! Holds errors that arose from checking the string.*/
00077                 bool neuronIDError;
00078 
00079                 //Qt widgets
00080                 QComboBox* neuronGrpCombo;
00081                 QRadioButton* neurGrpRadioButt;
00082                 QRadioButton* neurIDRadioButt;
00083                 QTextEdit* neurIDText;
00084                 QLineEdit* archStatsNameText;
00085 
00086 
00087                 //============================ METHODS ===============================
00088                 /*! Declare copy constructor private so it cannot be used inadvertently.*/
00089                 ArchiveStatisticsDialog(const ArchiveStatisticsDialog&);
00090 
00091                 /*! Declare assignment private so it cannot be used inadvertently.*/
00092                 ArchiveStatisticsDialog operator = (const ArchiveStatisticsDialog&);
00093 
00094                 unsigned int checkNeuronID(QString idSTr);
00095                 void initialiseDialog();
00096 
00097 };
00098 
00099 #endif//ARCHIVESTATISTICSDIALOG_H
00100 

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