mirror of https://github.com/qt/qt3d.git
Update the creator template files to follow latest API
Change-Id: I8d6144a25963390b78ed9273a02b65b8e9cb37c4 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
This commit is contained in:
parent
168df684fa
commit
9ff925c821
|
|
@ -22,19 +22,19 @@ QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
%{CN}::~%{CN}()
|
%{CN}::~%{CN}()
|
||||||
{
|
{
|
||||||
QNode::cleanup();
|
|
||||||
}
|
}
|
||||||
@else
|
@else
|
||||||
// TODO: Implement QBackendNode template
|
// TODO: Implement QBackendNode template
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
@if '%{Base}' === 'QNode' || '%{Base}' === 'QComponent' || '%{Base}' === 'QEntity'
|
@if '%{Base}' === 'QNode' || '%{Base}' === 'QComponent' || '%{Base}' === 'QEntity'
|
||||||
void %{CN}::copy(const QNode *ref)
|
Qt3DCore::QNodeCreatedChangeBasePtr %{CN}::createNodeCreationChange() const
|
||||||
{
|
{
|
||||||
%{Base}::copy(ref);
|
auto creationChange = Qt3DCore::QNodeCreatedChangePtr<%{CN}Data>::create(this);
|
||||||
const %{CN} *object = static_cast<const %{CN} *>(ref);
|
auto &data = creationChange->data;
|
||||||
|
Q_D(const %{CN});
|
||||||
// TODO: Copy the objects's members
|
// TODO: Send data members in creation change
|
||||||
|
return creationChange;
|
||||||
}
|
}
|
||||||
@endif
|
@endif
|
||||||
%{JS: Cpp.closeNamespaces('%{Class}')}\
|
%{JS: Cpp.closeNamespaces('%{Class}')}\
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@ class %{CN}
|
||||||
@endif
|
@endif
|
||||||
public:
|
public:
|
||||||
@if '%{Base}' === 'QNode' || '%{Base}' === 'QComponent' || '%{Base}' === 'QEntity'
|
@if '%{Base}' === 'QNode' || '%{Base}' === 'QComponent' || '%{Base}' === 'QEntity'
|
||||||
explicit %{CN}(Qt3DCore::QNode *parent = 0);
|
explicit %{CN}(Qt3DCore::QNode *parent = nullptr);
|
||||||
@else
|
@else
|
||||||
%{CN}();
|
%{CN}();
|
||||||
@endif
|
@endif
|
||||||
|
|
@ -41,12 +41,11 @@ Q_SIGNALS:
|
||||||
|
|
||||||
@if '%{Base}' === 'QNode' || '%{Base}' === 'QComponent' || '%{Base}' === 'QEntity'
|
@if '%{Base}' === 'QNode' || '%{Base}' === 'QComponent' || '%{Base}' === 'QEntity'
|
||||||
protected:
|
protected:
|
||||||
Q_DECLARE_PRIVATE(%{CN})
|
%{CN}(%{CN}Private &dd, Qt3DCore::QNode *parent = nullptr);
|
||||||
%{CN}(%{CN}Private &dd, Qt3DCore::QNode *parent = 0);
|
|
||||||
void copy(const Qt3DCore::QNode *ref) Q_DECL_OVERRIDE;
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QT3D_CLONEABLE(%{CN})
|
Q_DECLARE_PRIVATE(%{CN})
|
||||||
|
Qt3DCore::QNodeCreatedChangeBasePtr createNodeCreationChange() const Q_DECL_OVERRIDE;
|
||||||
@endif
|
@endif
|
||||||
};
|
};
|
||||||
%{JS: Cpp.closeNamespaces('%{Class}')}
|
%{JS: Cpp.closeNamespaces('%{Class}')}
|
||||||
|
|
|
||||||
|
|
@ -31,8 +31,17 @@ class %{CN}Private : public Qt3DCore::%{Base}Private
|
||||||
public:
|
public:
|
||||||
%{CN}Private();
|
%{CN}Private();
|
||||||
|
|
||||||
|
Q_DECLARE_PUBLIC(%{CN})
|
||||||
|
|
||||||
|
// TODO Add member variables
|
||||||
};
|
};
|
||||||
|
@if '%{Base}' === 'QNode' || '%{Base}' === 'QComponent'
|
||||||
|
|
||||||
|
struct %{CN}Data
|
||||||
|
{
|
||||||
|
// TODO: Add members that should be sent to the backend
|
||||||
|
};
|
||||||
|
@endif
|
||||||
%{JS: Cpp.closeNamespaces('%{Class}')}
|
%{JS: Cpp.closeNamespaces('%{Class}')}
|
||||||
|
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue