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; }
void MainWindow::startScript(){ Logger::getInstance().log("lets run the SSM, registering the SMEngine" ,loglevel); if (startAgent->isChecked()){ Logger::getInstance().log("Gonna to start a QProcess with the Agent now", loglevel); } vinceAdapter = new VinceAdapter(); smEngine = new SMEngine(document, utteranceDocument); smEngine->setObjectName("smEngine"); stateMachine->registerObject(smEngine); QTimer timer; timer.start(2000); this->hide(); QObject::connect(smEngine, SIGNAL(executeMurml(QString)), vinceAdapter, SLOT(executeMurml(QString))); QObject::connect(this, SIGNAL(firstUse(bool)), smEngine, SLOT(toggleFirstUse(bool))); QObject::connect(stateMachine, SIGNAL(finished()), smEngine, SLOT(finished())); QObject::connect(smEngine, SIGNAL(stopEngine()), this, SLOT(showGui())); stateMachine->start(); if (firstUseBox->isChecked()) emit firstUse(true); smEngine->startEngine(); Logger::getInstance().log("StateMachine started", loglevel); }
void StartGui(int* argc, char* *argv[]) { gtk_init(argc, argv); initializeGui(); showGui(); gtk_main(); hideGui(); finalizeGui(); }
bool NetworkDynamicsPlotterApplication::setupGui() { //Have to be present before the GUI is constructed. StandardNeuralNetworkFunctions(); StandardConstraintCollection(); mMainWindow = new DynamicsPlotterMainWindow(mEnableSimulator, true); if(mMainWindow != 0) { new NetworkEditorCollection(mMainWindow->getMenu("Tools"), "Network &Editor", false); BoolValueSwitcherAction *runPlotterButton = new BoolValueSwitcherAction("&Run Plotters", DynamicsPlotConstants::VALUE_PLOTTER_EXECUTE); runPlotterButton->setShortcut(tr("Ctrl+r")); mMainWindow->getMenu("Control")->addAction(runPlotterButton); } connect(this, SIGNAL(showGui()), mMainWindow, SLOT(showWindow())); mTimer = new QTimer(); mTimer->setInterval(2000); OnlinePlotter *op = new OnlinePlotter(); //Core::getInstance()->addSystemObject(op); for(int i = 0; i < 6; ++i) { OnlinePlotterWindow *opw = new OnlinePlotterWindow(i); connect(op, SIGNAL(dataPrepared(QString, MatrixValue*, bool)), opw, SLOT(printData(QString, MatrixValue*, bool))); connect(mTimer, SIGNAL(timeout()), opw, SLOT(updateData())); connect(opw, SIGNAL(timerStart()), mTimer, SLOT(start())); connect(op, SIGNAL(startProcessing()), opw, SLOT(processing())); connect(op, SIGNAL(finishedProcessing()), opw, SLOT(finishedProcessing())); } connect(op, SIGNAL(finishedProcessing()), mTimer, SLOT(stop())); //***/Till****// return true; }
bool LiDAR_roof_segmentation::execute(PlugInArgList* pInArgList, PlugInArgList* pOutArgList) { /* if (pInArgList == NULL) { return false; }*/ /* ProgressTracker progress(pInArgList->getPlugInArgValue<Progress>(Executable::ProgressArg()), "Identifying buildings\n", "app", getDescriptorId());*/ //PointCloudElement* pElement = pInArgList->getPlugInArgValue<PointCloudElement>(Executable::DataElementArg()); /* if(pElement == NULL) {return false;}*/ showGui(); return true; }
int Game::run() { // Initialize if (!initializeGlfw()) { return 1; } if (GLEW_OK != initializeGlew()) { return 2; } initializeGl(); tileManager_->initialize(currentPos_); options_ = tileManager_->getOptions(); ImGui_ImplGlfwGL3_Init(window_, true); deltaTime_ = 0.0f; // Time between current and last frame lastFrame_ = 0.0f; // Time at last frame lastTime_ = 0.0f; // Time since last fps-"second" frameCount_ = 0; // Game loop while (!glfwWindowShouldClose(window_)) { // Calculate deltatime of current frame GLfloat currentTime = glfwGetTime(); deltaTime_ = currentTime - lastFrame_; lastFrame_ = currentTime; // Check for events glfwPollEvents(); // GUI showGui(); // Move do_movement(deltaTime_); // Get current camera position getCurrentPosition(); // Clear color- and depth buffer glClearColor(0.3f, 0.3f, 0.3f, 1.0f); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); // Update and render tiles tileManager_->update(currentPos_); tileManager_->renderAll(deltaTime_, camera_.getViewMatrix()); // Render GUI if (!guiClosed_) { // ignore wireframe setting for gui glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); ImGui::Render(); glPolygonMode(GL_FRONT_AND_BACK, fillmode_); } // Swap the screen buffers glfwSwapBuffers(window_); } // Clean up imgui ImGui_ImplGlfwGL3_Shutdown(); // Clean up tiles tileManager_->cleanUp(); // Terminate GLFW, clearing any resources allocated by GLFW. glfwDestroyWindow(window_); glfwTerminate(); return 0; }