Loading [MathJax]/extensions/TeX/AMSmath.js
Radium Engine  1.5.0
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
Ra::Gui::ParameterSetEditor Class Reference

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>

+ Inheritance diagram for Ra::Gui::ParameterSetEditor:
+ Collaboration diagram for Ra::Gui::ParameterSetEditor:

Signals

void parameterModified (const std::string &name)
 

Public Member Functions

void setupFromParameters (Engine::Data::RenderParameters &params, 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
 
ParameterSetEditoroperator= (const ParameterSetEditor &)=delete
 
 ParameterSetEditor (ParameterSetEditor &&)=delete
 
ParameterSetEditor && operator= (ParameterSetEditor &&)=delete
 
- Public Member Functions inherited from Ra::Gui::Widgets::ControlPanel
 ControlPanel (const std::string &name, bool hline=true, QWidget *parent=nullptr)
 
 ControlPanel (const ControlPanel &)=delete
 
ControlPaneloperator= (const ControlPanel &)=delete
 
 ControlPanel (ControlPanel &&)=delete
 
ControlPaneloperator= (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
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ ParameterSetEditor()

Ra::Gui::ParameterSetEditor::ParameterSetEditor ( const std::string &  name,
QWidget *  parent = nullptr 
)
explicit

Constructors and destructor

Definition at line 110 of file ParameterSetEditor.cpp.

Member Function Documentation

◆ parameterModified

void Ra::Gui::ParameterSetEditor::parameterModified ( const std::string &  name)
signal

Signal emitted whenever a parameter is modified

◆ setupFromParameters()

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.

Parameters
paramsthe parameter set to edit
constraintsthe parameter constraints descriptor
name(optional) the name to display in top of the editor

Definition at line 245 of file ParameterSetEditor.cpp.

+ Here is the call graph for this function:

◆ showUnspecified()

void Ra::Gui::ParameterSetEditor::showUnspecified ( bool  enable)

Wether to show parameters without associated metadata

Parameters
enable

Definition at line 254 of file ParameterSetEditor.cpp.


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