]> Creatis software - cpPlugins.git/blobdiff - lib/cpPlugins/QT/OpenFileDialog.cxx
...
[cpPlugins.git] / lib / cpPlugins / QT / OpenFileDialog.cxx
index 1027250a8d5d914e0a9f3ed518e819f82668b7e1..784d1113c542347e0fb5faeba475f076dce5aa34 100644 (file)
@@ -1,8 +1,5 @@
 #include <cpPlugins/QT/OpenFileDialog.h>
-
-#ifdef cpPlugins_QT4
-
-#include <cpPlugins/BaseObjects/Parameters.h>
+#include <cpPlugins/Pipeline/Parameters.h>
 
 // -------------------------------------------------------------------------
 cpPlugins::QT::OpenFileDialog::
@@ -26,7 +23,7 @@ cpPlugins::QT::OpenFileDialog::
 // -------------------------------------------------------------------------
 void cpPlugins::QT::OpenFileDialog::
 SetParameters(
-  cpPlugins::BaseObjects::Parameters* params, const std::string& name
+  cpPlugins::Pipeline::Parameters* params, const std::string& name
   )
 {
   if( params == NULL )
@@ -38,8 +35,8 @@ SetParameters(
   } // fi
   auto param_type = params->GetType( name );
   if(
-    param_type != cpPlugins::BaseObjects::Parameters::OpenFileName &&
-    param_type != cpPlugins::BaseObjects::Parameters::OpenFileNameList
+    param_type != cpPlugins::Pipeline::Parameters::OpenFileName &&
+    param_type != cpPlugins::Pipeline::Parameters::OpenFileNameList
     )
   {
     this->m_Parameters = NULL;
@@ -55,13 +52,13 @@ SetParameters(
   if( extensions != "" )
     filters << extensions.c_str( );
   filters << "Any file (*)";
-  if( param_type == cpPlugins::BaseObjects::Parameters::OpenFileName )
+  if( param_type == cpPlugins::Pipeline::Parameters::OpenFileName )
     this->setFileMode( QFileDialog::ExistingFile );
   else
     this->setFileMode( QFileDialog::ExistingFiles );
   this->setNameFilters( filters );
   this->setAcceptMode( QFileDialog::AcceptOpen );
-  if( param_type == cpPlugins::BaseObjects::Parameters::OpenFileName )
+  if( param_type == cpPlugins::Pipeline::Parameters::OpenFileName )
   {
     auto file = this->m_Parameters->GetOpenFileName( this->m_Name );
     if( file == "" )
@@ -91,7 +88,7 @@ _dlg_Accepted( )
   {
     auto files = this->selectedFiles( );
     auto param_type = this->m_Parameters->GetType( this->m_Name );
-    if( param_type == cpPlugins::BaseObjects::Parameters::OpenFileNameList )
+    if( param_type == cpPlugins::Pipeline::Parameters::OpenFileNameList )
     {
       this->m_Parameters->ClearOpenFileNameList( this->m_Name );
       for( auto fIt = files.begin( ); fIt != files.end( ); ++fIt )
@@ -107,6 +104,4 @@ _dlg_Accepted( )
   } // fi
 }
 
-#endif // cpPlugins_QT4
-
 // eof - $RCSfile$