#include "ui_PipelineEditor.h"
#include <cpPipelineEditor/Editor.h>
+#include <cpExtensions/QT/PropertyWidget.h>
#include <QMessageBox>
+#include <vtkRenderWindowInteractor.h>
// -------------------------------------------------------------------------
PipelineEditor::
this,
SLOT( _ShowFilterOutput( const std::string&, const std::string& ) )
);
+ this->connect(
+ this->m_UI->Canvas->editor( ),
+ SIGNAL( hideFilterOutput( const std::string&, const std::string& ) ),
+ this,
+ SLOT( _HideFilterOutput( const std::string&, const std::string& ) )
+ );
+ this->connect(
+ this->m_UI->Canvas->editor( ),
+ SIGNAL( visualPropertiesFilterOutput( const std::string&, const std::string& ) ),
+ this,
+ SLOT( _PropertiesFilterOutput( const std::string&, const std::string& ) )
+ );
}
// -------------------------------------------------------------------------
} // fi
}
+// -------------------------------------------------------------------------
+void PipelineEditor::
+_HideFilterOutput(
+ const std::string& filter_name, const std::string& output_name
+ )
+{
+ // Get output
+ auto filter = this->m_Workspace.GetFilter( filter_name );
+ if( filter != NULL )
+ {
+ auto output = filter->GetOutputData( output_name );
+ if( output != NULL )
+ {
+ std::string data_name = output_name + "@" + filter_name;
+ this->m_UI->Viewer->HideData( data_name );
+
+ } // fi
+
+ } // fi
+}
+
+// -------------------------------------------------------------------------
+void PipelineEditor::
+_PropertiesFilterOutput(
+ const std::string& filter_name, const std::string& output_name
+ )
+{
+ // Get output
+ auto filter = this->m_Workspace.GetFilter( filter_name );
+ if( filter != NULL )
+ {
+ auto output = filter->GetOutputData( output_name );
+ if( output != NULL )
+ {
+ std::string data_name = output_name + "@" + filter_name;
+ auto prop = this->m_UI->Viewer->GetProp( data_name );
+
+ cpExtensions::QT::PropertyWidget* wdg =
+ new cpExtensions::QT::PropertyWidget( NULL );
+ wdg->SetProp( prop );
+ wdg->SetRenderWindow( this->m_UI->Viewer->GetInteractor( 3 )->GetRenderWindow( ) );
+ wdg->show( );
+ }
+ else
+ QMessageBox::critical(
+ this,
+ QMessageBox::tr( "Error showing data" ),
+ QMessageBox::tr( "No known VTK conversion!" )
+ );
+
+ } // fi
+}
+
// eof - $RCSfile$