satdump/src-interface/viewer2/dsp/flowgraph/node_int.cpp
2025-04-15 19:06:12 +01:00

26 lines
704 B
C++

#include "node_int.h"
#include "flowgraph.h"
#include "imgui/imgui.h"
namespace satdump
{
namespace ndsp
{
NodeInternal::NodeInternal(const Flowgraph *f, std::shared_ptr<ndsp::Block> b) : f((Flowgraph *)f), blk(b) { optdisp = std::make_unique<ndsp::OptDisplayerWarper>(blk); }
void NodeInternal::render()
{
ImGui::PushItemWidth(200);
optdisp->draw();
ImGui::PopItemWidth();
}
nlohmann::json NodeInternal::getP() { return blk->get_cfg(); }
void NodeInternal::setP(nlohmann::json p)
{
blk->set_cfg(p);
optdisp->update();
}
} // namespace ndsp
} // namespace satdump