本文整理汇总了C++中WndProperty::hide方法的典型用法代码示例。如果您正苦于以下问题:C++ WndProperty::hide方法的具体用法?C++ WndProperty::hide怎么用?C++ WndProperty::hide使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类WndProperty
的用法示例。
在下文中一共展示了WndProperty::hide方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
static void
SetBallast(void)
{
WndProperty* wp;
wp = (WndProperty*)wf->FindByName(_T("prpBallast"));
if (wp) {
if (glide_polar.IsBallastable()) {
DataFieldFloat &df = *(DataFieldFloat *)wp->GetDataField();
df.SetAsFloat(glide_polar.GetBallastLitres());
} else
wp->hide();
wp->RefreshDisplay();
}
wp = (WndProperty*)wf->FindByName(_T("prpWingLoading"));
if (wp) {
const fixed wl = glide_polar.GetWingLoading();
if (wl > fixed_zero) {
DataFieldFloat &df = *(DataFieldFloat *)wp->GetDataField();
df.SetAsFloat(wl);
} else
wp->hide();
wp->RefreshDisplay();
}
}
示例2: assert
void
ExperimentalConfigPanel::Init(WndForm *_wf)
{
assert(_wf != NULL);
wf = _wf;
WndProperty *wp;
if (!is_windows_ce() || is_altair()) {
wp = (WndProperty*)wf->FindByName(_T("prpAppInfoBoxModel"));
if (wp) {
wp->hide();
}
}
#if defined(_WIN32_WCE) && !defined(GNAV)
// VENTA-ADDON Model change config menu 11
wp = (WndProperty*)wf->FindByName(_T("prpAppInfoBoxModel"));
if (wp) {
DataFieldEnum* dfe;
dfe = (DataFieldEnum*)wp->GetDataField();
dfe->addEnumText(_("Generic"));
dfe->addEnumText(_T("HP31x"));
dfe->addEnumText(_T("MedionP5"));
dfe->addEnumText(_T("MIO"));
dfe->addEnumText(_T("Nokia500")); // VENTA3
dfe->addEnumText(_T("PN6000"));
dfe->Set((int)GlobalModelType);
wp->RefreshDisplay();
}
#endif
}
示例3: Visit
void
Visit(const SectorZone& oz)
{
hide_all();
WndFrame* wp = ((WndFrame *)wf->FindByName(_T("frmOZSector")));
if (wp)
wp->show();
LoadFormProperty(*wf, _T("prpOZSectorRadius"),
ugDistance, oz.getRadius());
LoadFormProperty(*wf, _T("prpOZSectorStartRadial"),
oz.getStartRadial().value_degrees());
LoadFormProperty(*wf, _T("prpOZSectorFinishRadial"),
oz.getEndRadial().value_degrees());
WndProperty* wap = (WndProperty*)wf->FindByName(_T("prpOZSectorInnerRadius"));
if (wap) {
wap->hide();
}
}
示例4: assert
void
LayoutConfigPanel::Init(WndForm *_wf)
{
assert(_wf != NULL);
wf = _wf;
WndProperty *wp;
if (Display::RotateSupported()) {
wp = (WndProperty*)wf->FindByName(_T("prpDisplayOrientation"));
assert(wp != NULL);
DataFieldEnum *dfe = (DataFieldEnum *)wp->GetDataField();
dfe->addEnumText(_("Default"));
dfe->addEnumText(_("Portrait"));
dfe->addEnumText(_("Landscape"));
dfe->Set(Profile::GetDisplayOrientation());
wp->RefreshDisplay();
} else {
wp = (WndProperty*)wf->FindByName(_T("prpDisplayOrientation"));
assert(wp != NULL);
wp->hide();
}
wp = (WndProperty*)wf->FindByName(_T("prpAppInfoBoxGeom"));
if (wp) {
DataFieldEnum* dfe;
dfe = (DataFieldEnum*)wp->GetDataField();
dfe->addEnumText(_("8 Top + Bottom (Portrait)"),
InfoBoxLayout::ibTop4Bottom4);
dfe->addEnumText(_("8 Bottom (Portrait)"), InfoBoxLayout::ibBottom8);
dfe->addEnumText(_("8 Top (Portrait)"), InfoBoxLayout::ibTop8);
dfe->addEnumText(_("8 Left + Right (Landscape)"),
InfoBoxLayout::ibLeft4Right4);
dfe->addEnumText(_("8 Left (Landscape)"), InfoBoxLayout::ibLeft8);
dfe->addEnumText(_("8 Right (Landscape)"), InfoBoxLayout::ibRight8);
dfe->addEnumText(_("9 Right + Vario (Landscape)"), InfoBoxLayout::ibGNav);
dfe->addEnumText(_("5 Right (Square)"), InfoBoxLayout::ibSquare);
dfe->addEnumText(_("12 Right (Landscape)"), InfoBoxLayout::ibRight12);
dfe->addEnumText(_("12 Bottom (Portrait)"), InfoBoxLayout::ibBottom12);
dfe->addEnumText(_("24 Right (Landscape)"), InfoBoxLayout::ibRight24);
dfe->Set(InfoBoxLayout::InfoBoxGeometry);
wp->RefreshDisplay();
}
wp = (WndProperty*)wf->FindByName(_T("prpAppStatusMessageAlignment"));
if (wp) {
DataFieldEnum* dfe;
dfe = (DataFieldEnum*)wp->GetDataField();
dfe->addEnumText(_("Center"));
dfe->addEnumText(_("Topleft"));
dfe->Set(Appearance.StateMessageAlign);
wp->RefreshDisplay();
}
wp = (WndProperty*)wf->FindByName(_T("prpDialogStyle"));
if (wp) {
DataFieldEnum* dfe;
dfe = (DataFieldEnum*)wp->GetDataField();
dfe->addEnumText(_("Full width"));
dfe->addEnumText(_("Scaled"));
dfe->addEnumText(_("Scaled centered"));
dfe->addEnumText(_("Fixed"));
dfe->Set(DialogStyleSetting);
wp->RefreshDisplay();
}
LoadFormProperty(*wf, _T("prpAppInverseInfoBox"),
Appearance.InverseInfoBox);
LoadFormProperty(*wf, _T("prpAppInfoBoxColors"), Appearance.InfoBoxColors);
wp = (WndProperty*)wf->FindByName(_T("prpAppInfoBoxBorder"));
if (wp) {
DataFieldEnum* dfe;
dfe = (DataFieldEnum*)wp->GetDataField();
dfe->addEnumText(_("Box"));
dfe->addEnumText(_("Tab"));
dfe->Set(Appearance.InfoBoxBorder);
wp->RefreshDisplay();
}
wp = (WndProperty*)wf->FindByName(_T("prpTabDialogStyle"));
if (wp) {
DataFieldEnum* dfe;
dfe = (DataFieldEnum*)wp->GetDataField();
dfe->addEnumText(_("Text"));
dfe->addEnumText(_("Icons"));
dfe->Set(Appearance.DialogTabStyle);
wp->RefreshDisplay();
}
}
示例5: switch
static void
SetUnits()
{
WndProperty* wp;
switch (Units::GetCoordinateFormat()) {
case cfDDMMSS: // ("DDMMSS");
case cfDDMMSSss: // ("DDMMSS.ss");
wp = (WndProperty*)wf->FindByName(_T("prpLongitudeDDDD"));
assert(wp != NULL);
wp->hide();
wp = (WndProperty*)wf->FindByName(_T("prpLatitudeDDDD"));
assert(wp != NULL);
wp->hide();
wp = (WndProperty*)wf->FindByName(_T("prpLongitudemmm"));
assert(wp != NULL);
wp->hide();
wp = (WndProperty*)wf->FindByName(_T("prpLatitudemmm"));
assert(wp != NULL);
wp->hide();
break;
case cfDDMMmmm: // ("DDMM.mmm");
wp = (WndProperty*)wf->FindByName(_T("prpLongitudeDDDD"));
assert(wp != NULL);
wp->hide();
wp = (WndProperty*)wf->FindByName(_T("prpLatitudeDDDD"));
assert(wp != NULL);
wp->hide();
wp = (WndProperty*)wf->FindByName(_T("prpLongitudeS"));
assert(wp != NULL);
wp->hide();
wp = (WndProperty*)wf->FindByName(_T("prpLatitudeS"));
assert(wp != NULL);
wp->hide();
break;
case cfDDdddd: // ("DD.dddd");
wp = (WndProperty*)wf->FindByName(_T("prpLongitudeM"));
assert(wp != NULL);
wp->hide();
wp = (WndProperty*)wf->FindByName(_T("prpLatitudeM"));
assert(wp != NULL);
wp->hide();
wp = (WndProperty*)wf->FindByName(_T("prpLongitudeS"));
assert(wp != NULL);
wp->hide();
wp = (WndProperty*)wf->FindByName(_T("prpLatitudeS"));
assert(wp != NULL);
wp->hide();
wp = (WndProperty*)wf->FindByName(_T("prpLongitudemmm"));
// hide this field for DD.dddd format
assert(wp != NULL);
wp->hide();
wp = (WndProperty*)wf->FindByName(_T("prpLatitudemmm"));
assert(wp != NULL);
wp->hide();
break;
}
}
示例6: SetUnits
static void SetUnits(void) {
WndProperty* wp;
switch (Units::GetCoordinateFormat()) {
case 0: // ("DDMMSS");
case 1: // ("DDMMSS.ss");
wp = (WndProperty*)wf->FindByName(_T("prpLongitudeDDDD"));
if (wp) {
wp->hide();
}
wp = (WndProperty*)wf->FindByName(_T("prpLatitudeDDDD"));
if (wp) {
wp->hide();
}
wp = (WndProperty*)wf->FindByName(_T("prpLongitudemmm"));
if (wp) {
wp->hide();
}
wp = (WndProperty*)wf->FindByName(_T("prpLatitudemmm"));
if (wp) {
wp->hide();
}
break;
case 2: // ("DDMM.mmm");
wp = (WndProperty*)wf->FindByName(_T("prpLongitudeDDDD"));
if (wp) {
wp->hide();
}
wp = (WndProperty*)wf->FindByName(_T("prpLatitudeDDDD"));
if (wp) {
wp->hide();
}
wp = (WndProperty*)wf->FindByName(_T("prpLongitudeS"));
if (wp) {
wp->hide();
}
wp = (WndProperty*)wf->FindByName(_T("prpLatitudeS"));
if (wp) {
wp->hide();
}
break;
case 3: // ("DD.dddd");
wp = (WndProperty*)wf->FindByName(_T("prpLongitudeM"));
if (wp) {
wp->hide();
}
wp = (WndProperty*)wf->FindByName(_T("prpLatitudeM"));
if (wp) {
wp->hide();
}
wp = (WndProperty*)wf->FindByName(_T("prpLongitudeS"));
if (wp) {
wp->hide();
}
wp = (WndProperty*)wf->FindByName(_T("prpLatitudeS"));
if (wp) {
wp->hide();
}
wp = (WndProperty*)wf->FindByName(_T("prpLongitudemmm"));
// hide this field for DD.dddd format
if (wp) {
wp->hide();
}
wp = (WndProperty*)wf->FindByName(_T("prpLatitudemmm"));
if (wp) {
wp->hide();
}
break;
}
}
示例7:
static void
RefreshCalculator(void)
{
WndProperty* wp;
// update outputs
wp = (WndProperty*)wf->FindByName(_T("prpAATEst"));
if (wp) {
wp->GetDataField()->SetAsFloat((
XCSoarInterface::Calculated().common_stats.task_time_remaining +
XCSoarInterface::Calculated().common_stats.task_time_elapsed) / 60);
wp->RefreshDisplay();
}
// update outputs
wp = (WndProperty*)wf->FindByName(_T("prpAATTime"));
if (wp) {
if (XCSoarInterface::Calculated().task_stats.has_targets) {
wp->GetDataField()->SetAsFloat(
protected_task_manager.get_ordered_task_behaviour().aat_min_time / 60);
wp->RefreshDisplay();
} else {
wp->hide();
}
}
wp = (WndProperty*)wf->FindByName(_T("prpDistance"));
if (wp) {
wp->GetDataField()->SetAsFloat(Units::ToUserDistance(
XCSoarInterface::Calculated().task_stats.total.solution_planned.Vector.Distance));
wp->GetDataField()->SetUnits(Units::GetDistanceName());
wp->RefreshDisplay();
}
wp = (WndProperty*)wf->FindByName(_T("prpMacCready"));
if (wp) {
wp->GetDataField()->SetUnits(Units::GetVerticalSpeedName());
wp->RefreshDisplay();
}
wp = (WndProperty*)wf->FindByName(_T("prpEffectiveMacCready"));
if (wp) {
wp->GetDataField()->SetUnits(Units::GetVerticalSpeedName());
wp->GetDataField()->SetAsFloat(Units::ToUserVSpeed(emc));
wp->RefreshDisplay();
}
/*
wp = (WndProperty*)wf->FindByName(_T("prpRange"));
if (wp) {
wp->RefreshDisplay();
wp->set_visible(task.getSettings().AATEnabled &&
task.ValidTaskPoint(task.getActiveIndex() + 1));
wp->GetDataField()->SetAsFloat(Range*100.0);
wp->RefreshDisplay();
}
fixed v1;
if (XCSoarInterface::Calculated().TaskTimeToGo>0) {
v1 = XCSoarInterface::Calculated().TaskDistanceToGo/
XCSoarInterface::Calculated().TaskTimeToGo;
} else {
v1 = 0;
}
*/
wp = (WndProperty*)wf->FindByName(_T("prpSpeedRemaining"));
if (wp) {
wp->GetDataField()->SetAsFloat(Units::ToUserTaskSpeed(
XCSoarInterface::Calculated().task_stats.total.remaining_effective.get_speed()));
wp->GetDataField()->SetUnits(Units::GetTaskSpeedName());
wp->RefreshDisplay();
}
wp = (WndProperty*)wf->FindByName(_T("prpSpeedAchieved"));
if (wp) {
wp->GetDataField()->SetAsFloat(Units::ToUserTaskSpeed(
XCSoarInterface::Calculated().task_stats.total.travelled.get_speed()));
wp->GetDataField()->SetUnits(Units::GetTaskSpeedName());
wp->RefreshDisplay();
}
wp = (WndProperty*)wf->FindByName(_T("prpCruiseEfficiency"));
if (wp) {
wp->GetDataField()->SetAsFloat(cruise_efficiency * 100);
wp->RefreshDisplay();
}
}