diff --git a/CMakeLists.txt b/CMakeLists.txt index 89e166f022c68cae34a30d309cbd9a7e91a08085..f3bc1844d222833f32445c8935633d51115db411 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -41,14 +41,8 @@ IF(WIN32) ENDIF(WIN32) # Link to the Orfeo ToolBox -FIND_PACKAGE(OTB PATHS /usr/lib/otb) -IF(OTB_FOUND) - INCLUDE(${OTB_USE_FILE}) -ELSE(OTB_FOUND) - MESSAGE(FATAL_ERROR - "OTB not found. Please set OTB_DIR") -ENDIF(OTB_FOUND) - +FIND_PACKAGE(OTB REQUIRED PATHS /usr/lib/otb ) +INCLUDE(${OTB_USE_FILE}) OPTION(OTB_USE_QT "Generate Qt wrappers for Applications" ON) diff --git a/Code/Core/otbWrapperInputImageParameter.h b/Code/Core/otbWrapperInputImageParameter.h index beeed86249fbbb00c2609bce7ccdba6c7c874c31..a44d03f9c95dc8189ab2a9ec933bcde58953b668 100644 --- a/Code/Core/otbWrapperInputImageParameter.h +++ b/Code/Core/otbWrapperInputImageParameter.h @@ -18,6 +18,7 @@ #ifndef __otbWrapperInputImageParameter_h #define __otbWrapperInputImageParameter_h +#include "otbVectorImage.h" #include "otbWrapperParameter.h" namespace otb @@ -43,6 +44,15 @@ public: /** RTTI support */ itkTypeMacro(InputImageParameter,Parameter); + typedef float PixelType; + typedef otb::VectorImage<PixelType, 2> VectorImageType; + + /** Set the value */ + itkSetObjectMacro(Image, VectorImageType); + + /** Get the value */ + itkGetObjectMacro(Image, VectorImageType); + protected: /** Constructor */ InputImageParameter() @@ -56,6 +66,8 @@ private: InputImageParameter(const Parameter &); //purposely not implemented void operator =(const Parameter&); //purposely not implemented + VectorImageType::Pointer m_Image; + }; // End class InputImage Parameter } // End namespace Wrapper diff --git a/Code/Core/otbWrapperInputVectorDataParameter.h b/Code/Core/otbWrapperInputVectorDataParameter.h new file mode 100644 index 0000000000000000000000000000000000000000..48e5f872e68ea20168988667538b0420f536eba4 --- /dev/null +++ b/Code/Core/otbWrapperInputVectorDataParameter.h @@ -0,0 +1,77 @@ +/*========================================================================= + + Program: ORFEO Toolbox + Language: C++ + Date: $Date$ + Version: $Revision$ + + + Copyright (c) Centre National d'Etudes Spatiales. All rights reserved. + See OTBCopyright.txt for details. + + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef __otbWrapperInputVectorDataParameter_h +#define __otbWrapperInputVectorDataParameter_h + +#include "otbVectorData.h" +#include "otbWrapperParameter.h" + +namespace otb +{ +namespace Wrapper +{ +/** \class InputVectorDataParameter + * \brief This class represents a InputVectorData parameter + */ + +class ITK_EXPORT InputVectorDataParameter : public Parameter +{ +public: + /** Standard class typedef */ + typedef InputVectorDataParameter Self; + typedef Parameter Superclass; + typedef itk::SmartPointer<Self> Pointer; + typedef itk::SmartPointer<const Self> ConstPointer; + + /** Defining ::New() static method */ + itkNewMacro(Self); + + /** RTTI support */ + itkTypeMacro(InputVectorDataParameter,Parameter); + + typedef double CoordinatePrecisionType; + typedef double ValuePrecisionType; + typedef otb::VectorData<CoordinatePrecisionType, 2, ValuePrecisionType> VectorDataType; + + /** Set the value */ + itkSetObjectMacro(VectorData, VectorDataType); + + /** Get the value */ + itkGetObjectMacro(VectorData, VectorDataType); + +protected: + /** Constructor */ + InputVectorDataParameter() + {} + + /** Destructor */ + virtual ~InputVectorDataParameter() + {} + +private: + InputVectorDataParameter(const Parameter &); //purposely not implemented + void operator =(const Parameter&); //purposely not implemented + + VectorDataType::Pointer m_VectorData; + +}; + +} // End namespace Wrapper +} // End namespace otb + +#endif diff --git a/Code/Core/otbWrapperNumericalParameter.h b/Code/Core/otbWrapperNumericalParameter.h index 8ac50d640744ca53eea0b6faa3744f862d89d72f..06a8bd4990462b17e20ab7ac12e10bfcbd55ea76 100644 --- a/Code/Core/otbWrapperNumericalParameter.h +++ b/Code/Core/otbWrapperNumericalParameter.h @@ -57,7 +57,7 @@ public: virtual void SetAnyValue(boost::any v) { // Perform any cast - m_Value=boost::any_cast<T>(v); + m_Value = boost::any_cast<T>(v); // Call Modified(); this->Modified(); @@ -97,9 +97,9 @@ protected: /** Constructor */ NumericalParameter() : m_Value(itk::NumericTraits<T>::Zero), - m_DefaultValue(itk::NumericTraits<T>::Zero), - m_MinimumValue(itk::NumericTraits<T>::min()), - m_MaximumValue(itk::NumericTraits<T>::max()) + m_DefaultValue(itk::NumericTraits<T>::Zero), + m_MinimumValue(itk::NumericTraits<T>::min()), + m_MaximumValue(itk::NumericTraits<T>::max()) {} /** Destructor */ diff --git a/Code/Core/otbWrapperStringParameter.h b/Code/Core/otbWrapperStringParameter.h index bfb15a836093ec32fd09472763f27d9491851b95..0ca6e0d15f94a082af22e3d6e590cb9c1bad2be8 100644 --- a/Code/Core/otbWrapperStringParameter.h +++ b/Code/Core/otbWrapperStringParameter.h @@ -18,6 +18,7 @@ #ifndef __otbWrapperStringParameter_h #define __otbWrapperStringParameter_h +#include <string> #include "otbWrapperParameter.h" namespace otb diff --git a/Code/Wrappers/QtWidget/otbWrapperQtWidgetParameterFactory.cxx b/Code/Wrappers/QtWidget/otbWrapperQtWidgetParameterFactory.cxx index b5b08756c905dc58b5270441337db42704d346ea..2d89673bcf8184d6e54722532d71e4ea761f9f4c 100644 --- a/Code/Wrappers/QtWidget/otbWrapperQtWidgetParameterFactory.cxx +++ b/Code/Wrappers/QtWidget/otbWrapperQtWidgetParameterFactory.cxx @@ -65,12 +65,12 @@ QtWidgetParameterFactory::CreateQtWidget( Parameter* param, QtWidgetModel* model { QWidget* widget = 0; - typedef QtWidgetParameterGenericFactory<EmptyParameter, QtWidgetEmptyParameter> EmptyWidgetFactory; - typedef QtWidgetParameterGenericFactory<IntParameter, QtWidgetIntParameter> IntWidgetFactory; - typedef QtWidgetParameterGenericFactory<FloatParameter, QtWidgetFloatParameter> FloatWidgetFactory; - typedef QtWidgetParameterGenericFactory<StringParameter, QtWidgetStringParameter> StringWidgetFactory; - typedef QtWidgetParameterGenericFactory<ChoiceParameter, QtWidgetChoiceParameter> ChoiceWidgetFactory; - typedef QtWidgetParameterGenericFactory<ParameterList, QtWidgetParameterGroup> GroupWidgetFactory; + typedef QtWidgetParameterGenericFactory<EmptyParameter, QtWidgetEmptyParameter> EmptyWidgetFactory; + typedef QtWidgetParameterGenericFactory<IntParameter, QtWidgetIntParameter> IntWidgetFactory; + typedef QtWidgetParameterGenericFactory<FloatParameter, QtWidgetFloatParameter> FloatWidgetFactory; + typedef QtWidgetParameterGenericFactory<StringParameter, QtWidgetStringParameter> StringWidgetFactory; + typedef QtWidgetParameterGenericFactory<ChoiceParameter, QtWidgetChoiceParameter> ChoiceWidgetFactory; + typedef QtWidgetParameterGenericFactory<ParameterGroup, QtWidgetParameterGroup> GroupWidgetFactory; if ( EmptyWidgetFactory::CanCreate(param) ) { diff --git a/Code/Wrappers/QtWidget/otbWrapperQtWidgetParameterGroup.cxx b/Code/Wrappers/QtWidget/otbWrapperQtWidgetParameterGroup.cxx index 83375bc01605160b8392416c6315d5410968961e..db7757d53440256e7bbc26377cadfd0562990954 100644 --- a/Code/Wrappers/QtWidget/otbWrapperQtWidgetParameterGroup.cxx +++ b/Code/Wrappers/QtWidget/otbWrapperQtWidgetParameterGroup.cxx @@ -24,7 +24,7 @@ namespace otb namespace Wrapper { -QtWidgetParameterGroup::QtWidgetParameterGroup(ParameterList::Pointer paramList, QtWidgetModel* m) +QtWidgetParameterGroup::QtWidgetParameterGroup(ParameterGroup::Pointer paramList, QtWidgetModel* m) : QtWidgetParameterBase(m), m_ParamList(paramList) { diff --git a/Code/Wrappers/QtWidget/otbWrapperQtWidgetParameterGroup.h b/Code/Wrappers/QtWidget/otbWrapperQtWidgetParameterGroup.h index 72fe9e0f4d28737b19b8cb32aadf67840c37bef1..81e4621e847c35ea1a81b49a8f7d5715178b3e14 100644 --- a/Code/Wrappers/QtWidget/otbWrapperQtWidgetParameterGroup.h +++ b/Code/Wrappers/QtWidget/otbWrapperQtWidgetParameterGroup.h @@ -19,7 +19,7 @@ #define __otbWrapperQtWidgetParameterGroup_h #include <QtGui> -#include "otbWrapperParameterList.h" +#include "otbWrapperParameterGroup.h" #include "otbWrapperQtWidgetParameterBase.h" namespace otb @@ -34,7 +34,7 @@ class QtWidgetParameterGroup : public QtWidgetParameterBase { Q_OBJECT public: - QtWidgetParameterGroup(ParameterList::Pointer, QtWidgetModel*); + QtWidgetParameterGroup(ParameterGroup::Pointer, QtWidgetModel*); virtual ~QtWidgetParameterGroup(); private: @@ -43,7 +43,7 @@ private: void CreateWidget(); - ParameterList::Pointer m_ParamList; + ParameterGroup::Pointer m_ParamList; }; diff --git a/Example/otbAddition.cxx b/Example/otbAddition.cxx index 6e875d7736466eaab02ffb671d00166b034fc31f..37a7cb499d1ca63316aaa4c2a3fcd011ea286046 100644 --- a/Example/otbAddition.cxx +++ b/Example/otbAddition.cxx @@ -36,7 +36,7 @@ Addition::~Addition() void Addition::DoCreateParameters() { std::cout << "Addition::DoCreateParameters" << std::endl; - ParameterList* params = GetParameterList(); + ParameterGroup* params = GetParameterList(); otb::Wrapper::FloatParameter::Pointer a = otb::Wrapper::FloatParameter::New(); otb::Wrapper::FloatParameter::Pointer b = otb::Wrapper::FloatParameter::New(); @@ -53,7 +53,7 @@ void Addition::DoExecute() { std::cout << "Addition::DoExecute" << std::endl; - ParameterList* params = GetParameterList(); + ParameterGroup* params = GetParameterList(); otb::Wrapper::FloatParameter* pa = dynamic_cast<otb::Wrapper::FloatParameter*>(params->GetParameter(0).GetPointer()); boost::any avalue = pa->GetAnyValue(); diff --git a/Testing/CMakeLists.txt b/Testing/CMakeLists.txt index 3177d6867200d8151f942e6852aa87862ad84c6d..5e3f8f4c9fff681f0c96d383d8f809dad4ce5d9a 100644 --- a/Testing/CMakeLists.txt +++ b/Testing/CMakeLists.txt @@ -1,88 +1,2 @@ -SET(CXX_TEST_PATH ${EXECUTABLE_OUTPUT_PATH}) - -IF(WIN32) - ADD_DEFINITIONS(-DWIN32) -ENDIF(WIN32) - -SET(OTB_WRAPPER_TESTS ${CXX_TEST_PATH}/otbWrapperTests) -SET(OTB_WRAPPER_QT_TESTS ${CXX_TEST_PATH}/otbWrapperQtWidgetTests) - -ADD_TEST(owTuParameterNew ${OTB_WRAPPER_TESTS} - otbWrapperParameterNew - ) - -ADD_TEST(owTvParameter ${OTB_WRAPPER_TESTS} - otbWrapperParameterTest1 - "param1" - ) - - -# NumericalParameter class test -ADD_TEST(owTuNumericalParameter ${OTB_WRAPPER_TESTS} - otbWrapperNumericalParameterNew - ) - -# EmptyParameter class test -ADD_TEST(owTuEmptyParameter ${OTB_WRAPPER_TESTS} - otbWrapperEmptyParameterNew - ) - -# NumericalParameter class test -ADD_TEST(owTuNumericalParameter ${OTB_WRAPPER_TESTS} - otbWrapperNumericalParameterNew - ) - -ADD_TEST(owTvNumericalParameter ${OTB_WRAPPER_TESTS} - otbWrapperNumericalParameterTest1 - 42.42 - "mykey" - "my description" - ) - -# Input Image parameter class test -ADD_TEST(owTuInputImageParameter ${OTB_WRAPPER_TESTS} - otbWrapperInputImageParameterNew - ) - -# Application class test -ADD_TEST(owTuApplication ${OTB_WRAPPER_TESTS} - otbWrapperApplicationNew - ) - -IF(OTB_USE_QT) -ADD_TEST(owTvQtWidgetParameterFactory ${OTB_WRAPPER_QT_TESTS} - otbWrapperQtWidgetParameterFactory -) - -ADD_TEST(owTvQtWidgetParameterGroup ${OTB_WRAPPER_QT_TESTS} - otbWrapperQtWidgetParameterGroup -) - -ENDIF(OTB_USE_QT) - -# ----------------Source files CXX ----------------------------------- - -SET(Wrapper_SRCS -otbWrapperTests.cxx -otbWrapperParameterTest.cxx -otbWrapperNumericalParameterTest.cxx -otbWrapperEmptyParameterTest.cxx -otbWrapperApplicationTest.cxx -otbWrapperParameterListTest.cxx -otbWrapperInputImageParameterTest.cxx -) - -ADD_EXECUTABLE(otbWrapperTests ${Wrapper_SRCS}) -TARGET_LINK_LIBRARIES(otbWrapperTests OTBIO OTBCommon ITKIO ITKCommon OTBTesting OTBWrapperCore) - -IF(OTB_USE_QT) - -SET(WrapperQtWidget_SRCS -otbWrapperQtWidgetTests.cxx -otbWrapperQtWidgetParameterFactory.cxx -) - -ADD_EXECUTABLE(otbWrapperQtWidgetTests ${WrapperQtWidget_SRCS}) -TARGET_LINK_LIBRARIES(otbWrapperQtWidgetTests OTBIO OTBCommon ITKIO ITKCommon OTBTesting OTBWrapperCore OTBWrapperQtWidget) - -ENDIF(OTB_USE_QT) +add_subdirectory(Core) +add_subdirectory(QtWidget) \ No newline at end of file diff --git a/Testing/Core/CMakeLists.txt b/Testing/Core/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..be88fea11095736ca00821ce8f0934747d78b150 --- /dev/null +++ b/Testing/Core/CMakeLists.txt @@ -0,0 +1,73 @@ +SET(CXX_TEST_PATH ${EXECUTABLE_OUTPUT_PATH}) + +IF(WIN32) + ADD_DEFINITIONS(-DWIN32) +ENDIF(WIN32) + +SET(OTB_WRAPPER_TESTS ${CXX_TEST_PATH}/otbWrapperTests) + + +ADD_TEST(owTuParameterNew ${OTB_WRAPPER_TESTS} + otbWrapperParameterNew + ) + +ADD_TEST(owTvParameter ${OTB_WRAPPER_TESTS} + otbWrapperParameterTest1 + "param1" + ) + + +# NumericalParameter class test +ADD_TEST(owTuNumericalParameter ${OTB_WRAPPER_TESTS} + otbWrapperNumericalParameterNew + ) + +# EmptyParameter class test +ADD_TEST(owTuEmptyParameter ${OTB_WRAPPER_TESTS} + otbWrapperEmptyParameterNew + ) + +# NumericalParameter class test +ADD_TEST(owTuNumericalParameter ${OTB_WRAPPER_TESTS} + otbWrapperNumericalParameterNew + ) + +ADD_TEST(owTvNumericalParameter ${OTB_WRAPPER_TESTS} + otbWrapperNumericalParameterTest1 + 42.42 + "mykey" + "my description" + ) + +# Input Image parameter class test +ADD_TEST(owTuInputImageParameter ${OTB_WRAPPER_TESTS} + otbWrapperInputImageParameterNew + ) + +# Input VectorData parameter class test +ADD_TEST(owTuInputVectorDataParameter ${OTB_WRAPPER_TESTS} + otbWrapperInputVectorDataParameterNew + ) + +# Application class test +ADD_TEST(owTuApplication ${OTB_WRAPPER_TESTS} + otbWrapperApplicationNew + ) + + +# ----------------Source files CXX ----------------------------------- + +SET(Wrapper_SRCS +otbWrapperCoreTests.cxx + +otbWrapperParameterTest.cxx +otbWrapperNumericalParameterTest.cxx +otbWrapperEmptyParameterTest.cxx +otbWrapperApplicationTest.cxx +otbWrapperParameterListTest.cxx +otbWrapperInputImageParameterTest.cxx +otbWrapperInputVectorDataParameterTest.cxx +) + +ADD_EXECUTABLE(otbWrapperTests ${Wrapper_SRCS}) +TARGET_LINK_LIBRARIES(otbWrapperTests OTBIO OTBCommon ITKIO ITKCommon OTBTesting OTBWrapperCore) diff --git a/Testing/otbWrapperApplicationTest.cxx b/Testing/Core/otbWrapperApplicationTest.cxx similarity index 100% rename from Testing/otbWrapperApplicationTest.cxx rename to Testing/Core/otbWrapperApplicationTest.cxx diff --git a/Testing/otbWrapperTests.cxx b/Testing/Core/otbWrapperCoreTests.cxx similarity index 95% rename from Testing/otbWrapperTests.cxx rename to Testing/Core/otbWrapperCoreTests.cxx index 92203eca4d873d74234296b4f3e900e04c0ce6ce..50b6329ca85f8fe5d1eebc2df460886637c7ffbd 100644 --- a/Testing/otbWrapperTests.cxx +++ b/Testing/Core/otbWrapperCoreTests.cxx @@ -34,4 +34,5 @@ void RegisterTests() REGISTER_TEST(otbWrapperApplicationNew); REGISTER_TEST(otbWrapperParameterListNew); REGISTER_TEST(otbWrapperInputImageParameterNew); + REGISTER_TEST(otbWrapperInputVectorDataParameterNew); } diff --git a/Testing/otbWrapperEmptyParameterTest.cxx b/Testing/Core/otbWrapperEmptyParameterTest.cxx similarity index 100% rename from Testing/otbWrapperEmptyParameterTest.cxx rename to Testing/Core/otbWrapperEmptyParameterTest.cxx diff --git a/Testing/otbWrapperInputImageParameterTest.cxx b/Testing/Core/otbWrapperInputImageParameterTest.cxx similarity index 100% rename from Testing/otbWrapperInputImageParameterTest.cxx rename to Testing/Core/otbWrapperInputImageParameterTest.cxx diff --git a/Testing/Core/otbWrapperInputVectorDataParameterTest.cxx b/Testing/Core/otbWrapperInputVectorDataParameterTest.cxx new file mode 100644 index 0000000000000000000000000000000000000000..f7cb0e7d299def0224bba0892cc9bc02c330375d --- /dev/null +++ b/Testing/Core/otbWrapperInputVectorDataParameterTest.cxx @@ -0,0 +1,30 @@ +/*========================================================================= + + Program: ORFEO Toolbox + Language: C++ + Date: $Date$ + Version: $Revision$ + + + Copyright (c) Centre National d'Etudes Spatiales. All rights reserved. + See OTBCopyright.txt for details. + + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#if defined(_MSC_VER) +#pragma warning ( disable : 4786 ) +#endif + +#include "otbWrapperInputVectorDataParameter.h" + +int otbWrapperInputVectorDataParameterNew(int argc, char* argv[]) +{ + typedef otb::Wrapper::InputVectorDataParameter InputVectorDataParameterType; + InputVectorDataParameterType::Pointer parameter = InputVectorDataParameterType::New(); + + return EXIT_SUCCESS; +} diff --git a/Testing/otbWrapperNumericalParameterTest.cxx b/Testing/Core/otbWrapperNumericalParameterTest.cxx similarity index 100% rename from Testing/otbWrapperNumericalParameterTest.cxx rename to Testing/Core/otbWrapperNumericalParameterTest.cxx diff --git a/Testing/otbWrapperParameterListTest.cxx b/Testing/Core/otbWrapperParameterListTest.cxx similarity index 82% rename from Testing/otbWrapperParameterListTest.cxx rename to Testing/Core/otbWrapperParameterListTest.cxx index f74a32a509ff0ea43ba4597a1c5b91f9d67823a1..412c0fc1e42f3f44c4ab7c71a2d6af5624d04d7c 100644 --- a/Testing/otbWrapperParameterListTest.cxx +++ b/Testing/Core/otbWrapperParameterListTest.cxx @@ -19,12 +19,12 @@ #pragma warning ( disable : 4786 ) #endif -#include "otbWrapperParameterList.h" +#include "otbWrapperParameterGroup.h" int otbWrapperParameterListNew(int argc, char* argv[]) { - typedef otb::Wrapper::ParameterList ParameterListType; - ParameterListType::Pointer parameters = ParameterListType::New(); + using otb::Wrapper::ParameterGroup; + ParameterGroup::Pointer parameters = ParameterGroup::New(); //std::cout << parameter << std::endl; diff --git a/Testing/otbWrapperParameterTest.cxx b/Testing/Core/otbWrapperParameterTest.cxx similarity index 100% rename from Testing/otbWrapperParameterTest.cxx rename to Testing/Core/otbWrapperParameterTest.cxx diff --git a/Testing/QtWidget/CMakeLists.txt b/Testing/QtWidget/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..5cb6767c3d62042cb4d6c1c8b4b921753fc621a4 --- /dev/null +++ b/Testing/QtWidget/CMakeLists.txt @@ -0,0 +1,25 @@ +SET(CXX_TEST_PATH ${EXECUTABLE_OUTPUT_PATH}) + +IF(OTB_USE_QT) + +SET(OTB_WRAPPER_QTWIDGET_TESTS ${CXX_TEST_PATH}/otbWrapperQtWidgetTests) + +SET(WrapperQtWidget_SRCS + otbWrapperQtWidgetTests.cxx + otbWrapperQtWidgetParameterFactory.cxx) + +ADD_EXECUTABLE(otbWrapperQtWidgetTests ${WrapperQtWidget_SRCS}) +TARGET_LINK_LIBRARIES(otbWrapperQtWidgetTests + OTBIO + OTBCommon + OTBTesting + OTBWrapperCore + OTBWrapperQtWidget) + +ADD_TEST(owTvQtWidgetParameterFactory ${OTB_WRAPPER_QTWIDGET_TESTS} + otbWrapperQtWidgetParameterFactory) + +ADD_TEST(owTvQtWidgetParameterGroup ${OTB_WRAPPER_QTWIDGET_TESTS} + otbWrapperQtWidgetParameterGroup) + +ENDIF(OTB_USE_QT) diff --git a/Testing/otbWrapperQtWidgetParameterFactory.cxx b/Testing/QtWidget/otbWrapperQtWidgetParameterFactory.cxx similarity index 90% rename from Testing/otbWrapperQtWidgetParameterFactory.cxx rename to Testing/QtWidget/otbWrapperQtWidgetParameterFactory.cxx index f8ad613e9ac6b25f3046a585d67afee3ff5006de..7e24972af9c81c917d43938fc480e3444209a98d 100644 --- a/Testing/otbWrapperQtWidgetParameterFactory.cxx +++ b/Testing/QtWidget/otbWrapperQtWidgetParameterFactory.cxx @@ -24,12 +24,11 @@ #include "otbWrapperNumericalParameter.h" #include "otbWrapperChoiceParameter.h" #include "otbWrapperStringParameter.h" -#include "otbWrapperQtWidgetParameterGroup.h" +#include "otbWrapperParameterGroup.h" #include "otbWrapperQtWidgetModel.h" - - +#include "otbWrapperQtWidgetParameterGroup.h" namespace otb { @@ -190,7 +189,7 @@ int otbWrapperQtWidgetParameterGroup(int argc, char* argv[]) stringParam->SetKey("string"); stringParam->SetValue("test value"); - otb::Wrapper::ParameterList::Pointer list = otb::Wrapper::ParameterList::New(); + otb::Wrapper::ParameterGroup::Pointer list = otb::Wrapper::ParameterGroup::New(); list->AddParameter(otb::Wrapper::Parameter::Pointer(intParam.GetPointer())); list->AddParameter(otb::Wrapper::Parameter::Pointer(floatParam.GetPointer())); list->AddParameter(otb::Wrapper::Parameter::Pointer(emptyParam.GetPointer())); @@ -234,19 +233,19 @@ int otbWrapperQtWidgetParameterGroup(int argc, char* argv[]) stringParam2->SetKey("string2"); stringParam2->SetValue("test value"); - otb::Wrapper::ParameterList::Pointer list2 = otb::Wrapper::ParameterList::New(); - list2->SetName("Group parameter"); - list2->SetDescription("This is a group parameter"); - list2->SetKey("group2"); + otb::Wrapper::ParameterGroup::Pointer group2 = otb::Wrapper::ParameterGroup::New(); + group2->SetName("Group parameter"); + group2->SetDescription("This is a group parameter"); + group2->SetKey("group2"); - list2->AddParameter(otb::Wrapper::Parameter::Pointer(intParam2.GetPointer())); - list2->AddParameter(otb::Wrapper::Parameter::Pointer(floatParam2.GetPointer())); - list2->AddParameter(otb::Wrapper::Parameter::Pointer(emptyParam2.GetPointer())); - list2->AddParameter(otb::Wrapper::Parameter::Pointer(choiceParam2.GetPointer())); - list2->AddParameter(otb::Wrapper::Parameter::Pointer(stringParam2.GetPointer())); - list2->AddParameter(otb::Wrapper::Parameter::Pointer(list.GetPointer())); + group2->AddParameter(otb::Wrapper::Parameter::Pointer(intParam2.GetPointer())); + group2->AddParameter(otb::Wrapper::Parameter::Pointer(floatParam2.GetPointer())); + group2->AddParameter(otb::Wrapper::Parameter::Pointer(emptyParam2.GetPointer())); + group2->AddParameter(otb::Wrapper::Parameter::Pointer(choiceParam2.GetPointer())); + group2->AddParameter(otb::Wrapper::Parameter::Pointer(stringParam2.GetPointer())); + group2->AddParameter(otb::Wrapper::Parameter::Pointer(list.GetPointer())); - QWidget * group = new otb::Wrapper::QtWidgetParameterGroup(list2, model); + QWidget * group = new otb::Wrapper::QtWidgetParameterGroup(group2, model); if(group) { diff --git a/Testing/otbWrapperQtWidgetTests.cxx b/Testing/QtWidget/otbWrapperQtWidgetTests.cxx similarity index 100% rename from Testing/otbWrapperQtWidgetTests.cxx rename to Testing/QtWidget/otbWrapperQtWidgetTests.cxx