Ocular Engine
|
Parent class for all general property widgets. More...
#include <PropertyWidget.hpp>
Public Member Functions | |
PropertyWidget (std::string const &type, QWidget *parent=nullptr) | |
virtual QSize | sizeHint () const override |
virtual bool | updateProperties () |
virtual void | setValue (void *value, uint32_t size) |
virtual std::string | getValue () const |
std::string | getType () const |
void | setVariable (Core::ExposedVariable &variable) |
void | setDisplayName (std::string const &name) |
std::string const & | getDisplayName () const |
std::string const & | getVariableName () const |
void | addWidgetLeftSide (QWidget *widget) |
void | addWidgetRightSide (QWidget *widget) |
Protected Attributes | |
QHBoxLayout * | m_LayoutRight |
Layout for the right-side frame. | |
Core::ExposedVariable | m_Variable |
The variable this widget is responsible for displaying and modifying. | |
Parent class for all general property widgets.
Each instance of a property widget is broken into two parts: a name on the left side, and some form of data display on the right.
void Ocular::Editor::PropertyWidget::addWidgetLeftSide | ( | QWidget * | widget | ) |
Adds a new widget to the left-side layout.
[in] | widget |
void Ocular::Editor::PropertyWidget::addWidgetRightSide | ( | QWidget * | widget | ) |
Adds a new widget to the right-side layout.
[in] | widget |
std::string const & Ocular::Editor::PropertyWidget::getDisplayName | ( | ) | const |
Retrieves the text of the label on the left-side of the widget.
std::string Ocular::Editor::PropertyWidget::getType | ( | ) | const |
|
virtual |
Reimplemented in Ocular::Editor::ResourceProperty, Ocular::Editor::DirectoryProperty, Ocular::Editor::FileProperty, Ocular::Editor::QuatAsEulerProperty, Ocular::Editor::StringProperty, Ocular::Editor::ColorProperty, Ocular::Editor::Vector2Property, Ocular::Editor::Vector3Property, Ocular::Editor::Vector4Property, Ocular::Editor::Int16Property, Ocular::Editor::Int32Property, Ocular::Editor::Int8Property, Ocular::Editor::UInt16Property, Ocular::Editor::UInt32Property, Ocular::Editor::UInt8Property, Ocular::Editor::DoubleProperty, Ocular::Editor::FloatProperty, Ocular::Editor::BoolProperty, Ocular::Editor::EulerProperty, and Ocular::Editor::QuaternionProperty.
std::string const & Ocular::Editor::PropertyWidget::getVariableName | ( | ) | const |
Retrieves the name of the exposed variable.
void Ocular::Editor::PropertyWidget::setDisplayName | ( | std::string const & | name | ) |
Sets the text of the label on the left-side of the widget.
[in] | name |
|
virtual |
Sets the value of the variable and/or widget.
Reimplemented in Ocular::Editor::ResourceProperty, Ocular::Editor::DirectoryProperty, Ocular::Editor::FileProperty, Ocular::Editor::QuatAsEulerProperty, Ocular::Editor::StringProperty, Ocular::Editor::ColorProperty, Ocular::Editor::Vector2Property, Ocular::Editor::Vector3Property, Ocular::Editor::Vector4Property, Ocular::Editor::Int16Property, Ocular::Editor::Int32Property, Ocular::Editor::Int8Property, Ocular::Editor::UInt16Property, Ocular::Editor::UInt32Property, Ocular::Editor::UInt8Property, Ocular::Editor::DoubleProperty, Ocular::Editor::FloatProperty, Ocular::Editor::BoolProperty, Ocular::Editor::EulerProperty, and Ocular::Editor::QuaternionProperty.
void Ocular::Editor::PropertyWidget::setVariable | ( | Core::ExposedVariable & | variable | ) |
Sets the variable whose data should be displayed and made available to modify by the implementation.
[in] | variable |
|
virtual |
Update method that is called up to once a frame so that changes to the tracked variable may be checked for, and displayed.
Reimplemented in Ocular::Editor::ResourceProperty, Ocular::Editor::ColorProperty, Ocular::Editor::DirectoryProperty, Ocular::Editor::FileProperty, Ocular::Editor::QuatAsEulerProperty, Ocular::Editor::Int16Property, Ocular::Editor::Int32Property, Ocular::Editor::Int8Property, Ocular::Editor::UInt16Property, Ocular::Editor::UInt32Property, Ocular::Editor::UInt8Property, Ocular::Editor::MultiProperty, Ocular::Editor::DoubleProperty, Ocular::Editor::FloatProperty, Ocular::Editor::BoolProperty, Ocular::Editor::EulerProperty, Ocular::Editor::QuaternionProperty, Ocular::Editor::StringProperty, Ocular::Editor::Vector2Property, Ocular::Editor::Vector3Property, and Ocular::Editor::Vector4Property.