Changeset View
Changeset View
Standalone View
Standalone View
file_templates/classes/qobject_pimpl/class.h
1 | {% extends "cpp_header.h" %} | 1 | {% extends "cpp_qobject_pimpl_header.h" %} | ||
---|---|---|---|---|---|
2 | {% load kdev_filters %} | | |||
3 | 2 | | |||
4 | {% block includes %} | | |||
5 | {{ block.super }} | | |||
6 | {% if not base_classes %} | | |||
7 | #include <QObject> | | |||
8 | {% endif %} | | |||
9 | {% endblock includes %} | | |||
10 | | ||||
11 | | ||||
12 | {% block forward_declarations %} | | |||
13 | class {{ name }}Private; | | |||
14 | {% endblock forward_declarations %} | | |||
15 | | ||||
16 | | ||||
17 | {% block class_declaration_open %} | | |||
18 | {% if base_classes %} | | |||
19 | {{ block.super }} | | |||
20 | {% else %} | | |||
21 | {% include "class_declaration_apidox_cpp.txt" %} | | |||
22 | class {{ name }} : public QObject | | |||
23 | { | | |||
24 | {% endif %} | | |||
25 | {% endblock class_declaration_open %} | | |||
26 | | ||||
27 | {% block class_body %} | | |||
28 | Q_OBJECT | | |||
29 | {% for property in members %} | | |||
30 | {% include "class_qproperty_declaration_cpp.txt" %} | | |||
31 | {% endfor %} | | |||
32 | | ||||
33 | | ||||
34 | {% if public_functions or members %} | | |||
35 | public: | | |||
36 | {% endif %} | | |||
37 | {% for method in public_functions %} | | |||
38 | | ||||
39 | {% include "class_method_declaration_apidox_cpp.txt" %} | | |||
40 | {% include "class_method_declaration_cpp.txt" %} | | |||
41 | | ||||
42 | {% endfor %} | | |||
43 | | ||||
44 | {% for property in members %} | | |||
45 | | ||||
46 | {% include "class_property_getter_declaration_apidox_cpp.txt" %} | | |||
47 | {% include "class_property_getter_declaration_cpp.txt" %} | | |||
48 | 3 | | |||
49 | {% endfor %} | 4 | {% block qobject_default_include %} | ||
50 | 5 | #include <QObject> | |||
51 | 6 | {% endblock qobject_default_include %} | |||
52 | {% if members %} | | |||
53 | public Q_SLOTS: | | |||
54 | {% for property in members %} | | |||
55 | | ||||
56 | {% include "class_property_setter_declaration_apidox_cpp.txt" %} | | |||
57 | {% include "class_property_setter_declaration_cpp.txt" %} | | |||
58 | | ||||
59 | {% endfor %} | | |||
60 | | ||||
61 | Q_SIGNALS: | | |||
62 | {% for property in members %} | | |||
63 | | ||||
64 | {% include "class_property_signal_declaration_cpp.txt" %} | | |||
65 | | ||||
66 | {% endfor %} | | |||
67 | {% endif %} | | |||
68 | | ||||
69 | | ||||
70 | {% if protected_functions %} | | |||
71 | protected: | | |||
72 | {% for method in protected_functions %} | | |||
73 | | ||||
74 | {% include "class_method_declaration_apidox_cpp.txt" %} | | |||
75 | {% include "class_method_declaration_cpp.txt" %} | | |||
76 | | ||||
77 | {% endfor %} | | |||
78 | {% endif %} | | |||
79 | 7 | | |||
80 | 8 | | |||
81 | private: | 9 | {% block qobject_baseclass %}QObject{% endblock qobject_baseclass %} | ||
82 | {{ name }}Private* const d_ptr; | | |||
83 | Q_DECLARE_PRIVATE({{ name }}) | | |||
84 | {% endblock class_body %} | |