mirror of
https://github.com/SatDump/SatDump
synced 2026-08-13 17:47:30 -04:00
51 lines
No EOL
1.3 KiB
C++
51 lines
No EOL
1.3 KiB
C++
#pragma once
|
|
|
|
#include "../handler.h"
|
|
#include "../image/image_handler.h"
|
|
#include "proj_ui.h"
|
|
|
|
namespace satdump
|
|
{
|
|
namespace viewer
|
|
{
|
|
class ProjectionHandler : public Handler, public ProcessingHandler
|
|
{
|
|
public:
|
|
ProjectionHandler();
|
|
~ProjectionHandler();
|
|
|
|
ImageHandler img_handler;
|
|
|
|
proj::ProjectionConfigUI projui;
|
|
|
|
// Auto-update in UI
|
|
bool needs_to_update = true;
|
|
|
|
// Proc function
|
|
void do_process();
|
|
|
|
// The Rest
|
|
void drawMenu();
|
|
void drawContents(ImVec2 win_size);
|
|
void drawMenuBar();
|
|
|
|
void setConfig(nlohmann::json p);
|
|
nlohmann::json getConfig();
|
|
|
|
void addSubHandler(std::shared_ptr<Handler> handler)
|
|
{
|
|
Handler::addSubHandler(handler);
|
|
img_handler.addSubHandler(handler);
|
|
}
|
|
|
|
void delSubHandler(std::shared_ptr<Handler> handler, bool now = false)
|
|
{
|
|
img_handler.delSubHandler(handler, true);
|
|
Handler::delSubHandler(handler, now);
|
|
}
|
|
|
|
std::string getName() { return "ProjectionToRename"; }
|
|
std::string getID() { return "projection_handler"; }
|
|
};
|
|
} // namespace viewer
|
|
} // namespace satdump
|