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 NETWORKVIEWERPROPERTIES_H 00024 #define NETWORKVIEWERPROPERTIES_H 00025 00026 //SpikeStream includes 00027 #include "NetworkViewer.h" 00028 #include "DBInterface.h" 00029 #include "HighlightDialog.h" 00030 00031 //Qt includes 00032 #include <qwidget.h> 00033 #include <qcombobox.h> 00034 #include <qcheckbox.h> 00035 #include <qpushbutton.h> 00036 #include <qradiobutton.h> 00037 #include <qlabel.h> 00038 #include <qprogressbar.h> 00039 #include <qtable.h> 00040 #include <qstring.h> 00041 00042 00043 //-------------------------- Network Viewer Properties---------------------- 00044 /*! GUI used to control the NetworkViewer 3D neuron display. */ 00045 //-------------------------------------------------------------------------- 00046 00047 class NetworkViewerProperties : public QWidget { 00048 Q_OBJECT 00049 00050 public: 00051 NetworkViewerProperties(QWidget *parent, NetworkViewer*, DBInterface*); 00052 ~NetworkViewerProperties(); 00053 void reloadConnectionDetails(); 00054 void reloadConnections(); 00055 void reloadNeuronGroups(); 00056 void setFirstSingleNeuronNumber(unsigned int singleNeuronNumber); 00057 void setRenderProgressLabel(const QString labelText); 00058 void setSecondSingleNeuronNumber(unsigned int singleNeuronNumber); 00059 00060 00061 private slots: 00062 void cancelRenderProgress(); 00063 void connCheckBoxChanged(); 00064 void filterCombosChanged(int); 00065 void firstNeuronComboChanged(int); 00066 void highlightButtonPressed(); 00067 void renderDelayChanged(int); 00068 void renderStateChanged(); 00069 void secondNeuronComboChanged(int); 00070 void showConnectionDetailsChanged(); 00071 void showConnectionsChanged(); 00072 void sortRows(int); 00073 00074 00075 private: 00076 //======================== VARIABLES ================================= 00077 //Qt variables for layers 00078 QCheckBox *fullRenderCheckBox; 00079 QProgressBar *progressBar; 00080 QComboBox *renderDelayCombo; 00081 QLabel *renderDelayLabel; 00082 QLabel *renderProgressLabel; 00083 QPushButton* renderCancelButton; 00084 QPushButton* highlightButton; 00085 00086 //Qt variables for connections 00087 QRadioButton *allConnRadioButt; 00088 QCheckBox *connectionDetailsCheckBox; 00089 QTable *connectionDetailsTable; 00090 QCheckBox *connectionsCheckBox; 00091 QRadioButton *connsSingleNeurRadioButt; 00092 QComboBox *neurConnsFilterCombo; 00093 QComboBox *neurConnsFromToCombo; 00094 QLabel *neurConnsLabel; 00095 QComboBox *neurConnsNeurGrpCombo_1; 00096 QComboBox *neurConnsNeurGrpCombo_2; 00097 QLabel *neurTotalConnsLabel; 00098 QLabel *singleNeurNumLabel_1; 00099 QLabel *singleNeurNumLabel_2; 00100 QLabel *andLabel; 00101 QLabel *inLabel_1; 00102 QLabel *inLabel_2; 00103 00104 /*! Holds the neuronID when the connections to a single neuron are being displayed.*/ 00105 unsigned int firstSingleNeuronNumber; 00106 00107 /*! Holds the neuronID when the connections to a single neuron are being displayed.*/ 00108 unsigned int secondSingleNeuronNumber; 00109 00110 /*! Controls the filtering of the connections.*/ 00111 bool showFromConns; 00112 00113 /*! Controls the filtering of the connections.*/ 00114 bool showToConns; 00115 00116 /*! Controls the filtering of the connections.*/ 00117 bool betweenMode; 00118 00119 /*! Reference to NetworkViewer that this class controls.*/ 00120 NetworkViewer *networkViewer; 00121 00122 /*! Reference to class handling database.*/ 00123 DBInterface *dbInterface; 00124 00125 /*! Dialog to control the highlighting of the network*/ 00126 HighlightDialog* highlightDialog; 00127 00128 00129 //============================ METHODS ======================================== 00130 /*! Declare copy constructor private so it cannot be used inadvertently.*/ 00131 NetworkViewerProperties (const NetworkViewerProperties&); 00132 00133 /*! Declare assignment private so it cannot be used inadvertently.*/ 00134 NetworkViewerProperties operator = (const NetworkViewerProperties&); 00135 00136 void loadConnectionDetails(); 00137 void loadLayerNames(QComboBox*); 00138 00139 }; 00140 00141 00142 #endif//NETWORKVIEWERPROPERTIES_H 00143 00144 00145 00146
1.4.4