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 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71
|
{% extends "cpp_header.h" %}
{% load kdev_filters %}
{% block includes %}
{{ block.super }}
{% if not base_classes %}
#include <QObject>
{% endif %}
{% endblock %}
{% block class_body %}
public:
{# doing our own destructor, to ensure there is one #}
{% if not base_classes %}
virtual ~{{ name }}();
{% else %}{# Assumption: subclassing only other interfaces #}
~{{ name }}() override;
{% endif %}
{% for method in public_functions %}
{# skipping any defined destructor #}
{% if not method.isDestructor %}
{% include "class_method_declaration_apidox_cpp.txt" %}
{% include "class_method_declaration_cpp.txt" %}
{% endif %}
{% endfor %}
{% for property in members %}
{% include "class_property_getter_declaration_apidox_cpp.txt" %}
virtual {{ property.type }} {{ property.name }}() const = 0;
{% include "class_property_setter_declaration_apidox_cpp.txt" %}
virtual void set{{ property.name|upper_first }}({{ property.type|arg_type }} {{ property.name }}) = 0;
{% endfor %}
{% if protected_functions %}
protected:
{% for method in protected_functions %}
{# skipping any defined destructor #}
{% if not method.isDestructor %}
{% include "class_method_declaration_apidox_cpp.txt" %}
{% include "class_method_declaration_cpp.txt" %}
{% endif %}
{% endfor %}
{% endif %}
{% if private_functions %}
private:
{% for method in private_functions %}
{# skipping any defined destructor #}
{% if not method.isDestructor %}
{% include "class_method_declaration_apidox_cpp.txt" %}
{% include "class_method_declaration_cpp.txt" %}
{% endif %}
{% endfor %}
{% endif %}
{% endblock class_body %}
{% block outside_namespace %}
{{ block.super }}
Q_DECLARE_INTERFACE({% if namespaces %}{{ namespaces|join:"::" }}::{% endif %}{{ name }}, "{{ interfaceid }}")
{% endblock %}
|