]> Creatis software - clitk.git/commitdiff
tests are back
authormpech <maxime.pech@insa-lyon.fr>
Wed, 18 May 2011 08:38:31 +0000 (10:38 +0200)
committermpech <maxime.pech@insa-lyon.fr>
Wed, 18 May 2011 08:38:31 +0000 (10:38 +0200)
new entry for registering in the help menubar

tests/CMakeLists.txt
tests/vv/CMakeLists.txt
vv/qt_ui/vvMainWindow.ui
vv/vvMainWindow.cxx
vv/vvMainWindow.h

index 59a01878ef3210de7d3bc7070ded39dcb4670904..b85b146e75a45f58379761e693dbd0cbeca1a327 100644 (file)
@@ -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/)
 
index 492e8f7c84a605a00a4082fa8b9df91307c593b1..24e1d3a9c0f2381714192bff1075ef2d9d5f5823 100644 (file)
@@ -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})
index 5560a9e063b1f7b32fb1c9c31f7a89485961e586..7215e621aaf9d7e83bc6ec336c9a38ae09a4e057 100644 (file)
     </property>
     <addaction name="actionNavigation_Help"/>
     <addaction name="actionDocumentation"/>
+    <addaction name="actionRegister_vv"/>
    </widget>
    <widget class="QMenu" name="menuOverlay">
     <property name="title">
     <string>Experimental...</string>
    </property>
   </action>
+  <action name="actionRegister_vv">
+   <property name="text">
+    <string>Register vv</string>
+   </property>
+  </action>
  </widget>
  <customwidgets>
   <customwidget>
index c82e77f29d9fd293762919635265f9723e632ad0..21074a8ea71f4c58a6980411349f9ca1e4f78e13 100644 (file)
@@ -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()
 {
index 22e2b55dccc3f77fca48f77b6f434c2207735f61..35a5d90adbf2f2ca0ce3a4b6be77e0f60d4f5475 100644 (file)
@@ -87,6 +87,7 @@ public slots:
   void ImageInfoChanged();
   void ShowHelpDialog();
   void ShowDocumentation();
+  void PopupRegisterForm(bool checkCanPush=false);
   void ComputeDeformableRegistration();
   void WarpImage();
   void ChangeViewMode();