VVTK_SegmentationCursorDlg::VVTK_SegmentationCursorDlg( QWidget* parent, const char* name )
:QDialog( parent, name, false, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu ),
myEventCallbackCommand( vtkCallbackCommand::New() ),
- myActorCollection( vtkActorCollection::New() ),
myOutsideCursorSettings( VISU_OutsideCursorSettings::New() )
{
myPriority = 0.0;
{
}
-void VVTK_SegmentationCursorDlg::AddActor( VISU_GaussPtsAct* theActor )
+void VVTK_SegmentationCursorDlg::AddActor( VISU_GaussPtsAct1* theActor )
{
- myActorCollection->AddItem( theActor );
-
theActor->SetOutsideCursorSettings( myOutsideCursorSettings.GetPointer() );
}
-void VVTK_SegmentationCursorDlg::RemoveActor( VISU_GaussPtsAct* theActor )
+void VVTK_SegmentationCursorDlg::RemoveActor( VISU_GaussPtsAct1* theActor )
{
- myActorCollection->RemoveItem( theActor );
+ theActor->SetOutsideCursorSettings( NULL );
}
void VVTK_SegmentationCursorDlg::SetWidget( VISU_ImplicitFunctionWidget* theWidget )
aColor[2] = aButtonColor.blue() / 255.0;
myOutsideCursorSettings->SetColor( aColor );
- vtkActor* anActor;
- for( myActorCollection->InitTraversal(); ( anActor = myActorCollection->GetNextActor() ) != 0; )
- {
- VISU_GaussPtsAct* aGPActor = dynamic_cast<VISU_GaussPtsAct*>( anActor );
- if( aGPActor )
- aGPActor->UpdateOutsideCursorSettings();
- }
+ myOutsideCursorSettings->InvokeEvent(vtkCommand::ModifiedEvent,NULL);
}
void VVTK_SegmentationCursorDlg::onClickClose()
class QtxAction;
class QtxDblSpinBox;
-class VISU_GaussPtsAct;
+class VISU_GaussPtsAct1;
class VISU_OutsideCursorSettings;
class VISU_ImplicitFunctionWidget;
VVTK_SegmentationCursorDlg( QWidget* parent = 0, const char* name = 0 );
~VVTK_SegmentationCursorDlg();
- void AddActor( VISU_GaussPtsAct* );
- void RemoveActor( VISU_GaussPtsAct* );
+ void AddActor( VISU_GaussPtsAct1* );
+ void RemoveActor( VISU_GaussPtsAct1* );
void SetWidget( VISU_ImplicitFunctionWidget* );
void SetAction( QtxAction* theAction ) { myAction = theAction; }
QString myMainTexture;
QString myAlphaTexture;
- vtkSmartPointer<vtkActorCollection> myActorCollection;
vtkSmartPointer<VISU_OutsideCursorSettings> myOutsideCursorSettings;
};