diff options
Diffstat (limited to 'src/tools/ivigenerator/templates_frontend/struct.h.tpl')
-rw-r--r-- | src/tools/ivigenerator/templates_frontend/struct.h.tpl | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/tools/ivigenerator/templates_frontend/struct.h.tpl b/src/tools/ivigenerator/templates_frontend/struct.h.tpl index 84b8c4f..0438a87 100644 --- a/src/tools/ivigenerator/templates_frontend/struct.h.tpl +++ b/src/tools/ivigenerator/templates_frontend/struct.h.tpl @@ -47,6 +47,7 @@ #include "{{module.module_name|lower}}module.h" #include <QObject> +#include <QDataStream> QT_BEGIN_NAMESPACE @@ -69,12 +70,21 @@ public: {% endif %} {% endfor %} + private: {% for field in struct.fields %} {{field|return_type}} m_{{field}}; {% endfor %} + + friend QDataStream &operator>>(QDataStream &stream, {{class}} &obj); }; +bool operator==(const {{class}} &left, const {{class}} &right) Q_DECL_NOTHROW; +bool operator!=(const {{class}} &left, const {{class}} &right) Q_DECL_NOTHROW; + +QDataStream &operator<<(QDataStream &stream, const {{class}} &obj); +QDataStream &operator>>(QDataStream &stream, {{class}} &obj); + QT_END_NAMESPACE Q_DECLARE_METATYPE({{class}}) |