OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
ot::PropertyInput Class Referenceabstract

#include "PropertyInput.h"

Inheritance diagram for ot::PropertyInput:
ot::QWidgetInterface ot::PropertyInputBool ot::PropertyInputColor ot::PropertyInputDirectory ot::PropertyInputDouble ot::PropertyInputFilePath ot::PropertyInputInt ot::PropertyInputPainter2D ot::PropertyInputString ot::PropertyInputStringList

Public Slots

void slotValueChanged (void)
 If called the "inputValueChanged()" signal is emitted and the multiple values flag removed.
 
void slotValueChanged (bool)
 If called the "inputValueChanged()" signal is emitted and the multiple values flag removed.
 
void slotValueChanged (int)
 If called the "inputValueChanged()" signal is emitted and the multiple values flag removed.
 

Signals

void inputValueChanged (void)
 Is emitted whenever the user changed a value.
 

Public Member Functions

 PropertyInput ()
 
virtual ~PropertyInput ()
 
virtual void addPropertyInputValueToJson (ot::JsonValue &_object, const char *_memberNameValue, ot::JsonAllocator &_allocator)=0
 Add the current value to the provided JSON object.
 
virtual QVariant getCurrentValue (void) const =0
 Returns the current value.
 
virtual PropertycreatePropertyConfiguration (void) const =0
 Creates a property configuration that can be used to later create this object.
 
virtual QWidget * getQWidget (void) override=0
 Returns the root widget of the input (allows nested widgets)
 
virtual bool setupFromConfiguration (const Property *_configuration)
 Setup the input from the provided configration.
 
virtual void focusPropertyInput (void)=0
 Sets the focus on the input widget.
 
const std::string & getPropertyType (void) const
 
void setData (const PropertyBase &_data)
 
PropertyBasedata (void)
 
const PropertyBasedata (void) const
 
void setDataHasChanged (bool _changed=true)
 
bool dataHasChanged (void) const
 
- Public Member Functions inherited from ot::QWidgetInterface
 QWidgetInterface ()
 
virtual ~QWidgetInterface ()
 
void setOTWidgetFlags (const WidgetFlags &_flags)
 
const WidgetFlagsotWidgetFlags (void) const
 
virtual void otWidgetFlagsChanged (const WidgetFlags &_flags)
 
void centerOnParent (const QWidget *const _parentWidget)
 Centers this widget on the parent. If no parent is provided the widget will center on the screen.
 
QPoint calculateCenterOnParentPos (const QWidget *const _parentWidget)
 Calculates the top left corner of this widget centered on the parent widget. If no parent is provided the widget will center on the screen.
 

Additional Inherited Members

- Protected Attributes inherited from ot::QWidgetInterface
WidgetFlags m_widgetFlags
 

Constructor & Destructor Documentation

◆ PropertyInput()

ot::PropertyInput::PropertyInput ( )

◆ ~PropertyInput()

virtual ot::PropertyInput::~PropertyInput ( )
inlinevirtual

Member Function Documentation

◆ addPropertyInputValueToJson()

virtual void ot::PropertyInput::addPropertyInputValueToJson ( ot::JsonValue & _object,
const char * _memberNameValue,
ot::JsonAllocator & _allocator )
pure virtual

Add the current value to the provided JSON object.

Parameters
_objectTarget JSON object
_memberNameValueValue member name
_allocatorJSON allocator

Implemented in ot::PropertyInputBool, ot::PropertyInputColor, ot::PropertyInputDirectory, ot::PropertyInputDouble, ot::PropertyInputFilePath, ot::PropertyInputInt, ot::PropertyInputPainter2D, ot::PropertyInputString, and ot::PropertyInputStringList.

◆ createPropertyConfiguration()

virtual Property * ot::PropertyInput::createPropertyConfiguration ( void ) const
pure virtual

◆ data() [1/2]

PropertyBase & ot::PropertyInput::data ( void )
inline

◆ data() [2/2]

const PropertyBase & ot::PropertyInput::data ( void ) const
inline

◆ dataHasChanged()

bool ot::PropertyInput::dataHasChanged ( void ) const
inline

◆ focusPropertyInput()

virtual void ot::PropertyInput::focusPropertyInput ( void )
pure virtual

◆ getCurrentValue()

virtual QVariant ot::PropertyInput::getCurrentValue ( void ) const
pure virtual

◆ getPropertyType()

const std::string & ot::PropertyInput::getPropertyType ( void ) const
inline

◆ getQWidget()

virtual QWidget * ot::PropertyInput::getQWidget ( void )
overridepure virtual

◆ inputValueChanged

void ot::PropertyInput::inputValueChanged ( void )
signal

Is emitted whenever the user changed a value.

◆ setData()

void ot::PropertyInput::setData ( const PropertyBase & _data)
inline

◆ setDataHasChanged()

void ot::PropertyInput::setDataHasChanged ( bool _changed = true)
inline

◆ setupFromConfiguration()

bool ot::PropertyInput::setupFromConfiguration ( const Property * _configuration)
virtual

◆ slotValueChanged [1/3]

void ot::PropertyInput::slotValueChanged ( bool )
slot

If called the "inputValueChanged()" signal is emitted and the multiple values flag removed.

◆ slotValueChanged [2/3]

void ot::PropertyInput::slotValueChanged ( int )
slot

If called the "inputValueChanged()" signal is emitted and the multiple values flag removed.

◆ slotValueChanged [3/3]

void ot::PropertyInput::slotValueChanged ( void )
slot

If called the "inputValueChanged()" signal is emitted and the multiple values flag removed.


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