SatDump 2.0.0-alpha-76a915210
Loading...
Searching...
No Matches
projection_handler.h
1#pragma once
2
3#include "../handler.h"
5#include "proj_ui.h"
6
7namespace satdump
8{
9 namespace handlers
10 {
11 class ProjectionHandler : public Handler, public ProcessingHandler
12 {
13 public:
14 ProjectionHandler();
15 ~ProjectionHandler();
16
17 ImageHandler img_handler;
18
20
21 // Auto-update in UI
22 bool needs_to_update = false;
23
24 // Proc function
25 void do_process();
26
27 // The Rest
28 void drawMenu();
29 void drawContents(ImVec2 win_size);
30 void drawMenuBar();
31
32 void setConfig(nlohmann::json p);
33 nlohmann::json getConfig();
34
35 void delSubHandler(std::shared_ptr<Handler> handler, bool now = false)
36 {
37 // img_handler.delSubHandler(handler, true);
38 Handler::delSubHandler(handler, now);
39 }
40
41 // void drawTreeMenu(std::shared_ptr<Handler> &h)
42 // {
43 // img_handler.drawTreeMenu(h);
44 // Handler::drawTreeMenu(h);
45 // }
46
47 std::string getName() { return "Projection"; } // TODOREWORK allow renaming?
48 std::string getID() { return "projection_handler"; }
49 };
50 } // namespace handlers
51} // namespace satdump
SatDump's handler base class.
Definition handler.h:32
virtual void delSubHandler(std::shared_ptr< Handler > handler, bool now=false)
Delete a subhandler.
Definition handler.cpp:159
The main standard ImageHandler.
Definition image_handler.h:33
void delSubHandler(std::shared_ptr< Handler > handler, bool now=false)
Delete a subhandler.
Definition projection_handler.h:35
void drawMenuBar()
Render explorer menu bar (in the left sidebar)
Definition projection_handler.cpp:461
void drawContents(ImVec2 win_size)
Render explorer contents (center/left)
Definition projection_handler.cpp:476
void setConfig(nlohmann::json p)
Optional, allows setting a configuration/state from JSON.
Definition projection_handler.cpp:68
void do_process()
Actual processing function to be implemented by the child class.
Definition projection_handler.cpp:322
std::string getName()
Get this handler's readable name.
Definition projection_handler.h:47
void drawMenu()
Render explorer menu left sidebar.
Definition projection_handler.cpp:39
nlohmann::json getConfig()
Optional, allows getting a configuration/state as JSON.
Definition projection_handler.cpp:76
Definition proj_ui.h:13