bool NeuroAndSimEvaluationStandardGuiApplication::setupGui() { //Register command line argument descriptions to the PlugInManager to support //switching the GUI on and off CommandLineArgument *guiArgument = new CommandLineArgument( "enableGui", "gui", "", "Starts the application with graphical user interface.", 0, 0, true); CommandLineArgument *noGuiArgument = new CommandLineArgument( "disableGui", "nogui", "", "Starts the application without graphical user interface.", 0, 0, true); if(noGuiArgument->getParameterValue()->get() != "") { mEnableGui = false; } if(guiArgument->getParameterValue()->get() != "") { mEnableGui = true; } if(mEnableGui) { mGuiMainWindow = new GuiMainWindow(mEnableControl, mEnableDebugging); connect(this, SIGNAL(showGui()), mGuiMainWindow, SLOT(showWindow())); } return true; }
bool NerdClusterNeuroEvoApplication::setupGui() { bool enableGui = true; CommandLineArgument *guiArgument = new CommandLineArgument( "enableGui", "gui", "", "Starts the application with graphical user interface.", 0, 0, true); CommandLineArgument *noGuiArgument = new CommandLineArgument( "disableGui", "nogui", "", "Starts the application without graphical user interface.", 0, 0, true); if(noGuiArgument->getParameterValue()->get() != "") { enableGui = false; } if(guiArgument->getParameterValue()->get() != "") { enableGui = true; } if(enableGui) { mMainGui = new SimpleEvolutionMainWindow(true); OnlineFitnessPlotter *plotterButton = new OnlineFitnessPlotter(); mMainGui->getMenu("Evolution")->addAction(plotterButton->getAction()); new EvolutionPropertyPanelCollection(mMainGui->getMenu("Evolution"), "Evolution Parameters", true); connect(this, SIGNAL(showGui()), mMainGui, SLOT(show())); } return true; }
bool NerdNeuroEvoApplication::setupGui() { CommandLineArgument *guiArgument = new CommandLineArgument( "enableGui", "gui", "", "Starts the application with graphical user interface.", 0, 0, true); CommandLineArgument *noGuiArgument = new CommandLineArgument( "disableGui", "nogui", "", "Starts the application without graphical user interface.", 0, 0, true); if(noGuiArgument->getParameterValue()->get() != "") { mEnableGui = false; } if(guiArgument->getParameterValue()->get() != "") { mEnableGui = true; } if(mEnableGui) { mGuiMainWindow = new GuiMainWindow(true, true); connect(this, SIGNAL(showGui()), mGuiMainWindow, SLOT(showWindow())); OnlineFitnessPlotter *plotterButton = new OnlineFitnessPlotter(); mGuiMainWindow->getMenu("Evolution")->addAction(plotterButton->getAction()); EvolutionProgressBar *progressBar = new EvolutionProgressBar(); mGuiMainWindow->addWidget(progressBar); MultiplePopulationOverviewWindowWidget *overview = new MultiplePopulationOverviewWindowWidget(); overview->getAction()->setShortcut(tr("Ctrl+Shift+p")); mGuiMainWindow->getMenu("Evolution")->addAction(overview->getAction()); EvolutionPropertyPanelCollection(mGuiMainWindow->getMenu("Evolution"), "Evolution Parameters"); BoolValueSwitcherAction *runEvolutionButton = new BoolValueSwitcherAction("&Run Evolution", EvolutionConstants::VALUE_EVO_RUN_EVOLUTION); runEvolutionButton->setShortcut(tr("Ctrl+e")); mGuiMainWindow->getMenu("Evolution")->addAction(runEvolutionButton); NetworkEditorCollection(mGuiMainWindow->getMenu("Tools"), "Network Editor"); } return true; }
NerdBaseApplication::NerdBaseApplication(int argc, char *argv[], bool enableGui) : BaseApplication(), mSeedCommunication(0), mEnableGui(enableGui), mServerPort(45454) { for(int i = 0; i < argc; ++i) { QString flag(argv[i]); flag = flag.trimmed(); if((flag.compare("-port") == 0 || flag.compare("-p") == 0) && (i < (argc - 1))) { QString portValue(argv[i + 1]); ++i; bool ok = false; int port = portValue.toInt(&ok); if(ok) { mServerPort = port; } else { qDebug("Could not parse the port!"); } } } CommandLineArgument *guiArgument = new CommandLineArgument( "enableGui", "gui", "", "Starts the application with graphical user interface.", 0, 0, true); CommandLineArgument *noGuiArgument = new CommandLineArgument( "disableGui", "nogui", "", "Starts the application without graphical user interface.", 0, 0, true); if(noGuiArgument->getParameterValue()->get() != "") { mEnableGui = false; } if(guiArgument->getParameterValue()->get() != "") { mEnableGui = true; } }