本文整理汇总了C++中ODPoint::SetNameShown方法的典型用法代码示例。如果您正苦于以下问题:C++ ODPoint::SetNameShown方法的具体用法?C++ ODPoint::SetNameShown怎么用?C++ ODPoint::SetNameShown使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ODPoint
的用法示例。
在下文中一共展示了ODPoint::SetNameShown方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OnOK
void ODDRDialogImpl::OnOK( wxCommandEvent& event )
{
if( m_pDR != NULL ) {
if( g_pPathMan->GetpActivePath() == m_pDR ) g_pPathMan->DeactivatePath( m_pDR );
if( !g_pPathMan->DeletePath( m_pDR ) )
return;
if( g_pODPathPropDialog && ( g_pODPathPropDialog->IsShown()) && (m_pDR == g_pODPathPropDialog->GetPath()) ) {
g_pODPathPropDialog->Hide();
}
if( g_pPathManagerDialog && g_pPathManagerDialog->IsShown() )
g_pPathManagerDialog->UpdatePathListCtrl();
if( g_pODPointPropDialog && g_pODPointPropDialog->IsShown() ) {
g_pODPointPropDialog->ValidateMark();
g_pODPointPropDialog->UpdateProperties();
}
}
DR *l_pDR = new(DR);
g_pDRList->Append( l_pDR );
g_pPathList->Append( l_pDR );
l_pDR->m_PathNameString << _("DR") << _T(" ") << g_pDRList->GetCount();
ODPoint *beginPoint = new ODPoint( g_pfFix.Lat, g_pfFix.Lon, wxEmptyString, wxS("Start"), wxT("") );
beginPoint->SetNameShown( false );
beginPoint->SetTypeString( wxT("DR Point"));
beginPoint->m_IconName = g_sDRPointIconName;
beginPoint->m_bIsolatedMark = false;
beginPoint->m_bShowODPointRangeRings = g_bDRPointShowRangeRings;
beginPoint->m_iODPointRangeRingsNumber = g_iDRPointRangeRingsNumber;
beginPoint->m_fODPointRangeRingsStep = g_fDRPointRangeRingsStep;
beginPoint->m_iODPointRangeRingsStepUnits = g_iDRPointRangeRingsStepUnits;
beginPoint->m_wxcODPointRangeRingsColour = g_colourDRPointRangeRingsColour;
beginPoint->m_iRangeRingStyle = g_iDRPointRangeRingLineStyle;
beginPoint->m_iRangeRingWidth = g_iDRPointRangeRingLineWidth;
l_pDR->AddPoint( beginPoint, false );
m_textCtrlSOG->GetValue().ToDouble( &l_pDR->m_dSoG );
l_pDR->m_iCoG = g_ocpn_draw_pi->GetTrueOrMag( wxAtoi( m_textCtrlCOG->GetValue() ) );
l_pDR->m_dMagCOG = g_dVar;
m_textCtrlLength->GetValue().ToDouble( &l_pDR->m_dDRPathLength );
m_textCtrlDRPointInterval->GetValue().ToDouble( &l_pDR->m_dDRPointInterval );
l_pDR->m_iLengthType = m_radioBoxLengthType->GetSelection();
l_pDR->m_iIntervalType = m_radioBoxIntervalType->GetSelection();
l_pDR->m_iDistanceUnits = m_radioBoxDistanceUnits->GetSelection();
l_pDR->m_iTimeUnits = m_radioBoxTimeUnits->GetSelection();
switch ( m_radioBoxLengthType->GetSelection() ) {
case ID_LT_TIME: {
switch ( m_radioBoxTimeUnits->GetSelection() ) {
case ID_TU_MINUTES:
l_pDR->m_dTotalLengthNM = ( l_pDR->m_dSoG / 60 ) * l_pDR->m_dDRPathLength;
break;
case ID_TU_HOURS:
l_pDR->m_dTotalLengthNM = l_pDR->m_dSoG * l_pDR->m_dDRPathLength;
break;
case ID_TU_DAYS:
l_pDR->m_dTotalLengthNM = ( l_pDR->m_dSoG * l_pDR->m_dDRPathLength ) * 24;
break;
}
break;
}
case ID_LT_DISTANCE: {
if( m_radioBoxDistanceUnits->GetSelection() == ID_DU_KILOMETRES )
l_pDR->m_dTotalLengthNM = l_pDR->m_dDRPathLength / 1.852;
else
l_pDR->m_dTotalLengthNM = l_pDR->m_dDRPathLength;
break;
}
}
switch ( m_radioBoxIntervalType->GetSelection() ) {
case ID_IT_TIME: {
switch ( m_radioBoxTimeUnits->GetSelection() ) {
case ID_TU_MINUTES:
l_pDR->m_dDRPointIntervalNM = ( l_pDR->m_dSoG / 60 ) * l_pDR->m_dDRPointInterval;
break;
case ID_TU_HOURS:
l_pDR->m_dDRPointIntervalNM = l_pDR->m_dSoG * l_pDR->m_dDRPointInterval;
break;
case ID_TU_DAYS:
l_pDR->m_dDRPointIntervalNM = ( l_pDR->m_dSoG * l_pDR->m_dDRPointInterval ) * 24;
break;
}
break;
}
case ID_IT_DISTANCE: {
if( m_radioBoxDistanceUnits->GetSelection() == ID_DU_KILOMETRES )
l_pDR->m_dDRPointIntervalNM = l_pDR->m_dDRPointInterval / 1.852;
else
l_pDR->m_dDRPointIntervalNM = l_pDR->m_dDRPointInterval;
break;
}
}
double l_dStartLat = g_pfFix.Lat;
//.........这里部分代码省略.........