From 9f4f79e593574189f650f99115e692adb9a4a5bf Mon Sep 17 00:00:00 2001 From: mpech Date: Wed, 18 May 2011 10:38:31 +0200 Subject: [PATCH] tests are back new entry for registering in the help menubar --- tests/CMakeLists.txt | 2 +- tests/vv/CMakeLists.txt | 2 +- vv/qt_ui/vvMainWindow.ui | 6 ++++++ vv/vvMainWindow.cxx | 24 +++++++++++++++++++----- vv/vvMainWindow.h | 1 + 5 files changed, 28 insertions(+), 7 deletions(-) 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(); -- 2.47.1