File indexing completed on 2025-02-09 04:28:27

0001 { % extends "base_header.h" % }
0002 
0003 { % block includes % } {
0004     % if baseClass %
0005 }
0006 #include <{{ baseClass.module }}/{{ baseClass.type }}>
0007 
0008 { % endif % } { % endblock % }
0009 
0010 { % block forward_decls % } {
0011     % if pimpl %
0012 }
0013 class
0014 {
0015     {
0016         className
0017     }
0018 } Private;
0019 
0020 { % endif % } { % endblock % }
0021 
0022 { % block class_content % } {
0023     % if qobject %
0024 }
0025 Q_OBJECT{ % endif % }
0026 {% for prop in properties %
0027 }
0028 Q_PROPERTY(
0029     {{prop.type}} {
0030         {
0031             prop.name
0032         }
0033     } READ{{prop.name}} { % if not prop.readonly % } WRITE{{prop.name | to_write}} { % endif % })
0034 {
0035     % endfor %
0036 }
0037 
0038 public:
0039     {
0040 #The getter, eg QString myString() const;
0041 0042     ">#
0043     }
0044     {% for property in properties %
0045     }
0046     {{property.type}} {{property.name}}() const;
0047     {
0048         % if not property.readonly %
0049     }
0050     { % comment % } The setter, eg setMyString(const QString &myString);
0051     {
0052         % endcomment %
0053     }
0054     void{{property.name | to_write}}({{property.type | to_arg}} {{property.name}});
0055     { % endif % }
0056 
0057         { % endfor % } { % comment % } Comment tags are used to remove unwanted whitespace
0058         / newlines in the output.
0059 
0060           Group together properties of the same type,
0061         public, protected, private { % endcomment % } { % regroup methods by accessType as method_groups % } { % with "true" as default % }
0062     {% for method_group in method_groups %
0063     }
0064     {{method_group.grouper}}:
0065     {% for method in method_group.list %
0066     }
0067     {
0068         % if method.virtual %
0069     }
0070     virtual { % endif % } {{method.type}} {{method.name}}({ % include "args.h" % })
0071     {
0072         % if method.const %
0073     }
0074     const { % endif % };
0075     { % endfor % }
0076 
0077     { % endfor % } {
0078         % endwith %
0079     }
0080 
0081 private:
0082     {
0083         % if pimpl %
0084     }
0085     Q_DECLARE_PRIVATE({{className}})
0086     {
0087         {
0088             className
0089         }
0090     }
0091     Private *const d_ptr;
0092     { % else % } {% for property in properties %
0093     }
0094     {
0095         {
0096             property.type
0097         }
0098     }
0099     m_{{property.name}};
0100     { % endfor % } { % endif % } {
0101         % endblock class_content %
0102     }