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)
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)
......@@ -140,10 +140,8 @@ protected:
template <typename InnerType >
QString getPropertyText_(unsigned int index);
#ifdef ENABLE_PROPVIS_HISTOGRAMS
template<typename Type>
void showHistogram(ACG::QtWidgets::QtHistogramWidget *histogramWidget);
#endif
private:
template<typename PropHandleT>
......
......@@ -60,10 +60,9 @@ OMPropertyVisualizerDouble<MeshT>::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<double>(w->histogram);});
#endif
}
template <typename MeshT>
......
......@@ -425,8 +425,6 @@ void OMPropertyVisualizer<MeshT>::setVertexPropertyFromText(unsigned int index,
}
#ifdef ENABLE_PROPVIS_HISTOGRAMS
template<typename MeshT>
template<typename Type>
void OMPropertyVisualizer<MeshT>::showHistogram(ACG::QtWidgets::QtHistogramWidget *histogramWidget) {
......@@ -476,6 +474,3 @@ void OMPropertyVisualizer<MeshT>::showHistogram(ACG::QtWidgets::QtHistogramWidge
assert(false);
}
}
#endif
......@@ -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 <typename Type>
void showHistogram(ACG::QtWidgets::QtHistogramWidget *histogramWidget);
#endif
protected:
MeshT* mesh;
......
......@@ -67,10 +67,9 @@ OVMPropertyVisualizerDouble<MeshT>::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<double>(w->histogram);});
#endif
}
......
......@@ -409,8 +409,6 @@ void OVMPropertyVisualizer<MeshT>::setVertexPropertyFromText(unsigned int /*inde
emit log(LOGERR, "Setting VertexProp not implemented for this property type");
}
#ifdef ENABLE_PROPVIS_HISTOGRAMS
template<typename MeshT>
template<typename Type>
void OVMPropertyVisualizer<MeshT>::showHistogram(ACG::QtWidgets::QtHistogramWidget *histogramWidget) {
......@@ -452,6 +450,5 @@ void OVMPropertyVisualizer<MeshT>::showHistogram(ACG::QtWidgets::QtHistogramWidg
assert(false);
}
}
#endif
#endif /* ENABLE_OPENVOLUMEMESH_SUPPORT */
......@@ -181,11 +181,10 @@ public:
protected:
virtual ACG::IColorCoder *buildColorCoder();
#ifdef ENABLE_PROPVIS_HISTOGRAMS
template<typename PropType, typename Iterable>
void showHistogramT(ACG::QtWidgets::QtHistogramWidget *widget,
Iterable data);
#endif
PropertyInfo propertyInfo;
......@@ -193,7 +192,6 @@ public:
QWidget* widget;
};
#ifdef ENABLE_PROPVIS_HISTOGRAMS
template<typename PropType, typename Iterable>
void PropertyVisualizer::showHistogramT(
ACG::QtWidgets::QtHistogramWidget *widget,
......@@ -205,6 +203,5 @@ void PropertyVisualizer::showHistogramT(
ACG::Histogram *hist = new ACG::HistogramT<PropType>(data.begin(), data.end(), max_bins);
widget->setHistogram(hist);
}
#endif
#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