diff --git a/CMakeLists.txt b/CMakeLists.txt index 67588097ac52b7e97e121c8b8de075c4fc8fb7aa..4f0980812be43940e3b9ceb5a4b489d6042e47d8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -27,9 +27,4 @@ if(OPENVOLUMEMESH_FOUND) endif() endif() -find_package(CXX11) -if(CXX11_FLAG_DETECTED) - add_definitions (-DENABLE_PROPVIS_HISTOGRAMS) -endif() - openflipper_plugin (INSTALLDATA Icons DIRS OpenMesh OpenVolumeMesh Widgets DEPS OpenMesh OpenVolumeMesh) diff --git a/OpenMesh/OMPropertyVisualizer.hh b/OpenMesh/OMPropertyVisualizer.hh index d7b02ffe1b4bee3a1afa3b41fdc4b90ab17e9270..afbf3f2bc57842b7f9a9d0c7d6eaaa23f3f3034f 100644 --- a/OpenMesh/OMPropertyVisualizer.hh +++ b/OpenMesh/OMPropertyVisualizer.hh @@ -140,10 +140,8 @@ protected: template QString getPropertyText_(unsigned int index); -#ifdef ENABLE_PROPVIS_HISTOGRAMS template void showHistogram(ACG::QtWidgets::QtHistogramWidget *histogramWidget); -#endif private: template diff --git a/OpenMesh/OMPropertyVisualizerDoubleT.cc b/OpenMesh/OMPropertyVisualizerDoubleT.cc index e0c325ba3608dcef87b5d1ac78687c249a900874..7128d04998e70573db773f574a8139a445eb12af 100644 --- a/OpenMesh/OMPropertyVisualizerDoubleT.cc +++ b/OpenMesh/OMPropertyVisualizerDoubleT.cc @@ -60,10 +60,9 @@ OMPropertyVisualizerDouble::OMPropertyVisualizerDouble(MeshT* _mesh, Prop DoubleWidget* w = new DoubleWidget(); w->paramDouble->setTitle(QString("Double Parameters of ").append(PropertyVisualizer::propertyInfo.propName().c_str())); PropertyVisualizer::widget = w; -#ifdef ENABLE_PROPVIS_HISTOGRAMS + this->connect(w->computeHistogramButton, &QPushButton::clicked, [this, w](){this->template showHistogram(w->histogram);}); -#endif } template diff --git a/OpenMesh/OMPropertyVisualizerT.cc b/OpenMesh/OMPropertyVisualizerT.cc index 8deda8be81fa312356d077a4ec09dbfa27ea3706..5091f346b06eb8c1bcb86c54aad6696f13516070 100644 --- a/OpenMesh/OMPropertyVisualizerT.cc +++ b/OpenMesh/OMPropertyVisualizerT.cc @@ -425,8 +425,6 @@ void OMPropertyVisualizer::setVertexPropertyFromText(unsigned int index, } -#ifdef ENABLE_PROPVIS_HISTOGRAMS - template template void OMPropertyVisualizer::showHistogram(ACG::QtWidgets::QtHistogramWidget *histogramWidget) { @@ -476,6 +474,3 @@ void OMPropertyVisualizer::showHistogram(ACG::QtWidgets::QtHistogramWidge assert(false); } } -#endif - - diff --git a/OpenVolumeMesh/OVMPropertyVisualizer.hh b/OpenVolumeMesh/OVMPropertyVisualizer.hh index 93f0b87531104090ef82784a768627888efe197f..8ea2989c8b060561f050bc46a7e8632f67add167 100644 --- a/OpenVolumeMesh/OVMPropertyVisualizer.hh +++ b/OpenVolumeMesh/OVMPropertyVisualizer.hh @@ -99,11 +99,9 @@ public: /// Returns the ID of the closest primitive. unsigned int getClosestPrimitiveId(unsigned int _face, ACG::Vec3d &_hitPoint); -#ifdef ENABLE_PROPVIS_HISTOGRAMS protected slots: template void showHistogram(ACG::QtWidgets::QtHistogramWidget *histogramWidget); -#endif protected: MeshT* mesh; diff --git a/OpenVolumeMesh/OVMPropertyVisualizerDoubleT.cc b/OpenVolumeMesh/OVMPropertyVisualizerDoubleT.cc index e0085178eb1da768a658f2b1ba17bfae29de6f93..915b7ca71263a68f2a40083aacc24584fff53f7b 100644 --- a/OpenVolumeMesh/OVMPropertyVisualizerDoubleT.cc +++ b/OpenVolumeMesh/OVMPropertyVisualizerDoubleT.cc @@ -67,10 +67,9 @@ OVMPropertyVisualizerDouble::OVMPropertyVisualizerDouble(MeshT* _mesh, in DoubleWidget* w = new DoubleWidget(); w->paramDouble->setTitle(QString("Double Parameters of ").append(PropertyVisualizer::propertyInfo.propName().c_str())); PropertyVisualizer::widget = w; -#ifdef ENABLE_PROPVIS_HISTOGRAMS + this->connect(w->computeHistogramButton, &QPushButton::clicked, [this, w](){this->template showHistogram(w->histogram);}); -#endif } diff --git a/OpenVolumeMesh/OVMPropertyVisualizerT.cc b/OpenVolumeMesh/OVMPropertyVisualizerT.cc index 069015b915f047da9cf04bc1001a09fbddd15220..3cb5396a4582874733a85cbb975df844a65809fb 100644 --- a/OpenVolumeMesh/OVMPropertyVisualizerT.cc +++ b/OpenVolumeMesh/OVMPropertyVisualizerT.cc @@ -409,8 +409,6 @@ void OVMPropertyVisualizer::setVertexPropertyFromText(unsigned int /*inde emit log(LOGERR, "Setting VertexProp not implemented for this property type"); } -#ifdef ENABLE_PROPVIS_HISTOGRAMS - template template void OVMPropertyVisualizer::showHistogram(ACG::QtWidgets::QtHistogramWidget *histogramWidget) { @@ -452,6 +450,5 @@ void OVMPropertyVisualizer::showHistogram(ACG::QtWidgets::QtHistogramWidg assert(false); } } -#endif #endif /* ENABLE_OPENVOLUMEMESH_SUPPORT */ diff --git a/PropertyVisualizer.hh b/PropertyVisualizer.hh index 589be0f7f3caadbacf2fc447a08ba791ac38d439..8dda9ff65ad8b32f6d8bc1a74258c0903363c10c 100644 --- a/PropertyVisualizer.hh +++ b/PropertyVisualizer.hh @@ -181,11 +181,10 @@ public: protected: virtual ACG::IColorCoder *buildColorCoder(); -#ifdef ENABLE_PROPVIS_HISTOGRAMS + template void showHistogramT(ACG::QtWidgets::QtHistogramWidget *widget, Iterable data); -#endif PropertyInfo propertyInfo; @@ -193,7 +192,6 @@ public: QWidget* widget; }; -#ifdef ENABLE_PROPVIS_HISTOGRAMS template void PropertyVisualizer::showHistogramT( ACG::QtWidgets::QtHistogramWidget *widget, @@ -205,6 +203,5 @@ void PropertyVisualizer::showHistogramT( ACG::Histogram *hist = new ACG::HistogramT(data.begin(), data.end(), max_bins); widget->setHistogram(hist); } -#endif #endif /* PROPERTY_VISUALIZER_HH */