Ocular Engine
Ocular::Editor::PropertyWidget Class Reference

Parent class for all general property widgets. More...

#include <PropertyWidget.hpp>

Inheritance diagram for Ocular::Editor::PropertyWidget:
Ocular::Editor::BoolProperty Ocular::Editor::ColorProperty Ocular::Editor::DirectoryProperty Ocular::Editor::DoubleProperty Ocular::Editor::EulerProperty Ocular::Editor::FileProperty Ocular::Editor::FloatProperty Ocular::Editor::Int16Property Ocular::Editor::Int32Property Ocular::Editor::Int8Property Ocular::Editor::MultiProperty Ocular::Editor::QuatAsEulerProperty Ocular::Editor::QuaternionProperty Ocular::Editor::ResourceProperty Ocular::Editor::StringProperty Ocular::Editor::UInt16Property Ocular::Editor::UInt32Property Ocular::Editor::UInt8Property Ocular::Editor::Vector2Property Ocular::Editor::Vector3Property Ocular::Editor::Vector4Property

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.

Detailed Description

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.

Member Function Documentation

void Ocular::Editor::PropertyWidget::addWidgetLeftSide ( QWidget *  widget)

Adds a new widget to the left-side layout.

void Ocular::Editor::PropertyWidget::addWidgetRightSide ( QWidget *  widget)

Adds a new widget to the right-side layout.

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
Type of property as a string
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.

void Ocular::Editor::PropertyWidget::setVariable ( Core::ExposedVariable variable)

Sets the variable whose data should be displayed and made available to modify by the implementation.


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