diff options
| author | jacqueline <me@jacqueline.id.au> | 2024-01-15 12:31:20 +1100 |
|---|---|---|
| committer | jacqueline <me@jacqueline.id.au> | 2024-01-15 12:31:20 +1100 |
| commit | 7cdcd44e0ca10ebdc796638190ed1d9b45d99ef0 (patch) | |
| tree | 637b43848d17c9dbdc1688cb4733eb235f223e37 /src/ui/include/screen_settings.hpp | |
| parent | 0e04eb918ec976017276306181282769d8896c83 (diff) | |
| download | tangara-fw-7cdcd44e0ca10ebdc796638190ed1d9b45d99ef0.tar.gz | |
Begin migration of remaining screens to Lua
Diffstat (limited to 'src/ui/include/screen_settings.hpp')
| -rw-r--r-- | src/ui/include/screen_settings.hpp | 116 |
1 files changed, 0 insertions, 116 deletions
diff --git a/src/ui/include/screen_settings.hpp b/src/ui/include/screen_settings.hpp deleted file mode 100644 index 7402f9f9..00000000 --- a/src/ui/include/screen_settings.hpp +++ /dev/null @@ -1,116 +0,0 @@ -/* - * Copyright 2023 jacqueline <me@jacqueline.id.au> - * - * SPDX-License-Identifier: GPL-3.0-only - */ - -#pragma once - -#include <stdint.h> -#include <cstdint> -#include <list> -#include <memory> -#include <vector> - -#include "bluetooth.hpp" -#include "bluetooth_types.hpp" -#include "display.hpp" -#include "index.hpp" -#include "lvgl.h" - -#include "model_top_bar.hpp" -#include "nvs.hpp" -#include "samd.hpp" -#include "screen.hpp" - -namespace ui { -namespace screens { - -class Settings : public MenuScreen { - public: - Settings(models::TopBar&); -}; - -class Bluetooth : public MenuScreen { - public: - Bluetooth(models::TopBar&, drivers::Bluetooth& bt, drivers::NvsStorage& nvs); - ~Bluetooth(); - - auto ChangeEnabledState(bool enabled) -> void; - auto RefreshDevicesList() -> void; - auto OnDeviceSelected(ssize_t index) -> void; - - private: - auto RemoveAllDevices() -> void; - auto AddPreferredDevice(const drivers::bluetooth::Device&) -> void; - auto AddDevice(const drivers::bluetooth::Device&) -> void; - - drivers::Bluetooth& bt_; - drivers::NvsStorage& nvs_; - - lv_obj_t* devices_list_; - lv_obj_t* preferred_device_; - - std::list<drivers::bluetooth::mac_addr_t> macs_in_list_; -}; - -class Headphones : public MenuScreen { - public: - Headphones(models::TopBar&, drivers::NvsStorage& nvs); - - auto ChangeMaxVolume(uint8_t index) -> void; - auto ChangeCustomVolume(int8_t diff) -> void; - - private: - auto UpdateCustomVol(uint16_t) -> void; - - drivers::NvsStorage& nvs_; - lv_obj_t* custom_vol_container_; - lv_obj_t* custom_vol_label_; - - std::vector<uint16_t> index_to_level_; - uint16_t custom_limit_; -}; - -class Appearance : public MenuScreen { - public: - Appearance(models::TopBar&, - drivers::NvsStorage& nvs, - drivers::Display& display); - - auto ChangeBrightness(uint_fast8_t) -> void; - auto CommitBrightness() -> void; - - private: - drivers::NvsStorage& nvs_; - drivers::Display& display_; - - lv_obj_t* current_brightness_label_; - uint_fast8_t current_brightness_; -}; - -class InputMethod : public MenuScreen { - public: - InputMethod(models::TopBar&, drivers::NvsStorage& nvs); - - private: - drivers::NvsStorage& nvs_; -}; - -class Storage : public MenuScreen { - public: - Storage(models::TopBar&); -}; - -class FirmwareUpdate : public MenuScreen { - public: - FirmwareUpdate(models::TopBar&, drivers::Samd&); -}; - -class About : public MenuScreen { - public: - About(models::TopBar&); -}; - -} // namespace screens -} // namespace ui |
