X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FcpPlugins%2FQT%2FOpenFileDialog.cxx;h=784d1113c542347e0fb5faeba475f076dce5aa34;hb=61b3659afe961ed248f30e26f9ca8f28fcfafddc;hp=1027250a8d5d914e0a9f3ed518e819f82668b7e1;hpb=9b11582dc5062474361432e46838c4e790c21f10;p=cpPlugins.git diff --git a/lib/cpPlugins/QT/OpenFileDialog.cxx b/lib/cpPlugins/QT/OpenFileDialog.cxx index 1027250..784d111 100644 --- a/lib/cpPlugins/QT/OpenFileDialog.cxx +++ b/lib/cpPlugins/QT/OpenFileDialog.cxx @@ -1,8 +1,5 @@ #include - -#ifdef cpPlugins_QT4 - -#include +#include // ------------------------------------------------------------------------- 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$