From: mpech Date: Wed, 18 May 2011 08:38:31 +0000 (+0200) Subject: tests are back X-Git-Tag: v1.2.1~22 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=9f4f79e593574189f650f99115e692adb9a4a5bf;p=clitk.git tests are back new entry for registering in the help menubar --- diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 59a0187..b85b146 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -20,7 +20,7 @@ set(GTEST_DIR ${ITK_DIR}/../gtest/ CACHE STRING "gtestDir") #if windows gtestLibName=gtest.dll else libgtest.a set(gtestLibName libgtest.a) set(GTEST_LIB ${GTEST_DIR}/build/${gtestLibName}) -message(gtestlib name = ${GTEST_LIB}) +#message(gtestlib name = ${GTEST_LIB}) set_property(TARGET gtest PROPERTY IMPORTED_LOCATION "${GTEST_LIB}") include_directories(${GTEST_DIR}/include/) diff --git a/tests/vv/CMakeLists.txt b/tests/vv/CMakeLists.txt index 492e8f7..24e1d3a 100644 --- a/tests/vv/CMakeLists.txt +++ b/tests/vv/CMakeLists.txt @@ -15,7 +15,7 @@ include_directories( FILE(GLOB srcs *.cxx) ADD_EXECUTABLE(vvTest ${srcs}) -target_link_libraries(vvTest vvLib ${vvExternalLibs} gtest) +target_link_libraries(vvTest vvLib gtest) # Add all tests found in the source code, calling the executable to run them add_google_tests ( ${EXECUTABLE_OUTPUT_PATH}/vvTest ${srcs}) diff --git a/vv/qt_ui/vvMainWindow.ui b/vv/qt_ui/vvMainWindow.ui index 5560a9e..7215e62 100644 --- a/vv/qt_ui/vvMainWindow.ui +++ b/vv/qt_ui/vvMainWindow.ui @@ -811,6 +811,7 @@ + @@ -1101,6 +1102,11 @@ Experimental... + + + Register vv + + diff --git a/vv/vvMainWindow.cxx b/vv/vvMainWindow.cxx index c82e77f..21074a8 100644 --- a/vv/vvMainWindow.cxx +++ b/vv/vvMainWindow.cxx @@ -252,6 +252,7 @@ vvMainWindow::vvMainWindow():vvMainWindowBase() connect(actionAdd_VF_to_current_Image,SIGNAL(triggered()),this,SLOT(OpenField())); connect(actionNavigation_Help,SIGNAL(triggered()),this,SLOT(ShowHelpDialog())); connect(actionDocumentation,SIGNAL(triggered()),this,SLOT(ShowDocumentation())); + connect(actionRegister_vv,SIGNAL(triggered()),this,SLOT(PopupRegisterForm())); /////////////////////////////////////////////// connect(actionSegmentation,SIGNAL(triggered()),this,SLOT(SegmentationOnCurrentImage())); @@ -331,11 +332,7 @@ vvMainWindow::vvMainWindow():vvMainWindowBase() void vvMainWindow::show(){ vvMainWindowBase::show(); - vvRegisterForm* registerForm = new vvRegisterForm(QUrl("http://www.creatis.insa-lyon.fr/~dsarrut/vvregister/write.php"), getVVSettingsPath(), getSettingsOptionFormat()); - if(registerForm->canPush()){ - registerForm->show(); - registerForm->acquitPushed();//too bad if there is not internet connection anymore. - } + PopupRegisterForm(true); } //------------------------------------------------------------------------------ void vvMainWindow::UpdateMemoryUsage() @@ -1217,6 +1214,23 @@ void vvMainWindow::ShowDocumentation() { documentation->show(); } +//------------------------------------------------------------------------------ + +//------------------------------------------------------------------------------ +void vvMainWindow::PopupRegisterForm(bool checkCanPush) +{ + vvRegisterForm* registerForm = new vvRegisterForm(QUrl("http://www.creatis.insa-lyon.fr/~dsarrut/vvregister/write.php"), getVVSettingsPath(), getSettingsOptionFormat()); + if(!checkCanPush){ + registerForm->show(); + }else{ + if(registerForm->canPush()){ + registerForm->show(); + registerForm->acquitPushed();//too bad if there is not internet connection anymore. + } + } +} +//------------------------------------------------------------------------------ + //------------------------------------------------------------------------------ void vvMainWindow::ShowHelpDialog() { diff --git a/vv/vvMainWindow.h b/vv/vvMainWindow.h index 22e2b55..35a5d90 100644 --- a/vv/vvMainWindow.h +++ b/vv/vvMainWindow.h @@ -87,6 +87,7 @@ public slots: void ImageInfoChanged(); void ShowHelpDialog(); void ShowDocumentation(); + void PopupRegisterForm(bool checkCanPush=false); void ComputeDeformableRegistration(); void WarpImage(); void ChangeViewMode();