blob: 2d1ffb140bf27b049bcf8a2a90c7aa24ae8ac0fc (
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
|
{# Copyright (c) Pelagicore AB 2016 #}
{% set class = 'Qml{0}'.format(interface) %}
/****************************************************************************
** This is an auto-generated file.
** Do not edit! All changes made to it will be lost.
****************************************************************************/
#pragma once
#include <QtCore>
#include "qml{{module.module_name|lower}}module.h"
class {{class}} : public QObject
{
Q_OBJECT
{% for property in interface.properties %}
Q_PROPERTY({{property|returnType}} {{property}} READ {{property}} {%if not property.is_readonly%}WRITE set{{property|upperfirst}} {%endif%}NOTIFY {{property}}Changed)
{% endfor %}
public:
{{class}}(QObject *parent=0);
static void registerQmlTypes(const QString& uri, int majorVersion=1, int minorVersion=0);
public Q_SLOTS:
{% for operation in interface.operations %}
{{operation|returnType}} {{operation}}({{operation.parameters|map('parameterType')|join(', ')}});
{%- endfor %}
public:
{% for property in interface.properties %}
void set{{property|upperfirst}}({{ property|parameterType }});
{{property|returnType}} {{property}}() const;
{% endfor %}
Q_SIGNALS:
{% for property in interface.properties %}
void {{property}}Changed({{property|parameterType}});
{% endfor %}
private:
{% for property in interface.properties %}
{{property|returnType}} m_{{property}};
{% endfor %}
};
|