diff options
Diffstat (limited to 'qface/templates/qface/qtcpp.j2')
-rw-r--r-- | qface/templates/qface/qtcpp.j2 | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/qface/templates/qface/qtcpp.j2 b/qface/templates/qface/qtcpp.j2 index 67b68f8..729bfc9 100644 --- a/qface/templates/qface/qtcpp.j2 +++ b/qface/templates/qface/qtcpp.j2 @@ -14,15 +14,15 @@ {%- endmacro %} {% macro property_decl(property, notifiable=True) -%} -Q_PROPERTY({{property|returnType}} {{property}} READ {{property}} {% if not property.readonly %}WRITE set{{property|upperfirst}}{% endif %}{% if not property.const and notifiable %} NOTIFY {{property}}Changed{% endif %}) +Q_PROPERTY({{property|qt.returnType}} {{property}} READ {{property}} {% if not property.readonly %}WRITE set{{property|upperfirst}}{% endif %}{% if not property.const and notifiable %} NOTIFY {{property}}Changed{% endif %}) {%- endmacro %} {% macro property_setter_decl(property, ending=";") -%} -void set{{property|upperfirst}}({{ property|parameterType }}){{ending}} +void set{{property|upperfirst}}({{ property|qt.parameterType }}){{ending}} {%- endmacro %} {% macro property_getter_decl(property, ending=";") -%} -{{property|returnType}} {{property}}() const{{ending}} +{{property|qt.returnType}} {{property}}() const{{ending}} {%- endmacro %} {% macro signal_decl(symbol, postfix="") -%} @@ -30,7 +30,7 @@ void {{symbol}}{{postfix}}(); {%- endmacro %} {% macro property_member_decl(property) -%} -{{property|returnType}} m_{{property}}; +{{property|qt.returnType}} m_{{property}}; {%- endmacro %} {% macro property_setter_impl(class, property, notifiable=True) -%} @@ -41,7 +41,7 @@ void {{symbol}}{{postfix}}(); {{doc.description|join("\n ")}} {% endwith %} */ -void {{class}}::set{{property|upperfirst}}({{ property|parameterType }}) +void {{class}}::set{{property|upperfirst}}({{ property|qt.parameterType }}) { {% if notifiable %} if (m_{{property}} != {{property}}) { @@ -56,7 +56,7 @@ void {{class}}::set{{property|upperfirst}}({{ property|parameterType }}) {% macro property_getter_impl(class, property) -%} -{{property|returnType}} {{class}}::{{property}}() const +{{property|qt.returnType}} {{class}}::{{property}}() const { return m_{{property}}; } @@ -65,24 +65,24 @@ void {{class}}::set{{property|upperfirst}}({{ property|parameterType }}) {% macro operation_impl(class, operation) -%} /*! - \qmlmethod {{operation.type}} {{class}}::{{operation}}({{operation|parameters}}) + \qmlmethod {{operation.type}} {{class}}::{{operation}}({{operation|qt.parameters}}) {% with doc = operation.comment|parse_doc %} \brief {{doc.brief}} {{doc.description|join("\n ")}} {% endwith %} */ -{{operation|returnType}} {{class}}::{{operation}}({{operation|parameters}}) +{{operation|qt.returnType}} {{class}}::{{operation}}({{operation|qt.parameters}}) { {% for parameter in operation.parameters %} Q_UNUSED({{parameter.name}}); {% endfor %} qWarning() << "{{class}}::{{operation}}(...) not implemented"; - return {{operation|defaultValue}}; + return {{operation|qt.defaultValue}}; } {%- endmacro %} {% macro operation_decl(operation, ending=";") -%} - virtual {{operation|returnType}} {{operation}}({{operation|parameters}}){{ending}} + virtual {{operation|qt.returnType}} {{operation}}({{operation|qt.parameters}}){{ending}} {%- endmacro %} {% macro autogenerated(prefix="//") -%} |