void Controller::setting() { if ( worker->getState() != kStopping ){ dashBoard->printLine( "The algorithm is running. Cannot change the parameters now.\n" ); return ; } if ( SetDialog::Accepted == setDialog->exec() ){ field_len = setDialog->getFieldLength() ; rad_sens = setDialog->getRadSens() ; rad_comm = setDialog->getRadComm() ; pop_size = setDialog->getPopSize() ; total_gen = setDialog->getTotalGen(); cross_rate = setDialog->getCrossRate() ; mut_rate = setDialog->getMutRate() ; moea = setDialog->getEA() ; worker->setPara( field_len, rad_sens, rad_comm, pop_size, total_gen, cross_rate, mut_rate ); emit SetEA( moea ) ; dashBoard->printLine("Setting succeed!\n") ; } }
/*@ XFile::SetEAList ( char*, XEAList* ) @group EAs @parameters <t 'ø' c=2> øchar* filename øname of the file øXEAList* list ølist of EAs to save </t> @returns ULONG result @remarks Save a list of EAs to a file */ ULONG XFile :: SetEAList( const char * path, const XEAList * list) { for(int i = 0; i < list->GetEACount(); i++) { ULONG rc = SetEA( path, list->GetEA(i)); if(rc) return rc; } return 0; }