summaryrefslogtreecommitdiff
path: root/generator/qtcpp/templates/struct.h
diff options
context:
space:
mode:
Diffstat (limited to 'generator/qtcpp/templates/struct.h')
-rw-r--r--generator/qtcpp/templates/struct.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/generator/qtcpp/templates/struct.h b/generator/qtcpp/templates/struct.h
new file mode 100644
index 0000000..9517512
--- /dev/null
+++ b/generator/qtcpp/templates/struct.h
@@ -0,0 +1,28 @@
+{# Copyright (c) Pelagicore AB 2016 #}
+/****************************************************************************
+** This is an auto-generated file.
+** Do not edit! All changes made to it will be lost.
+****************************************************************************/
+
+#pragma once
+
+#include <QtCore>
+
+class {{struct}}
+{
+ Q_GADGET
+{% for field in struct.fields %}
+ Q_PROPERTY({{field|returnType}} {{field}} MEMBER m_{{field}})
+{% endfor %}
+
+public:
+{% for field in struct.fields %}
+ {{field|returnType}} m_{{field}};
+{% endfor %}
+
+ bool operator==(const {{struct}} &other) const;
+};
+
+Q_DECLARE_METATYPE({{struct}})
+
+