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 PROBEDIALOG_H 00024 #define PROBEDIALOG_H 00025 00026 //SpikeStream includes 00027 #include "DBInterface.h" 00028 00029 //Qt includes 00030 #include <qdialog.h> 00031 #include <qcombobox.h> 00032 #include <qlineedit.h> 00033 #include <qtable.h> 00034 00035 00036 //--------------------------- Probe Dialog -------------------------------- 00037 /*! Allows the user to select the type of probe. Support for probes is not 00038 implemented yet. */ 00039 00040 // FIXME PROBE ARCHITECTURE NOT IMPLEMENTED YET! 00041 // FIXME MAY ALSO ALLOW USER TO CONFIGURE ITS PARAMETERS 00042 //-------------------------------------------------------------------------- 00043 00044 class ProbeDialog : public QDialog{ 00045 Q_OBJECT 00046 00047 public: 00048 ProbeDialog(QWidget *parent, DBInterface* netDBInter); 00049 ~ProbeDialog(); 00050 00051 00052 private slots: 00053 void addProbe(); 00054 void deleteProbes(); 00055 void probeTableHeaderClicked(int colNumber); 00056 00057 00058 private: 00059 //========================== VARIABLES ============================== 00060 /*! References to database interfaces.*/ 00061 DBInterface* networkDBInterface; 00062 00063 /*! Stores link between a combo position and a neuron type id.*/ 00064 map<int, unsigned short> typePositionMap; 00065 00066 //Qt widgets 00067 QLineEdit* nameText; 00068 QComboBox* probeTypeCombo; 00069 QTable* probeTable; 00070 00071 //Location of information in the probeTable 00072 int selectionCol; 00073 int probeIDCol; 00074 int nameCol; 00075 int typeDescCol; 00076 int typeCol; 00077 00078 00079 //=========================== METHODS =============================== 00080 /*! Declare copy constructor private so it cannot be used inadvertently.*/ 00081 ProbeDialog (const ProbeDialog&); 00082 00083 /*! Declare assignment private so it cannot be used inadvertently.*/ 00084 ProbeDialog operator = (const ProbeDialog&); 00085 00086 void fillProbeTypeCombo(); 00087 string getDescription(unsigned int pType); 00088 void loadProbeTable(); 00089 void removeProbeFromTable(unsigned int probeID); 00090 00091 }; 00092 00093 00094 #endif//PROBEDIALOG_H 00095
1.4.4