25 #include "displaycontroller.h"
26 #include "evodataviewer.h"
27 #include "holisticviewer.h"
28 #include "total99resources.h"
29 #include <QGridLayout>
30 #include <QPushButton>
32 #include <QFileDialog>
33 #include <QVBoxLayout>
38 #include <QCoreApplication>
46 #pragma warning(disable:4996)
53 this->evonet = evonet;
59 QTimer* timer =
new QTimer(
this);
60 timer->setInterval( 40 );
61 timer->setSingleShot(
false );
63 connect( timer, SIGNAL(timeout()),
this, SLOT(onEvonetUpdated()) );
73 QList<ParameterSettableUIViewer> viewsList;
74 viewsList.append( networkView( parent, flags ) );
75 viewsList.append( neuroMonitorView( parent, flags ) );
76 viewsList.append( holisticView( parent, flags ) );
83 networkDialog->pseudo_activate_net();
84 networkDialog->setWindowTitle(
"Neural Network Editor" );
88 ParameterSettableUIViewer EvonetUI::neuroMonitorView( QWidget* parent, Qt::WindowFlags flags )
90 edv =
new EvoDataViewer( evonet->getNoNeurons(), 1000, 0, parent, flags );
94 for (
int i = 0; i < evonet->getNoNeurons(); i++) {
95 if (evonet->neurondisplay[i] == 1) {
100 if ( evonet->neurondcolor[i].isValid() ) {
101 edv->
setChunkProperties(i, evonet->neuronrange[i][0], evonet->neuronrange[i][1], evonet->neuronl[i], evonet->neurondcolor[i], dn);
104 edv->
setChunkProperties(i, evonet->neuronrange[i][0], evonet->neuronrange[i][1], evonet->neuronl[i], QColor(255,0,0), dn);
107 edv->setWindowTitle(
"Neurons Monitor" );
108 edv->setGeometry(50, 50, 600, 600);
109 return ParameterSettableUIViewer( edv,
"Neurons Monitor" );
112 ParameterSettableUIViewer EvonetUI::holisticView( QWidget* parent, Qt::WindowFlags flags )
114 hlv =
new HolisticViewer(evonet, parent, flags);
115 hlv->resize(300, 300);
116 hlv->setWindowTitle(
"Holistic Viewer");
117 return ParameterSettableUIViewer( hlv,
"Holistic View" );
120 void EvonetUI::onEvonetUpdated() {
122 if ( networkDialog ) {
123 networkDialog->update();
153 for (
int ch = 0; ch < evonet->getNoNeurons(); ch++) {
172 #if defined(_MSC_VER)