Changes between Version 2 and Version 3 of TutorialAddingNewParameter
- Timestamp:
- Nov 21, 2013, 11:25:50 AM (11 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
TutorialAddingNewParameter
v2 v3 9 9 For instance, your class can look like: 10 10 11 {{{ 11 {{{#!c++ 12 12 class MyComponent 13 13 : public QObject … … 31 31 For a ''optional/defaulted'' parameter: add a line like ```("parameter-name", value<!ParameterType>(&variableToSetWithParameterValue)->default_value(kDefaultParameterValue), "parameter description"```. 32 32 33 {{{ 33 {{{#!c++ 34 34 addParameters() 35 35 ("integer-value", value<int>(&mInteger)->required(), "integer value for test") … … 43 43 44 44 '''Before the modification:''' 45 {{{ 45 {{{#!xml 46 46 <component name="mycomp" type="MyComponent" /> 47 47 }}} 48 48 49 49 '''After the modification:''' 50 {{{ 50 {{{#!xml 51 51 <component name="mycomp" type="MyComponent" integer-value="12345" /> 52 52 }}} 53 53 or 54 {{{ 54 {{{#!xml 55 55 <component name="mycomp" type="MyComponent" integer-value="12345" floating-point-value="543.21" /> 56 56 }}} 57