本文整理汇总了C++中ODPoint::GetDescription方法的典型用法代码示例。如果您正苦于以下问题:C++ ODPoint::GetDescription方法的具体用法?C++ ODPoint::GetDescription怎么用?C++ ODPoint::GetDescription使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ODPoint
的用法示例。
在下文中一共展示了ODPoint::GetDescription方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: UpdateProperties
bool PathProp::UpdateProperties( Path *pPath )
{
if( NULL == pPath ) return false;
::wxBeginBusyCursor();
m_PathNameCtl->SetValue( pPath->m_PathNameString );
m_textDescription->SetValue( pPath->m_PathDescription);
m_pPathActive->SetValue( pPath->IsActive() );
double brg;
double join_distance = 0.;
ODPoint *first_point = pPath->GetPoint( 1 );
if( first_point )
DistanceBearingMercator_Plugin( first_point->m_lat, first_point->m_lon, g_dLat, g_dLon, &brg, &join_distance );
// Update the "tides event" column header
wxListItem column_info;
if( m_opList->GetColumn( 6, column_info ) ) {
wxString c = _("Next tide event");
if( gpIDX && m_starttime.IsValid() ) {
c = _T("@~~");
c.Append( wxString( gpIDX->IDX_station_name, wxConvUTF8 ) );
int i = c.Find( ',' );
if( i != wxNOT_FOUND ) c.Remove( i );
}
column_info.SetText( c );
m_opList->SetColumn( 6, column_info );
}
// Total length
double total_length = pPath->m_path_length;
wxString slen;
slen.Printf( wxT("%5.2f ") + getUsrDistanceUnit_Plugin(), toUsrDistance_Plugin( total_length ) );
m_TotalDistCtl->SetValue( slen );
wxString time_form;
wxString tide_form;
// Iterate on Route Points
wxODPointListNode *node = pPath->m_pODPointList->GetFirst();
int i = 0;
double slat = g_dLat;
double slon = g_dLon;
int stopover_count = 0;
bool arrival = true; // marks which pass over the wpt we do - 1. arrival 2. departure
bool enroute = true; // for active route, skip all points up to the active point
wxString nullify = _T("----");
while( node ) {
ODPoint *prp = node->GetData();
long item_line_index = i + stopover_count;
// Leg
wxString t;
t.Printf( _T("%d"), i );
if( i == 0 ) t = _T("Boat");
if( arrival ) m_opList->SetItem( item_line_index, 0, t );
// Mark Name
if( arrival ) m_opList->SetItem( item_line_index, 1, prp->GetName() );
// Store Dewcription
if( arrival ) m_opList->SetItem( item_line_index, 8, prp->GetDescription() );
// Distance
// Note that Distance/Bearing for Leg 000 is as from current position
double brg, leg_dist;
bool starting_point = false;
starting_point = ( i == 0 ) && enroute;
if( m_pEnroutePoint && !starting_point ) starting_point = ( prp->m_GUID
== m_pEnroutePoint->m_GUID );
DistanceBearingMercator_Plugin( prp->m_lat, prp->m_lon, slat, slon, &brg, &leg_dist );
// calculation of course at current WayPoint.
double course=10, tmp_leg_dist=23;
wxODPointListNode *next_node = node->GetNext();
ODPoint * _next_prp = (next_node)? next_node->GetData(): NULL;
if (_next_prp )
{
DistanceBearingMercator_Plugin( _next_prp->m_lat, _next_prp->m_lon, prp->m_lat, prp->m_lon, &course, &tmp_leg_dist );
}else
{
course = 0.0;
tmp_leg_dist = 0.0;
}
//prp->SetCourse(course); // save the course to the next waypoint for printing.
// end of calculation
t.Printf( _T("%6.2f ") + getUsrDistanceUnit_Plugin(), toUsrDistance_Plugin( leg_dist ) );
if( arrival )
//.........这里部分代码省略.........