Subghz app example (#365)
* 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>
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
#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;
|
||||
};
|
||||
Reference in New Issue
Block a user