Commit 1847afc6 authored by Otmane Lahlou's avatar Otmane Lahlou

ADD: test for TreeWidget fill

parent 588c8a6a
......@@ -23,6 +23,7 @@ include_directories(
set(Common_SRCS
mvdApplicationsToolBoxTest.cxx
mvdApplicationsBrowserTest.cxx
mvdFillToolBoxWidgetTreeTest.cxx
)
#-------------- Monteverdi Common Tests ---------------------------------
......@@ -36,6 +37,13 @@ add_test(apTvMonteverdi2ApplicationsBrowser ${Common_TESTS}
${OTB_DIR}/bin
)
# Fill ToolBox algorithms tree
add_test(apTvMonteverdi2FillToolBoxTree ${Common_TESTS}
mvdFillToolBoxWidgetTreeTest
${OTB_DIR}/bin
)
add_executable(mvdCommonTests mvdCommonTests.cxx ${Common_SRCS})
target_link_libraries(mvdCommonTests Monteverdi2_Common OTBTesting)
......
......@@ -28,4 +28,5 @@ void RegisterTests()
{
REGISTER_TEST(mvdApplicationsToolBoxTest);
REGISTER_TEST(mvdApplicationsBrowserTest);
REGISTER_TEST(mvdFillToolBoxWidgetTreeTest);
}
/*=========================================================================
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.
=========================================================================*/
//
// Configuration include.
//// Included at first position before any other ones.
#include "ConfigureMonteverdi2.h"
//
// Qt includes (sorted by alphabetic order)
//// Must be included before system/custom includes.
//
// System includes (sorted by alphabetic order)
// Monteverdi includes (sorted by alphabetic order)
#include "mvdApplicationsToolBox.h"
#include "mvdApplicationsBrowser.h"
int mvdFillToolBoxWidgetTreeTest(int argc, char* argv[])
{
//
// instanciate the algorithms toolbox widget
QApplication app(argc, argv);
mvd::ApplicationsToolBox * appToolBox = new mvd::ApplicationsToolBox();
//
// instanciate applications browser
mvd::ApplicationsBrowser * browser = new mvd::ApplicationsBrowser();
//
// connections
QObject::connect(browser,
SIGNAL( AvailableApplicationsTagsChanged(const ApplicationsTagContainer& ) ),
appToolBox,
SLOT( OnAvailableApplicationsTagsChanged(const ApplicationsTagContainer& ) )
);
//
// is search path set
if (argc > 1)
{
browser->SetAutoLoadPath(argv[1]);
}
//
// get the algorithms/tags map container in the widget
browser->SearchAvailableApplicationsTags();
//
// show the application for a while
appToolBox->show();
QTimer::singleShot(1000, &app, SLOT(quit()));
return app.exec();
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment