Skip to content

Commit

Permalink
[qt5] fix custom widgets
Browse files Browse the repository at this point in the history
  • Loading branch information
3nids committed Nov 19, 2015
1 parent b1eb812 commit df8584a
Show file tree
Hide file tree
Showing 20 changed files with 151 additions and 20 deletions.
2 changes: 2 additions & 0 deletions src/customwidgets/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ ADD_DEFINITIONS(-DQT_NO_DEBUG)
ADD_DEFINITIONS(-DQT_SHARED)

IF (QT5_BUILD)
FIND_PACKAGE(Qt5UiPlugin REQUIRED)
FIND_PACKAGE(Qt5Designer REQUIRED)
ENDIF (QT5_BUILD)

Expand Down Expand Up @@ -109,6 +110,7 @@ INCLUDE_DIRECTORIES(
)
INCLUDE_DIRECTORIES(SYSTEM
${GEOS_INCLUDE_DIR}
${Qt5UiPlugin_INCLUDE_DIRS} # For Qt5
${Qt5Designer_INCLUDE_DIRS} # For Qt5
${QT_QTDESIGNER_INCLUDE_DIR} # For Qt4
)
Expand Down
7 changes: 6 additions & 1 deletion src/customwidgets/qgiscustomwidgets.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,20 @@
#define QGISCUSTOMWIDGETS_H


#include <QtGlobal>
#if QT_VERSION < 0x050000
#include <QDesignerCustomWidgetCollectionInterface>
#else
#include <QtUiPlugin/QDesignerCustomWidgetCollectionInterface>
#endif
#include <qplugin.h>


class QgisCustomWidgets : public QObject, public QDesignerCustomWidgetCollectionInterface
{
Q_OBJECT
#if QT_VERSION >= 0x050000
Q_PLUGIN_METADATA( IID "org.qgis.CustomWidgets" )
Q_PLUGIN_METADATA( IID "org.qgis.customwidgets" )
#endif
Q_INTERFACES( QDesignerCustomWidgetCollectionInterface )

Expand Down
10 changes: 8 additions & 2 deletions src/customwidgets/qgscollapsiblegroupboxplugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,15 @@
#ifndef QGSCOLLAPSIBLEGROUPBOXPLUGIN_H
#define QGSCOLLAPSIBLEGROUPBOXPLUGIN_H

#include <QDesignerExportWidget>
#include <QDesignerCustomWidgetInterface>

#include <QtGlobal>
#if QT_VERSION < 0x050000
#include <QDesignerCustomWidgetCollectionInterface>
#include <QDesignerExportWidget>
#else
#include <QtUiPlugin/QDesignerCustomWidgetInterface>
#include <QtUiPlugin/QDesignerExportWidget>
#endif

class CUSTOMWIDGETS_EXPORT QgsCollapsibleGroupBoxPlugin : public QObject, public QDesignerCustomWidgetInterface
{
Expand Down
9 changes: 8 additions & 1 deletion src/customwidgets/qgscolorbuttonplugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,15 @@
#ifndef QGSCOLORBUTTONPLUGIN_H
#define QGSCOLORBUTTONPLUGIN_H


#include <QtGlobal>
#if QT_VERSION < 0x050000
#include <QDesignerCustomWidgetCollectionInterface>
#include <QDesignerExportWidget>
#include <QDesignerCustomWidgetInterface>
#else
#include <QtUiPlugin/QDesignerCustomWidgetInterface>
#include <QtUiPlugin/QDesignerExportWidget>
#endif


class CUSTOMWIDGETS_EXPORT QgsColorButtonPlugin : public QObject, public QDesignerCustomWidgetInterface
Expand Down
9 changes: 8 additions & 1 deletion src/customwidgets/qgscolorbuttonv2plugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,15 @@
#ifndef QGSCOLORBUTTONV2PLUGIN_H
#define QGSCOLORBUTTONV2PLUGIN_H


#include <QtGlobal>
#if QT_VERSION < 0x050000
#include <QDesignerCustomWidgetCollectionInterface>
#include <QDesignerExportWidget>
#include <QDesignerCustomWidgetInterface>
#else
#include <QtUiPlugin/QDesignerCustomWidgetInterface>
#include <QtUiPlugin/QDesignerExportWidget>
#endif


class CUSTOMWIDGETS_EXPORT QgsColorButtonV2Plugin : public QObject, public QDesignerCustomWidgetInterface
Expand Down
9 changes: 8 additions & 1 deletion src/customwidgets/qgsdatadefinedbuttonplugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,15 @@
#ifndef QGSDATADEFINEDBUTTONPLUGIN_H
#define QGSDATADEFINEDBUTTONPLUGIN_H


#include <QtGlobal>
#if QT_VERSION < 0x050000
#include <QDesignerCustomWidgetCollectionInterface>
#include <QDesignerExportWidget>
#include <QDesignerCustomWidgetInterface>
#else
#include <QtUiPlugin/QDesignerCustomWidgetInterface>
#include <QtUiPlugin/QDesignerExportWidget>
#endif


class CUSTOMWIDGETS_EXPORT QgsDataDefinedButtonPlugin : public QObject, public QDesignerCustomWidgetInterface
Expand Down
9 changes: 8 additions & 1 deletion src/customwidgets/qgsdatetimeeditplugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,15 @@
#ifndef QGSDATETIMEEDITPLUGIN_H
#define QGSDATETIMEEDITPLUGIN_H


#include <QtGlobal>
#if QT_VERSION < 0x050000
#include <QDesignerCustomWidgetCollectionInterface>
#include <QDesignerExportWidget>
#include <QDesignerCustomWidgetInterface>
#else
#include <QtUiPlugin/QDesignerCustomWidgetInterface>
#include <QtUiPlugin/QDesignerExportWidget>
#endif


class CUSTOMWIDGETS_EXPORT QgsDateTimeEditPlugin : public QObject, public QDesignerCustomWidgetInterface
Expand Down
9 changes: 8 additions & 1 deletion src/customwidgets/qgsdoublespinboxplugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,15 @@
#ifndef QGSDOUBLESPINBOXPLUGIN_H
#define QGSDOUBLESPINBOXPLUGIN_H


#include <QtGlobal>
#if QT_VERSION < 0x050000
#include <QDesignerCustomWidgetCollectionInterface>
#include <QDesignerExportWidget>
#include <QDesignerCustomWidgetInterface>
#else
#include <QtUiPlugin/QDesignerCustomWidgetInterface>
#include <QtUiPlugin/QDesignerExportWidget>
#endif


class CUSTOMWIDGETS_EXPORT QgsDoubleSpinBoxPlugin : public QObject, public QDesignerCustomWidgetInterface
Expand Down
9 changes: 8 additions & 1 deletion src/customwidgets/qgsexpressionbuilderwidgetplugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,15 @@
#ifndef QGSEXPRESSIONBUILDERWIDGETPLUGIN_H
#define QGSEXPRESSIONBUILDERWIDGETPLUGIN_H


#include <QtGlobal>
#if QT_VERSION < 0x050000
#include <QDesignerCustomWidgetCollectionInterface>
#include <QDesignerExportWidget>
#include <QDesignerCustomWidgetInterface>
#else
#include <QtUiPlugin/QDesignerCustomWidgetInterface>
#include <QtUiPlugin/QDesignerExportWidget>
#endif


class CUSTOMWIDGETS_EXPORT QgsExpressionBuilderWidgetPlugin : public QObject, public QDesignerCustomWidgetInterface
Expand Down
9 changes: 8 additions & 1 deletion src/customwidgets/qgsextentgroupboxplugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,15 @@
#ifndef QGSEXTENTGROUPBOXPLUGIN_H
#define QGSEXTENTGROUPBOXPLUGIN_H


#include <QtGlobal>
#if QT_VERSION < 0x050000
#include <QDesignerCustomWidgetCollectionInterface>
#include <QDesignerExportWidget>
#include <QDesignerCustomWidgetInterface>
#else
#include <QtUiPlugin/QDesignerCustomWidgetInterface>
#include <QtUiPlugin/QDesignerExportWidget>
#endif


class CUSTOMWIDGETS_EXPORT QgsExtentGroupBoxPlugin : public QObject, public QDesignerCustomWidgetInterface
Expand Down
9 changes: 8 additions & 1 deletion src/customwidgets/qgsfieldcomboboxplugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,15 @@
#ifndef QGSFIELDCOMBOBOXPLUGIN_H
#define QGSFIELDCOMBOBOXPLUGIN_H


#include <QtGlobal>
#if QT_VERSION < 0x050000
#include <QDesignerCustomWidgetCollectionInterface>
#include <QDesignerExportWidget>
#include <QDesignerCustomWidgetInterface>
#else
#include <QtUiPlugin/QDesignerCustomWidgetInterface>
#include <QtUiPlugin/QDesignerExportWidget>
#endif


class CUSTOMWIDGETS_EXPORT QgsFieldComboBoxPlugin : public QObject, public QDesignerCustomWidgetInterface
Expand Down
9 changes: 8 additions & 1 deletion src/customwidgets/qgsfieldexpressionwidgetplugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,15 @@
#ifndef QGSFIELDEXPRESSIONWIDGETPLUGIN_H
#define QGSFIELDEXPRESSIONWIDGETPLUGIN_H


#include <QtGlobal>
#if QT_VERSION < 0x050000
#include <QDesignerCustomWidgetCollectionInterface>
#include <QDesignerExportWidget>
#include <QDesignerCustomWidgetInterface>
#else
#include <QtUiPlugin/QDesignerCustomWidgetInterface>
#include <QtUiPlugin/QDesignerExportWidget>
#endif


class CUSTOMWIDGETS_EXPORT QgsFieldExpressionWidgetPlugin : public QObject, public QDesignerCustomWidgetInterface
Expand Down
9 changes: 8 additions & 1 deletion src/customwidgets/qgsfilterlineeditplugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,15 @@
#ifndef QGSFILTERLINEEDITPLUGIN_H
#define QGSFILTERLINEEDITPLUGIN_H


#include <QtGlobal>
#if QT_VERSION < 0x050000
#include <QDesignerCustomWidgetCollectionInterface>
#include <QDesignerExportWidget>
#include <QDesignerCustomWidgetInterface>
#else
#include <QtUiPlugin/QDesignerCustomWidgetInterface>
#include <QtUiPlugin/QDesignerExportWidget>
#endif


class CUSTOMWIDGETS_EXPORT QgsFilterLineEditPlugin : public QObject, public QDesignerCustomWidgetInterface
Expand Down
9 changes: 8 additions & 1 deletion src/customwidgets/qgsmaplayercomboboxplugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,15 @@
#ifndef QGSMAPLAYERCOMBOBOXPLUGIN_H
#define QGSMAPLAYERCOMBOBOXPLUGIN_H


#include <QtGlobal>
#if QT_VERSION < 0x050000
#include <QDesignerCustomWidgetCollectionInterface>
#include <QDesignerExportWidget>
#include <QDesignerCustomWidgetInterface>
#else
#include <QtUiPlugin/QDesignerCustomWidgetInterface>
#include <QtUiPlugin/QDesignerExportWidget>
#endif


class CUSTOMWIDGETS_EXPORT QgsMapLayerComboBoxPlugin : public QObject, public QDesignerCustomWidgetInterface
Expand Down
9 changes: 8 additions & 1 deletion src/customwidgets/qgsprojectionselectionwidgetplugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,15 @@
#ifndef QGSPROJECTIONSELECTIONWIDGETPLUGIN_H
#define QGSPROJECTIONSELECTIONWIDGETPLUGIN_H


#include <QtGlobal>
#if QT_VERSION < 0x050000
#include <QDesignerCustomWidgetCollectionInterface>
#include <QDesignerExportWidget>
#include <QDesignerCustomWidgetInterface>
#else
#include <QtUiPlugin/QDesignerCustomWidgetInterface>
#include <QtUiPlugin/QDesignerExportWidget>
#endif


class CUSTOMWIDGETS_EXPORT QgsProjectionSelectionWidgetPlugin : public QObject, public QDesignerCustomWidgetInterface
Expand Down
9 changes: 8 additions & 1 deletion src/customwidgets/qgsrelationeditorwidgetplugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,15 @@
#ifndef QGSRELATIONEDITORWIDGETPLUGIN_H
#define QGSRELATIONEDITORWIDGETPLUGIN_H


#include <QtGlobal>
#if QT_VERSION < 0x050000
#include <QDesignerCustomWidgetCollectionInterface>
#include <QDesignerExportWidget>
#include <QDesignerCustomWidgetInterface>
#else
#include <QtUiPlugin/QDesignerCustomWidgetInterface>
#include <QtUiPlugin/QDesignerExportWidget>
#endif


class CUSTOMWIDGETS_EXPORT QgsRelationEditorWidgetPlugin : public QObject, public QDesignerCustomWidgetInterface
Expand Down
9 changes: 8 additions & 1 deletion src/customwidgets/qgsrelationreferencewidgetplugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,15 @@
#ifndef QGSRELATIONREFERENCEWIDGETPLUGIN_H
#define QGSRELATIONREFERENCEWIDGETPLUGIN_H


#include <QtGlobal>
#if QT_VERSION < 0x050000
#include <QDesignerCustomWidgetCollectionInterface>
#include <QDesignerExportWidget>
#include <QDesignerCustomWidgetInterface>
#else
#include <QtUiPlugin/QDesignerCustomWidgetInterface>
#include <QtUiPlugin/QDesignerExportWidget>
#endif


class CUSTOMWIDGETS_EXPORT QgsRelationReferenceWidgetPlugin : public QObject, public QDesignerCustomWidgetInterface
Expand Down
9 changes: 8 additions & 1 deletion src/customwidgets/qgsscalerangewidgetplugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,15 @@
#ifndef QGSSCALERANGEWIDGETPLUGIN_H
#define QGSSCALERANGEWIDGETPLUGIN_H


#include <QtGlobal>
#if QT_VERSION < 0x050000
#include <QDesignerCustomWidgetCollectionInterface>
#include <QDesignerExportWidget>
#include <QDesignerCustomWidgetInterface>
#else
#include <QtUiPlugin/QDesignerCustomWidgetInterface>
#include <QtUiPlugin/QDesignerExportWidget>
#endif


class CUSTOMWIDGETS_EXPORT QgsScaleRangeWidgetPlugin : public QObject, public QDesignerCustomWidgetInterface
Expand Down
9 changes: 8 additions & 1 deletion src/customwidgets/qgsscalewidgetplugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,15 @@
#ifndef QGSSCALEWIDGETPLUGIN_H
#define QGSSCALEWIDGETPLUGIN_H


#include <QtGlobal>
#if QT_VERSION < 0x050000
#include <QDesignerCustomWidgetCollectionInterface>
#include <QDesignerExportWidget>
#include <QDesignerCustomWidgetInterface>
#else
#include <QtUiPlugin/QDesignerCustomWidgetInterface>
#include <QtUiPlugin/QDesignerExportWidget>
#endif


class CUSTOMWIDGETS_EXPORT QgsScaleWidgetPlugin : public QObject, public QDesignerCustomWidgetInterface
Expand Down
8 changes: 7 additions & 1 deletion src/customwidgets/qgsspinboxplugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,14 @@
#ifndef QGSSPINBOXPLUGIN_H
#define QGSSPINBOXPLUGIN_H

#include <QtGlobal>
#if QT_VERSION < 0x050000
#include <QDesignerCustomWidgetCollectionInterface>
#include <QDesignerExportWidget>
#include <QDesignerCustomWidgetInterface>
#else
#include <QtUiPlugin/QDesignerCustomWidgetInterface>
#include <QtUiPlugin/QDesignerExportWidget>
#endif


class CUSTOMWIDGETS_EXPORT QgsSpinBoxPlugin : public QObject, public QDesignerCustomWidgetInterface
Expand Down

0 comments on commit df8584a

Please sign in to comment.