+#ifdef cpPlugins_Interface_QT4
+#include <QDialogButtonBox>
+
+// -------------------------------------------------------------------------
+cpPlugins::BasicFilters::MacheteFilter_Dialog::
+MacheteFilter_Dialog(
+ QWidget* parent, MacheteFilter* filter, Qt::WindowFlags f
+ )
+ : QDialog( parent, f | Qt::WindowStaysOnTopHint ),
+ m_Filter( filter )
+{
+ this->m_Title = new QLabel( this );
+ this->m_Title->setText( "Execute machete filter" );
+
+ this->m_MainLayout = new QGridLayout( this );
+ this->m_ToolsLayout = new QVBoxLayout( );
+ this->m_ToolsLayout->addWidget( this->m_Title );
+ this->m_MainLayout->addLayout( this->m_ToolsLayout, 0, 0, 1, 1 );
+
+ // Add buttons
+ QDialogButtonBox* bb = new QDialogButtonBox(
+ QDialogButtonBox::Cancel | QDialogButtonBox::Ok
+ );
+ QObject::connect( bb, SIGNAL( accepted( ) ), this, SLOT( accept( ) ) );
+ QObject::connect( bb, SIGNAL( rejected( ) ), this, SLOT( reject( ) ) );
+ this->m_ToolsLayout->addWidget( bb );
+}
+
+// -------------------------------------------------------------------------
+cpPlugins::BasicFilters::MacheteFilter_Dialog::
+~MacheteFilter_Dialog( )
+{
+ delete this->m_Title;
+ delete this->m_ToolsLayout;
+ delete this->m_MainLayout;
+}
+
+// -------------------------------------------------------------------------
+void cpPlugins::BasicFilters::MacheteFilter_Dialog::
+accept( )
+{
+ // Get interactive widget
+ if( this->m_Filter == NULL )
+ return;
+ vtkPlaneWidget* wdg = this->m_Filter->m_PlaneWidget;
+ if( wdg == NULL )
+ return;
+
+ // Get/Set plane parameters
+ double center[ 3 ], normal[ 3 ];
+ wdg->GetCenter( center );
+ wdg->GetNormal( normal );
+
+ this->m_Filter->GetParameters( )->SetPoint( "PlaneCenter", 3, center );
+ this->m_Filter->GetParameters( )->SetVector( "PlaneNormal", 3, normal );
+
+ // Update filter
+ auto plugins = this->m_Filter->GetPlugins( );
+ if( plugins != NULL )
+ {
+ auto app = plugins->GetApplication( );
+ if( app != NULL )
+ app->UpdateActualFilter( );
+
+ } // fi
+}
+
+// -------------------------------------------------------------------------
+void cpPlugins::BasicFilters::MacheteFilter_Dialog::
+reject( )
+{
+ auto plugins = this->m_Filter->GetPlugins( );
+ if( plugins != NULL )
+ plugins->DeactivateFilter( );
+ this->Superclass::reject( );
+}
+
+#endif // cpPlugins_Interface_QT4
+