= Adding new parameter = Let us suppose that we want to add two new parameters to our component. First parameter, named "integer-value" of type ```int``` will be obligatory (required). Second one, named "floating-point-value" of type ```double``` will be optional/defaulted (we will provide a default value and the user will not be obliged to set it. 1. Add member fields to your component which will contain parameter values. For instance, your class can look like: {{{ class MyComponent : public QObject , public ComponentBase { public: // ... private: int mInteger; double mDouble; }; }}} 2. Invoke ```addParameters()``` in your component constructor. This function returns an object that allows you to add parameters. Then, '''after ```()```''', add parameters: For a ''required'' parameter: add a line like ```("parameter-name", value(&variableToSetWithParameterValue)->required(), "parameter description"```. For a ''optional/defaulted'' parameter: add a line like ```("parameter-name", value(&variableToSetWithParameterValue)->default_value(kDefaultParameterValue), "parameter description"```. {{{ addParameters() ("integer-value", value(&mInteger)->required(), "integer value for test") ("floating-point-value", value(&mDouble)->default_value(kDefaultMemoryName), "floating-point value for test") ; }}} 3. Modify your XML file In the ``` }}} '''After the modification:''' {{{ }}} or {{{ }}}