Exemplo n.º 1
0
void ConsoleRoboCupCtrl::executeConsoleCommand(std::string command, RobotConsole* console, bool scenarioAndLocationOnly)
{
  if(!scenarioAndLocationOnly)
    showInputDialog(command);
  std::string buffer;
  InConfigMemory stream(command.c_str(), command.size());
  stream >> buffer;
  if(buffer == "call")
  {
    std::string optionalFile;
    stream >> buffer >> optionalFile;
    executeFile(optionalFile, buffer, true, console, scenarioAndLocationOnly);
  }
Exemplo n.º 2
0
int main(int argc, char *argv[])
{
    QGuiApplication app(argc, argv);
    app.setOrganizationName("Eric Cao");
    app.setApplicationName("League Champions");
    QQmlApplicationEngine engine;

    RiotService riot;
    engine.rootContext()->setContextProperty("Riot", &riot);
    engine.load(QUrl("qrc:/main.qml"));

    QObject *item = engine.rootObjects().value(0);
    QQuickWindow *window = qobject_cast<QQuickWindow *>(item);
    QObject::connect(&riot, SIGNAL(noApiKey()), window, SLOT(showInputDialog()));

    window->show();
    riot.getChampions();

    return app.exec();
}