本文整理汇总了C++中DataFieldEnum::SetDetachGUI方法的典型用法代码示例。如果您正苦于以下问题:C++ DataFieldEnum::SetDetachGUI方法的具体用法?C++ DataFieldEnum::SetDetachGUI怎么用?C++ DataFieldEnum::SetDetachGUI使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DataFieldEnum
的用法示例。
在下文中一共展示了DataFieldEnum::SetDetachGUI方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SetWaypointValues
static void SetWaypointValues(bool first=false) {
WndProperty* wp;
wp = (WndProperty*)wf->FindByName(TEXT("prpAATType"));
if (wp) {
DataFieldEnum* dfe;
dfe = (DataFieldEnum*)wp->GetDataField();
if (first) {
// LKTOKEN [email protected]_ = "Cylinder"
dfe->addEnumText(gettext(TEXT("[email protected]_")));
// LKTOKEN [email protected]_ = "Sector"
dfe->addEnumText(gettext(TEXT("[email protected]_")));
}
dfe->SetDetachGUI(true); // disable call to OnAATEnabled
dfe->Set(Task[twItemIndex].AATType);
dfe->SetDetachGUI(false);
wp->RefreshDisplay();
}
wp = (WndProperty*)wf->FindByName(TEXT("prpAATCircleRadius"));
if (wp) {
wp->GetDataField()->SetAsFloat(lround(Task[twItemIndex].AATCircleRadius
*DISTANCEMODIFY*DISTANCE_ROUNDING)/DISTANCE_ROUNDING);
wp->GetDataField()->SetUnits(Units::GetDistanceName());
wp->SetVisible(Task[twItemIndex].AATType==0);
wp->RefreshDisplay();
}
wp = (WndProperty*)wf->FindByName(TEXT("prpAATSectorRadius"));
if (wp) {
wp->GetDataField()->SetAsFloat(lround(Task[twItemIndex].AATSectorRadius
*DISTANCEMODIFY*DISTANCE_ROUNDING)/DISTANCE_ROUNDING);
wp->GetDataField()->SetUnits(Units::GetDistanceName());
wp->SetVisible(Task[twItemIndex].AATType>0);
wp->RefreshDisplay();
}
wp = (WndProperty*)wf->FindByName(TEXT("prpAATStartRadial"));
if (wp) {
wp->GetDataField()->SetAsFloat(Task[twItemIndex].AATStartRadial);
wp->SetVisible(Task[twItemIndex].AATType>0);
wp->RefreshDisplay();
}
wp = (WndProperty*)wf->FindByName(TEXT("prpAATFinishRadial"));
if (wp) {
wp->GetDataField()->SetAsFloat(Task[twItemIndex].AATFinishRadial);
wp->SetVisible(Task[twItemIndex].AATType>0);
wp->RefreshDisplay();
}
}
示例2: SetWaypointValues
static void SetWaypointValues(bool first=false) {
WndProperty* wp;
TASK_POINT tp = task.getTaskPoint(twItemIndex);
wp = (WndProperty*)wf->FindByName(_T("prpAATType"));
if (wp) {
DataFieldEnum* dfe;
dfe = (DataFieldEnum*)wp->GetDataField();
if (first) {
dfe->addEnumText(gettext(_T("Cylinder")));
dfe->addEnumText(gettext(_T("Sector")));
}
dfe->SetDetachGUI(true); // disable call to OnAATEnabled
dfe->Set(tp.AATType);
dfe->SetDetachGUI(false);
wp->RefreshDisplay();
}
wp = (WndProperty*)wf->FindByName(_T("prpAATCircleRadius"));
if (wp) {
wp->GetDataField()->SetAsFloat(lround(tp.AATCircleRadius
*DISTANCEMODIFY*DISTANCE_ROUNDING)/DISTANCE_ROUNDING);
wp->GetDataField()->SetUnits(Units::GetDistanceName());
wp->set_visible(tp.AATType == 0);
wp->RefreshDisplay();
}
wp = (WndProperty*)wf->FindByName(_T("prpAATSectorRadius"));
if (wp) {
wp->GetDataField()->SetAsFloat(lround(tp.AATSectorRadius
*DISTANCEMODIFY*DISTANCE_ROUNDING)/DISTANCE_ROUNDING);
wp->GetDataField()->SetUnits(Units::GetDistanceName());
wp->set_visible(tp.AATType > 0);
wp->RefreshDisplay();
}
wp = (WndProperty*)wf->FindByName(_T("prpAATStartRadial"));
if (wp) {
wp->GetDataField()->SetAsFloat(tp.AATStartRadial);
wp->set_visible(tp.AATType > 0);
wp->RefreshDisplay();
}
wp = (WndProperty*)wf->FindByName(_T("prpAATFinishRadial"));
if (wp) {
wp->GetDataField()->SetAsFloat(tp.AATFinishRadial);
wp->set_visible(tp.AATType > 0);
wp->RefreshDisplay();
}
}
示例3: SetValues
static void SetValues(bool first=false) {
WndProperty* wp;
wp = (WndProperty*)wf->FindByName(TEXT("prpTaskFinishLine"));
if (wp) {
DataFieldEnum* dfe;
dfe = (DataFieldEnum*)wp->GetDataField();
if (first) {
// LKTOKEN [email protected]_ = "Cylinder"
dfe->addEnumText(gettext(TEXT("[email protected]_")));
// LKTOKEN [email protected]_ = "Line"
dfe->addEnumText(gettext(TEXT("[email protected]_")));
// LKTOKEN [email protected]_ = "FAI Sector"
dfe->addEnumText(gettext(TEXT("[email protected]_")));
}
dfe->Set(FinishLine);
wp->RefreshDisplay();
}
wp = (WndProperty*)wf->FindByName(TEXT("prpTaskFinishRadius"));
if (wp) {
wp->GetDataField()->SetAsFloat(lround(FinishRadius*DISTANCEMODIFY*DISTANCE_ROUNDING)/DISTANCE_ROUNDING);
wp->GetDataField()->SetUnits(Units::GetDistanceName());
wp->RefreshDisplay();
}
wp = (WndProperty*)wf->FindByName(TEXT("prpTaskStartLine"));
if (wp) {
DataFieldEnum* dfe;
dfe = (DataFieldEnum*)wp->GetDataField();
if (first) {
// LKTOKEN [email protected]_ = "Cylinder"
dfe->addEnumText(gettext(TEXT("[email protected]_")));
// LKTOKEN [email protected]_ = "Line"
dfe->addEnumText(gettext(TEXT("[email protected]_")));
// LKTOKEN [email protected]_ = "FAI Sector"
dfe->addEnumText(gettext(TEXT("[email protected]_")));
}
dfe->SetDetachGUI(true); // disable call to OnAATEnabled
dfe->Set(StartLine);
dfe->SetDetachGUI(false);
wp->RefreshDisplay();
}
wp = (WndProperty*)wf->FindByName(TEXT("prpTaskStartRadius"));
if (wp) {
wp->GetDataField()->SetAsFloat(lround(StartRadius*DISTANCEMODIFY*DISTANCE_ROUNDING)/DISTANCE_ROUNDING);
wp->GetDataField()->SetUnits(Units::GetDistanceName());
wp->RefreshDisplay();
}
wp = (WndProperty*)wf->FindByName(TEXT("prpTaskFAISector"));
if (wp) {
// 110223 CAN ANYONE PLEASE CHECK WHAT THE HACK IS A BOOL FOR BILL GATES? BECAUSE IF FALSE IS -1 THEN
// WE HAVE MANY PROBLEMS! I THINK IT IS TIME TO GO BACK TO bool AND GET RID OF MS BOOLS!!
wp->SetVisible(AATEnabled==0);
DataFieldEnum* dfe;
dfe = (DataFieldEnum*)wp->GetDataField();
if (first) {
// LKTOKEN [email protected]_ = "Cylinder"
dfe->addEnumText(gettext(TEXT("[email protected]_")));
// LKTOKEN [email protected]_ = "FAI Sector"
dfe->addEnumText(gettext(TEXT("[email protected]_")));
dfe->addEnumText(gettext(TEXT("DAe 0.5/10")));
}
dfe->SetDetachGUI(true); // disable call to OnAATEnabled
dfe->Set(SectorType);
dfe->SetDetachGUI(false);
wp->RefreshDisplay();
}
wp = (WndProperty*)wf->FindByName(TEXT("prpTaskSectorRadius"));
if (wp) {
wp->SetVisible(AATEnabled==0);
wp->GetDataField()->SetAsFloat(lround(SectorRadius*DISTANCEMODIFY*DISTANCE_ROUNDING)/DISTANCE_ROUNDING);
wp->GetDataField()->SetUnits(Units::GetDistanceName());
wp->RefreshDisplay();
}
wp = (WndProperty*)wf->FindByName(TEXT("prpAutoAdvance"));
if (wp) {
DataFieldEnum* dfe;
dfe = (DataFieldEnum*)wp->GetDataField();
if (first) {
// LKTOKEN [email protected]_ = "Manual"
dfe->addEnumText(gettext(TEXT("[email protected]_")));
// LKTOKEN [email protected]_ "Auto"
dfe->addEnumText(gettext(TEXT("[email protected]_")));
// LKTOKEN [email protected]_ = "Arm"
dfe->addEnumText(gettext(TEXT("[email protected]_")));
// LKTOKEN [email protected]_ = "Arm start"
dfe->addEnumText(gettext(TEXT("[email protected]_")));
// LKTOKEN [email protected]_ = "Arm TPs"
dfe->addEnumText(gettext(TEXT("[email protected]_")));
}
dfe->Set(AutoAdvance);
wp->RefreshDisplay();
}
wp = (WndProperty*)wf->FindByName(TEXT("prpMinTime"));
//.........这里部分代码省略.........
示例4: SetValues
static void SetValues(bool first=false) {
WndProperty* wp;
wp = (WndProperty*)wf->FindByName(_T("prpTaskFinishLine"));
if (wp) {
DataFieldEnum* dfe;
dfe = (DataFieldEnum*)wp->GetDataField();
if (first) {
dfe->addEnumText(gettext(_T("Cylinder")));
dfe->addEnumText(gettext(_T("Line")));
dfe->addEnumText(gettext(_T("FAI Sector")));
}
dfe->Set(settings_task.FinishType);
wp->RefreshDisplay();
}
wp = (WndProperty*)wf->FindByName(_T("prpTaskFinishRadius"));
if (wp) {
wp->GetDataField()->SetAsFloat(lround(settings_task.FinishRadius*DISTANCEMODIFY*DISTANCE_ROUNDING)/DISTANCE_ROUNDING);
wp->GetDataField()->SetUnits(Units::GetDistanceName());
wp->RefreshDisplay();
}
wp = (WndProperty*)wf->FindByName(_T("prpTaskStartLine"));
if (wp) {
DataFieldEnum* dfe;
dfe = (DataFieldEnum*)wp->GetDataField();
if (first) {
dfe->addEnumText(gettext(_T("Cylinder")));
dfe->addEnumText(gettext(_T("Line")));
dfe->addEnumText(gettext(_T("FAI Sector")));
}
dfe->SetDetachGUI(true); // disable call to OnAATEnabled
dfe->Set(settings_task.StartType);
dfe->SetDetachGUI(false);
wp->RefreshDisplay();
}
wp = (WndProperty*)wf->FindByName(_T("prpTaskStartRadius"));
if (wp) {
wp->GetDataField()->SetAsFloat(lround(settings_task.StartRadius*DISTANCEMODIFY*DISTANCE_ROUNDING)/DISTANCE_ROUNDING);
wp->GetDataField()->SetUnits(Units::GetDistanceName());
wp->RefreshDisplay();
}
wp = (WndProperty*)wf->FindByName(_T("prpTaskFAISector"));
if (wp) {
wp->set_visible(settings_task.AATEnabled == 0);
DataFieldEnum* dfe;
dfe = (DataFieldEnum*)wp->GetDataField();
if (first) {
dfe->addEnumText(gettext(_T("Cylinder")));
dfe->addEnumText(gettext(_T("FAI Sector")));
dfe->addEnumText(gettext(_T("DAe 0.5/10")));
}
dfe->SetDetachGUI(true); // disable call to OnAATEnabled
dfe->Set(settings_task.SectorType);
dfe->SetDetachGUI(false);
wp->RefreshDisplay();
}
wp = (WndProperty*)wf->FindByName(_T("prpTaskSectorRadius"));
if (wp) {
wp->set_visible(settings_task.AATEnabled == 0);
wp->GetDataField()->SetAsFloat(lround(settings_task.SectorRadius*DISTANCEMODIFY*DISTANCE_ROUNDING)/DISTANCE_ROUNDING);
wp->GetDataField()->SetUnits(Units::GetDistanceName());
wp->RefreshDisplay();
}
wp = (WndProperty*)wf->FindByName(_T("prpAutoAdvance"));
if (wp) {
DataFieldEnum* dfe;
dfe = (DataFieldEnum*)wp->GetDataField();
if (first) {
dfe->addEnumText(gettext(_T("Manual")));
dfe->addEnumText(gettext(_T("Auto")));
dfe->addEnumText(gettext(_T("Arm")));
dfe->addEnumText(gettext(_T("Arm start")));
}
dfe->Set(settings_task.AutoAdvance);
wp->RefreshDisplay();
}
wp = (WndProperty*)wf->FindByName(_T("prpMinTime"));
if (wp) {
wp->set_visible(settings_task.AATEnabled > 0);
wp->GetDataField()->SetAsFloat(settings_task.AATTaskLength);
wp->RefreshDisplay();
}
wp = (WndProperty*)wf->FindByName(_T("prpEnableMultipleStartPoints"));
if (wp) {
wp->GetDataField()->Set(settings_task.EnableMultipleStartPoints);
wp->RefreshDisplay();
}
wp = (WndProperty*)wf->FindByName(_T("prpAATEnabled"));
if (wp) {
bool aw = (settings_task.AATEnabled != 0);
wp->GetDataField()->Set(aw);
//.........这里部分代码省略.........