#include "PipelineEditor.h" #include "ui_PipelineEditor.h" #include #include #include #include #include #include #include #include // ------------------------------------------------------------------------- PipelineEditor:: PipelineEditor( int argc, char* argv[], QApplication* app, QWidget* parent ) : Superclass( argc, argv, app, parent ), m_UI( new Ui::PipelineEditor ) { // Load environment configuration char* p = std::getenv( cpPlugins_PATHS ); std::string sp = ""; if( p != NULL ) sp = std::string( p ) + std::string( cpPlugins_SEPARATOR ); QFileInfo info( argv[ 0 ] ); if( info.exists( ) ) sp += info.canonicalPath( ).toStdString( ); setenv( cpPlugins_PATHS, sp.c_str( ), 0 ); // Basic configuration this->m_UI->setupUi( this ); this->_Configure( this->m_UI->LoadedPlugins, this->m_UI->Viewer, this->m_UI->Canvas->editor( ) ); // Connect actions to slots this->connect( this->m_UI->ActionBackgroundMPR, SIGNAL( triggered( ) ), this, SLOT( _ActionBackgroundMPR( ) ) ); this->connect( this->m_UI->ActionBackground3D, SIGNAL( triggered( ) ), this, SLOT( _ActionBackground3D( ) ) ); this->connect( this->m_UI->ButtonLoadPluginsFile, SIGNAL( clicked( ) ), this, SLOT( _InteractiveLoadPlugins( ) ) ); this->connect( this->m_UI->ButtonLoadPluginsPath, SIGNAL( clicked( ) ), this, SLOT( _InteractiveLoadPluginsFromPath( ) ) ); this->connect( this->m_UI->ActionOpenWorkspace, SIGNAL( triggered( ) ), this, SLOT( _InteractiveLoadWorkspace( ) ) ); this->connect( this->m_UI->ActionSaveWorkspace, SIGNAL( triggered( ) ), this, SLOT( _InteractiveSaveWorkspace( ) ) ); this->connect( this->m_UI->Canvas->editor( ), SIGNAL( execFilter( const std::string& ) ), this, SLOT( _ExecFilter( const std::string& ) ) ); this->connect( this->m_UI->Canvas->editor( ), SIGNAL( showFilterOutput( const std::string&, const std::string& ) ), 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& ) ) ); } // ------------------------------------------------------------------------- PipelineEditor:: ~PipelineEditor( ) { delete this->m_UI; } // ------------------------------------------------------------------------- void PipelineEditor:: _ActionBackgroundMPR( ) { this->_BackgroundProperties( 4 ); } // ------------------------------------------------------------------------- void PipelineEditor:: _ActionBackground3D( ) { this->_BackgroundProperties( 3 ); } // ------------------------------------------------------------------------- void PipelineEditor:: _ShowFilterOutput( const std::string& filter_name, const std::string& output_name ) { this->_ExecFilter( filter_name ); this->_ShowData( filter_name, output_name ); } // ------------------------------------------------------------------------- void PipelineEditor:: _HideFilterOutput( const std::string& filter_name, const std::string& output_name ) { this->_HideData( filter_name, output_name ); } // ------------------------------------------------------------------------- void PipelineEditor:: _PropertiesFilterOutput( const std::string& filter_name, const std::string& output_name ) { this->_DataProperties( filter_name, output_name ); } // eof - $RCSfile$