VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Protected Slots | Protected Member Functions | Protected Attributes
makVrv::DtProceduralSoundsSettingsWidget Class Reference

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.

See Also
DtProceduralSoundPreviewRenderer, DtProceduralSoundLayerPlayer
Inheritance diagram for makVrv::DtProceduralSoundsSettingsWidget:
Inheritance graph
[legend]

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
 

Protected Attributes

DtDe & myDe
 
std::vector
< DtProceduralSoundConfig > 
myConfigs
 
QTreeWidget * myTree
 
QPushButton * myAddSoundButton
 
QPushButton * myRemoveSoundButton
 
QStackedWidget * myStack
 
QLineEdit * mySoundKeyEdit
 
DtStyledQTableWidget * myLayerTable
 
QPushButton * myAddLayerButton
 
QPushButton * myRemoveLayerButton
 
QLabel * myMinPolyphonyLabel
 
QLineEdit * myLayerNameEdit
 
QRadioButton * myPoissonRadio
 
QRadioButton * myFixedRadio
 
QPushButton * mySchedulingHelpIcon
 
QDoubleSpinBox * myDensitySpin
 
QLabel * myDensityLabel
 
QSpinBox * myFixedEventsSpin
 
QLabel * myFixedEventsLabel
 
QDoubleSpinBox * myGainMinSpin
 
QDoubleSpinBox * myGainMaxSpin
 
QPushButton * myGainHelpIcon
 
QDoubleSpinBox * myPitchMinSpin
 
QDoubleSpinBox * myPitchMaxSpin
 
QPushButton * myPitchHelpIcon
 
DtStyledQTableWidget * myClipTable
 
QPushButton * myAddClipButton
 
QPushButton * myRemoveClipButton
 
QPushButton * myClipsHelpIcon
 
QPushButton * myPlayLayerButton
 
int myPreviewingClipRow
 
std::vector< QPushButton * > myClipPreviewButtons
 
DtProceduralSoundLayerPlayer * myLayerPlayer
 
bool myIsUpdating
 
bool myIsDirty
 

Additional Inherited Members

- Public Attributes inherited from makVrv::DtProceduralSoundsSettingsWidgetInterface
boost::signalslib::signal
< void(std::vector
< DtProceduralSoundConfig >)> 
signal_soundsChanged
 

Constructor & Destructor Documentation

makVrv::DtProceduralSoundsSettingsWidget::DtProceduralSoundsSettingsWidget ( DtDe &  de,
QWidget *  parent = nullptr,
Qt::WindowFlags  f = Qt::Widget 
)
explicit

CTOR.

virtual makVrv::DtProceduralSoundsSettingsWidget::~DtProceduralSoundsSettingsWidget ( )
virtual

DTOR.

Member Function Documentation

virtual void makVrv::DtProceduralSoundsSettingsWidget::setSounds ( const std::vector< DtProceduralSoundConfig > &  sounds)
overridevirtual

Populate the widget with a new sound config list (does not emit signal).

Implements makVrv::DtProceduralSoundsSettingsWidgetInterface.

void makVrv::DtProceduralSoundsSettingsWidget::slot_treeSelectionChanged ( )
protectedslot

Called when the tree selection changes. Updates the right-side detail panel.

void makVrv::DtProceduralSoundsSettingsWidget::slot_addSound ( )
protectedslot

Called when the "Add Sound" button is clicked. Appends a new DtProceduralSoundConfig.

void makVrv::DtProceduralSoundsSettingsWidget::slot_removeSound ( )
protectedslot

Called when the "Remove Sound" button is clicked. Removes the selected sound.

void makVrv::DtProceduralSoundsSettingsWidget::slot_layerTableCellChanged ( int  row,
int  col 
)
protectedslot
void makVrv::DtProceduralSoundsSettingsWidget::slot_layerTableSelectionChanged ( )
protectedslot

Called when the layer table selection changes. Switches the right panel to the layer form.

void makVrv::DtProceduralSoundsSettingsWidget::slot_addLayer ( )
protectedslot

Called when "Add Layer" is clicked on the sound detail page. Appends a new DtProceduralLayerConfig.

void makVrv::DtProceduralSoundsSettingsWidget::slot_removeLayer ( )
protectedslot

Called when "Remove Layer" is clicked on the sound detail page.

void makVrv::DtProceduralSoundsSettingsWidget::slot_layerNameEdited ( const QString &  text)
protectedslot

Called when the layer name field is edited.

Parameters
textNew layer name entered by the user.
void makVrv::DtProceduralSoundsSettingsWidget::slot_layerNameEditingFinished ( )
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.

void makVrv::DtProceduralSoundsSettingsWidget::slot_schedulingModePoisson ( bool  checked)
protectedslot

Called when the Poisson scheduling radio button is toggled.

Parameters
checkedtrue when Poisson mode is selected.
void makVrv::DtProceduralSoundsSettingsWidget::slot_schedulingModeFixed ( bool  checked)
protectedslot

Called when the Fixed Parallel scheduling radio button is toggled.

Parameters
checkedtrue when Fixed Parallel mode is selected.
void makVrv::DtProceduralSoundsSettingsWidget::slot_densityValueChanged ( double  value)
protectedslot

Called when the density spin box value changes.

Parameters
valueNew density in events per second.
void makVrv::DtProceduralSoundsSettingsWidget::slot_fixedEventsValueChanged ( int  value)
protectedslot

Called when the fixed-events spin box value changes.

Parameters
valueNew fixed parallel event count.
void makVrv::DtProceduralSoundsSettingsWidget::slot_gainMinValueChanged ( double  value)
protectedslot

Called when the minimum gain spin box value changes.

Parameters
valueNew minimum linear gain [0..1].
void makVrv::DtProceduralSoundsSettingsWidget::slot_gainMaxValueChanged ( double  value)
protectedslot

Called when the maximum gain spin box value changes.

Parameters
valueNew maximum linear gain [0..1].
void makVrv::DtProceduralSoundsSettingsWidget::slot_pitchMinValueChanged ( double  value)
protectedslot

Called when the minimum pitch spin box value changes.

Parameters
valueNew minimum pitch ratio (1.0 = original).
void makVrv::DtProceduralSoundsSettingsWidget::slot_pitchMaxValueChanged ( double  value)
protectedslot

Called when the maximum pitch spin box value changes.

Parameters
valueNew maximum pitch ratio.
void makVrv::DtProceduralSoundsSettingsWidget::slot_clipTableCellClicked ( int  row,
int  col 
)
protectedslot
void makVrv::DtProceduralSoundsSettingsWidget::slot_clipTableCellChanged ( int  row,
int  col 
)
protectedslot
void makVrv::DtProceduralSoundsSettingsWidget::slot_addClip ( )
protectedslot
void makVrv::DtProceduralSoundsSettingsWidget::slot_removeClip ( )
protectedslot
void makVrv::DtProceduralSoundsSettingsWidget::slot_clipPreviewButtonClicked ( int  row)
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().

Parameters
rowClip table row index.
void makVrv::DtProceduralSoundsSettingsWidget::slot_playLayerClicked ( )
protectedslot

Called when the Play/Stop sample button is clicked. Toggles a one-layer preview via myLayerPlayer.

void makVrv::DtProceduralSoundsSettingsWidget::slot_playbackStateChanged ( bool  playing)
protectedslot

Called when myLayerPlayer switches between playing and stopped. Updates the Play button text.

Parameters
playingtrue when the preview just started, false when stopped.
void makVrv::DtProceduralSoundsSettingsWidget::setupGui ( )
protected

Build the complete widget layout.

void makVrv::DtProceduralSoundsSettingsWidget::refreshTree ( )
protected

Rebuild the tree from myConfigs (blocks tree signals).

void makVrv::DtProceduralSoundsSettingsWidget::refreshLayerTable ( int  soundIndex)
protected

Repopulate the layer table on the sound page for the given sound index.

void makVrv::DtProceduralSoundsSettingsWidget::refreshClipTable ( int  soundIndex,
int  layerIndex 
)
protected

Repopulate the clip table on the layer page for the given sound/layer indices.

void makVrv::DtProceduralSoundsSettingsWidget::refreshLayerForm ( int  soundIndex,
int  layerIndex 
)
protected

Populate the layer property form for the given sound/layer indices. Also refreshes the four help-icon tooltips.

void makVrv::DtProceduralSoundsSettingsWidget::refreshSoundPage ( int  soundIndex)
protected

Repopulate the sound-selected page (Page 1) content. Includes the layer table and the inline min-polyphony estimate label.

Parameters
soundIndexTop-level (sound) index in myConfigs.
void makVrv::DtProceduralSoundsSettingsWidget::refreshLayerInsight ( )
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.

void makVrv::DtProceduralSoundsSettingsWidget::reselectLayerInTree ( int  soundIndex,
int  layerIndex 
)
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.

Parameters
soundIndexTop-level (sound) index in the tree.
layerIndexChild (layer) index under the sound.
void makVrv::DtProceduralSoundsSettingsWidget::emitChanged ( )
protected

Emit signal_soundsChanged with the current myConfigs.

int makVrv::DtProceduralSoundsSettingsWidget::selectedSoundIndex ( ) const
protected

Return the currently selected sound index, or -1 if none / a layer is selected.

std::pair<int,int> makVrv::DtProceduralSoundsSettingsWidget::selectedLayerIndices ( ) const
protected

Return the currently selected layer indices (sound, layer), or (-1,-1).

Member Data Documentation

DtDe& makVrv::DtProceduralSoundsSettingsWidget::myDe
protected
std::vector<DtProceduralSoundConfig> makVrv::DtProceduralSoundsSettingsWidget::myConfigs
protected

Full in-memory config list mirrored from the manager.

QTreeWidget* makVrv::DtProceduralSoundsSettingsWidget::myTree
protected

Tree showing Sound > Layer > Clip hierarchy.

QPushButton* makVrv::DtProceduralSoundsSettingsWidget::myAddSoundButton
protected

Adds a new sound config.

QPushButton* makVrv::DtProceduralSoundsSettingsWidget::myRemoveSoundButton
protected

Removes the selected sound config.

QStackedWidget* makVrv::DtProceduralSoundsSettingsWidget::myStack
protected

Stacked right-panel pages (0 = none, 1 = sound, 2 = layer).

QLineEdit* makVrv::DtProceduralSoundsSettingsWidget::mySoundKeyEdit
protected

Factory key for the selected sound.

DtStyledQTableWidget* makVrv::DtProceduralSoundsSettingsWidget::myLayerTable
protected

Editable table of layers for the selected sound.

QPushButton* makVrv::DtProceduralSoundsSettingsWidget::myAddLayerButton
protected

Adds a new layer.

QPushButton* makVrv::DtProceduralSoundsSettingsWidget::myRemoveLayerButton
protected

Removes the selected layer.

QLabel* makVrv::DtProceduralSoundsSettingsWidget::myMinPolyphonyLabel
protected

Inline rich-HTML min-polyphony estimate below the layer table.

QLineEdit* makVrv::DtProceduralSoundsSettingsWidget::myLayerNameEdit
protected

Editable name for the selected layer.

QRadioButton* makVrv::DtProceduralSoundsSettingsWidget::myPoissonRadio
protected

Selects Poisson (random) scheduling mode.

QRadioButton* makVrv::DtProceduralSoundsSettingsWidget::myFixedRadio
protected

Selects fixed parallel event scheduling mode.

QPushButton* makVrv::DtProceduralSoundsSettingsWidget::mySchedulingHelpIcon
protected

"?" icon with a scheduling insight tooltip.

QDoubleSpinBox* makVrv::DtProceduralSoundsSettingsWidget::myDensitySpin
protected

Events-per-second density for Poisson mode.

QLabel* makVrv::DtProceduralSoundsSettingsWidget::myDensityLabel
protected

Label for myDensitySpin (Poisson mode only).

QSpinBox* makVrv::DtProceduralSoundsSettingsWidget::myFixedEventsSpin
protected

Fixed simultaneous event count for fixed mode.

QLabel* makVrv::DtProceduralSoundsSettingsWidget::myFixedEventsLabel
protected

Label for myFixedEventsSpin (FixedParallel mode only).

QDoubleSpinBox* makVrv::DtProceduralSoundsSettingsWidget::myGainMinSpin
protected

Minimum linear gain for randomized events.

QDoubleSpinBox* makVrv::DtProceduralSoundsSettingsWidget::myGainMaxSpin
protected

Maximum linear gain for randomized events.

QPushButton* makVrv::DtProceduralSoundsSettingsWidget::myGainHelpIcon
protected

"?" icon with a gain-range insight tooltip.

QDoubleSpinBox* makVrv::DtProceduralSoundsSettingsWidget::myPitchMinSpin
protected

Minimum pitch ratio for randomized events.

QDoubleSpinBox* makVrv::DtProceduralSoundsSettingsWidget::myPitchMaxSpin
protected

Maximum pitch ratio for randomized events.

QPushButton* makVrv::DtProceduralSoundsSettingsWidget::myPitchHelpIcon
protected

"?" icon with a pitch-range insight tooltip.

DtStyledQTableWidget* makVrv::DtProceduralSoundsSettingsWidget::myClipTable
protected

Clip pool table for the selected layer.

QPushButton* makVrv::DtProceduralSoundsSettingsWidget::myAddClipButton
protected

Adds a new clip to the selected layer.

QPushButton* makVrv::DtProceduralSoundsSettingsWidget::myRemoveClipButton
protected

Removes the selected clip.

QPushButton* makVrv::DtProceduralSoundsSettingsWidget::myClipsHelpIcon
protected

"?" icon with a clip-probability tooltip.

QPushButton* makVrv::DtProceduralSoundsSettingsWidget::myPlayLayerButton
protected

Play/Stop sample button below the clip table.

int makVrv::DtProceduralSoundsSettingsWidget::myPreviewingClipRow
protected

Row index of the currently-previewing clip; -1 when no clip preview is active.

std::vector<QPushButton*> makVrv::DtProceduralSoundsSettingsWidget::myClipPreviewButtons
protected

Per-row preview buttons in the clip table (rebuilt each refreshClipTable; cells own the pointers).

DtProceduralSoundLayerPlayer* makVrv::DtProceduralSoundsSettingsWidget::myLayerPlayer
protected

Owns the per-layer audio audition state (DtProceduralSound + tick timer).

bool makVrv::DtProceduralSoundsSettingsWidget::myIsUpdating
protected

true while setSounds() / refreshTree() is running to suppress re-entrant signals.

bool makVrv::DtProceduralSoundsSettingsWidget::myIsDirty
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.


The documentation for this class was generated from the following file:

Document ID: Generated on Thu Oct 15 21:27:02 EDT 2026 from SVN revision 296421
Copyright © 2005-2026 MAK Technologies. All Rights Reserved (www.mak.com)