forked from qt-creator/qt-creator
Change-Id: I251299a2faf8580d199d6b0c0688904f59f13311 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
47 lines
785 B
C++
47 lines
785 B
C++
%{Cpp:LicenseTemplate}\
|
|
@if '%{Cpp:PragmaOnce}'
|
|
#pragma once
|
|
@else
|
|
#ifndef %{GUARD}
|
|
#define %{GUARD}
|
|
@endif
|
|
@if %{IsShared}
|
|
|
|
#include "%{GlobalHdrFileName}"
|
|
@elsif %{IsQtPlugin}
|
|
|
|
#include <%{BaseClassName}>
|
|
@endif
|
|
%{JS: Cpp.openNamespaces('%{Class}')}\
|
|
|
|
@if %{IsShared}
|
|
class %{LibraryExport} %{CN}
|
|
{
|
|
public:
|
|
%{CN}();
|
|
};
|
|
@elsif %{IsStatic}
|
|
class %{CN}
|
|
{
|
|
public:
|
|
%{CN}();
|
|
};
|
|
@else
|
|
class %{CN} : public %{BaseClassName}
|
|
{
|
|
Q_OBJECT
|
|
Q_PLUGIN_METADATA(IID "org.qt-project.Qt.%{PluginInterface}" FILE "%{PluginJsonFile}")
|
|
|
|
public:
|
|
explicit %{CN}(QObject *parent = nullptr);
|
|
|
|
private:
|
|
%{JS: '%{PluginMethods}'.split('|').map(s => ' ' + s + ' override;').join('\n')}
|
|
};
|
|
@endif
|
|
%{JS: Cpp.closeNamespaces('%{Class}')}\
|
|
@if ! '%{Cpp:PragmaOnce}'
|
|
|
|
#endif // %{GUARD}
|
|
@endif
|