Main Page | Namespace List | Data Structures | File List | Data Fields | Globals

newnetworkwizard.ui.h

Go to the documentation of this file.
00001 /****************************************************************************
00002 ** ui.h extension file, included from the uic-generated form implementation.
00003 **
00004 ** If you want to add, delete, or rename functions or slots, use
00005 ** Qt Designer to update this file, preserving your code.
00006 **
00007 ** You should not define a constructor or destructor in this file.
00008 ** Instead, write your code in functions called init() and destroy().
00009 ** These will automatically be called by the form's constructor and
00010 ** destructor.
00011 *****************************************************************************/
00012 
00013 # include <qmessagebox.h>
00014 # include <qtextedit.h>
00015 # include <inn.h>
00016 # include <network.h>
00017 # include <iostream>
00018 # include <interface.h>
00019 
00020 extern Network * network ;
00021 extern Inn * inn ;
00022 
00023 void NewNetworkWizard::init() {
00024 
00025 }
00026 
00027 
00028 void NewNetworkWizard::nbNeuronsInputSpecified( void ) {
00029         network->clearLayer(0) ;
00030         network->addNNeurons(0, lineEdit1->text().toInt()) ;
00031 }
00032 
00033 
00034 void NewNetworkWizard::nbNeuronsOutputSpecified( void ) {
00035         network->clearLayer(1) ;
00036         network->addNNeurons(1, lineEdit2->text().toInt()) ;
00037 }
00038 
00039 
00040 void NewNetworkWizard::topoMLPClicked( void ) {
00041     if( radioButton1->isChecked() ) setFinishEnabled(currentPage(), true) ;
00042     network->removeAxons() ;
00043     network->constructTopologyMLP() ;
00044 }
00045 
00046 
00047 void NewNetworkWizard::topoCCClicked( void ) {
00048         if( radioButton2->isChecked() ) setFinishEnabled(currentPage(), true) ;
00049         network->removeAxons() ;
00050         network->constructTopologyCC();
00051 }
00052 
00053 void NewNetworkWizard::nbNeuronsHiddenLayer1Specified( void ) {
00054         int n = lineEdit3->text().toInt() ;
00055         network->removeHiddenLayer( network->getHiddenLayerId(1) ) ;
00056         if(n) {
00057                 network->addHiddenLayer() ;
00058                 network->addNNeurons( network->getHiddenLayerId(1), n ) ;
00059         } else {
00060                 lineEdit3->setText( lineEdit4->text() ) ;
00061                 lineEdit4->setText( lineEdit5->text() ) ;
00062                 lineEdit5->setText( lineEdit6->text() ) ;
00063                 lineEdit6->setText( lineEdit7->text() ) ;
00064                 lineEdit7->setText( "0" ) ;
00065         }
00066 }
00067 
00068 
00069 void NewNetworkWizard::nbNeuronsHiddenLayer2Specified( void ) {
00070         int n = lineEdit4->text().toInt() ;
00071         network->removeHiddenLayer( network->getHiddenLayerId(2) ) ;
00072         if(n) {
00073                 network->addHiddenLayer() ;
00074                 network->addNNeurons( network->getHiddenLayerId(2), n ) ;
00075         } else {
00076                 lineEdit4->setText( lineEdit5->text() ) ;
00077                 lineEdit5->setText( lineEdit6->text() ) ;
00078                 lineEdit6->setText( lineEdit7->text() ) ;
00079                 lineEdit7->setText( "0" ) ;
00080         }
00081 }
00082 
00083 
00084 void NewNetworkWizard::nbNeuronsHiddenLayer3Specified( void ) {
00085         int n = lineEdit5->text().toInt() ;
00086         network->removeHiddenLayer( network->getHiddenLayerId(3) ) ;
00087         if(n) {
00088                 network->addHiddenLayer() ;
00089                 network->addNNeurons( network->getHiddenLayerId(3), n ) ;
00090         } else {
00091                 lineEdit5->setText( lineEdit6->text() ) ;
00092                 lineEdit6->setText( lineEdit7->text() ) ;
00093                 lineEdit7->setText( "0" ) ;
00094         }
00095 }
00096 
00097 
00098 void NewNetworkWizard::nbNeuronsHiddenLayer4Specified( void ) {
00099         int n = lineEdit6->text().toInt() ;
00100         network->removeHiddenLayer( network->getHiddenLayerId(4) ) ;
00101         if(n) {
00102                 network->addHiddenLayer() ;
00103                 network->addNNeurons( network->getHiddenLayerId(4), n ) ;
00104         } else {
00105                 lineEdit6->setText( lineEdit7->text() ) ;
00106                 lineEdit7->setText( "0" ) ;
00107         }
00108 }
00109 
00110 
00111 void NewNetworkWizard::nbNeuronsHiddenLayer5Specified( void ) {
00112         int n = lineEdit7->text().toInt() ;
00113         network->removeHiddenLayer( network->getHiddenLayerId(5) ) ;
00114         if(n) {
00115                 network->addHiddenLayer() ;
00116                 network->addNNeurons( network->getHiddenLayerId(5), n ) ;
00117         } else {
00118                 lineEdit7->setText( "0" ) ;
00119         }
00120 }

Generated on Fri Dec 3 14:57:50 2004 for INN by doxygen 1.3.6