mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-09-26 17:33:44 +08:00
40 lines
1.0 KiB
C++
40 lines
1.0 KiB
C++
#pragma once
|
|
|
|
#include "frogpilot/ui/qt/offroad/frogpilot_settings.h"
|
|
|
|
class FrogPilotSoundsPanel : public FrogPilotListWidget {
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit FrogPilotSoundsPanel(FrogPilotSettingsWindow *parent, bool forceOpen = false);
|
|
|
|
signals:
|
|
void openSubPanel();
|
|
|
|
protected:
|
|
void showEvent(QShowEvent *event) override;
|
|
|
|
private:
|
|
void initializeSoundPlayer();
|
|
void testSound(const QString &key);
|
|
void updateState(const UIState &s);
|
|
void updateToggles();
|
|
|
|
bool forceOpenDescriptions;
|
|
bool started;
|
|
|
|
std::map<QString, AbstractControl*> toggles;
|
|
|
|
QSet<QString> alertVolumeControlKeys {"DisengageVolume", "EngageVolume", "PromptDistractedVolume", "PromptVolume", "RefuseVolume", "WarningImmediateVolume", "WarningSoftVolume"};
|
|
QSet<QString> customAlertsKeys {"GoatScream", "GreenLightAlert", "LeadDepartingAlert", "LoudBlindspotAlert", "SpeedLimitChangedAlert"};
|
|
|
|
QSet<QString> parentKeys;
|
|
|
|
FrogPilotSettingsWindow *parent;
|
|
|
|
Params params;
|
|
Params params_memory{"", true};
|
|
|
|
QProcess *soundPlayerProcess;
|
|
};
|