Files
StarPilot/frogpilot/ui/qt/offroad/theme_settings.h
T
2026-02-11 22:24:25 -06:00

78 lines
2.1 KiB
C++

#pragma once
#include "frogpilot/ui/qt/offroad/frogpilot_settings.h"
class FrogPilotThemesPanel : public FrogPilotListWidget {
Q_OBJECT
public:
explicit FrogPilotThemesPanel(FrogPilotSettingsWindow *parent);
protected:
void showEvent(QShowEvent *event) override;
signals:
void openSubPanel();
private:
void updateState(const UIState &s, const FrogPilotUIState &fs);
void updateToggles();
bool cancellingDownload;
bool bootLogoDownloading = false;
bool bootLogosDownloaded = false;
bool colorDownloading;
bool colorsDownloaded;
bool distanceIconDownloading;
bool distanceIconsDownloaded;
bool finalizingDownload;
bool forceOpenDescriptions;
bool iconDownloading;
bool iconsDownloaded;
bool randomThemes;
bool signalDownloading;
bool signalsDownloaded;
bool soundDownloading;
bool soundsDownloaded;
bool themeDownloading;
bool wheelDownloading;
bool wheelsDownloaded;
int tuningLevel;
std::map<QString, AbstractControl*> toggles;
QSet<QString> customThemeKeys = {"BootLogo", "CustomColors", "CustomDistanceIcons", "CustomIcons", "CustomSignals", "CustomSounds", "DownloadStatusLabel", "WheelIcon"};
QSet<QString> parentKeys;
FrogPilotButtonsControl *manageBootLogosButton;
FrogPilotButtonsControl *manageCustomColorsButton;
FrogPilotButtonsControl *manageCustomIconsButton;
FrogPilotButtonsControl *manageCustomSignalsButton;
FrogPilotButtonsControl *manageCustomSoundsButton;
FrogPilotButtonsControl *manageDistanceIconsButton;
FrogPilotButtonsControl *manageWheelIconsButton;
FrogPilotSettingsWindow *parent;
LabelControl *downloadStatusLabel;
QDir bootLogosDirectory{"/data/themes/bootlogos/"};
QDir themePacksDirectory{"/data/themes/theme_packs/"};
QDir wheelsDirectory{"/data/themes/steering_wheels/"};
QJsonObject frogpilotToggleLevels;
QString bootLogoToDownload;
QString colorSchemeToDownload;
QString distanceIconPackToDownload;
QString iconPackToDownload;
QString signalAnimationToDownload;
QString soundPackToDownload;
QString wheelToDownload;
Params params;
Params params_memory{"/dev/shm/params"};
};