1 #include <cpPlugins/Interface/ProcessObject.h>
3 #ifdef cpPlugins_Interface_QT4
4 #include <cpPlugins/Interface/ParametersQtDialog.h>
5 #endif // cpPlugins_Interface_QT4
7 // -------------------------------------------------------------------------
8 cpPlugins::Interface::ProcessObject::
9 TParameters* cpPlugins::Interface::ProcessObject::
12 return( this->m_Parameters.GetPointer( ) );
15 // -------------------------------------------------------------------------
16 const cpPlugins::Interface::ProcessObject::
17 TParameters* cpPlugins::Interface::ProcessObject::
18 GetParameters( ) const
20 return( this->m_Parameters.GetPointer( ) );
23 // -------------------------------------------------------------------------
24 unsigned int cpPlugins::Interface::ProcessObject::
25 GetNumberOfInputs( ) const
27 return( this->m_Inputs.size( ) );
30 // -------------------------------------------------------------------------
31 unsigned int cpPlugins::Interface::ProcessObject::
32 GetNumberOfOutputs( ) const
34 return( this->m_Outputs.size( ) );
37 // -------------------------------------------------------------------------
38 void cpPlugins::Interface::ProcessObject::
39 SetNumberOfInputs( unsigned int n )
41 this->m_Inputs.clear( );
42 this->m_Inputs.resize( n );
46 // -------------------------------------------------------------------------
47 void cpPlugins::Interface::ProcessObject::
48 SetNumberOfOutputs( unsigned int n )
50 this->m_Outputs.clear( );
51 this->m_Outputs.resize( n );
55 // -------------------------------------------------------------------------
56 void cpPlugins::Interface::ProcessObject::
57 SetInput( unsigned int idx, cpPlugins::Interface::DataObject* dobj )
59 if( idx < this->m_Inputs.size( ) )
61 this->m_Inputs[ idx ] = dobj;
67 // -------------------------------------------------------------------------
68 std::string cpPlugins::Interface::ProcessObject::
73 // Force upstream updates
74 for( unsigned int i = 0; i < this->m_Inputs.size( ) && r == ""; ++i )
76 Self* src = dynamic_cast< Self* >( this->m_Inputs[ i ]->GetSource( ) );
84 r = this->_GenerateData( );
86 // Return error description, if any
90 // -------------------------------------------------------------------------
91 void cpPlugins::Interface::ProcessObject::
94 for( unsigned int idx = 0; idx < this->m_Outputs.size( ); ++idx )
95 if( this->m_Outputs[ idx ].IsNotNull( ) )
96 this->m_Outputs[ idx ]->DisconnectPipeline( );
99 // -------------------------------------------------------------------------
100 bool cpPlugins::Interface::ProcessObject::
101 ExecConfigurationDialog( QWidget* parent )
105 #ifdef cpPlugins_Interface_QT4
107 r = cpPlugins::Interface::ParametersQtDialog(
109 this->GetClassName( ) + std::string( " basic configuration" ),
114 // TODO: !!! this->m_Parameters = parameters;
117 #endif // cpPlugins_Interface_QT4
122 // -------------------------------------------------------------------------
123 cpPlugins::Interface::ProcessObject::
129 this->m_Parameters = TParameters::New( );
132 // -------------------------------------------------------------------------
133 cpPlugins::Interface::ProcessObject::