Maki
Formally verfied low-code orchestration
Loading...
Searching...
No Matches
PropertyInfo Class Reference

Represents a property with configuration and options. More...

#include <property_info.h>

Inheritance diagram for PropertyInfo:

Public Member Functions

 PropertyInfo ()
 Constructs an empty PropertyInfo object.
 PropertyInfo (const PropertyConfig &object)
 Constructs a PropertyInfo object from a PropertyConfig.
QString getid () const override
 Gets the ID of the property.
const IValue * getvalue () const override
 Gets the default value of the property.
koda::types::TypeReference gettype () const override
 Gets the type of the property.
Types::ControlTypes getcontrol () const override
 Gets the control type of the property.
void setId (const QString &arg)
 Sets the ID of the property.
void setDefaultValue (const maki::Value &arg)
 Sets the default value of the property.
void setType (const koda::types::TypeReference &arg)
 Sets the type of the property.
void setControl (Types::ControlTypes arg)
 Sets the control type of the property.
PropertyInfo getOption (const QString &optionId)
 Gets a specific option by ID.
QJsonObject toJson () const
 Converts the PropertyInfo object to a JSON object.

Static Public Member Functions

static PropertyInfo fromJson (const QJsonObject &data)
 Creates a PropertyInfo object from a JSON object.

Private Attributes

maki::Value mDefaultValue
 ID of the property.
koda::types::TypeReference mType
 Default value of the property.
Types::ControlTypes mControlType
 Type of the property.

Detailed Description

Represents a property with configuration and options.

Constructor & Destructor Documentation

◆ PropertyInfo()

PropertyInfo::PropertyInfo ( const PropertyConfig & object)

Constructs a PropertyInfo object from a PropertyConfig.

Parameters
objectThe PropertyConfig to initialize the object with.

Member Function Documentation

◆ fromJson()

PropertyInfo PropertyInfo::fromJson ( const QJsonObject & data)
static

Creates a PropertyInfo object from a JSON object.

Parameters
dataThe JSON data to parse.
Returns
PropertyInfo The created PropertyInfo object.

◆ getcontrol()

Types::ControlTypes PropertyInfo::getcontrol ( ) const
override

Gets the control type of the property.

Returns
Types::ControlTypes The control type of the property.

◆ getid()

QString PropertyInfo::getid ( ) const
override

Gets the ID of the property.

Returns
QString The ID of the property.

◆ getOption()

PropertyInfo PropertyInfo::getOption ( const QString & optionId)

Gets a specific option by ID.

Parameters
optionIdThe ID of the option to retrieve.
Returns
PropertyInfo The option with the specified ID.

◆ gettype()

koda::types::TypeReference PropertyInfo::gettype ( ) const
override

Gets the type of the property.

Returns
Types::PropertyTypes The type of the property.

◆ getvalue()

const IValue * PropertyInfo::getvalue ( ) const
override

Gets the default value of the property.

Returns
QVariant The default value of the property.

◆ setControl()

void PropertyInfo::setControl ( Types::ControlTypes arg)

Sets the control type of the property.

Parameters
argThe new control type for the property.

◆ setDefaultValue()

void PropertyInfo::setDefaultValue ( const maki::Value & arg)

Sets the default value of the property.

Parameters
argThe new default value for the property.

◆ setId()

void PropertyInfo::setId ( const QString & arg)

Sets the ID of the property.

Parameters
argThe new ID for the property.

◆ setType()

void PropertyInfo::setType ( const koda::types::TypeReference & arg)

Sets the type of the property.

Parameters
argThe new type for the property.

◆ toJson()

QJsonObject PropertyInfo::toJson ( ) const

Converts the PropertyInfo object to a JSON object.

Returns
QJsonObject A JSON representation of the object.

The documentation for this class was generated from the following files:
  • /__w/maki/maki/app/document/property_info.h
  • /__w/maki/maki/app/document/property_info.cpp