本文整理汇总了C++中UserInterface类的典型用法代码示例。如果您正苦于以下问题:C++ UserInterface类的具体用法?C++ UserInterface怎么用?C++ UserInterface使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了UserInterface类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: name
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;
}
开发者ID:SangitaSingh,项目名称:elmerfem,代码行数:29,代码来源:ecif_inputFront.cpp
示例2:
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;
}
开发者ID:p-hoffmann,项目名称:madpac,代码行数:30,代码来源:ShallowWaterBatchJobRunnerForRegularGrid.cpp
示例3: main
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
UserInterface w;
w.show();
return a.exec();
}
开发者ID:fabiomarkusmiranda,项目名称:exploded,代码行数:7,代码来源:main.cpp
示例4: main
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;
}
开发者ID:derricp1,项目名称:lionsbookbazaar,代码行数:27,代码来源:BazaarDriver.cpp
示例5: main
int main(int argc, char* argv[]) {
UserInterface face;
face.play(argv[1]);
return 0;
}
开发者ID:egabrielsen,项目名称:CSESMU2341,代码行数:7,代码来源:main.cpp
示例6: ejecutarOpcion
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;
}
}
开发者ID:MaxiBakka,项目名称:Prog4,代码行数:28,代码来源:MenuAdministradores.cpp
示例7: main
int main()
{
UserInterface ui;
ui.createOrLog();
return 0;
}
开发者ID:kingm8,项目名称:NYAN-Security,代码行数:7,代码来源:NYANDriver.cpp
示例8: main
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;
}
开发者ID:Valknut,项目名称:duplicates,代码行数:34,代码来源:main.cpp
示例9: fluidSim
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;
}
开发者ID:p-hoffmann,项目名称:madpac,代码行数:60,代码来源:PrototypeRunnerForRegularGrid.cpp
示例10: main
int main()
{
UserInterface start;
start.startProgram();
return 0;
}
开发者ID:thorhildurt,项目名称:Computer-scientists-database,代码行数:8,代码来源:main.cpp
示例11: main
int main(int argc, char** argv) {
UserInterface u;
u.menu();
return 0;
}
开发者ID:tjernquist,项目名称:OU4-Library,代码行数:8,代码来源:main.cpp
示例12: IsisMain
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();
}
开发者ID:corburn,项目名称:ISIS,代码行数:58,代码来源:skyrange.cpp
示例13: while
/// 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;
}
}
开发者ID:erenik,项目名称:engine,代码行数:10,代码来源:UserInterface.cpp
示例14: mainWindowCallback
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();
}
开发者ID:nodenstuff,项目名称:flobby,代码行数:9,代码来源:UserInterface.cpp
示例15: main
int main(int argc, char** args)
{
//Create a user defined window object
UserInterface m;
m.show();
Fl::run();
return 0;
}
开发者ID:slander36,项目名称:CS7610,代码行数:10,代码来源:main.cpp
示例16: main
int main()
{
UserInterface ui;
ui.displayMenu();
system("pause");
return 0;
}
开发者ID:zlwdk4,项目名称:PolyProgram,代码行数:10,代码来源:main.cpp
示例17: GetRelevantUIForWindow
UserInterface * GetRelevantUIForWindow(AppWindow * window)
{
if (!window)
return NULL;
UserInterface * globalUI = window->GetGlobalUI();
if (globalUI && globalUI->HasActivatableElement())
return globalUI;
return window->GetUI();
}
开发者ID:erenik,项目名称:engine,代码行数:10,代码来源:UserInterface.cpp
示例18: main
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;
}
开发者ID:jgalsurkar,项目名称:CPP_Practice_Projects,代码行数:10,代码来源:main.cpp
示例19: main
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;
*/
}
开发者ID:nesaro,项目名称:adelin,代码行数:54,代码来源:main.cpp
示例20:
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");
}
开发者ID:hici,项目名称:team_one,代码行数:11,代码来源:UserDatabase.cpp
注:本文中的UserInterface类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论