Commit 5fb271e8 authored by schultezub's avatar schultezub

minor improvement of VisualizationPipeline

git-svn-id: https://camplinux.in.tum.de/svn/campvis/trunk@218 bb408c1c-ae56-11e1-83d9-df6b3e0c105e
parent 7b800d4f
......@@ -14,6 +14,8 @@ namespace TUMVis {
, _canvas(0)
{
_data.s_dataAdded.connect(this, &VisualizationPipeline::onDataContainerDataAdded);
addProperty(&_renderTargetID);
_renderTargetID.s_changed.connect<VisualizationPipeline>(this, &VisualizationPipeline::onPropertyChanged);
}
VisualizationPipeline::~VisualizationPipeline() {
......@@ -78,4 +80,11 @@ namespace TUMVis {
_canvas = canvas;
}
void VisualizationPipeline::onPropertyChanged(const AbstractProperty* prop) {
if (prop == &_renderTargetID)
s_renderTargetChanged();
else
AbstractPipeline::onPropertyChanged(prop);
}
}
......@@ -97,6 +97,13 @@ namespace TUMVis {
*/
void onDataContainerDataAdded(const std::string& name, const DataHandle* dh);
/**
* Slot getting called when one of the observed properties changed and notifies its observers.
* If \a prop equals _renderTargetID, the s_renderTargetChanged is emitted.
* \param prop Property that emitted the signal
*/
virtual void onPropertyChanged(const AbstractProperty* prop);
/// Signal emitted when the pipeline's render target has changed
sigslot::signal0<> s_renderTargetChanged;
......
......@@ -17,7 +17,6 @@ namespace TUMVis {
_processors.push_back(&_imageReader);
_processors.push_back(&_eepGenerator);
addProperty(&_renderTargetID);
}
DVRVis::~DVRVis() {
......
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