aboutsummaryrefslogtreecommitdiffstats
path: root/qface/builtin/qtqml/templates/AbstractInterface.qml
blob: cac084701bb4d25a9445a4bbf77eaa66d6561473 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
{% include 'copyright.h' %}


/*
 * This is an auto-generated file.
 * Do not edit! All changes made to it will be lost.
 */

import QtQml 2.2
import QtQml.Models 2.2

import "."

{{interface.comment}}
QtObject {
    id: root

{% for property in interface.properties %}
{% if property.readonly %}
{% if property.comment %}
    {{ property.comment }}
{% endif %}
    readonly property {{property|propertyType}} {{property}} : _{{property}}
    property {{property|propertyType}} _{{property}} : {{property|defaultValue}}
{% else %}
{% if property.comment %}
    {{ property.comment }}
{% endif %}
    property {{property|propertyType}} {{property}} : {{property|defaultValue }}
{% endif %}
{% endfor %}

{% for operation in interface.operations %}
{% if operation.comment %}
    {{ operation.comment }}
{% endif %}
    property var {{operation}} : function({{operation.parameters|join(', ')}}) {}
{% endfor %}

{% for signal in interface.signals %}
    signal {{signal}}(
        {%- for parameter in signal.parameters %}
            {{- parameter.type|propertyType }} {{ parameter.name -}}
            {% if not loop.last %}, {% endif %}
        {% endfor -%}
    )
{% endfor %}
}