![]() |
VR-Forces Developer's Guide
|
Programmatic Qt widget for editing the ambient sound channel list.
The layout is a master-detail split:
All Qt layout and widget construction is done programmatically – no .ui file.

Public Member Functions | |
| DtProceduralSoundscapesSettingsWidget (DtDe &de, QWidget *parent=nullptr, Qt::WindowFlags f=Qt::Widget) | |
| virtual | ~DtProceduralSoundscapesSettingsWidget () |
| virtual void | setChannels (const std::vector< DtProceduralSoundscapeChannel > &channels) |
Public Member Functions inherited from makVrv::DtProceduralSoundscapesSettingsWidgetInterface | |
| DtProceduralSoundscapesSettingsWidgetInterface () | |
| virtual | ~DtProceduralSoundscapesSettingsWidgetInterface () |
Protected Slots | |
| virtual void | slot_channelSelectionChanged (int currentRow) |
| virtual void | slot_addChannel () |
| virtual void | slot_removeChannel () |
| virtual void | slot_previewButtonClicked () |
| virtual void | slot_audioTypeToggled (bool checked) |
| virtual void | slot_proximityTypeToggled (bool checked) |
| virtual void | slot_rasterModeChanged (int index) |
| virtual void | slot_detailFieldChanged () |
| virtual void | slot_detailFieldLiveOnly () |
| virtual void | slot_nameChanged (const QString &text) |
| virtual void | slot_precipitationParamsChanged () |
| virtual void | slot_windParamsChanged () |
| virtual void | slot_visibilityParamsChanged () |
Protected Member Functions | |
| void | showEvent (QShowEvent *event) override |
| void | setupGui () |
| void | refreshChannelList () |
| void | refreshDetail (int idx) |
| void | writeDetailToChannel (DtProceduralSoundscapeChannel &ch) |
| void | stopPreview () |
| void | updateProceduralKeyCombo () |
| void | createBehaviorTabWidget () |
| void | loadPrecipitationParamsIntoControls (const std::map< std::string, std::string > ¶ms) |
| void | loadWindParamsIntoControls (const std::map< std::string, std::string > ¶ms) |
| void | loadVisibilityParamsIntoControls (const std::map< std::string, std::string > ¶ms) |
| std::map< std::string, std::string > | savePrecipitationControlsToParams () const |
| std::map< std::string, std::string > | saveWindControlsToParams () const |
| std::map< std::string, std::string > | saveVisibilityControlsToParams () const |
| void | addPrecipitationTierRow (const QString &source, double peakFrom, double peakTo, double gain) |
| void | addWindTierRow (const QString &source, double peakFrom, double peakTo, double gain) |
| void | addVisibilityTierRow (const QString &source, double peakFrom, double peakTo, double gain) |
| void | syncAltitudeFadeSpins (QDoubleSpinBox *source) |
| void | updateAltitudeFadeSectionVisibility () |
Static Protected Member Functions | |
| static std::vector < DtAttributeFilter > | parseAttributeFilters (const QString &text) |
| static QString | encodeAttributeFilters (const std::vector< DtAttributeFilter > &filters) |
| static boost::optional < DtRasterSource > | parseRasterSource (const QString &text) |
| static QString | encodeRasterSource (const boost::optional< DtRasterSource > &rs) |
Additional Inherited Members | |
Public Attributes inherited from makVrv::DtProceduralSoundscapesSettingsWidgetInterface | |
| boost::signalslib::signal < void(std::vector < DtProceduralSoundscapeChannel >)> | signal_ChannelsChanged |
|
explicit |
CTOR.
|
virtual |
DTOR.
|
virtual |
Populate the widget with a new channel list (does not emit signal).
Implements makVrv::DtProceduralSoundscapesSettingsWidgetInterface.
|
protectedvirtualslot |
Called when the list selection changes. currentRow is -1 when empty.
|
protectedvirtualslot |
Called when "Add Channel" is clicked.
|
protectedvirtualslot |
Called when "Remove Channel" is clicked.
|
protectedvirtualslot |
Called when the preview (play/stop) button in the detail panel is clicked.
|
protectedvirtualslot |
Called when the audio-source radio buttons toggle. checked is the new state of the toggled radio button.
|
protectedvirtualslot |
Called when the proximity-source radio buttons toggle. checked is the new state of the Feature Layer radio button.
|
protectedvirtualslot |
Called when the raster mode combo changes.
|
protectedvirtualslot |
Called when any detail field changes. Writes the form back to myChannels and emits signal_ChannelsChanged. Also clears myIsDirty after the emit.
|
protectedvirtualslot |
Live-only form-to-model copy used for per-keystroke updates.
Performs the same writeDetailToChannel() pass as slot_detailFieldChanged() but does NOT emit signal_ChannelsChanged. The corresponding QLineEdit editingFinished signals route to slot_detailFieldChanged() so the runtime reload + .pscx autosave fire once per commit instead of once per keystroke. Sets myIsDirty so the destructor can flush the last in-flight edit if the widget is closed mid-edit.
|
protectedvirtualslot |
Called specifically when the Name field changes – additionally updates the list widget item text. Routes to slot_detailFieldLiveOnly() so per- keystroke typing does not fire a runtime reload.
|
protectedvirtualslot |
Called when add/remove/change events fire on Rain tier table.
|
protectedvirtualslot |
Called when add/remove/change events fire on Wind tier table.
|
protectedvirtualslot |
Called when add/remove/change events fire on Visibility tier table.
|
overrideprotected |
Force the containing top-level to grow to satisfy the form's minimum width on first show. See the corresponding comment in DtProceduralSoundscapesSettingsWidget.cxx and the "Horizontal minimum-width contract" section of DtProceduralSoundscapesSettingsWidget.instructions.md.
|
protected |
Build the widget layout.
|
protected |
Rebuild the list widget contents from myChannels.
|
protected |
Populate the detail form from myChannels[idx], or show the placeholder when idx < 0 or out of range.
|
protected |
Read all detail form fields into ch.
|
protected |
Stop the running audio preview and reset the preview button icon. No-op if no preview is active.
|
protected |
Repopulate the procedural soundscape key combo from the factory registry.
|
protected |
Build the QTabWidget (Feature Proximity / Precipitation Rate / Wind Speed) and assign it to myBehaviorTabWidget.
|
protected |
Populate the Rain tier table from params.
|
protected |
Populate the Wind tier table from params.
|
protected |
Populate the Visibility tier table from params.
|
protected |
Read the Rain tier table back into a params map.
|
protected |
Read the Wind tier table back into a params map.
|
protected |
Read the Visibility tier table back into a params map.
|
protected |
Append one row to myRainTiersTable.
|
protected |
Append one row to myWindTiersTable.
|
protected |
Append one row to myVisibilityTiersTable.
|
staticprotected |
Parse an attribute-filters string ("key=value;key=value") into a vector.
|
staticprotected |
Encode a vector of attribute filters into a display string.
|
staticprotected |
Parse a compact raster-source string into a DtRasterSource, or return an uninitialised optional when the string is empty.
Format: "layerName" PolygonizedRaster, all pixels matched "layerName|poly|v1,v2" PolygonizedRaster with class values "layerName|sdf|500.0" SDF mode, sdfMaxDistanceMeters=500 "layerName|class|v1,v2" Classification mode
|
staticprotected |
Encode an optional DtRasterSource back into the compact display string.
|
protected |
Mirror an altitude-fade value across the three per-tab pairs.
Each weather tab (Rain / Wind / Visibility) hosts its own altitude fade pair for visual grouping; the three pairs always share a single logical value and are kept in sync here.
| source | Spin box that just emitted valueChanged. Its new value is copied into the other two same-role peers (audible- altitude peers if source is one of the audible- altitude spin boxes, or fade-width peers if source is one of the fade-width spin boxes) using QSignalBlocker to prevent feedback cascades. |
|
protected |
Show or hide the per-tab Altitude Fade sections based on the Feature Proximity Gate.
Altitude fade only applies to weather-driven channels (gate OFF); a feature-proximity channel uses Fade Distance / Query Radius instead. When the gate is ON, the three sibling Altitude Fade sections (Rain / Wind / Visibility) are hidden entirely; when it is OFF, they are shown.
|
protected |
|
protected |
The full channel list mirrored from the manager.
|
protected |
|
protected |
|
protected |
|
protected |
page 0 = placeholder, page 1 = form
|
protected |
Cached from setupGui for showEvent.
|
protected |
One-shot latch for showEvent.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Stacked pages: 0=ModelDefinition, 1=Procedural, 2=Rain, 3=Wind, 4=Visibility.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
page 0 = feature layer, page 1 = raster
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
page 0 = SDF controls, page 1 = class values
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Index of the currently selected channel in myChannels, or -1.
|
protected |
Index of the channel currently being previewed, or -1.
|
protected |
True while refreshDetail() is populating the form (suppresses slots).
|
protected |
True when myChannels has been mutated by a user edit and not yet published via signal_ChannelsChanged. The destructor uses this to flush the last in-flight edit only when something actually changed, avoiding a spurious runtime reload + .pscx autosave on no-op close.