![]() |
Radium Engine
1.6.3
|
#include <Gui/Widgets/ControlPanel.hpp>
Inheritance diagram for Ra::Gui::Widgets::ControlPanel:
Collaboration diagram for Ra::Gui::Widgets::ControlPanel:Public Member Functions | |
| 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 | addSeparator () |
| void | addStretch (int stretch) |
| void | newLayout () |
| 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) |
Simple panel for Qt gui. A control panel will expose all configurable options the object its decorate to allow the user to interact with it.
Definition at line 26 of file ControlPanel.hpp.
|
explicit |
Definition at line 20 of file ControlPanel.cpp.
| void Ra::Gui::Widgets::ControlPanel::addButton | ( | const std::string & | name, |
| std::function< void()> | callback, | ||
| const std::string & | tooltip = "" ) |
Add a button. This button, when pressed, will call the associated callback.
| name | The name of the button |
| callback | The function to call when the state changed |
| tooltip | The tooltip text |
Definition at line 74 of file ControlPanel.cpp.
Here is the call graph for this function:| void Ra::Gui::Widgets::ControlPanel::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 = "" ) |
Add a color input button. This button, when pressed, will open a color chooser and call the associated callback. The button is also painted with the chosen color.
| name | The name of the color to choose |
| callback | The function to call when the state changed. The color give to the callback is in linearRGB color space. |
| color | The initial value of the color, in linearRGB color space. |
| withAlpha | allow to enter alpha channel value |
| tooltip | The tooltip text |
Definition at line 170 of file ControlPanel.cpp.
Here is the call graph for this function:| void Ra::Gui::Widgets::ControlPanel::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 = "" ) |
Definition at line 298 of file ControlPanel.cpp.
| void Ra::Gui::Widgets::ControlPanel::addComboBox | ( | const std::string & | name, |
| std::function< void(int)> | callback, | ||
| int | initial, | ||
| const std::vector< std::string > & | items, | ||
| const std::string & | tooltip = "" ) |
Add a combobox to the panel Allow the user to select values from a combobox
| name | The name of the option |
| callback | The function to call when the index changed |
| initial | The initial index of the combobox |
| items | The menu items of the combobox |
| tooltip | The tooltip text |
Definition at line 275 of file ControlPanel.cpp.
Here is the call graph for this function:| void Ra::Gui::Widgets::ControlPanel::addConstrainedNumberInput | ( | const std::string & | name, |
| std::function< void(T)> | callback, | ||
| Scalar | initial, | ||
| std::function< bool(T)> | predicate, | ||
| const std::string & | tooltip = "", | ||
| int | dec = 3 ) |
Add a checking scalar (real number) input spinbox. This input will return a scalar value that meet the conditions of a given predicate.
| T | The type of value to edit (default Scalar) |
| name | The name of the scalar value |
| callback | The function to call when the state changed |
| initial | The initial value of the scalar |
| predicate | defines a set of conditions that the scalar should meet |
| tooltip | The tooltip text |
| dec | The display precision (decimals) of the value |
Definition at line 251 of file ControlPanel.hpp.
Here is the call graph for this function:| void Ra::Gui::Widgets::ControlPanel::addFileInput | ( | const std::string & | name, |
| std::function< void(std::string)> | callback, | ||
| const std::string & | rootDirectory, | ||
| const std::string & | filters, | ||
| const std::string & | tooltip = "" ) |
Add a file dialog to the ui. Allow the user to select a file to load according to given filters
| name | The name of the file property to expose |
| callback | The function to call when the state changed |
| rootDirectory | The initial directory of the file dialog |
| filters | The filters to apply to filenames |
| tooltip | The tooltip text |
Definition at line 227 of file ControlPanel.cpp.
Here is the call graph for this function:| void Ra::Gui::Widgets::ControlPanel::addFileOutput | ( | const std::string & | name, |
| std::function< void(std::string)> | callback, | ||
| const std::string & | rootDirectory, | ||
| const std::string & | filters, | ||
| const std::string & | tooltip = "" ) |
Add a save file dialog to the ui. Allow the user to select a file to load according to given filters
| name | The name of the file property to expose |
| callback | The function to call when the state changed |
| rootDirectory | The initial directory of the file dialog |
| filters | The filters to apply to filenames |
| tooltip | The tooltip text |
Definition at line 251 of file ControlPanel.cpp.
| void Ra::Gui::Widgets::ControlPanel::addLabel | ( | const std::string & | text | ) |
Add a label. Shows text.
| text | The text to show |
Definition at line 68 of file ControlPanel.cpp.
Here is the call graph for this function:| void Ra::Gui::Widgets::ControlPanel::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 = "" ) |
Add a matrix input. This input will return a matrix.
| name | The name of the matrix |
| callback | The function to call when the state changed |
| initial | The initial value of the matrix |
| dec | The display precision (decimals) of the value |
| tooltip | The tooltip text |
Definition at line 148 of file ControlPanel.cpp.
Here is the call graph for this function:| void Ra::Gui::Widgets::ControlPanel::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 ) |
Add a scalar input spinbox. This input will return a scalar value within given bounds.
| T | The type of value to edit (default Scalar) |
| name | The name of the scalar value |
| callback | The function to call when the state changed |
| initial | The initial value of the scalar |
| min | The min bound of the value |
| max | The max bound of the value |
| tooltip | The tooltip text |
| dec | The display precision (decimals) of the value |
Definition at line 283 of file ControlPanel.hpp.
Here is the call graph for this function:| void Ra::Gui::Widgets::ControlPanel::addOption | ( | const std::string & | name, |
| std::function< void(bool)> | callback, | ||
| bool | set = false, | ||
| const std::string & | tooltip = "" ) |
Methods to populate the panel with dedicated ui elements. Add an option to the panel An option is an on/off checkbox to activate a state of the renderer.
| name | The name of the option |
| callback | The function to call when the state changed |
| set | The initial value of the option |
Definition at line 47 of file ControlPanel.cpp.
Here is the call graph for this function:| void Ra::Gui::Widgets::ControlPanel::addPowerSliderInput | ( | const std::string & | name, |
| std::function< void(double)> | callback, | ||
| double | initial = 0, | ||
| double | min = 0, | ||
| double | max = 100, | ||
| const std::string & | tooltip = "" ) |
Add an horizontal power slider input. This input will return a scalar value within given bounds.
| name | The name of the scalar value |
| callback | The function to call when the state changed |
| initial | The initial value of the color |
| min | The min bound of the value |
| max | The max bound of the value |
| tooltip | The tooltip text |
Definition at line 123 of file ControlPanel.cpp.
Here is the call graph for this function:| void Ra::Gui::Widgets::ControlPanel::addSeparator | ( | ) |
Definition at line 266 of file ControlPanel.cpp.
| void Ra::Gui::Widgets::ControlPanel::addSliderInput | ( | const std::string & | name, |
| std::function< void(int)> | callback, | ||
| int | initial = 0, | ||
| int | min = 0, | ||
| int | max = 100, | ||
| const std::string & | tooltip = "" ) |
Add an horizontal slider input. This input will return a scalar value within given bounds.
| name | The name of the scalar value |
| callback | The function to call when the state changed |
| initial | The initial value of the scalar |
| min | The min bound of the value |
| max | The max bound of the value |
| tooltip | The tooltip text |
Definition at line 89 of file ControlPanel.cpp.
Here is the call graph for this function:| void Ra::Gui::Widgets::ControlPanel::addStretch | ( | int | stretch | ) |
Definition at line 322 of file ControlPanel.cpp.
| void Ra::Gui::Widgets::ControlPanel::addVectorInput | ( | const std::string & | name, |
| std::function< void(const std::vector< T > &)> | callback, | ||
| const std::vector< T > & | initial, | ||
| const std::string & | tooltip = "" ) |
Add a vector input. This input will return a vector.
| name | The name of the vector |
| callback | The function to call when the state changed |
| initial | The initial value of the vector |
| tooltip | The tooltip text |
Definition at line 321 of file ControlPanel.hpp.
Here is the call graph for this function:| void Ra::Gui::Widgets::ControlPanel::addWidget | ( | QWidget * | newWidget | ) |
Add an arbitrary widget to the ui.
| newWidget | The widget to add to the ui. |
Definition at line 329 of file ControlPanel.cpp.
|
inline |
Definition at line 238 of file ControlPanel.hpp.