![]() |
Radium Engine
1.5.0
|
Simple Widget for RenderParameter edition The editor will expose a control panel containing all of the editable parameters from a RenderParameter set. More...
#include <Gui/ParameterSetEditor/ParameterSetEditor.hpp>
Signals | |
void | parameterModified (const std::string &name) |
Public Member Functions | |
void | setupFromParameters (Engine::Data::RenderParameters ¶ms, const nlohmann::json &constraints) |
Update the different UI element with the given renderParameter, using the given constraints. More... | |
void | showUnspecified (bool enable) |
ParameterSetEditor (const std::string &name, QWidget *parent=nullptr) | |
ParameterSetEditor (const ParameterSetEditor &)=delete | |
ParameterSetEditor & | operator= (const ParameterSetEditor &)=delete |
ParameterSetEditor (ParameterSetEditor &&)=delete | |
ParameterSetEditor && | operator= (ParameterSetEditor &&)=delete |
![]() | |
ControlPanel (const std::string &name, bool hline=true, QWidget *parent=nullptr) | |
ControlPanel (const ControlPanel &)=delete | |
ControlPanel & | operator= (const ControlPanel &)=delete |
ControlPanel (ControlPanel &&)=delete | |
ControlPanel & | operator= (ControlPanel &&)=delete |
void | beginLayout (QBoxLayout::Direction dir=QBoxLayout::LeftToRight) |
void | endLayout (bool separator=false) |
void | addSeparator () |
void | addStretch (int stretch=0) |
void | addOption (const std::string &name, std::function< void(bool)> callback, bool set=false, const std::string &tooltip="") |
void | addLabel (const std::string &text) |
void | addButton (const std::string &name, std::function< void()> callback, const std::string &tooltip="") |
void | addColorInput (const std::string &name, const std::function< void(const Ra::Core::Utils::Color &clr)> &callback, Ra::Core::Utils::Color color=Ra::Core::Utils::Color::Black(), bool withAlpha=true, const std::string &tooltip="") |
template<typename T = Scalar> | |
void | addNumberInput (const std::string &name, std::function< void(T)> callback, T initial, T min=std::numeric_limits< T >::lowest(), T max=std::numeric_limits< T >::max(), const std::string &tooltip="", int dec=3) |
template<typename T = Scalar> | |
void | addConstrainedNumberInput (const std::string &name, std::function< void(T)> callback, Scalar initial, std::function< bool(T)> predicate, const std::string &tooltip="", int dec=3) |
void | addSliderInput (const std::string &name, std::function< void(int)> callback, int initial=0, int min=0, int max=100, const std::string &tooltip="") |
void | addPowerSliderInput (const std::string &name, std::function< void(double)> callback, double initial=0, double min=0, double max=100, const std::string &tooltip="") |
template<typename T = Scalar> | |
void | addVectorInput (const std::string &name, std::function< void(const std::vector< T > &)> callback, const std::vector< T > &initial, const std::string &tooltip="") |
void | addMatrixInput (const std::string &name, std::function< void(const Ra::Core::MatrixN &)> callback, const Ra::Core::MatrixN &initial, int dec=3, const std::string &tooltip="") |
void | addFileInput (const std::string &name, std::function< void(std::string)> callback, const std::string &rootDirectory, const std::string &filters, const std::string &tooltip="") |
void | addFileOutput (const std::string &name, std::function< void(std::string)> callback, const std::string &rootDirectory, const std::string &filters, const std::string &tooltip="") |
void | addComboBox (const std::string &name, std::function< void(int)> callback, int initial, const std::vector< std::string > &items, const std::string &tooltip="") |
void | addComboBox (const std::string &name, std::function< void(const QString &)> callback, const std::string &initial, const std::vector< std::string > &items, const std::string &tooltip="") |
void | addWidget (QWidget *newWidget) |
Friends | |
class | internal::RenderParameterUiBuilder |
Simple Widget for RenderParameter edition The editor will expose a control panel containing all of the editable parameters from a RenderParameter set.
Definition at line 34 of file ParameterSetEditor.hpp.
|
explicit |
Constructors and destructor
Definition at line 110 of file ParameterSetEditor.cpp.
|
signal |
Signal emitted whenever a parameter is modified
void Ra::Gui::ParameterSetEditor::setupFromParameters | ( | Engine::Data::RenderParameters & | params, |
const nlohmann::json & | constraints | ||
) |
Update the different UI element with the given renderParameter, using the given constraints.
params | the parameter set to edit |
constraints | the parameter constraints descriptor |
name | (optional) the name to display in top of the editor |
Definition at line 245 of file ParameterSetEditor.cpp.
void Ra::Gui::ParameterSetEditor::showUnspecified | ( | bool | enable | ) |
Wether to show parameters without associated metadata
enable |
Definition at line 254 of file ParameterSetEditor.cpp.