当前位置: 首页>>代码示例>>C++>>正文


C++ GlidePolar::get_all_up_weight方法代码示例

本文整理汇总了C++中GlidePolar::get_all_up_weight方法的典型用法代码示例。如果您正苦于以下问题:C++ GlidePolar::get_all_up_weight方法的具体用法?C++ GlidePolar::get_all_up_weight怎么用?C++ GlidePolar::get_all_up_weight使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在GlidePolar的用法示例。


在下文中一共展示了GlidePolar::get_all_up_weight方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: switch

static void
Update(void)
{
  TCHAR sTmp[1000];

  FlightStatistics &fs = glide_computer.GetFlightStats();
  GlidePolar polar = protected_task_manager.get_glide_polar();
  const CommonStats& stats = XCSoarInterface::Calculated().common_stats;

  switch (page) {
  case ANALYSIS_PAGE_BAROGRAPH:
    _stprintf(sTmp, _T("%s: %s"), _("Analysis"),
              _("Barograph"));
    wf->SetCaption(sTmp);
    fs.CaptionBarograph(sTmp);
    wInfo->SetCaption(sTmp);
    SetCalcCaption(_("Settings"));
    break;

  case ANALYSIS_PAGE_CLIMB:
    _stprintf(sTmp, _T("%s: %s"), _("Analysis"),
              _("Climb"));
    wf->SetCaption(sTmp);
    fs.CaptionClimb(sTmp);
    wInfo->SetCaption(sTmp);
    SetCalcCaption(_("Task calc"));
    break;

  case ANALYSIS_PAGE_WIND:
    _stprintf(sTmp, _T("%s: %s"), _("Analysis"),
              _("Wind at Altitude"));
    wf->SetCaption(sTmp);
    wInfo->SetCaption(_T(""));
    SetCalcCaption(_("Set wind"));
    break;

  case ANALYSIS_PAGE_POLAR:
    _stprintf(sTmp, _T("%s: %s (%s %d kg)"), _("Analysis"),
              _("Glide Polar"), _("Mass"),
              (int)polar.get_all_up_weight());
    wf->SetCaption(sTmp);
    fs.CaptionPolar(sTmp, polar);
    wInfo->SetCaption(sTmp);
    SetCalcCaption(_("Settings"));
   break;

  case ANALYSIS_PAGE_TEMPTRACE:
    _stprintf(sTmp, _T("%s: %s"), _("Analysis"),
              _("Temp trace"));
    wf->SetCaption(sTmp);
    fs.CaptionTempTrace(sTmp);
    wInfo->SetCaption(sTmp);
    SetCalcCaption(_("Settings"));
    break;

  case ANALYSIS_PAGE_TASK_SPEED:
    _stprintf(sTmp, _T("%s: %s"), _("Analysis"),
              _("Task speed"));
    wf->SetCaption(sTmp);
    wInfo->SetCaption(_T(""));
    SetCalcCaption(_("Task calc"));
    break;

  case ANALYSIS_PAGE_TASK:
    _stprintf(sTmp, _T("%s: %s"), _("Analysis"),
              _("Task"));
    wf->SetCaption(sTmp);
    fs.CaptionTask(sTmp, XCSoarInterface::Calculated());
    wInfo->SetCaption(sTmp);
    SetCalcCaption(_("Task calc"));
    break;

  case ANALYSIS_PAGE_OLC:
    _stprintf(sTmp, _T("%s: %s"), _("Analysis"),
              _("OnLine Contest"));
    wf->SetCaption(sTmp);

    TCHAR timetext1[100];
    Units::TimeToText(timetext1, (int)stats.olc.time);
    TCHAR distance[100];
    Units::FormatUserDistance(stats.olc.distance, distance, 100);
    _stprintf(sTmp,
              (Layout::landscape
              ? _T("%s:\r\n  %s\r\n%s:\r\n  %.1f %s\r\n%s: %s\r\n%s: %d %s\r\n")
              : _T("%s: %s\r\n%s: %.1f %s\r\n%s: %s\r\n%s: %d %s\r\n")),
              _("Distance"),
              distance,
              _("Score"),
              (double)stats.olc.score,
              _("pts"),
              _("Time"),
              timetext1,
              _("Speed"),
              (int)Units::ToUserUnit(stats.olc.speed, Units::TaskSpeedUnit),
              Units::GetTaskSpeedName());
    wInfo->SetCaption(sTmp);
    SetCalcCaption(_T(""));
    break;

  case ANALYSIS_PAGE_AIRSPACE:
//.........这里部分代码省略.........
开发者ID:galippi,项目名称:xcsoar,代码行数:101,代码来源:dlgAnalysis.cpp


注:本文中的GlidePolar::get_all_up_weight方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。