diff options
author | Sandro S. Andrade <sandroandrade@kde.org> | 2013-08-29 15:44:51 -0300 |
---|---|---|
committer | Sandro S. Andrade <sandroandrade@kde.org> | 2013-08-29 20:48:01 +0200 |
commit | 03a141b2de08aaaa12b69ae7422d524aaeb7e1b2 (patch) | |
tree | 4c2379fb75733c99ad069dd154c023e5715be1ce /scripts/templates/qclass.cpp | |
parent | 65c1353742f739bbb82df36fd11a0e2155ce4ff0 (diff) |
Move documentation from internal classes to QObject-based classes
Change-Id: Iecaf7c942d71a12d98eec38cf95a77c97772c29e
Reviewed-by: Sandro S. Andrade <sandroandrade@kde.org>
Diffstat (limited to 'scripts/templates/qclass.cpp')
-rw-r--r-- | scripts/templates/qclass.cpp | 26 |
1 files changed, 23 insertions, 3 deletions
diff --git a/scripts/templates/qclass.cpp b/scripts/templates/qclass.cpp index 6729a3d5..d1b21d31 100644 --- a/scripts/templates/qclass.cpp +++ b/scripts/templates/qclass.cpp @@ -55,6 +55,14 @@ [%- END -%] QT_BEGIN_NAMESPACE +/*! + \class ${namespace}${className} + + \inmodule Qt${namespace} + + \brief ${class.findvalue("ownedComment/body/text()")} + */ + Q${namespace}${className}::Q${namespace}${className}(QObject *parent) : QObject(parent) { @@ -62,8 +70,14 @@ Q${namespace}${className}::Q${namespace}${className}(QObject *parent) : [% FOREACH attribute = class.findnodes("ownedAttribute") -%] [%- IF loop.first -%] -// Owned attributes +// OWNED ATTRIBUTES [% END -%] +[%- SET documentation = attribute.findvalue("ownedComment/body/text()") -%] +[%- IF documentation != "" %] +/*! + ${documentation} + */ +[%- END -%] [%- SET qtAttribute = QT_ATTRIBUTE(attribute) -%] [%- SET qtType = QT_TYPE(namespace, attribute, "false") -%] [%- SET derived = attribute.findvalue("@isDerived") -%] @@ -99,10 +113,16 @@ Q${namespace}${className}::Q${namespace}${className}(QObject *parent) : [%- END -%] [% FOREACH operation = class.findnodes("ownedOperation[@name != ../ownedAttribute[@isDerived='true']/@name]") -%] [%- IF loop.first -%] -// Operations +// OPERATIONS [% END -%] [% SET operationName = operation.findvalue("@name") -%] [%- SET return = QT_TYPE(namespace, operation.findnodes("ownedParameter[@direction='return']"), "false") %] +[%- SET documentation = operation.findvalue("ownedComment/body/text()") -%] +[%- IF documentation != "" %] +/*! + ${documentation} + */ +[%- END %] [% return -%] Q${namespace}${className}::${operationName}( [%- FOREACH parameter = operation.findnodes("ownedParameter[@direction!='return']") -%] @@ -146,7 +166,7 @@ ${parameter.findvalue("@name")} [%- END -%] [% FOREACH attribute = class.findnodes("ownedAttribute") -%] [%- IF loop.first -%] -// Slots for owned attributes +// SLOTS FOR OWNED ATTRIBUTES [% END -%] [%- SET readOnly = attribute.findvalue("@isReadOnly") %] [%- IF readOnly == "false" || readOnly == "" -%] |