コード例 #1
0
ファイル: TaskView.cpp プロジェクト: macsux/XCSoar
void
PaintTaskPoint(Canvas &canvas, const PixelRect &rc,
               const OrderedTask &task, const OrderedTaskPoint &point,
               const GeoPoint &location, const SETTINGS_MAP &settings_map,
               const TaskLook &task_look,
               const AirspaceLook &airspace_look,
               const RasterTerrain *terrain)
{
  ChartProjection projection(rc, point, point.GetLocation());
  PaintTask(canvas, projection, task, location, settings_map,
            task_look, airspace_look, terrain);
}
コード例 #2
0
ファイル: TaskView.cpp プロジェクト: CnZoom/XcSoarPull
void
PaintTaskPoint(Canvas &canvas, const PixelRect &rc,
               const OrderedTask &task, const OrderedTaskPoint &point,
               const GeoPoint &location,
               const MapSettings &settings_map, const TaskLook &task_look,
               const AirspaceLook &airspace_look,
               const RasterTerrain *terrain, const Airspaces *airspaces,
               int highlight_index)
{
    /* TODO: check location_available in ChartProjection */
    ChartProjection projection(rc, point, point.GetLocation());
    PaintTask(canvas, projection, task, location,
              settings_map,
              task_look, airspace_look, terrain, airspaces,
              false, highlight_index);
}
コード例 #3
0
ファイル: OrderedTask.cpp プロジェクト: EkzoMan/XCSoar
bool
OrderedTask::Append(const OrderedTaskPoint &new_tp)
{
  if (/* is the new_tp allowed in this context? */
      (!task_points.empty() && !new_tp.IsPredecessorAllowed()) ||
      /* can a tp be appended after the last one? */
      (task_points.size() >= 1 &&
       !task_points[task_points.size() - 1]->IsSuccessorAllowed()))
    return false;

  task_points.push_back(new_tp.Clone(task_behaviour, ordered_settings));
  if (task_points.size() > 1)
    SetNeighbours(task_points.size() - 2);
  else {
    // give it a value when we have one tp so it is not uninitialised
    last_min_location = new_tp.GetLocation();
  }

  SetNeighbours(task_points.size() - 1);
  return true;
}
コード例 #4
0
ファイル: OrderedTask.cpp プロジェクト: davidswelt/XCSoar
bool 
OrderedTask::Append(const OrderedTaskPoint &new_tp)
{
  if (/* is the new_tp allowed in this context? */
      (!task_points.empty() && !new_tp.predecessor_allowed()) ||
      /* can a tp be appended after the last one? */
      (task_points.size() >= 1 && !task_points[task_points.size() - 1]->successor_allowed()))
    return false;

  task_points.push_back(new_tp.clone(task_behaviour, m_ordered_behaviour));
  if (task_points.size() > 1)
    set_neighbours(task_points.size() - 2);
  else {
    // give it a value when we have one tp so it is not uninitialised
    m_location_min_last = new_tp.GetLocation();
  }

  set_neighbours(task_points.size() - 1);
  update_geometry();
  return true;
}