SatDump 2.0.0-alpha-76a915210
Loading...
Searching...
No Matches
satdump::handlers::PunctiformProductHandler Class Reference
Inheritance diagram for satdump::handlers::PunctiformProductHandler:
satdump::handlers::ProductHandler satdump::handlers::Handler satdump::handlers::ProcessingHandler

Public Types

enum  current_mode_t { MODE_GRAPH , MODE_DOTMAP , MODE_FILLMAP }

Public Member Functions

 PunctiformProductHandler (std::shared_ptr< products::Product > p, bool dataset_mode=false)
void do_process ()
 Actual processing function to be implemented by the child class.
void drawMenu ()
 Render explorer menu left sidebar.
void drawContents (ImVec2 win_size)
 Render explorer contents (center/left)
void drawMenuBar ()
 Render explorer menu bar (in the left sidebar)
void addSubHandler (std::shared_ptr< Handler > handler, bool ontop=false)
 Add a new subhandler.
void delSubHandler (std::shared_ptr< Handler > handler, bool now=false)
 Delete a subhandler.
bool drawTreeMenu (std::shared_ptr< Handler > &h)
 Render explorer menu bar (in the left sidebar)
void setConfig (nlohmann::json p)
 Optional, allows setting a configuration/state from JSON.
nlohmann::json getConfig ()
 Optional, allows getting a configuration/state as JSON.
void saveResult (std::string directory)
std::string getID ()
Public Member Functions inherited from satdump::handlers::ProductHandler
nlohmann::json getInstrumentCfg ()
 ProductHandler (std::shared_ptr< products::Product > p, bool dataset_mode=false, std::function< bool(nlohmann::ordered_json &)> filterPreset=[](auto &) { return true;})
 Constructor.
std::string getName ()
 Get this handler's readable name.
Public Member Functions inherited from satdump::handlers::Handler
std::string getTreeID ()
 Get this handler's ImGui ID for rendering in the tree.
bool hasSubhandlers ()
 Check if this handler contains any sub-handlers.
virtual std::vector< std::shared_ptr< Handler > > getAllSubHandlers ()
 Get all current subhandlers.
void setCanBeSelected (bool v)
 Set if a handler can be select in the tree.
void setCanBeDragged (bool v)
 Set if a handler can be dragged around in the tree.
void setCanBeDraggedTo (bool v)
 Set if a handler can be dragged to in the tree.
void setSubHandlersCanBeDragged (bool v)
 Set if a handler's subhandlers can be dragged to in the tree.
void setCanSubBeReorgTo (bool v)
 Set if a handler's subhandlers can be reordered.
virtual void resetConfig ()
 Optional, allows resetting the handler's configuration.
Public Member Functions inherited from satdump::handlers::ProcessingHandler
void process ()
 Performing processing. This is not multi-threaded, intended to call it externally.
void set_is_processing (bool v)
 Set the processing status externally, to force waiting before starting a new thread.
void asyncProcess ()
 Perform processing asynchronously, in a thread.

Public Attributes

products::PunctiformProductproduct
current_mode_t current_mode = MODE_GRAPH
float progress = 0
ImageHandler img_handler
std::string selected_channel
double range_min = 0
double range_max = 10
Public Attributes inherited from satdump::handlers::Handler
std::string handler_tree_icon = "N"

Additional Inherited Members

Static Public Member Functions inherited from satdump::handlers::ProcessingHandler
static std::string getID ()
static std::shared_ptr< HandlergetInstance ()
Protected Member Functions inherited from satdump::handlers::ProductHandler
void resetPreset ()
std::string generateFileName ()
bool renderPresetMenu ()
 Draw preset selection menu.
void tryApplyDefaultPreset ()
 Attempts to a apply a default preset if present in the configuration.
Protected Attributes inherited from satdump::handlers::ProductHandler
bool preset_reset_by_handler = false
std::shared_ptr< products::Productproduct
nlohmann::ordered_json instrument_cfg
std::string product_internal_name
Protected Attributes inherited from satdump::handlers::Handler
std::vector< std::shared_ptr< Handler > > subhandlers
std::mutex subhandlers_mtx
Protected Attributes inherited from satdump::handlers::ProcessingHandler
bool is_processing = false
std::mutex is_processing_mtx
std::thread async_thread

Member Function Documentation

◆ addSubHandler()

void satdump::handlers::PunctiformProductHandler::addSubHandler ( std::shared_ptr< Handler > handler,
bool ontop = false )
inlinevirtual

Add a new subhandler.

Parameters
handlerthe handler to add
ontopif true, adds the handler at the start of the list

Reimplemented from satdump::handlers::Handler.

◆ delSubHandler()

void satdump::handlers::PunctiformProductHandler::delSubHandler ( std::shared_ptr< Handler > handler,
bool now = false )
inlinevirtual

Delete a subhandler.

Parameters
handlerthe handler to delete

Reimplemented from satdump::handlers::Handler.

◆ do_process()

void satdump::handlers::PunctiformProductHandler::do_process ( )
virtual

Actual processing function to be implemented by the child class.

Implements satdump::handlers::ProcessingHandler.

◆ drawContents()

void satdump::handlers::PunctiformProductHandler::drawContents ( ImVec2 win_size)
virtual

Render explorer contents (center/left)

Implements satdump::handlers::Handler.

◆ drawMenu()

void satdump::handlers::PunctiformProductHandler::drawMenu ( )
virtual

Render explorer menu left sidebar.

Implements satdump::handlers::Handler.

◆ drawMenuBar()

void satdump::handlers::PunctiformProductHandler::drawMenuBar ( )
virtual

Render explorer menu bar (in the left sidebar)

Reimplemented from satdump::handlers::Handler.

◆ drawTreeMenu()

bool satdump::handlers::PunctiformProductHandler::drawTreeMenu ( std::shared_ptr< Handler > & h)
inlinevirtual

Render explorer menu bar (in the left sidebar)

Parameters
hcurrently selected handler, to be replaced if another is selected
Returns
true if the handler provided is present in the tree

Reimplemented from satdump::handlers::Handler.

◆ getConfig()

nlohmann::json satdump::handlers::PunctiformProductHandler::getConfig ( )
virtual

Optional, allows getting a configuration/state as JSON.

Returns
JSON object

Reimplemented from satdump::handlers::Handler.

◆ getID()

std::string satdump::handlers::PunctiformProductHandler::getID ( )
inlinevirtual

Reimplemented from satdump::handlers::ProductHandler.

◆ saveResult()

void satdump::handlers::PunctiformProductHandler::saveResult ( std::string directory)
virtual

Reimplemented from satdump::handlers::ProductHandler.

◆ setConfig()

void satdump::handlers::PunctiformProductHandler::setConfig ( nlohmann::json p)
virtual

Optional, allows setting a configuration/state from JSON.

Parameters
pJSON object

Reimplemented from satdump::handlers::Handler.


The documentation for this class was generated from the following files: