#include <cpPlugins/Interface/ParametersListWidget.h>
-#include <vtkSmartPointer.h>
-#include <cpExtensions/Interaction/SeedWidget.h>
-#include <vtkPointHandleRepresentation3D.h>
-#include <vtkProperty.h>
-#include <vtkSeedRepresentation.h>
+#include <vtkRenderWindowInteractor.h>
#include <QCheckBox>
#include <QDialogButtonBox>
ParametersQtDialog( QWidget* parent, Qt::WindowFlags f )
: QDialog( parent, f ),
m_Parameters( NULL ),
- m_IsModal( false ),
- m_Interactor( NULL )
+ m_IsModal( false )
{
this->m_Title = new QLabel( this );
this->m_Title->setText( "Parameters dialog title" );
delete this->m_Title;
delete this->m_ToolsLayout;
delete this->m_MainLayout;
-
- for( unsigned int i = 0; i < this->m_Widgets.size( ); ++i )
- this->m_Widgets[ i ]->Delete( );
}
// -------------------------------------------------------------------------
// -------------------------------------------------------------------------
void cpPlugins::Interface::ParametersQtDialog::
-setInteractor( vtkRenderWindowInteractor* interactor )
+addInteractor( vtkRenderWindowInteractor* interactor )
{
- this->m_Interactor = interactor;
+ this->m_Interactors.insert( interactor );
}
// -------------------------------------------------------------------------
}
else if( pt == Parameters::Point || pt == Parameters::Index )
{
- if( this->m_Interactor != NULL )
+ auto iIt = this->m_Interactors.begin( );
+ for( ; iIt != this->m_Interactors.end( ); ++iIt )
{
- // Create a point widget and its representation
- vtkSmartPointer< vtkPointHandleRepresentation3D > handle =
- vtkSmartPointer< vtkPointHandleRepresentation3D >::New( );
- handle->GetProperty( )->SetColor( 1, 0, 0 );
- vtkSmartPointer< vtkSeedRepresentation > rep =
- vtkSmartPointer< vtkSeedRepresentation >::New( );
- rep->SetHandleRepresentation( handle );
-
- cpExtensions::Interaction::SeedWidget* widget =
- cpExtensions::Interaction::SeedWidget::New( );
- widget->SetInteractor( this->m_Interactor );
- widget->SetRepresentation( rep );
- widget->On( );
-
- this->m_Widgets.push_back( widget );
- this->m_IsModal = false;
+ TStyle* style =
+ dynamic_cast< TStyle* >( ( *iIt )->GetInteractorStyle( ) );
+ std::cout << "ACA VOY --> " << style << std::endl;
- } // fi
+ } // rof
+ this->m_IsModal = false;
+
+ /*
+ if( this->m_Interactor != NULL )
+ {
+
+ } // fi
+ */
} // fi
#include <cpPlugins/Interface/cpPlugins_Interface_Export.h>
#include <cpPlugins/Interface/Parameters.h>
+#include <cpExtensions/Interaction/ImageInteractorStyle.h>
-#include <vector>
+#include <set>
#include <QDialog>
#include <QGridLayout>
#include <QLabel>
#include <QVBoxLayout>
-class vtkAbstractWidget;
class vtkRenderWindowInteractor;
namespace cpPlugins
{
Q_OBJECT;
+ public:
+ typedef cpExtensions::Interaction::ImageInteractorStyle TStyle;
+
public:
ParametersQtDialog( QWidget* parent = 0, Qt::WindowFlags f = 0 );
virtual ~ParametersQtDialog( );
bool IsModal( ) const;
Parameters* getParameters( ) const;
- void setInteractor( vtkRenderWindowInteractor* interactor );
+ void addInteractor( vtkRenderWindowInteractor* interactor );
bool setParameters( Parameters* parameters );
void setTitle( const std::string& title );
QVBoxLayout* m_ToolsLayout;
bool m_IsModal;
- vtkRenderWindowInteractor* m_Interactor;
- std::vector< vtkAbstractWidget* > m_Widgets;
+ std::set< vtkRenderWindowInteractor* > m_Interactors;
};
} // ecapseman