]> Creatis software - clitk.git/commitdiff
Merge branch 'master' of /home/dsarrut/clitk3.server
authormpech <maxime.pech@insa-lyon.fr>
Wed, 18 May 2011 09:08:49 +0000 (11:08 +0200)
committermpech <maxime.pech@insa-lyon.fr>
Wed, 18 May 2011 09:08:49 +0000 (11:08 +0200)
tests/CMakeLists.txt
tests/vv/CMakeLists.txt
vv/qt_ui/vvMainWindow.ui
vv/qt_ui/vvRegisterForm.ui
vv/vvMainWindow.cxx
vv/vvMainWindow.h
vv/vvRegisterForm.cxx

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 d700b0c379f58fa6dcf65c3a281defd1c8d6b63d..c32cdf9586f6f4d8715bee4deb7d7e6a87ddbf58 100644 (file)
      <height>121</height>
     </rect>
    </property>
+   <property name="contextMenuPolicy">
+    <enum>Qt::DefaultContextMenu</enum>
+   </property>
+   <property name="autoFillBackground">
+    <bool>false</bool>
+   </property>
+   <property name="frameShape">
+    <enum>QFrame::NoFrame</enum>
+   </property>
+   <property name="frameShadow">
+    <enum>QFrame::Plain</enum>
+   </property>
    <property name="html">
     <string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
 &lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
index bb23b79a31a4fe1515b943efbba306942e2b7f52..303efebbaf8aafe2e41f76201f5eab18972c50cb 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();
index 839887fd0d84b34dc4ddc025e0b14fd03b0c8958..93d16e490c9d6d4bef50ad7f658d519db6730a7f 100644 (file)
@@ -20,6 +20,7 @@
 #include "vvRegisterForm.h"
 #include <QNetworkRequest>
 #include <QDir>
+#include <QPalette>
 #include "common/globals.h"
 #include "vvCommon.h"
 #include "vvUtils.h"
@@ -27,6 +28,7 @@
 vvRegisterForm::vvRegisterForm(QUrl url, QString path, QSettings::Format format):url(url), settings(path, format){ 
   manager = new QNetworkAccessManager(this);
   setupUi(this);
+  textBrowser->viewport()->setAutoFillBackground(false);
 }
 
 void vvRegisterForm::sendData(){