file.h 1.97 KB
Newer Older
Tobias Hunger's avatar
Tobias Hunger committed
1
%{Cpp:LicenseTemplate}\
2 3 4 5 6 7 8 9 10 11 12 13 14
#ifndef %{GUARD}
#define %{GUARD}

%{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}'       : '',
Tobias Hunger's avatar
Tobias Hunger committed
15
                             ( '%{IncludeQSharedData}' )      ? 'QtCore/QSharedDataPointer'                : '' ])}\
16 17 18 19 20 21 22 23 24 25 26
%{JS: Cpp.openNamespaces('%{Class}')}
@if '%{IncludeQSharedData}'
class %{CN}Data;

@endif
@if '%{Base}'
class %{CN} : public %{Base}
@else
class %{CN}
@endif
{
27
@if %{isQObject}
28
     Q_OBJECT
29
@endif
30
public:
31
@if '%{Base}' === 'QObject'
32 33 34 35 36 37 38 39 40 41
    explicit %{CN}(QObject *parent = 0);
@elsif '%{Base}' === 'QWidget' || '%{Base}' === 'QMainWindow'
    explicit %{CN}(QWidget *parent = 0);
@else
    %{CN}();
@endif
@if '%{IncludeQSharedData}'
    %{CN}(const %{CN} &);
    %{CN} &operator=(const %{CN} &);
    ~%{CN}();
42
@endif
43
@if %{isQObject}
44 45 46 47 48 49 50 51 52 53 54 55

signals:

public slots:
@endif
@if '%{IncludeQSharedData}'

private:
    QSharedDataPointer<%{CN}Data> data;
@endif
};
%{JS: Cpp.closeNamespaces('%{Class}')}
Tobias Hunger's avatar
Tobias Hunger committed
56
#endif // %{GUARD}\