From d7d1e9b914f289101f5f6f559c9968fd8120f5b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20M=C3=B6ller?= <matthias.moeller@rwth-aachen.de> Date: Fri, 19 Jul 2013 10:58:31 +0000 Subject: [PATCH] - adding qt5 pluginsystem - adding qt5 headers refs #1359 git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@17080 383ad7c9-94d9-4d36-a494-682f7c89f535 --- MovePlugin.cc | 11 +++++++++-- MovePlugin.hh | 4 ++++ MoveProps.hh | 8 +++++++- MoveToolbar.hh | 7 ++++++- 4 files changed, 26 insertions(+), 4 deletions(-) diff --git a/MovePlugin.cc b/MovePlugin.cc index d2e62a5..bd3ba69 100644 --- a/MovePlugin.cc +++ b/MovePlugin.cc @@ -40,7 +40,12 @@ * * \*===========================================================================*/ -#include <QtGui> + +#if QT_VERSION >= 0x050000 + #include <QtWidgets> +#else + #include <QtGui> +#endif #include "MovePlugin.hh" @@ -2297,5 +2302,7 @@ void MovePlugin::objectDeleted( int _id ){ //-------------------------------------------------------------------------------- -Q_EXPORT_PLUGIN2( moveplugin , MovePlugin ); +#if QT_VERSION < 0x050000 + Q_EXPORT_PLUGIN2( moveplugin , MovePlugin ); +#endif diff --git a/MovePlugin.hh b/MovePlugin.hh index 20d78ed..72f12dd 100644 --- a/MovePlugin.hh +++ b/MovePlugin.hh @@ -89,6 +89,10 @@ class MovePlugin : public QObject, BaseInterface, MouseInterface, KeyInterface, Q_INTERFACES(LoadSaveInterface) Q_INTERFACES(RPCInterface) +#if QT_VERSION >= 0x050000 + Q_PLUGIN_METADATA(IID "org.OpenFlipper.Plugins.Plugin-Move") +#endif + public: typedef unsigned int SelectionType; static const SelectionType VERTEX = 1; diff --git a/MoveProps.hh b/MoveProps.hh index f76871b..c396cc4 100644 --- a/MoveProps.hh +++ b/MoveProps.hh @@ -41,7 +41,13 @@ \*===========================================================================*/ #include "ui_setProps.hh" -#include <QtGui> + +#if QT_VERSION >= 0x050000 + #include <QtWidgets> +#else + #include <QtGui> +#endif + #include <OpenFlipper/BasePlugin/PluginFunctions.hh> diff --git a/MoveToolbar.hh b/MoveToolbar.hh index 1ac8f66..a48945f 100644 --- a/MoveToolbar.hh +++ b/MoveToolbar.hh @@ -41,7 +41,12 @@ \*===========================================================================*/ #include "ui_moveControls.hh" -#include <QtGui> + +#if QT_VERSION >= 0x050000 + #include <QtWidgets> +#else + #include <QtGui> +#endif class moveToolbarWidget : public QWidget, public Ui::moveControls { -- GitLab