]> SALOME platform Git repositories - modules/hydro.git/commitdiff
Salome HOME
Bug #61: title of group box create/edit section group box is always "Add element".
authormzn <mzn@opencascade.com>
Wed, 11 Dec 2013 14:25:01 +0000 (14:25 +0000)
committermzn <mzn@opencascade.com>
Wed, 11 Dec 2013 14:25:01 +0000 (14:25 +0000)
src/HYDROCurveCreator/CurveCreator_Widget.cxx
src/HYDROCurveCreator/CurveCreator_Widget.h
src/HYDROGUI/HYDROGUI_PolylineDlg.cxx
src/HYDROGUI/HYDROGUI_PolylineDlg.h
src/HYDROGUI/HYDROGUI_ProfileDlg.cxx
src/HYDROGUI/HYDROGUI_ProfileDlg.h
src/HYDROGUI/resources/HYDROGUI_msg_en.ts

index 343b1c248243abe9674381f6642121faa7d4ef46..c97f87c4bef9278f73c27021a05155d11ce11909 100644 (file)
@@ -513,7 +513,7 @@ void CurveCreator_Widget::onNewSection()
   myNewSectionEditor->setEditMode(false);
   QString aSectName = QString( CurveCreator_UtilsICurve::getUniqSectionName( myCurve ).c_str() );
   myNewSectionEditor->setSectionParameters(aSectName, true, CurveCreator::Polyline );
-  emit subOperationStarted( myNewSectionEditor );
+  emit subOperationStarted( myNewSectionEditor, false );
 }
 
 void CurveCreator_Widget::onAddNewSection()
@@ -635,7 +635,7 @@ void CurveCreator_Widget::onEditSection( int theSection )
   myNewSectionEditor->setEditMode(true);
   myNewSectionEditor->setSectionParameters( aSectName, isClosed, aType );
 
-  emit subOperationStarted( myNewSectionEditor );
+  emit subOperationStarted( myNewSectionEditor, true );
 }
 
 void CurveCreator_Widget::onModifySection()
index 57d0d9079bb0256e62c2ed049a59e728e85734e9..ae382682d7f84057a6c93f8619d3e4f1cfcfc2e8 100644 (file)
@@ -85,7 +85,7 @@ public:
 
 signals:
   void selectionChanged();
-  void subOperationStarted( QWidget* );
+  void subOperationStarted( QWidget*, bool );
   void subOperationFinished( QWidget* );
 
 public slots:
index a643eb3433010a8a48191abd18be994d1a659b5c..6e5f2b8935fd8310fc6b11a5771bb1c0fecc1376 100755 (executable)
@@ -55,7 +55,7 @@ HYDROGUI_PolylineDlg::HYDROGUI_PolylineDlg( HYDROGUI_Module* theModule, const QS
   anAddElementLayout->setSpacing( 5 );
 
   connect( myEditorWidget, SIGNAL( selectionChanged() ), this, SIGNAL( selectionChanged() ) );
-  connect( myEditorWidget, SIGNAL( subOperationStarted(QWidget*) ), this, SLOT( processStartedSubOperation(QWidget*) ) );
+  connect( myEditorWidget, SIGNAL( subOperationStarted(QWidget*, bool) ), this, SLOT( processStartedSubOperation(QWidget*, bool) ) );
   connect( myEditorWidget, SIGNAL( subOperationFinished(QWidget*) ), this, SLOT( processFinishedSubOperation(QWidget*) ) );
 
   myAddElementBox->hide();
@@ -70,10 +70,11 @@ void HYDROGUI_PolylineDlg::setOCCViewer( OCCViewer_Viewer* theViewer )
   myEditorWidget->setOCCViewer( theViewer );
 }
 
-void HYDROGUI_PolylineDlg::processStartedSubOperation( QWidget* theWidget )
+void HYDROGUI_PolylineDlg::processStartedSubOperation( QWidget* theWidget, bool theIsEdit )
 {
   myEditorWidget->setEnabled( false );
 
+  myAddElementBox->setTitle( theIsEdit ? tr( "EDIT_ELEMENT" ) : tr( "ADD_ELEMENT" ) );
   QBoxLayout* anAddElementLayout = dynamic_cast<QBoxLayout*>( myAddElementBox->layout() );
   anAddElementLayout->addWidget( theWidget );
 
index cc19c3bfb10a8d1ce45067708b1ae90c21540b00..aa78a5c6a7bd97b91a6c535a693200ee0ab64073 100755 (executable)
@@ -55,7 +55,7 @@ public:
   bool  deleteEnabled();
 
 protected slots:
-  void processStartedSubOperation( QWidget* );
+  void processStartedSubOperation( QWidget*, bool );
   void processFinishedSubOperation( QWidget* );
 
 signals:
index f4ee9b73130a752c7204518e7ea6e49e96a9210c..1dc3901f0cfee0cc26178b1391ee5e1db7bec247 100644 (file)
@@ -95,7 +95,7 @@ HYDROGUI_ProfileDlg::HYDROGUI_ProfileDlg( HYDROGUI_Module* theModule, const QStr
   myEditorWidget->setOCCViewer( aViewer );
 
   connect( myEditorWidget, SIGNAL( selectionChanged() ), this, SIGNAL( selectionChanged() ) );
-  connect( myEditorWidget, SIGNAL( subOperationStarted(QWidget*) ), this, SLOT( processStartedSubOperation(QWidget*) ) );
+  connect( myEditorWidget, SIGNAL( subOperationStarted(QWidget*, bool) ), this, SLOT( processStartedSubOperation(QWidget*, bool) ) );
   connect( myEditorWidget, SIGNAL( subOperationFinished(QWidget*) ), this, SLOT( processFinishedSubOperation(QWidget*) ) );
 
   myAddElementBox->hide();
@@ -175,10 +175,11 @@ bool HYDROGUI_ProfileDlg::deleteEnabled()
   return myEditorWidget->removeEnabled();
 }
 
-void HYDROGUI_ProfileDlg::processStartedSubOperation( QWidget* theWidget )
+void HYDROGUI_ProfileDlg::processStartedSubOperation( QWidget* theWidget, bool theIsEdit )
 {
   myEditorWidget->setEnabled( false );
 
+  myAddElementBox->setTitle( theIsEdit ? tr( "EDIT_ELEMENT" ) : tr( "ADD_ELEMENT" ) );
   QBoxLayout* anAddElementLayout = dynamic_cast<QBoxLayout*>( myAddElementBox->layout() );
   anAddElementLayout->addWidget( theWidget );
 
index 5459a5a64d2009eaf1ac659c56fe25aed0e446ad..253e26eb24ea49ef5d1fe565af79d72c88288af0 100644 (file)
@@ -62,7 +62,7 @@ protected:
   virtual bool eventFilter( QObject*, QEvent* );
 
 protected slots:
-  void processStartedSubOperation( QWidget* );
+  void processStartedSubOperation( QWidget*, bool );
   void processFinishedSubOperation( QWidget* );
 
   void onMouseMove( SUIT_ViewWindow*, QMouseEvent* );
index c4fb0ed51463bb1d223c01c97ce8a148098e8ee4..4e9afd6715e95ed0a9490c50715ffb160bc5f2b6 100644 (file)
@@ -1204,6 +1204,10 @@ file cannot be correctly imported for a Bathymetry definition.</translation>
       <source>ADD_ELEMENT</source>
       <translation>Add element</translation>
     </message>
+    <message>
+      <source>EDIT_ELEMENT</source>
+      <translation>Edit element</translation>
+    </message>
     <message>
       <source>POLYLINE_NAME_TLT</source>
       <translation>Name</translation>
@@ -1240,6 +1244,10 @@ file cannot be correctly imported for a Bathymetry definition.</translation>
       <source>ADD_ELEMENT</source>
       <translation>Add element</translation>
     </message>
+    <message>
+      <source>EDIT_ELEMENT</source>
+      <translation>Edit element</translation>
+    </message>
     <message>
       <source>PROFILE_NAME_TLT</source>
       <translation>Name</translation>