![]() |
VR-Forces Developer's Guide
|
Programmatic Qt widget for editing the procedural sound config list.
The layout is a horizontal QSplitter:
All Qt layout and widget construction is done programmatically - no .ui file.

Public Member Functions | |
| DtProceduralSoundsSettingsWidget (DtDe &de, QWidget *parent=nullptr, Qt::WindowFlags f=Qt::Widget) | |
| virtual | ~DtProceduralSoundsSettingsWidget () |
| virtual void | setSounds (const std::vector< DtProceduralSoundConfig > &sounds) override |
Public Member Functions inherited from makVrv::DtProceduralSoundsSettingsWidgetInterface | |
| DtProceduralSoundsSettingsWidgetInterface () | |
| virtual | ~DtProceduralSoundsSettingsWidgetInterface () |
Protected Slots | |
| void | slot_treeSelectionChanged () |
| void | slot_addSound () |
| void | slot_removeSound () |
| void | slot_layerTableCellChanged (int row, int col) |
| void | slot_layerTableSelectionChanged () |
| void | slot_addLayer () |
| void | slot_removeLayer () |
| void | slot_layerNameEdited (const QString &text) |
| void | slot_layerNameEditingFinished () |
| void | slot_schedulingModePoisson (bool checked) |
| void | slot_schedulingModeFixed (bool checked) |
| void | slot_densityValueChanged (double value) |
| void | slot_fixedEventsValueChanged (int value) |
| void | slot_gainMinValueChanged (double value) |
| void | slot_gainMaxValueChanged (double value) |
| void | slot_pitchMinValueChanged (double value) |
| void | slot_pitchMaxValueChanged (double value) |
| void | slot_clipTableCellClicked (int row, int col) |
| void | slot_clipTableCellChanged (int row, int col) |
| void | slot_addClip () |
| void | slot_removeClip () |
| void | slot_clipPreviewButtonClicked (int row) |
| void | slot_playLayerClicked () |
| void | slot_playbackStateChanged (bool playing) |
Protected Member Functions | |
| void | setupGui () |
| void | refreshTree () |
| void | refreshLayerTable (int soundIndex) |
| void | refreshClipTable (int soundIndex, int layerIndex) |
| void | refreshLayerForm (int soundIndex, int layerIndex) |
| void | refreshSoundPage (int soundIndex) |
| void | refreshLayerInsight () |
| void | reselectLayerInTree (int soundIndex, int layerIndex) |
| void | emitChanged () |
| int | selectedSoundIndex () const |
| std::pair< int, int > | selectedLayerIndices () const |
Additional Inherited Members | |
Public Attributes inherited from makVrv::DtProceduralSoundsSettingsWidgetInterface | |
| boost::signalslib::signal < void(std::vector < DtProceduralSoundConfig >)> | signal_soundsChanged |
|
explicit |
CTOR.
|
virtual |
DTOR.
|
overridevirtual |
Populate the widget with a new sound config list (does not emit signal).
Implements makVrv::DtProceduralSoundsSettingsWidgetInterface.
|
protectedslot |
Called when the tree selection changes. Updates the right-side detail panel.
|
protectedslot |
Called when the "Add Sound" button is clicked. Appends a new DtProceduralSoundConfig.
|
protectedslot |
Called when the "Remove Sound" button is clicked. Removes the selected sound.
|
protectedslot |
|
protectedslot |
Called when the layer table selection changes. Switches the right panel to the layer form.
|
protectedslot |
Called when "Add Layer" is clicked on the sound detail page. Appends a new DtProceduralLayerConfig.
|
protectedslot |
Called when "Remove Layer" is clicked on the sound detail page.
|
protectedslot |
Called when the layer name field is edited.
| text | New layer name entered by the user. |
|
protectedslot |
Called when the layer-name edit loses focus or Enter is pressed. Publishes the in-flight name change via emitChanged() so the runtime reload and disk autosave happen once per commit instead of per keystroke.
|
protectedslot |
Called when the Poisson scheduling radio button is toggled.
| checked | true when Poisson mode is selected. |
|
protectedslot |
Called when the Fixed Parallel scheduling radio button is toggled.
| checked | true when Fixed Parallel mode is selected. |
|
protectedslot |
Called when the density spin box value changes.
| value | New density in events per second. |
|
protectedslot |
Called when the fixed-events spin box value changes.
| value | New fixed parallel event count. |
|
protectedslot |
Called when the minimum gain spin box value changes.
| value | New minimum linear gain [0..1]. |
|
protectedslot |
Called when the maximum gain spin box value changes.
| value | New maximum linear gain [0..1]. |
|
protectedslot |
Called when the minimum pitch spin box value changes.
| value | New minimum pitch ratio (1.0 = original). |
|
protectedslot |
Called when the maximum pitch spin box value changes.
| value | New maximum pitch ratio. |
|
protectedslot |
|
protectedslot |
|
protectedslot |
|
protectedslot |
|
protectedslot |
Handler for a per-row clip preview button click.
Toggles preview playback for the clip at row. Only one preview (layer or single clip) plays at any time; starting a new preview stops any prior preview via DtProceduralSoundLayerPlayer::startPreview().
| row | Clip table row index. |
|
protectedslot |
Called when the Play/Stop sample button is clicked. Toggles a one-layer preview via myLayerPlayer.
|
protectedslot |
Called when myLayerPlayer switches between playing and stopped. Updates the Play button text.
| playing | true when the preview just started, false when stopped. |
|
protected |
Build the complete widget layout.
|
protected |
Rebuild the tree from myConfigs (blocks tree signals).
|
protected |
Repopulate the layer table on the sound page for the given sound index.
|
protected |
Repopulate the clip table on the layer page for the given sound/layer indices.
|
protected |
Populate the layer property form for the given sound/layer indices. Also refreshes the four help-icon tooltips.
|
protected |
Repopulate the sound-selected page (Page 1) content. Includes the layer table and the inline min-polyphony estimate label.
| soundIndex | Top-level (sound) index in myConfigs. |
|
protected |
Refresh the four help-icon tooltips, the Play button enable state, and any live audio-preview parameters for the currently selected layer. Does NOT touch the spin/radio form widgets, so it is safe to call from inside a spin-editing slot without disturbing the user's in-progress input. No-op if the current tree selection is not a layer.
|
protected |
Set the tree's current item to the given (sound, layer) without triggering slot_treeSelectionChanged. Used by clip add/remove/browse slots after refreshTree() to keep the layer selection visible.
| soundIndex | Top-level (sound) index in the tree. |
| layerIndex | Child (layer) index under the sound. |
|
protected |
Emit signal_soundsChanged with the current myConfigs.
|
protected |
Return the currently selected sound index, or -1 if none / a layer is selected.
|
protected |
Return the currently selected layer indices (sound, layer), or (-1,-1).
|
protected |
|
protected |
Full in-memory config list mirrored from the manager.
|
protected |
Tree showing Sound > Layer > Clip hierarchy.
|
protected |
Adds a new sound config.
|
protected |
Removes the selected sound config.
|
protected |
Stacked right-panel pages (0 = none, 1 = sound, 2 = layer).
|
protected |
Factory key for the selected sound.
|
protected |
Editable table of layers for the selected sound.
|
protected |
Adds a new layer.
|
protected |
Removes the selected layer.
|
protected |
Inline rich-HTML min-polyphony estimate below the layer table.
|
protected |
Editable name for the selected layer.
|
protected |
Selects Poisson (random) scheduling mode.
|
protected |
Selects fixed parallel event scheduling mode.
|
protected |
"?" icon with a scheduling insight tooltip.
|
protected |
Events-per-second density for Poisson mode.
|
protected |
Label for myDensitySpin (Poisson mode only).
|
protected |
Fixed simultaneous event count for fixed mode.
|
protected |
Label for myFixedEventsSpin (FixedParallel mode only).
|
protected |
Minimum linear gain for randomized events.
|
protected |
Maximum linear gain for randomized events.
|
protected |
"?" icon with a gain-range insight tooltip.
|
protected |
Minimum pitch ratio for randomized events.
|
protected |
Maximum pitch ratio for randomized events.
|
protected |
"?" icon with a pitch-range insight tooltip.
|
protected |
Clip pool table for the selected layer.
|
protected |
Adds a new clip to the selected layer.
|
protected |
Removes the selected clip.
|
protected |
"?" icon with a clip-probability tooltip.
|
protected |
Play/Stop sample button below the clip table.
|
protected |
Row index of the currently-previewing clip; -1 when no clip preview is active.
|
protected |
Per-row preview buttons in the clip table (rebuilt each refreshClipTable; cells own the pointers).
|
protected |
Owns the per-layer audio audition state (DtProceduralSound + tick timer).
|
protected |
true while setSounds() / refreshTree() is running to suppress re-entrant signals.
|
protected |
true when myConfigs has been mutated by a user edit and not yet published via emitChanged(). Used by the destructor to flush the last in-flight edit only when something actually changed, avoiding a spurious runtime reload + .psndx autosave on a no-op close.