Files
qt-creator/share/qtcreator/templates/wizards/projects/qtwidgetsapplication/widget.h
Eike Ziller a71dbd4b33 Fix different UI aggregation styles for widget project wizard
This got lost during the transition to JSON.
Amends 241efa353d

Fixes: QTCREATORBUG-24422
Change-Id: I51dec2e84adb3c5944ecaf83697f3e776bd3d7f1
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-08-14 07:37:24 +00:00

54 lines
1021 B
C++

%{Cpp:LicenseTemplate}\
@if '%{Cpp:PragmaOnce}'
#pragma once
@else
#ifndef %{GUARD}
#define %{GUARD}
@endif
@if %{GenerateForm} && ! %{JS: QtSupport.uiAsPointer() }
#include "%{UiHdrFileName}"
@endif
%{JS: QtSupport.qtIncludes([ 'QtGui/%{BaseClass}' ], [ 'QtWidgets/%{BaseClass}' ]) }\
%{JS: Cpp.openNamespaces('%{Class}')}\
@if %{GenerateForm} && %{JS: QtSupport.uiAsPointer() }
@if ! %{JS: Cpp.hasNamespaces('%{Class}')}
QT_BEGIN_NAMESPACE
@endif
namespace Ui { class %{CN}; }
@if ! %{JS: Cpp.hasNamespaces('%{Class}')}
QT_END_NAMESPACE
@endif
@endif
class %{CN} : public %{BaseClass}\
@if %{GenerateForm} && %{JS: QtSupport.uiAsInheritance() }
, private Ui::%{CN}
@else
@endif
{
Q_OBJECT
public:
%{CN}(QWidget *parent = nullptr);
~%{CN}();
@if %{GenerateForm}
@if %{JS: QtSupport.uiAsPointer() }
private:
Ui::%{CN} *ui;
@elsif %{JS: QtSupport.uiAsMember() }
private:
Ui::%{CN} ui;
@endif
@endif
};
%{JS: Cpp.closeNamespaces('%{Class}')}\
@if ! '%{Cpp:PragmaOnce}'
#endif // %{GUARD}
@endif