holisticviewer.h
1 /********************************************************************************
2  * FARSA Experiments Library *
3  * Copyright (C) 2007-2012 *
4  * Stefano Nolfi <stefano.nolfi@istc.cnr.it> *
5  * Onofrio Gigliotta <onofrio.gigliotta@istc.cnr.it> *
6  * Gianluca Massera <emmegian@yahoo.it> *
7  * Tomassino Ferrauto <tomassino.ferrauto@istc.cnr.it> *
8  * *
9  * This program is free software; you can redistribute it and/or modify *
10  * it under the terms of the GNU General Public License as published by *
11  * the Free Software Foundation; either version 2 of the License, or *
12  * (at your option) any later version. *
13  * *
14  * This program is distributed in the hope that it will be useful, *
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
17  * GNU General Public License for more details. *
18  * *
19  * You should have received a copy of the GNU General Public License *
20  * along with this program; if not, write to the Free Software *
21  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA *
22  ********************************************************************************/
23 
24 #ifndef HOLISTICVIEWER_H
25 #define HOLISTICVIEWER_H
26 
27 #include <QWidget>
28 #include <QGridLayout>
29 #include <QVBoxLayout>
30 #include <QHBoxLayout>
31 #include <QComboBox>
32 #include <QLabel>
33 #include <QPaintEvent>
34 #include <QVector>
35 #include "evonet.h"
36 #include "evodataviewer.h"
37 #include "evorobotexperiment.h"
38 
39 namespace farsa {
40 
41 class FARSA_EXPERIMENTS_API HolisticViewer : public QWidget
42 {
43  Q_OBJECT
44 private:
45  QVector<QLabel*> labels;
46  Evonet* net;
47  QGridLayout* grid;
48  QVBoxLayout* mainLayout;
49  QHBoxLayout* neuronChoice;
50  QComboBox *neuronX, *neuronY;
51  int getNeuronAct(int);
52 protected:
53  void paintEvent(QPaintEvent* qpe);
54 public:
55  HolisticViewer(Evonet*, QWidget* parent=0, Qt::WindowFlags flags=0);
56  void updateGrid();
57  void updatePlot();
58  void setNet(Evonet* n);
59 };
60 
61 } //end namespace farsa
62 
63 #endif
Evonet is the neural network taken from the EvoRobot.
Definition: evonet.h:121