mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-07-04 13:02:09 +08:00
74 lines
2.2 KiB
C++
74 lines
2.2 KiB
C++
#pragma once
|
|
|
|
#include "starpilot/ui/qt/offroad/starpilot_settings.h"
|
|
|
|
class StarPilotThemesPanel : public StarPilotListWidget {
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit StarPilotThemesPanel(StarPilotSettingsWindow *parent, bool forceOpen = false);
|
|
|
|
protected:
|
|
void showEvent(QShowEvent *event) override;
|
|
|
|
signals:
|
|
void openSubPanel();
|
|
|
|
private:
|
|
void updateState(const UIState &s, const StarPilotUIState &fs);
|
|
void updateToggles();
|
|
|
|
bool bootLogoDownloading = false;
|
|
bool bootLogosDownloaded = false;
|
|
bool cancellingDownload = false;
|
|
bool colorDownloading = false;
|
|
bool colorsDownloaded = false;
|
|
bool distanceIconDownloading = false;
|
|
bool distanceIconsDownloaded = false;
|
|
bool finalizingDownload = false;
|
|
bool forceOpenDescriptions = false;
|
|
bool iconDownloading = false;
|
|
bool iconsDownloaded = false;
|
|
bool randomThemes = false;
|
|
bool signalDownloading = false;
|
|
bool signalsDownloaded = false;
|
|
bool soundDownloading = false;
|
|
bool soundsDownloaded = false;
|
|
bool themeDownloading = false;
|
|
bool wheelDownloading = false;
|
|
bool wheelsDownloaded = false;
|
|
|
|
std::map<QString, AbstractControl*> toggles;
|
|
|
|
QSet<QString> customThemeKeys = {"BootLogo", "ColorScheme", "DistanceIconPack", "DownloadStatusLabel", "IconPack", "SignalAnimation", "SoundPack", "WheelIcon"};
|
|
|
|
QSet<QString> parentKeys;
|
|
|
|
StarPilotButtonsControl *manageBootLogosButton;
|
|
StarPilotButtonsControl *manageColorSchemeButton;
|
|
StarPilotButtonsControl *manageDistanceIconPackButton;
|
|
StarPilotButtonsControl *manageIconPackButton;
|
|
StarPilotButtonsControl *manageSignalAnimationButton;
|
|
StarPilotButtonsControl *manageSoundPackButton;
|
|
StarPilotButtonsControl *manageWheelIconsButton;
|
|
|
|
StarPilotSettingsWindow *parent;
|
|
|
|
LabelControl *downloadStatusLabel;
|
|
|
|
QDir bootLogosDirectory{"/data/themes/bootlogos/"};
|
|
QDir themePacksDirectory{"/data/themes/theme_packs/"};
|
|
QDir wheelsDirectory{"/data/themes/steering_wheels/"};
|
|
|
|
QString bootLogoToDownload;
|
|
QString colorSchemeToDownload;
|
|
QString distanceIconPackToDownload;
|
|
QString iconPackToDownload;
|
|
QString signalAnimationToDownload;
|
|
QString soundPackToDownload;
|
|
QString wheelToDownload;
|
|
|
|
Params params;
|
|
Params params_memory{"", true};
|
|
};
|