int InputFront::unknownFieldMsg(emf_ObjectData_X* object_data, bool is_fatal) { UserInterface* gui = theControlCenter->getGui(); strstream strm; if ( is_fatal ) { strm << "***ERROR: Unknown field name ("; } else { strm << "***WARNING: Unknown field name ("; } strm << object_data->field_name << ") when reading object: " << object_data->object_name; if ( object_data->object_id != NO_INDEX ) { strm << " " << object_data->object_id; } strm << ends; gui->showMsg(strm.str()); if (is_fatal) return notOk; else return isOk; }
int peano::applications::shallowwater::runners::ShallowWaterBatchJobRunnerForRegularGrid::runAsMaster(peano::applications::shallowwater::repositories::ShallowWaterBatchJobRepositoryForRegularGrid& repository) { UserInterface userInterface; userInterface.writeHeader(); // @todo Insert your code here // Start of dummy implementation repository.switchToSetupExperiment(); repository.iterate(); repository.switchToPlotSolution(); repository.iterate(); repository.switchToGodunovMethod(); for(int i = 1; i <= scenario::shallowwater::ShallowWaterScenarioService::getInstance().getScenario().getNumberOfTimeSteps(); i++) { repository.iterate(); if( scenario::shallowwater::ShallowWaterScenarioService::getInstance().getScenario().getOutputTimeDistance() > 0 && i % scenario::shallowwater::ShallowWaterScenarioService::getInstance().getScenario().getOutputTimeDistance() == 0 ) { repository.switchToPlotSolution(); repository.iterate(); repository.switchToGodunovMethod(); } } repository.logIterationStatistics(); repository.terminate(); // End of dummy implementation return 0; }
int main(int argc, char *argv[]) { QApplication a(argc, argv); UserInterface w; w.show(); return a.exec(); }
int main (int argc, const char * argv[]) { string errorMessage = ""; UserInterface ui = UserInterface(); bool startupSucceeded = ui.start(errorMessage); bool continueProgram = true; if(startupSucceeded) { while(continueProgram) { continueProgram = ui.menuLoginScreen(); if(continueProgram) { //system("CLS"); ui.mainMenu(); } } } else { cout << errorMessage << endl; } ui.save(); return 0; }
int main(int argc, char* argv[]) { UserInterface face; face.play(argv[1]); return 0; }
void MenuAdministradores::ejecutarOpcion(int opc) { UserInterface* submenu = NULL; switch(opc){ case 0: setSalida(); break; case 1: //despliega algo para leer datos y crea el dataInmo IUsuarioController::IngresarInmobiliaria(dato); break; case 2: //despliega algo para leer datos y crea el dataInt IUsuarioController::IngresarInteresado(dato); break; case 3: IUsuarioController::ObtnerReportedato); //ImprimirDatos break; default: throw ExOpcionInvalida(); } if (submenu!=NULL) { submenu->ejecutar(); delete submenu; } }
int main() { UserInterface ui; ui.createOrLog(); return 0; }
int main(int argc, char* argv[]) { TreeScanner scanner; UserInterface UI; // Parse the command line arguments. if (argc < 3) { cout << "Please enter the path to a directory. AND/OR output option:" << endl <<"Example: \n Scanner.exe C:/../../ -cmd \n" <<"\t -cmd - Outputs in command line \n\t -html - Outputs in HTML \n"; return 1; } string mainDir = string(argv[1]); if (!scanner.IsDirectory(mainDir)) { cout << "Please enter the path to a directory." << endl; return 1; } // Find and print out equivalence class information. map<string, vector<string> > classes; scanner.GroupIntoClasses(mainDir,classes); // Uses selected type of output form. if(!strcmp(argv[2],"-cmd")) UI.output(classes); if(!strcmp(argv[2],"-html")) { UI.output_h(classes); } return 0; }
int peano::applications::navierstokes::prototype1::runners::PrototypeRunnerForRegularGrid::runAsMaster( peano::applications::navierstokes::prototype1::repositories::PrototypeRepositoryForRegularGrid& repository, peano::geometry::Geometry& geometry, const peano::applications::navierstokes::prototype1::configurations::PrototypeConfigurationForRegularGrid& configuration) { UserInterface userInterface; userInterface.writeHeader(); //fill up state repository.getState().setLGSMaxIterations( configuration.getMaximumLGSIterations()); repository.getState().setPlotterPlotDebugInfo(true); repository.getState().setScenarioRe(1.0); repository.getState().setScenarioEta(1.0); repository.getState().setScenarioRho(1.0); repository.getState().setScenarioCharacteristicLength(1.0); repository.getState().setOdeTimestepnumber(0); // repository.getState().setElementType(DivergenceFree); repository.getState().setElementType(Dlinear); //Instanz. FluidSimulation const bool useDivergenceCorrection = false; const double rTol = 1e-7; FluidSimulation fluidSim(useDivergenceCorrection, rTol, configuration.plotVTKFiles(), repository); //Zeitschleife (spaeter: ode instanz) int numberOfTimeSteps = configuration.getNumberOfTimesteps(); double tau = 0.00001; double time = 0.0; const bool hasVariableTimeStepSize = false; //in state??? const double elapsedCPUTimePerStep = tarch::la::PI; const bool shallOutputBePlotted = true; //in state??? // const std::string outputPath = "./"; // geht nicht in state wegen string nicht in dastgen! const double dummyValue = -1.0; fluidSim.implementSetInitialValue(hasVariableTimeStepSize, time, dummyValue, dummyValue); for (int i = 1; i <= numberOfTimeSteps; i++) { repository.getState().setOdeTimestepnumber(i); repository.getState().setOdeTime(time); repository.getState().setOdeTau(tau); fluidSim.implementBeginTimeStep(); fluidSim.implementDerivativeAndUpdate(); time += tau; std::ostringstream msg; msg << "./testVtk." << i << ".vtk"; std::string timeStepNumberWithLeadingZeros = msg.str(); fluidSim.implementEndTimeStep(hasVariableTimeStepSize, elapsedCPUTimePerStep, shallOutputBePlotted, timeStepNumberWithLeadingZeros); } userInterface.writeDatatypeStatistics< RegularGridFluidVertexEnhancedDivFreeEulerExplicit, RegularGridFluidCellEnhancedDivFreeEulerExplicit, RegularGridFluidStateEnhancedDivFreeEulerExplicit> (); repository.logIterationStatistics(); repository.terminate(); return 0; }
int main() { UserInterface start; start.startProgram(); return 0; }
int main(int argc, char** argv) { UserInterface u; u.menu(); return 0; }
void IsisMain() { // Set the input image, get the camera model Process p; Cube *icube = p.SetInputCube("FROM"); Camera *cam = icube->camera(); // Get the ra/dec range and resolution double minRa, maxRa, minDec, maxDec; cam->RaDecRange(minRa, maxRa, minDec, maxDec); double res = cam->RaDecResolution(); // Get the center ra/dec cam->SetImage(icube->sampleCount() / 2.0, icube->lineCount() / 2.0); double centerRa = cam->RightAscension(); double centerDec = cam->Declination(); // Compute the rotation cam->SetRightAscensionDeclination(centerRa, centerDec + 2.0 * res); double x = cam->Sample() - icube->sampleCount() / 2.0; double y = cam->Line() - icube->lineCount() / 2.0; double rot = atan2(-y, x) * 180.0 / Isis::PI; rot = 90.0 - rot; if(rot < 0.0) rot += 360.0; // Setup and log results PvlGroup results("Range"); results += PvlKeyword("MinimumRightAscension", toString(minRa), "degrees"); results += PvlKeyword("MaximumRightAscension", toString(maxRa), "degrees"); results += PvlKeyword("MinimumDeclination", toString(minDec), "degrees"); results += PvlKeyword("MaximumDeclination", toString(maxDec), "degrees"); results += PvlKeyword("MinimumRightAscension", Projection::ToHMS(minRa), "hms"); results += PvlKeyword("MaximumRightAscension", Projection::ToHMS(maxRa), "hms"); results += PvlKeyword("MinimumDeclination", Projection::ToDMS(minDec), "dms"); results += PvlKeyword("MaximumDeclination", Projection::ToDMS(maxDec), "dms"); results += PvlKeyword("Resolution", toString(res), "degrees/pixel"); Application::Log(results); // Setup and log orientation PvlGroup orient("Orientation"); orient += PvlKeyword("CenterSample", toString(icube->sampleCount() / 2.0)); orient += PvlKeyword("CenterLine", toString(icube->lineCount() / 2.0)); orient += PvlKeyword("CenterRightAscension", toString(centerRa), "degrees"); orient += PvlKeyword("CenterDeclination", toString(centerDec), "degrees"); orient += PvlKeyword("CelestialNorthClockAngle", toString(rot), "degrees"); orient += PvlKeyword("Resolution", toString(res), "degrees/pixel"); Application::Log(orient); // Write the output file if requested UserInterface ui = Application::GetUserInterface(); if(ui.WasEntered("TO")) { Pvl temp; temp.addGroup(results); temp.addGroup(orient); temp.write(ui.GetFileName("TO", "txt")); } p.EndProcess(); }
/// Deletes all UIs that have not already been deleted so far. void UserInterface::DeleteAll() { while(userInterfaces.Size()) { UserInterface * ui = userInterfaces[0]; ui->SetBufferized(false); delete ui; } }
void UserInterface::mainWindowCallback(Fl_Widget * w, void * p) { if (Fl::event() == FL_SHORTCUT && Fl::event_key() == FL_Escape) { return; // ignore Escape } UserInterface * ui = static_cast<UserInterface*>(p); ui->quit(); }
int main(int argc, char** args) { //Create a user defined window object UserInterface m; m.show(); Fl::run(); return 0; }
int main() { UserInterface ui; ui.displayMenu(); system("pause"); return 0; }
UserInterface * GetRelevantUIForWindow(AppWindow * window) { if (!window) return NULL; UserInterface * globalUI = window->GetGlobalUI(); if (globalUI && globalUI->HasActivatableElement()) return globalUI; return window->GetUI(); }
int main(int argc, const char * argv[]) { //Creates an instance of the interface of type string and sends in the command line arguements UserInterface * contactInterface = new UserInterface(argc, argv); //The interface calls the main menu where the user will be able to interact with the program contactInterface->mainMenu(); return 0; }
int main(int argc, char *argv[]) { QTranslator myTranslator, qtTranslator; ABConfiguration * conf = new ABConfiguration(); #ifdef WIN32 WSADATA info; assert(WSAStartup(0x0101, &info)!=SOCKET_ERROR); #endif QApplication * app = new QApplication(argc,argv); qRegisterMetaType<BBSInterface::BBSStatus>("BBSInterface::BBSStatus"); //Permite usar los BBSStatus como objetos a pasar en Conexiones Qt qtTranslator.load(QString(":/qt_") + QLocale::system().name()); app->installTranslator(&qtTranslator); myTranslator.load(QString(":/adelinbackup_") + QLocale::system().name()); app->installTranslator(&myTranslator); Q_INIT_RESOURCE(adelinbackup); qDebug() << "MainApp::MainApp: Iniciando SSLLib"; SSLLib::Initialise(); qDebug() << "MainApp::MainApp: Iniciando BBBInterfaceSocket"; BBBInterfaceSocket * bbbi = new BBBInterfaceSocket(conf); qDebug() << "MainApp::MainApp: Iniciando BBSInterface"; BBSInterface * bbsi = new BBSInterface(conf); qDebug() << "MainApp::MainApp: Iniciando UserInterface"; UserInterface * ui = new UserInterface(app, argc, argv, conf, bbbi, bbsi); //Añadir el conector con autenticacion para solicitar el id de usuario qDebug() << "MainApp::MainApp: Comprobando estado de la configuración"; //if(conf->bbconf->status() != BBCInterface::CIS_OK) //{ // int returncode = QMessageBox::warning(0,"Error","No ha configurado correctamente adelin backup. Ejecutar el controlador backup?",QMessageBox::Yes|QMessageBox::Close,QMessageBox::Yes); // if (returncode == QMessageBox::Yes) // { // QProcess::startDetached("/usr/bin/abcontroller"); // return 0; // } // else // { // return -1; // } //} qDebug() << "MainApp::MainApp: Iniciando Hilo BBBInterfaceSocket"; bbbi->start(); qDebug() << "MainApp::mainloop: Iniciando Bucle Qt"; return ui->loop(); //FIXME: stop threads /* bbbi->shutdown(); while(bbbi->isRunning()) { sleep(1); } delete bbsi; delete bbbi; */ }
UserDatabase::UserDatabase(std::shared_ptr<Database> database, UserInterface &user_interface) : database_(database), user_interface_(user_interface) { user_interface.printf("user database loading: loading\n"); database_->execute_sql(g_sql_queries[0]); user_interface.printf("user database loading: success\n"); }
/// Fetches either the Global or Active UI, taking into consideration both active AppWindow and if there exist any valid content in the Global UI. UserInterface * RelevantUI() { AppWindow * window = WindowMan.GetCurrentlyActiveWindow(); if (!window) return NULL; UserInterface * globalUI = window->GetGlobalUI(); if (globalUI && globalUI->HasActivatableElement()) return globalUI; return window->GetUI(); }
int main(int argc, char **argv) { UserInterface* UI = new UserInterface; UI->init(); while (true) { UI->update(); } system("pause"); return 0; }
int main() { UserInterface* n = new UserInterface(); //START n->startProgram(); return 0; //THINGS TO DO //documentation avl vs hash //for loop up to 15 ^ //AND OR //add file using append (maintanance mode) //stress test (maybe show parsing with both) }
/** Reloads all existing UserInterfaces based on their respective source-files. Should only be called from RENER THREAD! As it will want to deallocate stuff. Use Graphics.QueueMessage(new GraphicsMessage(GM_RELOAD_UI)); */ void UserInterface::ReloadAll() { for (int i = 0; i < userInterfaces.Size(); ++i) { UserInterface * ui = userInterfaces[i]; // Reload only currently visible ones? if ( ui->lastRenderTime < Timer::GetCurrentTimeMs() - 1000) continue; // Reload! ui->Reload(); } }
void ArenaBattle::createHuman(UserInterface& display) { Weapon largeKnife("Large Knife", 60, 10); Armor leather("Leather Armor", 10); human.setGold(STARTING_GOLD); human.setPotionCount(STARTING_POTIONS); human.setWeapon(largeKnife); human.setArmor(leather); display.ask("What is thy name? "); getPlayerName(display.getInputBuffer()); std::cout << "[*] " << human.getName() << " is ready for adventure! " << std::endl; }
int main() { UserInterface myUI; myUI.Choice[0] = 'y'; while (strcmp(myUI.Choice,"q") != 0) { myUI.PrintMenu(); cin >> myUI.Choice; myUI.ChoiceFunc(); cout << endl; } }
int main() { int cmd= -1; Controller ctrl; UserInterface UI; UI.SetController(ctrl); while(cmd != 0) { UI.DisplayMenu(); UI.GetCommand(cmd); UI.AnalyzeCommand(cmd); } //cout<<"CMD:"<<cmd; }
// Store field data in Matc-expression table if it contains any Matc-variables // bool InputFront::storeMatcData(MatcValueTable& matcTable, const char* key, emf_ObjectData_X* od) { if ( !od->dataHasMatcVars ) { return false; } // Call external store function storeMatcString(matcTable, key, od->dataAsString); // Inform gui! UserInterface* gui = theControlCenter->getGui(); gui->setModelHasMatcDefinitions(); return true; }
void StarsApp::setup() { mTime = getElapsedSeconds(); // create the spherical grid mesh mGrid.setup(); // load the star database and create the VBO mesh mStars.load( loadAsset("hygxyz.csv") ); //mStars.write( writeFile( getAssetPath("") / "hygxyz.dat" ) ); // TODO // load texture and shader mStars.setup(); // create user interface mUserInterface.setup(); // initialize background image mBackground.setup(); // initialize camera mCamera.setup(); // mIsGridVisible = false; // forceHideCursor(); // mTimer.start(); }
void StarsApp::draw() { gl::clear( Color::black() ); gl::pushMatrices(); gl::setMatrices( mCamera.getCamera() ); { // draw background mBackground.draw(); // draw grid if(mIsGridVisible) mGrid.draw(); // draw stars mStars.draw(); } gl::popMatrices(); // draw user interface mUserInterface.draw(); // fade in at start of application gl::enableAlphaBlending(); double t = math<double>::clamp( mTimer.getSeconds() / 3.0, 0.0, 1.0 ); float a = ci::lerp<float>(1.0f, 0.0f, (float) t); if( a > 0.0f ) { gl::color( ColorA(0,0,0,a) ); gl::drawSolidRect( getWindowBounds() ); } gl::disableAlphaBlending(); }