Esempio n. 1
0
onelabWindow::onelabWindow(int deltaFontSize)
{
  FL_NORMAL_SIZE -= deltaFontSize;

  int width = 34 * FL_NORMAL_SIZE + WB;
  int height = 12 * BH + 4 * WB;

  win = new paletteWindow(width, height, CTX::instance()->nonModalWindows ? true : false);
  win->box(GMSH_WINDOW_BOX);
  win->label("ONELAB2");

  Fl_Tabs *o = new Fl_Tabs(WB, WB, width - 2 * WB, height - 2 * WB);
  {
    Fl_Group *o = new Fl_Group(
      WB, WB + BH, width - 2 * WB, height - 2 * WB - BH, "Network (server)");
    _listenOnUNIX = new Fl_Check_Button(2*WB, 2*WB + 1*BH, width-2*WB, BH, "Listen on UNIX socket");
    _sockUNIX = new Fl_Input(2*WB, 2*WB + 2*BH, width/2-2*WB, BH, "UNIX base socket name");
    _listenOnUNIX->callback(onelab_listen_unix_cb, _sockUNIX);
    _sockUNIX->align(FL_ALIGN_RIGHT);
    _listenOnTCP = new Fl_Check_Button(2*WB, 2*WB + 3*BH, width-2*WB, BH, "Listen on TCP socket");
    _sockTCP = new Fl_Input(2*WB, 2*WB + 4*BH, width/2-2*WB, BH, "TCP port (0 to let the system choose)");
    _listenOnTCP->callback(onelab_listen_tcp_cb, _sockTCP);
    _sockTCP->align(FL_ALIGN_RIGHT);
#ifdef HAVE_UDT
    _listenOnUDT = new Fl_Check_Button(2*WB, 2*WB + 5*BH, width-2*WB, BH, "Listen on UDT (UDP) socket");
    _sockUDT = new Fl_Input(2*WB, 2*WB + 6*BH, width/2-2*WB, BH, "UDP port (0 to let the system choose)");
    _listenOnUDT->callback(onelab_listen_udt_cb, _sockUDT);
    _sockUDT->align(FL_ALIGN_RIGHT);
#else
    _listenOnUDT = new Fl_Check_Button(2*WB, 2*WB + 5*BH, width-2*WB, BH, "Listen on UDT (UDP) socket");
    _sockUDT = new Fl_Input(2*WB, 2*WB + 6*BH, width/2-2*WB, BH, "UDP port (0 to let the system choose)");
    _sockUDT->align(FL_ALIGN_RIGHT);
#endif
    refreshServers();
    o->end();
  }
  {
    Fl_Group *o = new Fl_Group(
      0, WB + BH, width - 2 * WB, height - 2 * WB - BH, "Clients (server)");
    _solvers = new Fl_Choice(2*WB, 2*WB + 1*BH, width/2-2*WB, BH, "Solver");
    _solvers->align(FL_ALIGN_RIGHT);
    rebuildSolverList();
    _clients = new Fl_Browser(2*WB, 2*WB + 3*BH, width/2-2*WB, 5*BH, "Connected clients");
    _clients->align(FL_ALIGN_RIGHT);
    o->end();
  }
  {
    Fl_Group *o = new Fl_Group(
      WB, WB + BH, width - 2 * WB, height - 2 * WB - BH, "Network (client)");
    _remoteServer = new Fl_Input(2*WB, 2*WB + 1*BH, width/2-2*WB, BH, "Server address (IPv4:port)");
    _remoteServer->align(FL_ALIGN_RIGHT);
    _connectRemoteServer = new Fl_Button(2*WB, 3*WB + 2*BH, width/2-2*WB, BH, "Connect");
    _connectRemoteServer->callback(onelab_connect_remote_server_cb, _remoteServer);
  }
}
Esempio n. 2
0
void UTLauncher::gotServersInfo(QJsonDocument document)
{
    browser->loadFromJson(document.object());
    serversRefreshTimer.singleShot(5*60000, &bootstrap, SLOT(refreshServers()));
}
Esempio n. 3
0
void onelabWindow::refresh(){
  refreshServers();
  rebuildSolverList();
  refreshRemoteServer();
}