evonetui.h
1 /********************************************************************************
2  * FARSA Experiments Library *
3  * Copyright (C) 2007-2013 *
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 EVONETUI_H
25 #define EVONETUI_H
26 
27 #include "evonet.h"
28 #include "parametersettableui.h"
29 #include "resourcesuser.h"
30 
31 #include <QWidget>
32 #include <QMenu>
33 #include <QAction>
34 #include <QMenuBar>
35 #include <QFileDialog>
36 #include <QLabel>
37 #include <QList>
38 #include <QString>
39 #include <QWidget>
40 #include <QMenuBar>
41 #include <QVBoxLayout>
42 #include <QObject>
43 
44 namespace farsa {
45 
46 class EvoDataViewer;
47 class NetworkDialog;
48 class HolisticViewer;
49 
50 class FARSA_EXPERIMENTS_API EvonetUI : public QObject, public ParameterSettableUI {
51  Q_OBJECT
52 public:
59  EvonetUI( Evonet* net, DataUploader<ActivationsToGui>* neuronsMonitorUploader);
61  ~EvonetUI();
62 // /*! fill the menu "Actions" of Total99 with following actions:
63 // * \param actionsMenu is the actionsMenu display in the menu bar of Total99
64 // */
65 // void fillActionsMenu( QMenu* actionsMenu );
71  QList<ParameterSettableUIViewer> getViewers( QWidget* parent, Qt::WindowFlags flags );
72 // /*! add the "Tests" menu to the menu bar of Total99
73 // * \param menuBar is the menu bar of the Total99 application
74 // */
75 // void addAdditionalMenus( QMenuBar* menuBar );
76 
82  void changeNet(Evonet* n);
83 
84 private:
85  ParameterSettableUIViewer networkView( QWidget* parent, Qt::WindowFlags flags );
86  ParameterSettableUIViewer neuroMonitorView( QWidget* parent, Qt::WindowFlags flags );
87  ParameterSettableUIViewer holisticView( QWidget* parent, Qt::WindowFlags flags );
88 
90  EvoDataViewer* edv;
92  HolisticViewer* hlv;
93  // The widget for display/manipulate the neural network
94  NetworkDialog *networkDialog;
96  Evonet* evonet;
98  DataDownloader<ActivationsToGui> neuronsMonitorDownloader;
100  int nNeurons;
101 
102 private slots:
105  void onEvonetUpdated();
106 };
107 
108 } //end namespace farsa
109 
110 #endif
111 
Evonet is the neural network taken from the EvoRobot.
Definition: evonet.h:121