]> SALOME platform Git repositories - modules/hydro.git/commitdiff
Salome HOME
New labels for coordinates are added into Import image dialog. Mode labels are updated.
authorrkv <rkv@opencascade.com>
Tue, 22 Oct 2013 09:06:00 +0000 (09:06 +0000)
committerrkv <rkv@opencascade.com>
Tue, 22 Oct 2013 09:06:00 +0000 (09:06 +0000)
src/HYDROData/CMakeLists.txt
src/HYDROGUI/CMakeLists.txt
src/HYDROGUI/HYDROGUI_ImportImageDlg.cxx
src/HYDROGUI/resources/HYDROGUI_msg_en.ts
src/HYDROGUI/resources/LightApp.xml

index 566afc080d14a214e378f96ccafa95c15f597434..fed28edf8d0a4f858c3241a3e17a87bb6805212d 100644 (file)
@@ -50,10 +50,11 @@ include_directories(
   ${CAS_INCLUDE_DIRS}
   ${QT_INCLUDES}
   ${CMAKE_CURRENT_SOURCE_DIR}
+  ${GUI_ROOT_DIR}/include/salome
 )
 
 add_library(HYDROData SHARED ${PROJECT_SOURCES} ${PROJECT_HEADERS})
-target_link_libraries(HYDROData ${CAS_OCAF} ${CAS_OCAFVIS} ${CAS_TKG3d} ${CAS_TKGeomBase} ${CAS_TKGeomAlgo} ${QT_LIBRARIES} ${ImageComposer})
+target_link_libraries(HYDROData ${CAS_OCAF} ${CAS_OCAFVIS} ${CAS_TKG3d} ${CAS_TKGeomBase} ${CAS_TKGeomAlgo} ${CAS_TKBrep} ${CAS_TKTopAlgo} ${QT_LIBRARIES} ${ImageComposer})
 
 set(PROJECT_LIBRARIES HYDROData)
 
index a92c80f11ff31c77d8ab5f623d0675731953575b..0a8e21c8c9bccb73c689d0ce489d73ee74542098 100644 (file)
@@ -118,7 +118,7 @@ include_directories(
 
 add_library(HYDROGUI SHARED ${PROJECT_SOURCES} ${PROJECT_HEADERS} ${PROJECT_HEADERS_MOC})
 target_link_libraries(HYDROGUI HYDROData 
-    ${CAS_TKV3d} ${CAS_TKTopAlgo} ${CAS_TKBRep}
+    ${CAS_TKV3d} ${CAS_TKTopAlgo} ${CAS_TKBrep} ${CAS_TKBO}
     ${LightApp} ${CAM} ${suit} ${qtx} ${ObjBrowser} ${GraphicsView} ${std} ${Event} ${OCCViewer}
     ${CurveCreator}
     )
index 795d099b6dba95c607b5443511bca09d128ff9a1..288e0a6051815f1ee7088c07566e4689646d798c 100644 (file)
@@ -96,13 +96,13 @@ HYDROGUI_ImportImageDlg::HYDROGUI_ImportImageDlg( HYDROGUI_Module* theModule, co
   aPainter.drawPixmap( 0, 0, anArrowPixmap );
   aPainter.end();
 
-  QRadioButton* aManualLambertBtn = new QRadioButton( tr( "MANUALLY_LAMBERT93" ), myTransformGroup );
   QRadioButton* aManualCartesianBtn = new QRadioButton( tr( "MANUALLY_CARTESIAN" ), myTransformGroup );
+  QRadioButton* aManualLambertBtn = new QRadioButton( tr( "MANUALLY_LAMBERT93" ), myTransformGroup );
   QRadioButton* aRefImageBtn = new QRadioButton( tr( "BY_REFERENCE_IMAGE" ), myTransformGroup );
 
   myModeGroup = new QButtonGroup( myTransformGroup );
-  myModeGroup->addButton( aManualLambertBtn, ManualLambert );
   myModeGroup->addButton( aManualCartesianBtn, ManualCartesian );
+  myModeGroup->addButton( aManualLambertBtn, ManualLambert );
   myModeGroup->addButton( aRefImageBtn, RefImage );
 
   myRefImage = new QComboBox( myTransformGroup );
@@ -110,8 +110,8 @@ HYDROGUI_ImportImageDlg::HYDROGUI_ImportImageDlg( HYDROGUI_Module* theModule, co
   QGridLayout* aModeLayout = new QGridLayout();
   aModeLayout->setMargin( 0 );
   aModeLayout->setSpacing( 5 );
-  aModeLayout->addWidget( aManualLambertBtn,   0, 0 );
-  aModeLayout->addWidget( aManualCartesianBtn, 1, 0 );
+  aModeLayout->addWidget( aManualCartesianBtn, 0, 0 );
+  aModeLayout->addWidget( aManualLambertBtn,   1, 0 );
   aModeLayout->addWidget( aRefImageBtn,        2, 0 );
   aModeLayout->addWidget( myRefImage,          2, 1 );
   aModeLayout->setColumnStretch( 1, 1 );
@@ -121,6 +121,26 @@ HYDROGUI_ImportImageDlg::HYDROGUI_ImportImageDlg( HYDROGUI_Module* theModule, co
   aTransformLayout->setSpacing( 5 );
   aTransformLayout->addLayout( aModeLayout, 0, 0, 1, 9 );
 
+  QLabel* aImageCSLabel = new QLabel( tr( "IMAGE_CS" ), myTransformGroup );
+  QLabel* aGeodesicLabel = new QLabel( "GEODESIC", myTransformGroup );
+  QLabel* aLambertLabel = new QLabel( "LAMBERT93", myTransformGroup );
+  QLabel* aRefImageLabel = new QLabel( "REFERENCE_IMAGE_CS", myTransformGroup );
+
+  aTransformLayout->addWidget( aImageCSLabel,  2, 1 );
+  aTransformLayout->addWidget( aGeodesicLabel, 2, 3, 1, 6 );
+  aTransformLayout->addWidget( aLambertLabel,  2, 3, 1, 6 );
+  aTransformLayout->addWidget( aRefImageLabel, 2, 3, 1, 6 );
+
+  connect( aManualCartesianBtn, SIGNAL( toggled( bool ) ), aGeodesicLabel, SLOT( setVisible ( bool ) ) );
+  connect( aManualCartesianBtn, SIGNAL( toggled( bool ) ), aLambertLabel, SLOT( setHidden ( bool ) ) );
+  connect( aManualCartesianBtn, SIGNAL( toggled( bool ) ), aRefImageLabel, SLOT( setHidden ( bool ) ) );
+  connect( aManualLambertBtn, SIGNAL( toggled( bool ) ), aLambertLabel, SLOT( setVisible ( bool ) ) );
+  connect( aManualLambertBtn, SIGNAL( toggled( bool ) ), aGeodesicLabel, SLOT( setHidden ( bool ) ) );
+  connect( aManualLambertBtn, SIGNAL( toggled( bool ) ), aRefImageLabel, SLOT( setHidden ( bool ) ) );
+  connect( aRefImageBtn, SIGNAL( toggled( bool ) ), aRefImageLabel, SLOT( setVisible ( bool ) ) );
+  connect( aRefImageBtn, SIGNAL( toggled( bool ) ), aGeodesicLabel, SLOT( setHidden ( bool ) ) );
+  connect( aRefImageBtn, SIGNAL( toggled( bool ) ), aLambertLabel, SLOT( setHidden ( bool ) ) );
+
   for( int aPointType = HYDROGUI_PrsImage::PointA;
        aPointType <= HYDROGUI_PrsImage::PointC; aPointType++ )
   {
@@ -166,7 +186,7 @@ HYDROGUI_ImportImageDlg::HYDROGUI_ImportImageDlg( HYDROGUI_Module* theModule, co
     QtxIntSpinBox* aRefPointX = new QtxIntSpinBox( 0, 0, 1, myTransformGroup ); // max is updated later
     QtxIntSpinBox* aRefPointY = new QtxIntSpinBox( 0, 0, 1, myTransformGroup ); // max is updated later
 
-    int aRow = 4 * aPointType + 2;
+    int aRow = 4 * aPointType + 3;
     aTransformLayout->addWidget( aPointBtn,        aRow,     0, 1, 9 );
 
     aTransformLayout->addWidget( aPointXLabel,     aRow + 1, 0 );
@@ -262,6 +282,9 @@ HYDROGUI_ImportImageDlg::HYDROGUI_ImportImageDlg( HYDROGUI_Module* theModule, co
 
 HYDROGUI_ImportImageDlg::~HYDROGUI_ImportImageDlg()
 {
+  delete myFileNameGroup;
+  delete myImageNameGroup;
+  delete myTransformGroup;
 }
 
 void HYDROGUI_ImportImageDlg::setIsEdit( const bool theIsEdit )
@@ -302,7 +325,7 @@ void HYDROGUI_ImportImageDlg::reset()
   myTransformGroup->setEnabled( false );
   myRefImage->clear();
 
-  setTransformationMode( ManualCartesian );
+  setTransformationMode( ManualLambert );
 
   myPrsPointDataList.clear();
 
index 356159ada3e392d6f6c56ff812f77e67346b2063..63f72ab8453d2166d2455da1e350e2c42a0478b0 100644 (file)
@@ -245,12 +245,28 @@ file cannot be correctly imported for a Bathymetry definition.</translation>
     </message>
     <message>
       <source>MANUALLY_CARTESIAN</source>
-      <translation>Manually input Cartesian coordinates</translation>
+      <translation>Manually input Geodesic coordinates</translation>
     </message>
     <message>
       <source>MANUALLY_LAMBERT93</source>
       <translation>Manually input Lambert93 coordinates</translation>
     </message>
+    <message>
+      <source>IMAGE_CS</source>
+      <translation>Image CS</translation>
+    </message>
+    <message>
+      <source>GEODESIC</source>
+      <translation>Geodesic</translation>
+    </message>
+    <message>
+      <source>LAMBERT93</source>
+      <translation>Lambert93</translation>
+    </message>
+    <message>
+      <source>REFERENCE_IMAGE_CS</source>
+      <translation>Reference Image CS</translation>
+    </message>
     <message>
       <source>NAME</source>
       <translation>Name</translation>
index 1e8658d7355c8e17f4e6eba1bf5bc9a04780cb18..884de34ce9e5d9e584eb4e0fe87db5f47be69dc0 100644 (file)
@@ -36,8 +36,8 @@
     <parameter name="translators" value="%P_msg_%L.qm|%P_icons.qm|%P_images.qm"/>
   </section>
   <section name="resources" >
-    <parameter value="${HYDRORes}" name="HYDRO" />
-    <parameter value="${HYDRORes}" name="HYDROGUI" />
+    <parameter value="${HYDRO_ROOT_DIR}/share/salome/resources/hydro" name="HYDRO" />
+    <parameter value="${HYDRO_ROOT_DIR}/share/salome/resources/hydro" name="HYDROGUI" />
     <parameter value="${GEOM_ROOT_DIR}/share/salome/resources/geom" name="GEOM"/>
   </section>
 </document>