forked from qt-creator/qt-creator
Allow users to choose #pragma once instead of #ifndef include guards in generated header files. Fixes: QTCREATORBUG-12166 Change-Id: I3ba41c7570beb9c5958e174b5581fcc25855050f Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Filip Bucek <fbucek@atlas.cz>
38 lines
842 B
C++
38 lines
842 B
C++
@if '%{Cpp:PragmaOnce}'
|
|
#pragma once
|
|
@else
|
|
#ifndef @SINGLE_INCLUDE_GUARD@
|
|
#define @SINGLE_INCLUDE_GUARD@
|
|
@endif
|
|
|
|
#include <QDesignerCustomWidgetInterface>
|
|
|
|
class @PLUGIN_CLASS@ : public QObject, public QDesignerCustomWidgetInterface
|
|
{
|
|
Q_OBJECT
|
|
Q_INTERFACES(QDesignerCustomWidgetInterface)
|
|
@SINGLE_PLUGIN_METADATA@
|
|
|
|
public:
|
|
@PLUGIN_CLASS@(QObject *parent = 0);
|
|
|
|
bool isContainer() const;
|
|
bool isInitialized() const;
|
|
QIcon icon() const;
|
|
QString domXml() const;
|
|
QString group() const;
|
|
QString includeFile() const;
|
|
QString name() const;
|
|
QString toolTip() const;
|
|
QString whatsThis() const;
|
|
QWidget *createWidget(QWidget *parent);
|
|
void initialize(QDesignerFormEditorInterface *core);
|
|
|
|
private:
|
|
bool m_initialized;
|
|
};
|
|
|
|
@if ! '%{Cpp:PragmaOnce}'
|
|
#endif // @SINGLE_INCLUDE_GUARD@
|
|
@endif
|