mirror of
https://github.com/DarkFlippers/unleashed-firmware
synced 2024-11-24 05:23:06 +00:00
7afdd14a4c
* Gui: ported submenu and view_dispatcher_remove_view from iButton branch * App gui-test: use backported submenu api * App subghz: initial commit * App subghz: syntax fix * App gui-test: fix submenu callback * App subghz: add subfolders to build * Gui view: c++ verison of with_view_model * Subghz app: simple spectrum settings view * Subghz app: add spectrum settings view to view manager * Subghz app: spectrum settings scene Co-authored-by: coreglitch <mail@s3f.ru>
37 lines
No EOL
809 B
C++
37 lines
No EOL
809 B
C++
#pragma once
|
|
#include <furi.h>
|
|
#include <gui/view_dispatcher.h>
|
|
#include <gui/modules/submenu.h>
|
|
#include "subghz-event.h"
|
|
#include "view/subghz-view-spectrum-settings.h"
|
|
|
|
class SubghzAppViewManager {
|
|
public:
|
|
enum class ViewType : uint8_t {
|
|
Submenu,
|
|
SpectrumSettings,
|
|
};
|
|
|
|
osMessageQueueId_t event_queue;
|
|
|
|
SubghzAppViewManager();
|
|
~SubghzAppViewManager();
|
|
|
|
void switch_to(ViewType type);
|
|
|
|
void receive_event(SubghzEvent* event);
|
|
void send_event(SubghzEvent* event);
|
|
|
|
Submenu* get_submenu();
|
|
SubghzViewSpectrumSettings* get_spectrum_settings();
|
|
|
|
private:
|
|
ViewDispatcher* view_dispatcher;
|
|
Gui* gui;
|
|
|
|
uint32_t previous_view_callback(void* context);
|
|
|
|
// view elements
|
|
Submenu* submenu;
|
|
SubghzViewSpectrumSettings* spectrum_settings;
|
|
}; |