VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtBallisticSoundSettingsWidget.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2026 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <vrvAudioQt/dllExport.h>
15 
16 #include <QtWidgets/QWidget>
17 
18 #include <vector>
19 
20 class QCheckBox;
21 class QDoubleSpinBox;
22 class QLabel;
23 class QLineEdit;
24 class QListWidget;
25 class QPushButton;
26 class QSpinBox;
27 class QStackedWidget;
28 class QTableWidget;
29 
30 namespace makVrv
31 {
32 
33  class DtDe;
34 
46  : public QWidget
48  {
49  Q_OBJECT;
50 
51  public:
57  QWidget* parent = nullptr,
58  Qt::WindowFlags f = Qt::Widget);
59 
62 
66  virtual void setRecord(const DtBallisticSoundSettingsRecord& record) override;
67 
68  protected slots:
70  void slot_groupSelectionChanged(int currentRow);
71 
73  void slot_addGroup();
74 
76  void slot_removeGroup();
77 
79  void slot_globalValueChanged();
80 
84  void slot_groupNameChanged(const QString& text);
85 
89  void slot_groupNameEditingFinished();
90 
92  void slot_addClip();
93 
95  void slot_removeClip();
96 
98  void slot_clipCellClicked(int row, int col);
99 
101  void slot_previewGroup();
102 
104  void slot_detailChanged();
105 
106  private:
108  void buildGui();
109 
111  void refreshGroupList();
112 
114  void refreshDetail(int idx);
115 
117  void writeDetailToGroup();
118 
122  bool validateGroupName();
123 
125  std::string generateUniqueGroupName() const;
126 
128  DtBallisticSoundSettingsRecord currentRecord() const;
129 
131 
132  // -----------------------------------------------------------------------
133  // Global controls
134  // -----------------------------------------------------------------------
139 
140  // -----------------------------------------------------------------------
141  // Master panel (group list)
142  // -----------------------------------------------------------------------
143  QListWidget* myGroupList;
146 
147  // -----------------------------------------------------------------------
148  // Detail panel
149  // -----------------------------------------------------------------------
150  QStackedWidget* myDetailStack;
160 
161  // -----------------------------------------------------------------------
162  // State
163  // -----------------------------------------------------------------------
164 
166  std::vector<DtBallisticSoundGroup> myGroups;
167 
170 
174 
178  bool myIsDirty;
179  };
180 
181 } // namespace makVrv
QTableWidget * myClipsTable
Two-column table: Path | Weight.
Definition: DtBallisticSoundSettingsWidget.h:153
QPushButton * myRemoveGroupButton
Removes the selected group.
Definition: DtBallisticSoundSettingsWidget.h:145
Contains the declaration for makVrv::DtBallisticSoundSettingsWidgetInterface.
QStackedWidget * myDetailStack
Index 0 = placeholder; index 1 = form.
Definition: DtBallisticSoundSettingsWidget.h:150
QDoubleSpinBox * myPitchMinSpin
Minimum pitch factor.
Definition: DtBallisticSoundSettingsWidget.h:156
QPushButton * myAddGroupButton
Creates a new group.
Definition: DtBallisticSoundSettingsWidget.h:144
Settings record for the ballistic proximity sound system.
Definition: DtBallisticSoundSettingsRecord.h:32
bool myIsUpdating
True while setRecord() or refreshDetail() is running to suppress re-entrant slot_detailChanged / slot...
Definition: DtBallisticSoundSettingsWidget.h:173
bool myIsDirty
True when myGroups has been mutated by a user edit but not yet published via signal_recordChanged. Used by the destructor to flush the last in-flight name edit only when something actually changed.
Definition: DtBallisticSoundSettingsWidget.h:178
QCheckBox * myEnabledCheck
Master enable toggle.
Definition: DtBallisticSoundSettingsWidget.h:135
int myCurrentGroupIdx
Index of the currently displayed group (-1 when nothing selected).
Definition: DtBallisticSoundSettingsWidget.h:169
#define DT_DLL_VRVAUDIOQT
Definition: dllExport.h:22
QDoubleSpinBox * myDetectionRadiusSpin
Detection radius in meters.
Definition: DtBallisticSoundSettingsWidget.h:136
QPushButton * myRemoveClipButton
Remove the selected clip row.
Definition: DtBallisticSoundSettingsWidget.h:155
QDoubleSpinBox * myGainMaxSpin
Maximum linear gain [0..1].
Definition: DtBallisticSoundSettingsWidget.h:159
QSpinBox * myMaxResultsSpin
Maximum concurrent stream slots.
Definition: DtBallisticSoundSettingsWidget.h:137
QDoubleSpinBox * myBaseDecibelsSpin
Base playback level in dBFS.
Definition: DtBallisticSoundSettingsWidget.h:138
QDoubleSpinBox * myPitchMaxSpin
Maximum pitch factor.
Definition: DtBallisticSoundSettingsWidget.h:157
std::vector< DtBallisticSoundGroup > myGroups
In-memory copy of the group list; the authoritative source for the widget.
Definition: DtBallisticSoundSettingsWidget.h:166
QPushButton * myPreviewButton
Play first clip in the group once.
Definition: DtBallisticSoundSettingsWidget.h:152
Contains the DtBallisticSoundSettingsRecord struct declaration.
DtDe & myDe
Simulation environment reference.
Definition: DtBallisticSoundSettingsWidget.h:130
Abstract interface for the Ballistic Sound settings widget.
Definition: DtBallisticSoundSettingsWidgetInterface.h:26
QLineEdit * myGroupNameEdit
Editable group name.
Definition: DtBallisticSoundSettingsWidget.h:151
QDoubleSpinBox * myGainMinSpin
Minimum linear gain [0..1].
Definition: DtBallisticSoundSettingsWidget.h:158
The DtDe is the core component of any VR-Vantage application. It owns a DtRenderer, DtDeCommunicator, as well as a DtDisplay and other things.
Definition: DtDe.h:76
QPushButton * myAddClipButton
Opens file dialog and appends a new clip row.
Definition: DtBallisticSoundSettingsWidget.h:154
Programmatic Qt widget for editing DtBallisticSoundSettingsRecord.
Definition: DtBallisticSoundSettingsWidget.h:45
QListWidget * myGroupList
Lists all group names.
Definition: DtBallisticSoundSettingsWidget.h:143

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)