GDevelop Core
Core library for developing platforms and tools compatible with GDevelop.
Public Member Functions | List of all members
gd::PropertyDescriptor Class Reference

Used to describe a property shown in a property grid. More...

#include <PropertyDescriptor.h>

Inherited by gd::NamedPropertyDescriptor.

Public Member Functions

 PropertyDescriptor (gd::String propertyValue)
 Create a property being a simple gd::String with the specified value. More...
 
 PropertyDescriptor ()
 Empty constructor creating an empty property to be displayed.
 
virtual ~PropertyDescriptor ()
 Destructor.
 
PropertyDescriptorSetValue (gd::String value)
 Change the value displayed in the property grid.
 
PropertyDescriptorSetType (gd::String type_)
 Change the type of the value displayed in the property grid. More...
 
PropertyDescriptorSetLabel (gd::String label_)
 Change the label displayed in the property grid.
 
PropertyDescriptorSetDescription (gd::String description_)
 Change the description displayed to the user, if any.
 
PropertyDescriptorSetGroup (gd::String group_)
 Change the group where this property is displayed to the user, if any.
 
PropertyDescriptorSetExtraInfo (const std::vector< gd::String > &info)
 Set and replace the additional information for the property.
 
PropertyDescriptorAddExtraInfo (const gd::String &info)
 Add an information about the property. More...
 
PropertyDescriptorSetMeasurementUnit (const gd::MeasurementUnit &measurementUnit_)
 Change the unit of measurement of the property value.
 
const gd::StringGetValue () const
 
const gd::StringGetType () const
 
const gd::StringGetLabel () const
 
const gd::StringGetDescription () const
 
const gd::StringGetGroup () const
 
const gd::MeasurementUnitGetMeasurementUnit () const
 
const std::vector< gd::String > & GetExtraInfo () const
 
std::vector< gd::String > & GetExtraInfo ()
 
PropertyDescriptorSetHidden (bool enable=true)
 Set if the property should be shown or hidden in the editor.
 
bool IsHidden () const
 Check if the property should be shown or hidden in the editor.
 
PropertyDescriptorSetDeprecated (bool enable=true)
 Set if the property is deprecated.
 
bool IsDeprecated () const
 Check if the property is deprecated.
 
PropertyDescriptorSetAdvanced (bool enable=true)
 Set if the property is marked as advanced.
 
bool IsAdvanced () const
 Check if the property is marked as advanced.
 
bool HasImpactOnOtherProperties () const
 Check if the property has impact on other properties - which means a change must re-render other properties.
 
PropertyDescriptorSetHasImpactOnOtherProperties (bool enable)
 Set if the property has impact on other properties - which means a change must re-render other properties.
 
QuickCustomization::Visibility GetQuickCustomizationVisibility () const
 
PropertyDescriptorSetQuickCustomizationVisibility (QuickCustomization::Visibility visibility)
 
Serialization
virtual void SerializeTo (SerializerElement &element) const
 Serialize the PropertyDescriptor.
 
virtual void UnserializeFrom (const SerializerElement &element)
 Unserialize the PropertyDescriptor.
 
virtual void SerializeValuesTo (SerializerElement &element) const
 Serialize only the value and extra informations.
 
virtual void UnserializeValuesFrom (const SerializerElement &element)
 Unserialize only the value and extra informations.
 

Detailed Description

Used to describe a property shown in a property grid.

See also
gd::Object
gd::EffectMetadata
Examples
/home/circleci/repo/GDevelop/Core/GDCore/Extensions/Metadata/DependencyMetadata.h.

Constructor & Destructor Documentation

◆ PropertyDescriptor()

gd::PropertyDescriptor::PropertyDescriptor ( gd::String  propertyValue)
inline

Create a property being a simple gd::String with the specified value.

Parameters
propertyValueThe value of the property.

Member Function Documentation

◆ AddExtraInfo()

PropertyDescriptor& gd::PropertyDescriptor::AddExtraInfo ( const gd::String info)
inline

Add an information about the property.

Note
The information are arbitrary and are interpreted by the class updating the property grid: Refer to it or to the documentation of the class which is returning the PropertyDescriptor to learn more about valid values for the extra information.

◆ SetType()

PropertyDescriptor& gd::PropertyDescriptor::SetType ( gd::String  type_)
inline

Change the type of the value displayed in the property grid.

Note
The type is arbitrary and is interpreted by the class updating the property grid: Refer to it or to the documentation of the class which is returning the PropertyDescriptor to learn more about valid values for the type.

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