void RASPSettingsPanel::Prepare(ContainerWindow &parent, const PixelRect &rc) { WndProperty *wp; wp = AddEnum(_("Field"), nullptr); DataFieldEnum *dfe = (DataFieldEnum *)wp->GetDataField(); dfe->EnableItemHelp(true); dfe->addEnumText(_("Terrain")); for (unsigned i = 1; i < RasterWeather::MAX_WEATHER_MAP; i++) { const TCHAR *label = RASP.ItemLabel(i); if (label != NULL) dfe->AddChoice(i, label, nullptr, RASP.ItemHelp(i)); } dfe->Set(RASP.GetParameter()); wp->RefreshDisplay(); wp = AddEnum(_("Time"), nullptr); dfe = (DataFieldEnum *)wp->GetDataField(); dfe->addEnumText(_("Now")); for (unsigned i = 1; i < RasterWeather::MAX_WEATHER_TIMES; i++) { if (RASP.isWeatherAvailable(i)) { TCHAR timetext[10]; _stprintf(timetext, _T("%04d"), RASP.IndexToTime(i)); dfe->addEnumText(timetext, i); } } dfe->Set(RASP.GetTime()); wp->RefreshDisplay(); }
void V7ConfigWidget::Prepare(ContainerWindow &parent, const PixelRect &rc) { RequestAllSettings(device); brgps = WaitUnsignedValue(device, "BRGPS", 5); brpda = WaitUnsignedValue(device, "BRPDA", 5); static gcc_constexpr_data StaticEnumChoice baud_list[] = { { 0, _T("4800"), NULL }, { 1, _T("9600"), NULL }, { 2, _T("19200"), NULL }, { 3, _T("38400"), NULL }, { 4, _T("57600"), NULL }, { 5, _T("115200"), NULL }, { 6, _T("230400"), NULL }, { 7, _T("256000"), NULL }, { 8, _T("460800"), NULL }, { 9, _T("500k"), NULL }, { 10, _T("1M"), NULL }, { 0 } }; AddEnum(_("GPS baud rate"), NULL, baud_list, brgps); AddEnum(_("PDA baud rate"), NULL, baud_list, brpda); }
void RASPSettingsPanel::Prepare(ContainerWindow &parent, const PixelRect &rc) { const WeatherUIState &state = CommonInterface::GetUIState().weather; time = state.time; WndProperty *wp; wp = AddEnum(_("Field"), nullptr, this); DataFieldEnum *dfe = (DataFieldEnum *)wp->GetDataField(); dfe->EnableItemHelp(true); for (unsigned i = 0; i < rasp.GetItemCount(); i++) { const auto &mi = rasp.GetItemInfo(i); const TCHAR *label = mi.label; if (label != nullptr) label = gettext(label); const TCHAR *help = mi.help; if (help != nullptr) help = gettext(help); dfe->AddChoice(i, mi.name, label, help); } dfe->Set(state.map); wp->RefreshDisplay(); AddEnum(_("Time"), nullptr, this); UpdateTimeControl(); }
void mitk::ResliceMethodProperty::AddThickSlicesTypes() { AddEnum( "disabled", (IdType) 0 ); AddEnum( "mip", (IdType) 1 ); AddEnum( "sum", (IdType) 2 ); AddEnum( "weighted", (IdType) 3 ); }
void mitk::ConnectomicsRenderingNodeRadiusParameterProperty::AddRenderingNodeRadiusParameters() { AddEnum( connectomicsRenderingNodeParameterConstant, NODE_RADIUS_CONSTANT ); AddEnum( connectomicsRenderingNodeParameterDegree , NODE_RADIUS_DEGREE ); AddEnum( connectomicsRenderingNodeParameterBetweenness , NODE_RADIUS_BETWEENNESS ); AddEnum( connectomicsRenderingNodeParameterClustering , NODE_RADIUS_CLUSTERING ); }
void Create() { AddEnum(_("Airbrake locked"), nullptr, airbrake_state_list, false); AddEnum(_("Flaps"), nullptr, flap_position_list, 0); AddBoolean(_("Gear down"), nullptr, false); AddBoolean(_("Acknowledge"), nullptr, false); AddBoolean(_("Repeat"), nullptr, false); AddBoolean(_("Speed command"), nullptr, false); }
void mitk::VtkScalarModeProperty::AddInterpolationTypes() { AddEnum( "Default", static_cast<IdType>( VTK_SCALAR_MODE_DEFAULT ) ); AddEnum( "PointData", static_cast<IdType>( VTK_SCALAR_MODE_USE_POINT_DATA ) ); AddEnum( "CellData", static_cast<IdType>( VTK_SCALAR_MODE_USE_CELL_DATA ) ); AddEnum( "PointFieldData", static_cast<IdType>( VTK_SCALAR_MODE_USE_POINT_FIELD_DATA ) ); AddEnum( "CellFieldData", static_cast<IdType>( VTK_SCALAR_MODE_USE_CELL_FIELD_DATA ) ); }
void mitk::RenderingModeProperty::AddRenderingModes() { AddEnum( "LevelWindow_Color", LEVELWINDOW_COLOR ); AddEnum( "LookupTable_LevelWindow_Color", LOOKUPTABLE_LEVELWINDOW_COLOR ); AddEnum( "ColorTransferFunction_LevelWindow_Color", COLORTRANSFERFUNCTION_LEVELWINDOW_COLOR ); AddEnum( "LookupTable_Color", LOOKUPTABLE_COLOR ); AddEnum( "ColorTransferFunction_Color", COLORTRANSFERFUNCTION_COLOR ); }
void GlideComputerConfigPanel::Prepare(ContainerWindow &parent, const PixelRect &rc) { const ComputerSettings &settings_computer = XCSoarInterface::GetComputerSettings(); RowFormWidget::Prepare(parent, rc); static gcc_constexpr_data StaticEnumChoice auto_mc_list[] = { { (unsigned)TaskBehaviour::AutoMCMode::FINALGLIDE, N_("Final glide"), N_("Adjusts MC for fastest arrival. For OLC sprint tasks, the MacCready is adjusted in " "order to cover the greatest distance in the remaining time and reach the finish height.") }, { (unsigned)TaskBehaviour::AutoMCMode::CLIMBAVERAGE, N_("Trending average climb"), N_("Sets MC to the trending average climb rate based on all climbs.") }, { (unsigned)TaskBehaviour::AutoMCMode::BOTH, N_("Both"), N_("Uses trending average during task, then fastest arrival when in final glide mode.") }, { 0 } }; AddEnum(_("Auto MC mode"), _("This option defines which auto MacCready algorithm is used."), auto_mc_list, (unsigned)settings_computer.task.auto_mc_mode); AddBoolean(_("Block speed to fly"), _("If enabled, the command speed in cruise is set to the MacCready speed to fly in " "no vertical air-mass movement. If disabled, the command speed in cruise is set " "to the dolphin speed to fly, equivalent to the MacCready speed with vertical " "air-mass movement."), settings_computer.features.block_stf_enabled); SetExpertRow(BlockSTF); AddBoolean(_("Nav. by baro altitude"), _("When enabled and if connected to a barometric altimeter, barometric altitude is " "used for all navigation functions. Otherwise GPS altitude is used."), settings_computer.features.nav_baro_altitude_enabled); SetExpertRow(EnableNavBaroAltitude); AddBoolean(_("Flap forces cruise"), _("When Vega variometer is connected and this option is true, the positive flap " "setting switches the flight mode between circling and cruise."), settings_computer.external_trigger_cruise_enabled); SetExpertRow(EnableExternalTriggerCruise); static gcc_constexpr_data StaticEnumChoice aver_eff_list[] = { { ae15seconds, _T("15 s"), N_("Preferred period for paragliders.") }, { ae30seconds, _T("30 s") }, { ae60seconds, _T("60 s") }, { ae90seconds, _T("90 s"), N_("Preferred period for gliders.") }, { ae2minutes, _T("2 min") }, { ae3minutes, _T("3 min") }, { 0 } }; AddEnum(_("L/D average period"), _("Here you can decide on how many seconds of flight this calculation must be done. " "Normally for gliders a good value is 90-120 seconds, and for paragliders 15 seconds."), aver_eff_list, settings_computer.average_eff_time); SetExpertRow(AverEffTime); }
void SymbolsConfigPanel::Prepare(ContainerWindow &parent, const PixelRect &rc) { const MapSettings &settings_map = CommonInterface::GetMapSettings(); AddEnum(_("Ground track"), _("Display the ground track as a grey line on the map."), ground_track_mode_list, (unsigned)settings_map.display_ground_track); AddBoolean(_("FLARM traffic"), _("This enables the display of FLARM traffic on the map window."), settings_map.show_flarm_on_map); AddEnum(_("Trail length"), _("Determines whether and how long a snail trail is drawn behind the glider."), trail_length_list, (unsigned)settings_map.trail.length, this); SetExpertRow(TRAIL_LENGTH); AddBoolean(_("Trail drift"), _("Determines whether the snail trail is drifted with the wind when displayed in " "circling mode. Switched Off, " "the snail trail stays uncompensated for wind drift."), settings_map.trail.wind_drift_enabled); SetExpertRow(TRAIL_DRIFT); AddEnum(_("Trail type"), _("Sets the type of the snail trail display."), trail_type_list, (int)settings_map.trail.type); SetExpertRow(TRAIL_TYPE); AddBoolean(_("Trail scaled"), _("If set to ON the snail trail width is scaled according to the vario signal."), settings_map.trail.scaling_enabled); SetExpertRow(TRAIL_WIDTH); AddBoolean(_("Detour cost markers"), _("If the aircraft heading deviates from the current waypoint, markers are displayed " "at points ahead of the aircraft. The value of each marker is the extra distance " "required to reach that point as a percentage of straight-line distance to the waypoint."), settings_map.detour_cost_markers_enabled); SetExpertRow(ENABLE_DETOUR_COST_MARKERS); AddEnum(_("Aircraft symbol"), NULL, aircraft_symbol_list, (unsigned)settings_map.aircraft_symbol); SetExpertRow(AIRCRAFT_SYMBOL); AddEnum(_("Wind arrow"), _("Determines the way the wind arrow is drawn on the map."), wind_arrow_list, (unsigned)settings_map.wind_arrow_style); SetExpertRow(WIND_ARROW_STYLE); AddBoolean(_("FAI triangle areas"), _("Show FAI triangle areas on the map."), settings_map.show_fai_triangle_areas); SetExpertRow(SHOW_FAI_TRIANGLE_AREAS); ShowTrailControls(settings_map.trail.length != TrailSettings::Length::OFF); }
void FLARMConfigWidget::Prepare(ContainerWindow &parent, const PixelRect &rc) { RequestAllSettings(device); baud = GetUnsignedValue(device, "BAUD", 2); priv = GetUnsignedValue(device, "PRIV", 0); thre = GetUnsignedValue(device, "THRE", 2); range = GetUnsignedValue(device, "RANGE", 3000); acft = GetUnsignedValue(device, "ACFT", 0); log_int = GetUnsignedValue(device, "LOGINT", 2); notrack = GetUnsignedValue(device, "NOTRACK", 0); static constexpr StaticEnumChoice baud_list[] = { { 0, _T("4800"), NULL }, { 1, _T("9600"), NULL }, { 2, _T("19200"), NULL }, { 4, _T("38400"), NULL }, { 5, _T("57600"), NULL }, { 0 } }; AddEnum(_("Baud rate"), NULL, baud_list, baud); AddBoolean(_("Stealth mode"), NULL, priv == 1); AddInteger(_("Threshold"), NULL, _T("%d m/s"), _T("%d"), 1, 10, 1, thre); AddInteger(_("Range"), NULL, _T("%d m"), _T("%d"), 2000, 25500, 250, range); static constexpr StaticEnumChoice acft_list[] = { { (unsigned)FlarmTraffic::AircraftType::UNKNOWN, N_("Unkown") }, { (unsigned)FlarmTraffic::AircraftType::GLIDER, N_("Glider") }, { (unsigned)FlarmTraffic::AircraftType::TOW_PLANE, N_("Tow plane") }, { (unsigned)FlarmTraffic::AircraftType::HELICOPTER, N_("Helicopter") }, { (unsigned)FlarmTraffic::AircraftType::PARACHUTE, N_("Parachute") }, { (unsigned)FlarmTraffic::AircraftType::DROP_PLANE, N_("Drop plane") }, { (unsigned)FlarmTraffic::AircraftType::HANG_GLIDER, N_("Hang glider") }, { (unsigned)FlarmTraffic::AircraftType::PARA_GLIDER, N_("Paraglider") }, { (unsigned)FlarmTraffic::AircraftType::POWERED_AIRCRAFT, N_("Powered aircraft") }, { (unsigned)FlarmTraffic::AircraftType::JET_AIRCRAFT, N_("Jet aircraft") }, { (unsigned)FlarmTraffic::AircraftType::FLYING_SAUCER, N_("Flying saucer") }, { (unsigned)FlarmTraffic::AircraftType::BALLOON, N_("Balloon") }, { (unsigned)FlarmTraffic::AircraftType::AIRSHIP, N_("Airship") }, { (unsigned)FlarmTraffic::AircraftType::UAV, N_("Unmanned aerial vehicle") }, { (unsigned)FlarmTraffic::AircraftType::STATIC_OBJECT, N_("Static object") }, { 0 } }; AddEnum(_("Type"), NULL, acft_list, acft); AddInteger(_("Logger interval"), NULL, _T("%d s"), _T("%d"), 1, 8, 1, log_int); AddBoolean(_("No tracking mode"), NULL, notrack == 1); }
void TrackingConfigPanel::Prepare(ContainerWindow &parent, const PixelRect &rc) { const TrackingSettings &settings = CommonInterface::GetComputerSettings().tracking; RowFormWidget::Prepare(parent, rc); #ifdef HAVE_SKYLINES_TRACKING AddBoolean(_T("SkyLines"), NULL, settings.skylines.enabled, this); AddTime(_("Tracking Interval"), NULL, 5, 1200, 5, settings.skylines.interval); #ifdef HAVE_SKYLINES_TRACKING_HANDLER AddBoolean(_("Track friends"), _("Download the position of your friends live from the SkyLines server."), settings.skylines.traffic_enabled, this); #endif StaticString<64> buffer; if (settings.skylines.key != 0) buffer.UnsafeFormat(_T("%llX"), (unsigned long long)settings.skylines.key); else buffer.clear(); AddText(_T("Key"), NULL, buffer); #endif #if defined(HAVE_SKYLINES_TRACKING) && defined(HAVE_LIVETRACK24) AddSpacer(); #endif #ifdef HAVE_LIVETRACK24 AddBoolean(_T("LiveTrack24"), _T(""), settings.livetrack24.enabled, this); AddTime(_("Tracking Interval"), _T(""), 5, 3600, 5, settings.interval); AddEnum(_("Vehicle Type"), _("Type of vehicle used."), vehicle_type_list, (unsigned) settings.vehicleType); WndProperty *edit = AddEnum(_("Server"), _T(""), server_list, 0); ((DataFieldEnum *)edit->GetDataField())->Set(settings.livetrack24.server); edit->RefreshDisplay(); AddText(_("Username"), _T(""), settings.livetrack24.username); AddPassword(_("Password"), _T(""), settings.livetrack24.password); #endif #ifdef HAVE_SKYLINES_TRACKING SetSkyLinesEnabled(settings.skylines.enabled); #endif #ifdef HAVE_LIVETRACK24 SetEnabled(settings.livetrack24.enabled); #endif }
void MapDisplayConfigPanel::Prepare(ContainerWindow &parent, const PixelRect &rc) { RowFormWidget::Prepare(parent, rc); const MapSettings &settings_map = CommonInterface::GetMapSettings(); const PageSettings &page_settings = CommonInterface::GetUISettings().pages; AddEnum(_("Cruise orientation"), _("Determines how the screen is rotated with the glider"), orientation_list, (unsigned)settings_map.cruise_orientation, this); AddEnum(_("Circling orientation"), _("Determines how the screen is rotated with the glider while circling"), orientation_list, (unsigned)settings_map.circling_orientation, this); AddBoolean(_("Circling zoom"), _("If enabled, then the map will zoom in automatically when entering circling mode and zoom out automatically when leaving circling mode."), settings_map.circle_zoom_enabled); AddEnum(_("Map shift reference"), _("Determines what is used to shift the glider from the map center"), shift_bias_list, (unsigned)settings_map.map_shift_bias, this); SetExpertRow(MAP_SHIFT_BIAS); AddInteger(_("Glider position offset"), _("Defines the location of the glider drawn on the screen in percent from the screen edge."), _T("%d %%"), _T("%d"), 10, 50, 5, settings_map.glider_screen_position); SetExpertRow(GliderScreenPosition); AddFloat(_("Max. auto zoom distance"), _("The upper limit for auto zoom distance."), _T("%.0f %s"), _T("%.0f"), fixed(20), fixed(250), fixed(10), false, UnitGroup::DISTANCE, settings_map.max_auto_zoom_distance); SetExpertRow(MaxAutoZoomDistance); AddBoolean(_("Distinct page zoom"), _("Maintain one map zoom level on each page."), page_settings.distinct_zoom); SetExpertRow(PAGES_DISTINCT_ZOOM); UpdateVisibilities(); }
void LX16xxConfigWidget::Prepare(ContainerWindow &parent, const PixelRect &rc) { RequestAllSettings(device); AddInteger(_("Avg. time"), NULL, _T("%d s"), _T("%d"), 1, 30, 1, WaitUnsignedValue(device, LX1600::Setting::VARIO_AVG_TIME, 25)); static constexpr StaticEnumChoice range_list[] = { { 25, _T("2.5 m/s"), NULL }, { 50, _T("5.0 m/s"), NULL }, { 100, _T("10 m/s"), NULL }, { 0 } }; AddEnum(_("Vario Range"), NULL, range_list, (unsigned)(WaitFixedValue(device, LX1600::Setting::VARIO_RANGE, fixed(5.0)) * 10)); AddFloat(_("Vario Filter"), NULL, _T("%.2f s"), _T("%.2f"), fixed(0.25), fixed(5), fixed(0.25), false, WaitFixedValue(device, LX1600::Setting::VARIO_FILTER, fixed(1))); static constexpr StaticEnumChoice te_level_list[] = { { 0, _T("Off"), NULL }, { 50, _T("50 %"), NULL }, { 60, _T("60 %"), NULL }, { 70, _T("70 %"), NULL }, { 80, _T("80 %"), NULL }, { 90, _T("90 %"), NULL }, { 100, _T("100 %"), NULL }, { 110, _T("110 %"), NULL }, { 120, _T("120 %"), NULL }, { 130, _T("130 %"), NULL }, { 140, _T("140 %"), NULL }, { 150, _T("150 %"), NULL }, { 0 } }; AddEnum(_("TE Level"), NULL, te_level_list, (unsigned)WaitFixedValue(device, LX1600::Setting::TE_LEVEL, fixed(50))); AddFloat(_("TE Filter"), NULL, _T("%.2f s"), _T("%.2f"), fixed(0.0), fixed(2), fixed(1), false, WaitFixedValue(device, LX1600::Setting::TE_FILTER, fixed(1.5))); AddFloat(_("SMART Filter"), NULL, _T("%.2f m/s²"), _T("%.2f"), fixed(0.5), fixed(5), fixed(0.1), false, WaitFixedValue(device, LX1600::Setting::SMART_VARIO_FILTER, fixed(1))); }
void mitk::ShaderProperty::AddShaderTypes() { AddEnum( "fixed" ); std::list<mitk::ShaderRepository::Shader::Pointer> *l = mitk::ShaderRepository::GetGlobalShaderRepository()->GetShaders(); std::list<mitk::ShaderRepository::Shader::Pointer>::const_iterator i = l->begin(); while( i != l->end() ) { AddEnum( (*i)->name ); i++; } }
void FontEditWidget::Prepare(ContainerWindow &parent, const PixelRect &rc) { RowFormWidget::Prepare(parent, rc); #ifdef USE_GDI WndProperty *wp = AddEnum(_("Font face"), NULL, this); { DataFieldEnum &df = *(DataFieldEnum *)wp->GetDataField(); df.addEnumText(_T("Tahoma")); df.addEnumText(_T("TahomaBD")); df.addEnumText(_T("DejaVu Sans Condensed")); } #else /* we cannot obtain a list of fonts on SDL/OpenGL currently */ #endif AddInteger(_("Height"), NULL, _T("%d"), _T("%d"), 1, 200, 1, 0, this); AddBoolean(_("Bold"), NULL, false, this); AddBoolean(_("Italic"), NULL, false, this); PixelRect preview_rc { 0, 0, Layout::Scale(250), Layout::Scale(100) }; LargeTextWindowStyle preview_style; preview_style.Border(); LargeTextWindow *preview = new LargeTextWindow(); preview->Create((ContainerWindow &)GetWindow(), preview_rc, preview_style); Add(preview); Load(); }
WndProperty *AddEnum(const TCHAR *label, const TCHAR *help, const StaticEnumChoice *list, unsigned value, DataFieldListener *listener) { WndProperty *control = AddEnum(label, help, list, value); control->GetDataField()->SetListener(listener); return control; }
void NanoConfigWidget::Prepare(ContainerWindow &parent, const PixelRect &rc) { RequestAllSettings(device); static constexpr StaticEnumChoice baud_list[] = { { 2400, _T("2400"), NULL }, { 4800, _T("4800"), NULL }, { 9600, _T("9600"), NULL }, { 19200, _T("19200"), NULL }, { 38400, _T("38400"), NULL }, { 57600, _T("57600"), NULL }, { 115200, _T("115200"), NULL }, { 0 } }; AddEnum(_("Baud rate"), NULL, baud_list, WaitUnsignedValue(device, "BAUDRATE", 115200)); AddBoolean(_("Auto off"), NULL, WaitBoolValue(device, "AUTOOFF", false)); AddBoolean(_("Auto finish flight"), NULL, WaitBoolValue(device, "OFFFIN", true)); AddBoolean(_("Always run"), NULL, WaitBoolValue(device, "ALWRUN", false)); AddBoolean(_("Enable NMEA"), NULL, WaitBoolValue(device, "NMEA", true)); AddInteger(_("Recording interval"), NULL, _T("%d s"), _T("%d"), 1, 60, 1, WaitUnsignedValue(device, "RECINT", 1)); }
void LoggerConfigPanel::Prepare(ContainerWindow &parent, const PixelRect &rc) { const ComputerSettings &settings_computer = CommonInterface::GetComputerSettings(); const LoggerSettings &logger = settings_computer.logger; RowFormWidget::Prepare(parent, rc); AddTime(_("Time step cruise"), _("This is the time interval between logged points when not circling."), 1, 30, 1, logger.time_step_cruise); SetExpertRow(LoggerTimeStepCruise); AddTime(_("Time step circling"), _("This is the time interval between logged points when circling."), 1, 30, 1, logger.time_step_circling); SetExpertRow(LoggerTimeStepCircling); AddEnum(_("Auto. logger"), _("Enables the automatic starting and stopping of logger on takeoff and landing " "respectively. Disable when flying paragliders."), auto_logger_list, (unsigned)logger.auto_logger); SetExpertRow(DisableAutoLogger); AddBoolean(_("NMEA logger"), _("Enable the NMEA logger on startup? If this option is disabled, " "the NMEA logger can still be started manually."), logger.enable_nmea_logger); SetExpertRow(EnableNMEALogger); AddBoolean(_("Log book"), _("Logs each start and landing."), logger.enable_flight_logger); SetExpertRow(EnableFlightLogger); }
void VegaParametersWidget::AddParameter(const StaticParameter &p) { assert(p.label != NULL); const TCHAR *label = gettext(p.label); const TCHAR *help = p.help != NULL ? gettext(p.help) : NULL; switch (p.type) { case DataField::Type::BOOLEAN: assert(p.choices == NULL); assert(p.format == NULL); AddBoolean(p.name, label, help); break; case DataField::Type::INTEGER: assert(p.choices == NULL); assert(p.format != NULL); AddInteger(p.name, label, help, p.min_value, p.max_value, p.format); break; case DataField::Type::ENUM: assert(p.choices != NULL); assert(p.format == NULL); AddEnum(p.name, label, help, p.choices); break; default: gcc_unreachable(); assert(false); } }
void SymbolsConfigPanel::Prepare(ContainerWindow &parent, const PixelRect &rc) { const MapSettings &settings_map = CommonInterface::GetMapSettings(); AddEnum(_("Track bearing"), _("Display the track bearing (ground track projection) on the map."), track_bearing_mode_list, settings_map.display_track_bearing); AddBoolean(_("FLARM traffic"), _("This enables the display of FLARM traffic on the map window."), settings_map.show_flarm_on_map); AddEnum(_("Trail length"), NULL, trail_length_list, (unsigned)settings_map.trail.length, this); SetExpertRow(Trail); AddBoolean(_("Trail drift"), _("Determines whether the snail trail is drifted with the wind when displayed in " "circling mode."), settings_map.trail.wind_drift_enabled); SetExpertRow(TrailDrift); AddEnum(_("Trail type"), NULL, trail_type_list, (int)settings_map.trail.type); SetExpertRow(SnailType); AddBoolean(_("Trail scaled"), _("If set to ON the snail trail width is scaled according to the vario signal."), settings_map.trail.scaling_enabled); SetExpertRow(SnailWidthScale); AddBoolean(_("Detour cost markers"), _("If the aircraft heading deviates from the current waypoint, markers are displayed " "at points ahead of the aircraft. The value of each marker is the extra distance " "required to reach that point as a percentage of straight-line distance to the waypoint."), settings_map.detour_cost_markers_enabled); SetExpertRow(DetourCostMarker); AddEnum(_("Aircraft symbol"), NULL, aircraft_symbol_list, settings_map.aircraft_symbol); SetExpertRow(AircraftSymbol); AddEnum(_("Wind arrow"), _("Determines the way the wind arrow is drawn on the map."), wind_arrow_list, settings_map.wind_arrow_style); SetExpertRow(WindArrowStyle); ShowTrailControls(settings_map.trail.length != TrailSettings::Length::OFF); }
/* methods from Widget */ virtual void Prepare(ContainerWindow &parent, const PixelRect &rc) { VegaParametersWidget::Prepare(parent, rc); sprintf(names[0], "Tone%sBeepType", mode); AddEnum(names[0], _("Beep type"), NULL, beep_types); sprintf(names[1], "Tone%sPitchScheme", mode); AddEnum(names[1], _("Pitch scheme"), NULL, pitch_schemes); sprintf(names[2], "Tone%sPitchScale", mode); AddEnum(names[2], _("Pitch scale"), NULL, pitch_and_period_scales); sprintf(names[3], "Tone%sPeriodScheme", mode); AddEnum(names[3], _("Period scheme"), NULL, period_schemes); sprintf(names[4], "Tone%sPeriodScale", mode); AddEnum(names[4], _("Period scale"), NULL, pitch_and_period_scales); }
void AirspaceFilterWidget::Prepare(ContainerWindow &parent, const PixelRect &rc) { Add(_("Name"), nullptr, CreateNameDataField(listener)); Add(_("Distance"), nullptr, CreateDistanceDataField(listener)); Add(_("Direction"), nullptr, CreateDirectionDataField(listener)); AddEnum(_("Type"), nullptr, type_filter_list, WILDCARD, listener); }
void RASPSettingsPanel::Prepare(ContainerWindow &parent, const PixelRect &rc) { const WeatherUIState &state = CommonInterface::GetUIState().weather; time = state.time; WndProperty *wp; wp = AddEnum(_("Field"), nullptr, this); wp->GetDataField()->EnableItemHelp(true); FillItemControl(); wp->RefreshDisplay(); AddEnum(_("Time"), nullptr, this); UpdateTimeControl(); AddButton(_("Download"), *this, DOWNLOAD); }
void MapDisplayConfigPanel::Prepare(ContainerWindow &parent, const PixelRect &rc) { instance = this; RowFormWidget::Prepare(parent, rc); const MapSettings &settings_map = CommonInterface::GetMapSettings(); AddEnum(_("Cruise orientation"), _("Determines how the screen is rotated with the glider"), orientation_list, settings_map.cruise_orientation, OnShiftTypeData); AddEnum(_("Circling orientation"), _("Determines how the screen is rotated with the glider while circling"), orientation_list, settings_map.cruise_orientation, OnShiftTypeData); AddBoolean(_("Circling zoom"), _("If enabled, then the map will zoom in automatically when entering circling mode and zoom out automatically when leaving circling mode."), settings_map.circle_zoom_enabled); AddEnum(_("Map shift reference"), _("Determines what is used to shift the glider from the map center"), shift_bias_list, settings_map.map_shift_bias, OnShiftTypeData); AddInteger(_("Glider position offset"), _("Defines the location of the glider drawn on the screen in percent from the screen edge."), _T("%d %%"), _T("%d"), 10, 50, 5, settings_map.glider_screen_position); AddFloat(_("Max. auto zoom distance"), _("The upper limit for auto zoom distance."), _T("%.0f %s"), _T("%.0f"), fixed(20), fixed(250), fixed(10), false, ugDistance, settings_map.max_auto_zoom_distance); UpdateVisibilities(); }
void ExperimentalConfigPanel::Prepare(ContainerWindow &parent, const PixelRect &rc) { RowFormWidget::Prepare(parent, rc); if (HasModelType()) { AddEnum(_("Device model"), _("Select your PNA model to make full use of its hardware capabilities. If it is not included, use Generic type."), model_type_list, (unsigned int)global_model_type); } }
void PageLayoutEditWidget::Prepare(ContainerWindow &parent, const PixelRect &rc) { const InfoBoxSettings &info_box_settings = CommonInterface::GetUISettings().info_boxes; static constexpr StaticEnumChoice main_list[] = { { (unsigned)PageLayout::Main::MAP, N_("Map") }, { (unsigned)PageLayout::Main::FLARM_RADAR, N_("FLARM radar") }, { (unsigned)PageLayout::Main::THERMAL_ASSISTANT, N_("Thermal assistant") }, { 0 } }; AddEnum(_("Main area"), _("Specifies what should be displayed in the main area."), main_list, (unsigned)PageLayout::Main::MAP, this); static constexpr StaticEnumChoice ib_list[] = { { IBP_AUTO, N_("Auto") }, { IBP_NONE, N_("None") }, { 0 } }; WndProperty *wp = AddEnum(_("InfoBoxes"), _("Specifies which InfoBoxes should be displayed on this page."), ib_list, IBP_AUTO, this); DataFieldEnum &ib = *(DataFieldEnum *)wp->GetDataField(); for (unsigned i = 0; i < InfoBoxSettings::MAX_PANELS; ++i) ib.AddChoice(i, gettext(info_box_settings.panels[i].name)); static constexpr StaticEnumChoice bottom_list[] = { { (unsigned)PageLayout::Bottom::NOTHING, N_("Nothing") }, { (unsigned)PageLayout::Bottom::CROSS_SECTION, N_("Cross section") }, { 0 } }; AddEnum(_("Bottom area"), _("Specifies what should be displayed below the main area."), bottom_list, (unsigned)PageLayout::Bottom::NOTHING, this); }
void ExperimentalConfigPanel::Prepare(ContainerWindow &parent, const PixelRect &rc) { RowFormWidget::Prepare(parent, rc); #ifdef HAVE_MODEL_TYPE const SystemSettings &system_settings = CommonInterface::GetSystemSettings(); AddEnum(_("Device model"), _("Select your PNA model to make full use of its hardware capabilities. If it is not included, use Generic type."), model_type_list, (unsigned)system_settings.model_type); #endif }
void WaypointEditWidget::Prepare(gcc_unused ContainerWindow &parent, gcc_unused const PixelRect &rc) { AddText(_("Name"), nullptr, value.name.c_str()); AddText(_("Comment"), nullptr, value.comment.c_str()); Add(_("Location"), nullptr, new GeoPointDataField(value.location,UIGlobals::GetFormatSettings().coordinate_format)); AddFloat(_("Altitude"), nullptr, _T("%.0f %s"), _T("%.0f"), 0, 30000, 5, false, UnitGroup::ALTITUDE, value.elevation); AddEnum(_("Type"), nullptr, waypoint_types, value.IsAirport() ? 1u : (value.IsLandable() ? 2u : 0u )); }
void mitk::RegEvalStyleProperty::AddTypes() { AddEnum( "Blend", static_cast<IdType>( 0 ) ); AddEnum( "Color Blend", static_cast<IdType>( 1 ) ); AddEnum( "Checkerboard", static_cast<IdType>( 2 ) ); AddEnum( "Wipe", static_cast<IdType>( 3 ) ); AddEnum( "Difference", static_cast<IdType>( 4 ) ); AddEnum( "Contour", static_cast<IdType>( 5 ) ); }