Exemplo n.º 1
0
// Setup
// Activates configuration and setting dialogs
//  Basic: Basic settings (QNH/Bugs/Ballast/MaxTemperature)
//  Wind: Wind settings
//  Task: Task editor
//  Airspace: Airspace filter settings
//  Replay: IGC replay dialog
void
InputEvents::eventSetup(const TCHAR *misc)
{
  if (StringIsEqual(misc, _T("Basic")))
    dlgBasicSettingsShowModal();
  else if (StringIsEqual(misc, _T("Wind")))
    ShowWindSettingsDialog();
  else if (StringIsEqual(misc, _T("System")))
    SystemConfiguration();
  else if (StringIsEqual(misc, _T("Task")))
    dlgTaskManagerShowModal();
  else if (StringIsEqual(misc, _T("Airspace")))
    dlgAirspaceShowModal(false);
  else if (StringIsEqual(misc, _T("Weather")))
    ShowWeatherDialog(_T("rasp"));
  else if (StringIsEqual(misc, _T("Replay"))) {
    if (!CommonInterface::MovementDetected())
      ShowReplayDialog();
  } else if (StringIsEqual(misc, _T("Switches")))
    dlgSwitchesShowModal();
  else if (StringIsEqual(misc, _T("Teamcode")))
    dlgTeamCodeShowModal();
  else if (StringIsEqual(misc, _T("Target")))
    dlgTargetShowModal();
  else if (StringIsEqual(misc, _T("Plane")))
    dlgPlanesShowModal();
  else if (StringIsEqual(misc, _T("Profile")))
    ProfileListDialog();
  else if (StringIsEqual(misc, _T("Alternates")))
    dlgAlternatesListShowModal();

  trigger_redraw();
}
Exemplo n.º 2
0
static void
OnCalcClicked()
{
  assert(wf != NULL);

  if (page == AnalysisPage::BAROGRAPH)
    dlgBasicSettingsShowModal();

  if (page == AnalysisPage::CLIMB) {
    wf->Hide();
    dlgTaskManagerShowModal();
    wf->Show();
  }

  if (page == AnalysisPage::WIND)
    ShowWindSettingsDialog();

  if (page == AnalysisPage::POLAR)
    dlgBasicSettingsShowModal();

  if (page == AnalysisPage::TEMPTRACE)
    dlgBasicSettingsShowModal();

  if ((page == AnalysisPage::TASK) || (page == AnalysisPage::TASK_SPEED)) {
    wf->Hide();
    dlgTaskManagerShowModal();
    wf->Show();
  }

  if (page == AnalysisPage::AIRSPACE)
    dlgAirspaceWarningsShowModal(wf->GetMainWindow(),
                                 glide_computer->GetAirspaceWarnings());

  Update();
}
Exemplo n.º 3
0
inline void
AnalysisWidget::OnCalcClicked()
{
  switch (page) {
  case AnalysisPage::BAROGRAPH:
    dlgBasicSettingsShowModal();
    break;

  case AnalysisPage::CLIMB:
  case AnalysisPage::TASK:
  case AnalysisPage::TASK_SPEED:
    dlgTaskManagerShowModal();
    break;

  case AnalysisPage::WIND:
    ShowWindSettingsDialog();
    break;

  case AnalysisPage::POLAR:
    dlgBasicSettingsShowModal();
    break;

  case AnalysisPage::TEMPTRACE:
    dlgBasicSettingsShowModal();
    break;

  case AnalysisPage::AIRSPACE:
    dlgAirspaceWarningsShowModal(dialog.GetMainWindow(),
                                 glide_computer.GetAirspaceWarnings());
    break;

  case AnalysisPage::THERMAL_BAND:
  case AnalysisPage::OLC:
  case AnalysisPage::COUNT:
    break;
  }

  Update();
}