Skip to content

Commit

Permalink
mepp now compatible with qt5 (and of course qt4...)
Browse files Browse the repository at this point in the history
  • Loading branch information
mtola committed Jun 24, 2013
1 parent 46fd1ce commit 1a58a8e
Show file tree
Hide file tree
Showing 50 changed files with 91 additions and 52 deletions.
4 changes: 3 additions & 1 deletion src/components/Analysis/Curvature/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ file(
)

if (WITH_QT5)
qt5_wrap_cpp( MOC_FILES ${hxx_header_files} ../../../mepp/mepp_action.hxx )
set( MOC_FILES "" ) # because CMAKE_AUTOMOC is ON
qt5_wrap_ui( UI_FILES ${all_ui_files} ../../../mepp/mainwindow.ui )
else(WITH_QT5)
qt4_wrap_cpp( MOC_FILES ${hxx_header_files} ../../../mepp/mepp_action.hxx )
Expand All @@ -193,6 +193,8 @@ file(
source_files
src/*
)
set( source_files ${source_files} ../../../mepp/mepp_action.hxx )

add_library(
${COMPONENT_NAME}
SHARED
Expand Down
2 changes: 1 addition & 1 deletion src/components/Analysis/Curvature/src/dialSettings.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#pragma GCC diagnostic warning "-Wuninitialized"
#endif

#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
#if QT_VERSION >= 0x050000
#include <QtWidgets>
#endif

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ void mepp_component_Curvature_plugin::OnDisplayMaxDir()
QApplication::restoreOverrideCursor();
}

#if (QT_VERSION < QT_VERSION_CHECK(5, 0, 0))
#if QT_VERSION < 0x050000
Q_EXPORT_PLUGIN2(mepp_component_Curvature_plugin, mepp_component_Curvature_plugin);
#endif

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#ifndef HEADER_MEPP_COMPONENT_CURVATURE_PLUGIN_INTERFACE_H
#define HEADER_MEPP_COMPONENT_CURVATURE_PLUGIN_INTERFACE_H

#include <QtGlobal> // important, for QT_VERSION

#include <QObject>

#include <mepp_config.h>
Expand All @@ -23,7 +25,7 @@ class mepp_component_Curvature_plugin :
{
Q_OBJECT
Q_INTERFACES(mepp_component_plugin_interface);
#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
#if QT_VERSION >= 0x050000
Q_PLUGIN_METADATA(IID "mepp_component_Curvature_plugin")
#endif

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ file(
)

if (WITH_QT5)
qt5_wrap_cpp( MOC_FILES ${hxx_header_files} ../../../mepp/mepp_action.hxx )
set( MOC_FILES "" ) # because CMAKE_AUTOMOC is ON
qt5_wrap_ui( UI_FILES ${all_ui_files} ../../../mepp/mainwindow.ui )
else(WITH_QT5)
qt4_wrap_cpp( MOC_FILES ${hxx_header_files} ../../../mepp/mepp_action.hxx )
Expand All @@ -193,6 +193,8 @@ file(
source_files
src/*
)
set( source_files ${source_files} ../../../mepp/mepp_action.hxx )

add_library(
${COMPONENT_NAME}
SHARED
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#pragma GCC diagnostic warning "-Wuninitialized"
#endif

#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
#if QT_VERSION >= 0x050000
#include <QtWidgets>
#endif

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#pragma GCC diagnostic warning "-Wuninitialized"
#endif

#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
#if QT_VERSION >= 0x050000
#include <QtWidgets>
#endif

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#pragma GCC diagnostic warning "-Wuninitialized"
#endif

#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
#if QT_VERSION >= 0x050000
#include <QtWidgets>
#endif

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -695,7 +695,7 @@ void mepp_component_Compression_Valence_plugin::OnJCWdecompress_without_extracti
}
}

#if (QT_VERSION < QT_VERSION_CHECK(5, 0, 0))
#if QT_VERSION < 0x050000
Q_EXPORT_PLUGIN2(mepp_component_Compression_Valence_plugin, mepp_component_Compression_Valence_plugin);
#endif

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#ifndef HEADER_MEPP_COMPONENT_COMPRESSION_VALENCE_PLUGIN_INTERFACE_H
#define HEADER_MEPP_COMPONENT_COMPRESSION_VALENCE_PLUGIN_INTERFACE_H

#include <QtGlobal> // important, for QT_VERSION

#include <QObject>

#include <mepp_config.h>
Expand All @@ -25,7 +27,7 @@ class mepp_component_Compression_Valence_plugin :

Q_OBJECT
Q_INTERFACES(mepp_component_plugin_interface);
#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
#if QT_VERSION >= 0x050000
Q_PLUGIN_METADATA(IID "mepp_component_Compression_Valence_plugin")
#endif

Expand Down
4 changes: 3 additions & 1 deletion src/components/Distance/MSDM/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ file(
)

if (WITH_QT5)
qt5_wrap_cpp( MOC_FILES ${hxx_header_files} ../../../mepp/mepp_action.hxx )
set( MOC_FILES "" ) # because CMAKE_AUTOMOC is ON
qt5_wrap_ui( UI_FILES ${all_ui_files} ../../../mepp/mainwindow.ui )
else(WITH_QT5)
qt4_wrap_cpp( MOC_FILES ${hxx_header_files} ../../../mepp/mepp_action.hxx )
Expand All @@ -193,6 +193,8 @@ file(
source_files
src/*
)
set( source_files ${source_files} ../../../mepp/mepp_action.hxx )

add_library(
${COMPONENT_NAME}
SHARED
Expand Down
2 changes: 1 addition & 1 deletion src/components/Distance/MSDM/src/dialSettings.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#pragma GCC diagnostic warning "-Wuninitialized"
#endif

#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
#if QT_VERSION >= 0x050000
#include <QtWidgets>
#endif

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ void mepp_component_MSDM_plugin::DistanceToColorMap()
}


#if (QT_VERSION < QT_VERSION_CHECK(5, 0, 0))
#if QT_VERSION < 0x050000
Q_EXPORT_PLUGIN2(mepp_component_MSDM_plugin, mepp_component_MSDM_plugin);
#endif

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#ifndef HEADER_MEPP_COMPONENT_MSDM_PLUGIN_INTERFACE_H
#define HEADER_MEPP_COMPONENT_MSDM_PLUGIN_INTERFACE_H

#include <QtGlobal> // important, for QT_VERSION

#include <QObject>

Expand All @@ -32,7 +33,7 @@ class mepp_component_MSDM_plugin :
{
Q_OBJECT
Q_INTERFACES(mepp_component_plugin_interface);
#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
#if QT_VERSION >= 0x050000
Q_PLUGIN_METADATA(IID "mepp_component_MSDM_plugin")
#endif

Expand Down
4 changes: 3 additions & 1 deletion src/components/Distance/MSDM2/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ file(
)

if (WITH_QT5)
qt5_wrap_cpp( MOC_FILES ${hxx_header_files} ../../../mepp/mepp_action.hxx )
set( MOC_FILES "" ) # because CMAKE_AUTOMOC is ON
qt5_wrap_ui( UI_FILES ${all_ui_files} ../../../mepp/mainwindow.ui )
else(WITH_QT5)
qt4_wrap_cpp( MOC_FILES ${hxx_header_files} ../../../mepp/mepp_action.hxx )
Expand All @@ -193,6 +193,8 @@ file(
source_files
src/*
)
set( source_files ${source_files} ../../../mepp/mepp_action.hxx )

add_library(
${COMPONENT_NAME}
SHARED
Expand Down
2 changes: 1 addition & 1 deletion src/components/Distance/MSDM2/src/dialSettings.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#pragma GCC diagnostic warning "-Wuninitialized"
#endif

#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
#if QT_VERSION >= 0x050000
#include <QtWidgets>
#endif

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ void mepp_component_MSDM2_plugin::DistanceToColorMap()



#if (QT_VERSION < QT_VERSION_CHECK(5, 0, 0))
#if QT_VERSION < 0x050000
Q_EXPORT_PLUGIN2(mepp_component_MSDM2_plugin, mepp_component_MSDM2_plugin);
#endif

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
#ifndef HEADER_MEPP_COMPONENT_MSDM2_PLUGIN_INTERFACE_H
#define HEADER_MEPP_COMPONENT_MSDM2_PLUGIN_INTERFACE_H

#include <QtGlobal> // important, for QT_VERSION

#include <QObject>

#include <mepp_config.h>
Expand All @@ -27,7 +29,7 @@ class mepp_component_MSDM2_plugin :
{
Q_OBJECT
Q_INTERFACES(mepp_component_plugin_interface);
#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
#if QT_VERSION >= 0x050000
Q_PLUGIN_METADATA(IID "mepp_component_MSDM2_plugin")
#endif

Expand Down
4 changes: 3 additions & 1 deletion src/components/Examples/CGAL_Example/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ file(
)

if (WITH_QT5)
qt5_wrap_cpp( MOC_FILES ${hxx_header_files} ../../../mepp/mepp_action.hxx )
set( MOC_FILES "" ) # because CMAKE_AUTOMOC is ON
qt5_wrap_ui( UI_FILES ${all_ui_files} ../../../mepp/mainwindow.ui )
else(WITH_QT5)
qt4_wrap_cpp( MOC_FILES ${hxx_header_files} ../../../mepp/mepp_action.hxx )
Expand All @@ -193,6 +193,8 @@ file(
source_files
src/*
)
set( source_files ${source_files} ../../../mepp/mepp_action.hxx )

add_library(
${COMPONENT_NAME}
SHARED
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#pragma GCC diagnostic warning "-Wuninitialized"
#endif

#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
#if QT_VERSION >= 0x050000
#include <QtWidgets>
#endif

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -606,7 +606,7 @@ void mepp_component_CGAL_Example_plugin::example()
QApplication::restoreOverrideCursor();
}

#if (QT_VERSION < QT_VERSION_CHECK(5, 0, 0))
#if QT_VERSION < 0x050000
Q_EXPORT_PLUGIN2(mepp_component_CGAL_Example_plugin, mepp_component_CGAL_Example_plugin);
#endif

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
#ifndef HEADER_MEPP_COMPONENT_CGAL_EXAMPLE_PLUGIN_INTERFACE_H
#define HEADER_MEPP_COMPONENT_CGAL_EXAMPLE_PLUGIN_INTERFACE_H

#include <QtGlobal> // important, for QT_VERSION

#include <QObject>

#include <mepp_config.h>
Expand All @@ -22,7 +24,7 @@ class mepp_component_CGAL_Example_plugin :
{
Q_OBJECT
Q_INTERFACES(mepp_component_plugin_interface);
#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
#if QT_VERSION >= 0x050000
Q_PLUGIN_METADATA(IID "mepp_component_CGAL_Example_plugin")
#endif

Expand Down
4 changes: 3 additions & 1 deletion src/components/Remeshing/Canonical/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ file(
)

if (WITH_QT5)
qt5_wrap_cpp( MOC_FILES ${hxx_header_files} ../../../mepp/mepp_action.hxx )
set( MOC_FILES "" ) # because CMAKE_AUTOMOC is ON
qt5_wrap_ui( UI_FILES ${all_ui_files} ../../../mepp/mainwindow.ui )
else(WITH_QT5)
qt4_wrap_cpp( MOC_FILES ${hxx_header_files} ../../../mepp/mepp_action.hxx )
Expand All @@ -193,6 +193,8 @@ file(
source_files
src/*
)
set( source_files ${source_files} ../../../mepp/mepp_action.hxx )

add_library(
${COMPONENT_NAME}
SHARED
Expand Down
2 changes: 1 addition & 1 deletion src/components/Remeshing/Canonical/src/dialSettings.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#pragma GCC diagnostic warning "-Wuninitialized"
#endif

#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
#if QT_VERSION >= 0x050000
#include <QtWidgets>
#endif

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ void mepp_component_Canonical_plugin::ValenceDrivenSimplification()
QApplication::restoreOverrideCursor();
}

#if (QT_VERSION < QT_VERSION_CHECK(5, 0, 0))
#if QT_VERSION < 0x050000
Q_EXPORT_PLUGIN2(mepp_component_Canonical_plugin, mepp_component_Canonical_plugin);
#endif

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#ifndef HEADER_MEPP_COMPONENT_CANONICAL_PLUGIN_INTERFACE_H
#define HEADER_MEPP_COMPONENT_CANONICAL_PLUGIN_INTERFACE_H

#include <QtGlobal> // important, for QT_VERSION

#include <QObject>

#include <mepp_config.h>
Expand All @@ -17,7 +19,7 @@ class mepp_component_Canonical_plugin :
{
Q_OBJECT
Q_INTERFACES(mepp_component_plugin_interface);
#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
#if QT_VERSION >= 0x050000
Q_PLUGIN_METADATA(IID "mepp_component_Canonical_plugin")
#endif

Expand Down
4 changes: 3 additions & 1 deletion src/components/Segmentation/VSA/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ file(
)

if (WITH_QT5)
qt5_wrap_cpp( MOC_FILES ${hxx_header_files} ../../../mepp/mepp_action.hxx )
set( MOC_FILES "" ) # because CMAKE_AUTOMOC is ON
qt5_wrap_ui( UI_FILES ${all_ui_files} ../../../mepp/mainwindow.ui )
else(WITH_QT5)
qt4_wrap_cpp( MOC_FILES ${hxx_header_files} ../../../mepp/mepp_action.hxx )
Expand All @@ -193,6 +193,8 @@ file(
source_files
src/*
)
set( source_files ${source_files} ../../../mepp/mepp_action.hxx )

add_library(
${COMPONENT_NAME}
SHARED
Expand Down
2 changes: 1 addition & 1 deletion src/components/Segmentation/VSA/src/dialSettings.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#pragma GCC diagnostic warning "-Wuninitialized"
#endif

#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
#if QT_VERSION >= 0x050000
#include <QtWidgets>
#endif

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ void mepp_component_VSA_plugin::FaceLabelsToColorMap()
QApplication::restoreOverrideCursor();
}

#if (QT_VERSION < QT_VERSION_CHECK(5, 0, 0))
#if QT_VERSION < 0x050000
Q_EXPORT_PLUGIN2(mepp_component_VSA_plugin, mepp_component_VSA_plugin);
#endif

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#ifndef HEADER_MEPP_COMPONENT_VSA_PLUGIN_INTERFACE_H
#define HEADER_MEPP_COMPONENT_VSA_PLUGIN_INTERFACE_H

#include <QtGlobal> // important, for QT_VERSION

#include <QObject>

#include <mepp_config.h>
Expand All @@ -23,7 +25,7 @@ class mepp_component_VSA_plugin :
{
Q_OBJECT
Q_INTERFACES(mepp_component_plugin_interface);
#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
#if QT_VERSION >= 0x050000
Q_PLUGIN_METADATA(IID "mepp_component_VSA_plugin")
#endif

Expand Down
Loading

0 comments on commit 1a58a8e

Please sign in to comment.