Ocular Engine
Ocular::Editor::MultiProperty Class Reference

#include <MultiProperty.hpp>

Inheritance diagram for Ocular::Editor::MultiProperty:
Ocular::Editor::PropertyWidget

Public Member Functions

 MultiProperty (QWidget *parent=nullptr)
 
virtual bool updateProperties () override
 
uint32_t addProperty (std::string const &name, LineType type)
 
QLabel * getLabel (uint32_t index)
 
LineEditgetLineEdit (uint32_t index)
 
uint32_t getNumProperties () const
 
- Public Member Functions inherited from Ocular::Editor::PropertyWidget
 PropertyWidget (std::string const &type, QWidget *parent=nullptr)
 
virtual QSize sizeHint () const override
 
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)
 

Additional Inherited Members

- Protected Attributes inherited from Ocular::Editor::PropertyWidget
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

Customizable property that displays a variable number of line edits.

Member Function Documentation

uint32_t Ocular::Editor::MultiProperty::addProperty ( std::string const &  name,
LineType  type 
)

Adds a new property to be displayed on the right-side of the widget.

Parameters
[in]nameText of the name label that is displayed to the left of the edit.
[in]typeThe type of line edit to create.
Returns
The index of the new property. Used to later retrieve the label and/or the edit.
QLabel * Ocular::Editor::MultiProperty::getLabel ( uint32_t  index)

Returns the label displayed to the left of the edit with the specified index.

Parameters
[in]indexValid property index. Returns NULL if index is invalid.
LineEdit * Ocular::Editor::MultiProperty::getLineEdit ( uint32_t  index)

Returns the edit with the specified index.

Parameters
[in]indexValid property index. Returns NULL if index is invalid.
uint32_t Ocular::Editor::MultiProperty::getNumProperties ( ) const

Returns the number of properties displayed

bool Ocular::Editor::MultiProperty::updateProperties ( )
overridevirtual

Update method that is called up to once a frame so that changes to the tracked variable may be checked for, and displayed.

Returns
Should return TRUE if a property was modified by the user; otherwise return FALSE.

Reimplemented from Ocular::Editor::PropertyWidget.


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