Commit bd79ca9a authored by Martin Heistermann's avatar Martin Heistermann

Propvis histograms: revert conditional compilation, C++11 & qt5 are always available now.

parent 5d154ef2
...@@ -27,9 +27,4 @@ if(OPENVOLUMEMESH_FOUND) ...@@ -27,9 +27,4 @@ if(OPENVOLUMEMESH_FOUND)
endif() endif()
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) openflipper_plugin (INSTALLDATA Icons DIRS OpenMesh OpenVolumeMesh Widgets DEPS OpenMesh OpenVolumeMesh)
...@@ -140,10 +140,8 @@ protected: ...@@ -140,10 +140,8 @@ protected:
template <typename InnerType > template <typename InnerType >
QString getPropertyText_(unsigned int index); QString getPropertyText_(unsigned int index);
#ifdef ENABLE_PROPVIS_HISTOGRAMS
template<typename Type> template<typename Type>
void showHistogram(ACG::QtWidgets::QtHistogramWidget *histogramWidget); void showHistogram(ACG::QtWidgets::QtHistogramWidget *histogramWidget);
#endif
private: private:
template<typename PropHandleT> template<typename PropHandleT>
......
...@@ -60,10 +60,9 @@ OMPropertyVisualizerDouble<MeshT>::OMPropertyVisualizerDouble(MeshT* _mesh, Prop ...@@ -60,10 +60,9 @@ OMPropertyVisualizerDouble<MeshT>::OMPropertyVisualizerDouble(MeshT* _mesh, Prop
DoubleWidget* w = new DoubleWidget(); DoubleWidget* w = new DoubleWidget();
w->paramDouble->setTitle(QString("Double Parameters of ").append(PropertyVisualizer::propertyInfo.propName().c_str())); w->paramDouble->setTitle(QString("Double Parameters of ").append(PropertyVisualizer::propertyInfo.propName().c_str()));
PropertyVisualizer::widget = w; PropertyVisualizer::widget = w;
#ifdef ENABLE_PROPVIS_HISTOGRAMS
this->connect(w->computeHistogramButton, &QPushButton::clicked, this->connect(w->computeHistogramButton, &QPushButton::clicked,
[this, w](){this->template showHistogram<double>(w->histogram);}); [this, w](){this->template showHistogram<double>(w->histogram);});
#endif
} }
template <typename MeshT> template <typename MeshT>
......
...@@ -425,8 +425,6 @@ void OMPropertyVisualizer<MeshT>::setVertexPropertyFromText(unsigned int index, ...@@ -425,8 +425,6 @@ void OMPropertyVisualizer<MeshT>::setVertexPropertyFromText(unsigned int index,
} }
#ifdef ENABLE_PROPVIS_HISTOGRAMS
template<typename MeshT> template<typename MeshT>
template<typename Type> template<typename Type>
void OMPropertyVisualizer<MeshT>::showHistogram(ACG::QtWidgets::QtHistogramWidget *histogramWidget) { void OMPropertyVisualizer<MeshT>::showHistogram(ACG::QtWidgets::QtHistogramWidget *histogramWidget) {
...@@ -476,6 +474,3 @@ void OMPropertyVisualizer<MeshT>::showHistogram(ACG::QtWidgets::QtHistogramWidge ...@@ -476,6 +474,3 @@ void OMPropertyVisualizer<MeshT>::showHistogram(ACG::QtWidgets::QtHistogramWidge
assert(false); assert(false);
} }
} }
#endif
...@@ -99,11 +99,9 @@ public: ...@@ -99,11 +99,9 @@ public:
/// Returns the ID of the closest primitive. /// Returns the ID of the closest primitive.
unsigned int getClosestPrimitiveId(unsigned int _face, ACG::Vec3d &_hitPoint); unsigned int getClosestPrimitiveId(unsigned int _face, ACG::Vec3d &_hitPoint);
#ifdef ENABLE_PROPVIS_HISTOGRAMS
protected slots: protected slots:
template <typename Type> template <typename Type>
void showHistogram(ACG::QtWidgets::QtHistogramWidget *histogramWidget); void showHistogram(ACG::QtWidgets::QtHistogramWidget *histogramWidget);
#endif
protected: protected:
MeshT* mesh; MeshT* mesh;
......
...@@ -67,10 +67,9 @@ OVMPropertyVisualizerDouble<MeshT>::OVMPropertyVisualizerDouble(MeshT* _mesh, in ...@@ -67,10 +67,9 @@ OVMPropertyVisualizerDouble<MeshT>::OVMPropertyVisualizerDouble(MeshT* _mesh, in
DoubleWidget* w = new DoubleWidget(); DoubleWidget* w = new DoubleWidget();
w->paramDouble->setTitle(QString("Double Parameters of ").append(PropertyVisualizer::propertyInfo.propName().c_str())); w->paramDouble->setTitle(QString("Double Parameters of ").append(PropertyVisualizer::propertyInfo.propName().c_str()));
PropertyVisualizer::widget = w; PropertyVisualizer::widget = w;
#ifdef ENABLE_PROPVIS_HISTOGRAMS
this->connect(w->computeHistogramButton, &QPushButton::clicked, this->connect(w->computeHistogramButton, &QPushButton::clicked,
[this, w](){this->template showHistogram<double>(w->histogram);}); [this, w](){this->template showHistogram<double>(w->histogram);});
#endif
} }
......
...@@ -409,8 +409,6 @@ void OVMPropertyVisualizer<MeshT>::setVertexPropertyFromText(unsigned int /*inde ...@@ -409,8 +409,6 @@ void OVMPropertyVisualizer<MeshT>::setVertexPropertyFromText(unsigned int /*inde
emit log(LOGERR, "Setting VertexProp not implemented for this property type"); emit log(LOGERR, "Setting VertexProp not implemented for this property type");
} }
#ifdef ENABLE_PROPVIS_HISTOGRAMS
template<typename MeshT> template<typename MeshT>
template<typename Type> template<typename Type>
void OVMPropertyVisualizer<MeshT>::showHistogram(ACG::QtWidgets::QtHistogramWidget *histogramWidget) { void OVMPropertyVisualizer<MeshT>::showHistogram(ACG::QtWidgets::QtHistogramWidget *histogramWidget) {
...@@ -452,6 +450,5 @@ void OVMPropertyVisualizer<MeshT>::showHistogram(ACG::QtWidgets::QtHistogramWidg ...@@ -452,6 +450,5 @@ void OVMPropertyVisualizer<MeshT>::showHistogram(ACG::QtWidgets::QtHistogramWidg
assert(false); assert(false);
} }
} }
#endif
#endif /* ENABLE_OPENVOLUMEMESH_SUPPORT */ #endif /* ENABLE_OPENVOLUMEMESH_SUPPORT */
...@@ -181,11 +181,10 @@ public: ...@@ -181,11 +181,10 @@ public:
protected: protected:
virtual ACG::IColorCoder *buildColorCoder(); virtual ACG::IColorCoder *buildColorCoder();
#ifdef ENABLE_PROPVIS_HISTOGRAMS
template<typename PropType, typename Iterable> template<typename PropType, typename Iterable>
void showHistogramT(ACG::QtWidgets::QtHistogramWidget *widget, void showHistogramT(ACG::QtWidgets::QtHistogramWidget *widget,
Iterable data); Iterable data);
#endif
PropertyInfo propertyInfo; PropertyInfo propertyInfo;
...@@ -193,7 +192,6 @@ public: ...@@ -193,7 +192,6 @@ public:
QWidget* widget; QWidget* widget;
}; };
#ifdef ENABLE_PROPVIS_HISTOGRAMS
template<typename PropType, typename Iterable> template<typename PropType, typename Iterable>
void PropertyVisualizer::showHistogramT( void PropertyVisualizer::showHistogramT(
ACG::QtWidgets::QtHistogramWidget *widget, ACG::QtWidgets::QtHistogramWidget *widget,
...@@ -205,6 +203,5 @@ void PropertyVisualizer::showHistogramT( ...@@ -205,6 +203,5 @@ void PropertyVisualizer::showHistogramT(
ACG::Histogram *hist = new ACG::HistogramT<PropType>(data.begin(), data.end(), max_bins); ACG::Histogram *hist = new ACG::HistogramT<PropType>(data.begin(), data.end(), max_bins);
widget->setHistogram(hist); widget->setHistogram(hist);
} }
#endif
#endif /* PROPERTY_VISUALIZER_HH */ #endif /* PROPERTY_VISUALIZER_HH */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment