Files
qt-creator/share/qtcreator/templates/wizards/projects/cpplibrary/lib.h
Tasuku Suzuki 245a995389 Plugin template: use _iid macro instead of "org.qt-project..."
Change-Id: Ib3a10681f65ee5317cd2813deae2322a81aa75c6
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-01-07 01:50:19 +00:00

47 lines
790 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 %{PluginInterface}_iid FILE "%{PluginJsonFile}")
public:
explicit %{CN}(QObject *parent = nullptr);
private:
%{JS: '%{PluginMethods}'.split('|').map(function(s) { return ' ' + s + ' override;'; \}).join('\\n')}
};
@endif
%{JS: Cpp.closeNamespaces('%{Class}')}\
@if ! '%{Cpp:PragmaOnce}'
#endif // %{GUARD}
@endif