Changes between Version 2 and Version 3 of TutorialAddingNewParameter


Ignore:
Timestamp:
Nov 21, 2013, 11:25:50 AM (11 years ago)
Author:
Marek Kurdej
Comment:

Added: formatters #!

Legend:

Unmodified
Added
Removed
Modified
  • TutorialAddingNewParameter

    v2 v3  
    99For instance, your class can look like:
    1010
    11 {{{
     11{{{#!c++
    1212class MyComponent
    1313    : public QObject
     
    3131For a ''optional/defaulted'' parameter: add a line like ```("parameter-name", value<!ParameterType>(&variableToSetWithParameterValue)->default_value(kDefaultParameterValue), "parameter description"```.
    3232
    33 {{{
     33{{{#!c++
    3434addParameters()
    3535("integer-value", value<int>(&mInteger)->required(), "integer value for test")
     
    4343
    4444'''Before the modification:'''
    45 {{{
     45{{{#!xml
    4646<component name="mycomp" type="MyComponent" />
    4747}}}
    4848
    4949'''After the modification:'''
    50 {{{
     50{{{#!xml
    5151<component name="mycomp" type="MyComponent" integer-value="12345" />
    5252}}}
    5353or
    54 {{{
     54{{{#!xml
    5555<component name="mycomp" type="MyComponent" integer-value="12345" floating-point-value="543.21" />
    5656}}}
    57