2014-10-31 16:18:52 +01:00
|
|
|
%{Cpp:LicenseTemplate}\
|
2019-01-03 10:56:36 +01:00
|
|
|
@if '%{Cpp:PragmaOnce}'
|
|
|
|
|
#pragma once
|
|
|
|
|
@else
|
2014-10-15 10:50:15 +02:00
|
|
|
#ifndef %{GUARD}
|
|
|
|
|
#define %{GUARD}
|
2019-01-03 10:56:36 +01:00
|
|
|
@endif
|
2014-10-15 10:50:15 +02:00
|
|
|
|
2020-02-07 16:58:37 +01:00
|
|
|
%{JS: Cpp.includeStatement('%{Base}', Util.preferredSuffix('text/x-c++hdr'), ['QObject', 'QWidget', 'QMainWindow', 'QQuickItem', 'QSharedData'], '%{TargetPath}')}\
|
2014-10-15 10:50:15 +02:00
|
|
|
%{JS: QtSupport.qtIncludes([ ( '%{IncludeQObject}' ) ? 'QtCore/%{IncludeQObject}' : '',
|
|
|
|
|
( '%{IncludeQWidget}' ) ? 'QtGui/%{IncludeQWidget}' : '',
|
|
|
|
|
( '%{IncludeQMainWindow}' ) ? 'QtGui/%{IncludeQMainWindow}' : '',
|
|
|
|
|
( '%{IncludeQDeclarativeItem}' ) ? 'QtDeclarative/%{IncludeQDeclarativeItem}' : '',
|
|
|
|
|
( '%{IncludeQSharedData}' ) ? 'QtCore/QSharedDataPointer' : '' ],
|
|
|
|
|
[ ( '%{IncludeQObject}' ) ? 'QtCore/%{IncludeQObject}' : '',
|
|
|
|
|
( '%{IncludeQWidget}' ) ? 'QtWidgets/%{IncludeQWidget}' : '',
|
|
|
|
|
( '%{IncludeQMainWindow}' ) ? 'QtWidgets/%{IncludeQMainWindow}' : '',
|
|
|
|
|
( '%{IncludeQDeclarativeItem}' ) ? 'QtQuick1/%{IncludeQDeclarativeItem}' : '',
|
|
|
|
|
( '%{IncludeQQuickItem}' ) ? 'QtDeclarative/%{IncludeQQuickItem}' : '',
|
2014-10-31 16:18:52 +01:00
|
|
|
( '%{IncludeQSharedData}' ) ? 'QtCore/QSharedDataPointer' : '' ])}\
|
2014-10-15 10:50:15 +02:00
|
|
|
%{JS: Cpp.openNamespaces('%{Class}')}
|
|
|
|
|
@if '%{IncludeQSharedData}'
|
|
|
|
|
class %{CN}Data;
|
|
|
|
|
|
|
|
|
|
@endif
|
|
|
|
|
@if '%{Base}'
|
|
|
|
|
class %{CN} : public %{Base}
|
|
|
|
|
@else
|
|
|
|
|
class %{CN}
|
|
|
|
|
@endif
|
|
|
|
|
{
|
2019-06-24 16:34:36 +02:00
|
|
|
@if '%{AddQObjectMacro}'
|
2014-10-15 10:50:15 +02:00
|
|
|
Q_OBJECT
|
2014-10-31 14:02:20 +01:00
|
|
|
@endif
|
2023-01-28 15:40:34 +09:00
|
|
|
@if '%{AddQmlElementMacro}'
|
|
|
|
|
QML_ELEMENT
|
|
|
|
|
@endif
|
2014-10-15 10:50:15 +02:00
|
|
|
public:
|
2021-01-15 16:55:26 +01:00
|
|
|
@if '%{Base}' === 'QObject' || %{JS: Cpp.hasQObjectParent('%{Base}')}
|
2016-10-07 16:34:26 +02:00
|
|
|
explicit %{CN}(QObject *parent = nullptr);
|
2014-10-15 10:50:15 +02:00
|
|
|
@elsif '%{Base}' === 'QWidget' || '%{Base}' === 'QMainWindow'
|
2016-10-07 16:34:26 +02:00
|
|
|
explicit %{CN}(QWidget *parent = nullptr);
|
2014-10-15 10:50:15 +02:00
|
|
|
@else
|
|
|
|
|
%{CN}();
|
|
|
|
|
@endif
|
|
|
|
|
@if '%{IncludeQSharedData}'
|
|
|
|
|
%{CN}(const %{CN} &);
|
|
|
|
|
%{CN} &operator=(const %{CN} &);
|
|
|
|
|
~%{CN}();
|
2014-11-26 17:44:48 +01:00
|
|
|
@endif
|
2015-08-27 14:18:38 +02:00
|
|
|
@if %{isQObject}
|
2014-10-15 10:50:15 +02:00
|
|
|
|
2019-07-16 17:06:29 +02:00
|
|
|
@if %{QtKeywordsEnabled}
|
2014-10-15 10:50:15 +02:00
|
|
|
signals:
|
2019-07-16 17:06:29 +02:00
|
|
|
@else
|
|
|
|
|
Q_SIGNALS:
|
|
|
|
|
@endif
|
2014-10-15 10:50:15 +02:00
|
|
|
|
|
|
|
|
@endif
|
|
|
|
|
@if '%{IncludeQSharedData}'
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
QSharedDataPointer<%{CN}Data> data;
|
|
|
|
|
@endif
|
|
|
|
|
};
|
|
|
|
|
%{JS: Cpp.closeNamespaces('%{Class}')}
|
2019-01-03 10:56:36 +01:00
|
|
|
@if ! '%{Cpp:PragmaOnce}'
|
|
|
|
|
#endif // %{GUARD}
|
|
|
|
|
@endif
|