]> SALOME platform Git repositories - modules/hydro.git/commitdiff
Salome HOME
#refs 585: polylines operations GUI
authorasl <asl@opencascade.com>
Thu, 18 Jun 2015 10:45:33 +0000 (13:45 +0300)
committerasl <asl@opencascade.com>
Thu, 18 Jun 2015 10:45:33 +0000 (13:45 +0300)
15 files changed:
src/HYDROData/CMakeLists.txt
src/HYDROData/HYDROData_IPolyline.h
src/HYDROData/HYDROData_PolylineOperator.cxx [new file with mode: 0644]
src/HYDROData/HYDROData_PolylineOperator.h [new file with mode: 0644]
src/HYDROData/HYDROData_PolylineXY.h
src/HYDROGUI/HYDROGUI_MergePolylinesOp.cxx
src/HYDROGUI/HYDROGUI_ObjComboBox.cxx
src/HYDROGUI/HYDROGUI_ObjComboBox.h
src/HYDROGUI/HYDROGUI_Operations.cxx
src/HYDROGUI/HYDROGUI_ProfileInterpolateDlg.cxx
src/HYDROGUI/HYDROGUI_RiverBottomDlg.cxx
src/HYDROGUI/HYDROGUI_SplitPolylinesDlg.cxx
src/HYDROGUI/HYDROGUI_SplitPolylinesDlg.h
src/HYDROGUI/HYDROGUI_SplitPolylinesOp.cxx
src/HYDROGUI/resources/HYDROGUI_msg_en.ts

index 2476f552d25ecd94120b08492090a9fbb4acead5..a54633a64927f108fdf037e234d9e568b69098da 100644 (file)
@@ -27,6 +27,7 @@ set(PROJECT_HEADERS
     HYDROData_ObstacleAltitude.h
     HYDROData_OperationsFactory.h
     HYDROData_Pipes.h
+    HYDROData_PolylineOperator.h
     HYDROData_PolylineXY.h
     HYDROData_Polyline3D.h
     HYDROData_PriorityQueue.h
@@ -81,6 +82,7 @@ set(PROJECT_SOURCES
     HYDROData_ObstacleAltitude.cxx
     HYDROData_OperationsFactory.cxx
     HYDROData_Pipes.cxx
+    HYDROData_PolylineOperator.cxx
     HYDROData_PolylineXY.cxx
     HYDROData_Polyline3D.cxx
     HYDROData_PriorityQueue.cxx
index 08cc1e665131227564c0386aa19986889fd69a13..1c4728995fbed9fcc1ec5ac261a6769f1690611c 100644 (file)
@@ -120,7 +120,7 @@ public:
    */
   HYDRODATA_EXPORT virtual SectionType GetSectionType( const int theSectionIndex ) const = 0;
 
-  /**
+  /** 
    * Set type for section with given index.
    * \param theSectionIndex index of section
    * \param theSectionType new section type
diff --git a/src/HYDROData/HYDROData_PolylineOperator.cxx b/src/HYDROData/HYDROData_PolylineOperator.cxx
new file mode 100644 (file)
index 0000000..2256a90
--- /dev/null
@@ -0,0 +1,45 @@
+// Copyright (C) 2014-2015  EDF-R&D
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#include <HYDROData_PolylineOperator.h>
+
+bool HYDROData_PolylineOperator::Split( const Handle( HYDROData_PolylineXY )& thePolyline,
+                                        const gp_Pnt2d& thePoint ) const
+{
+  //TODO
+  return true;
+}
+
+bool HYDROData_PolylineOperator::Split( const Handle( HYDROData_PolylineXY )& thePolyline,
+                               const Handle( HYDROData_PolylineXY )& theTool ) const
+{
+  //TODO
+  return true;
+}
+
+bool HYDROData_PolylineOperator::Split( const HYDROData_SequenceOfObjects& thePolylines )
+{
+  //TODO
+  return true;
+}
+
+bool HYDROData_PolylineOperator::Merge( const HYDROData_SequenceOfObjects& thePolylines )
+{
+  //TODO
+  return true;
+}
diff --git a/src/HYDROData/HYDROData_PolylineOperator.h b/src/HYDROData/HYDROData_PolylineOperator.h
new file mode 100644 (file)
index 0000000..5157be0
--- /dev/null
@@ -0,0 +1,37 @@
+// Copyright (C) 2014-2015  EDF-R&D
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#ifndef HYDROData_PolylineOperator_HeaderFile
+#define HYDROData_PolylineOperator_HeaderFile
+
+#include <HYDROData_PolylineXY.h>
+
+class gp_Pnt2d;
+
+class HYDROData_PolylineOperator
+{
+public:
+  HYDRODATA_EXPORT bool Split( const Handle( HYDROData_PolylineXY )& thePolyline,
+                               const gp_Pnt2d& thePoint ) const;
+  HYDRODATA_EXPORT bool Split( const Handle( HYDROData_PolylineXY )& thePolyline,
+                               const Handle( HYDROData_PolylineXY )& theTool ) const;
+  HYDRODATA_EXPORT bool Split( const HYDROData_SequenceOfObjects& thePolylines );
+  HYDRODATA_EXPORT bool Merge( const HYDROData_SequenceOfObjects& thePolylines );
+};
+
+#endif
index ef7101048ef76aa9f003a624c8a0eb7d01908c3b..a0172fd743de4aed5bb98d2d698d1c3b83fbab62 100644 (file)
@@ -27,6 +27,7 @@ class QPainterPath;
 class QTransform;
 class TopoDS_Wire;
 class gp_XYZ;
+class gp_Pnt;
 
 /**\class HYDROData_PolylineXY
  * \brief Class that stores/retreives information about the 
index dd1c271ff8d28d3d2b3cdb3439d820748371d034..8c6f21befca054c715b2a04505817333304f2555 100644 (file)
@@ -18,6 +18,8 @@
 
 #include <HYDROGUI_MergePolylinesOp.h>
 #include <HYDROGUI_MergePolylinesDlg.h>
+#include <HYDROGUI_UpdateFlags.h>
+#include <HYDROData_PolylineOperator.h>
 
 HYDROGUI_MergePolylinesOp::HYDROGUI_MergePolylinesOp( HYDROGUI_Module* theModule )
 : HYDROGUI_Operation( theModule )
@@ -33,7 +35,12 @@ void HYDROGUI_MergePolylinesOp::startOperation()
 {
   HYDROGUI_Operation::startOperation();
 
-  //TODO
+  HYDROGUI_MergePolylinesDlg* aPanel = 
+    ::qobject_cast<HYDROGUI_MergePolylinesDlg*>( inputPanel() );
+  if ( !aPanel )
+    return;
+
+  aPanel->setPolylinesFromSelection();
 }
 
 HYDROGUI_InputPanel* HYDROGUI_MergePolylinesOp::createInputPanel() const
@@ -45,16 +52,14 @@ bool HYDROGUI_MergePolylinesOp::processApply( int& theUpdateFlags,
                                               QString& theErrorMsg,
                                               QStringList& theBrowseObjectsEntries )
 {
-  /* TODO:
-  HYDROGUI_LocalCSDlg* aPanel = ::qobject_cast<HYDROGUI_LocalCSDlg*>( inputPanel() );
+  HYDROGUI_MergePolylinesDlg* aPanel = ::qobject_cast<HYDROGUI_MergePolylinesDlg*>( inputPanel() );
   if ( !aPanel )
     return false;
 
-  double aLX = aPanel->GetLocalX();
-  double aLY = aPanel->GetLocalY();
-  doc()->SetLocalCS( aLX, aLY );
+  HYDROData_SequenceOfObjects aPolylinesList = aPanel->selectedPolylines();
+  HYDROData_PolylineOperator anOp;
+  anOp.Merge( aPolylinesList );
 
   theUpdateFlags = UF_Model | UF_OCCViewer | UF_OCC_Forced | UF_VTKViewer;
-  */
   return true;
 }
index 6ead5e400e990a34767327a589e5f33883aa651d..18639114738a43049abf688f2b9f27d3da1808ee 100644 (file)
@@ -82,7 +82,8 @@ void HYDROGUI_ObjComboBox::reset()
     myObject->blockSignals( true );
 
     myObject->clear();
-    myObject->addItems( objectNames() );
+    myObjects.Clear();
+    myObject->addItems( objectNames( myObjects ) );
     myObject->setCurrentIndex( -1 );
 
     myObject->blockSignals( block );
@@ -91,7 +92,7 @@ void HYDROGUI_ObjComboBox::reset()
     updateSelection();
 }
 
-void HYDROGUI_ObjComboBox::setSectedObject( const QString& theName )
+void HYDROGUI_ObjComboBox::setSelectedObject( const QString& theName )
 {
     int aNewIdx = myObject->findText( theName );
     if ( aNewIdx != myObject->currentIndex() )
@@ -115,7 +116,7 @@ SUIT_SelectionMgr* HYDROGUI_ObjComboBox::selectionMgr() const
     return aSelMgr;
 }
 
-QStringList HYDROGUI_ObjComboBox::objectNames() const
+QStringList HYDROGUI_ObjComboBox::objectNames( HYDROData_SequenceOfObjects& theObjects ) const
 {
     QStringList aNames;
     for ( HYDROData_Iterator it( HYDROData_Document::Document( module()->getStudyId() ), objectType() ); it.More(); it.Next() )
@@ -153,3 +154,13 @@ void HYDROGUI_ObjComboBox::updateSelection()
         emit objectSelected( myObject->itemText( idx ) );
     }
 }
+
+Handle( HYDROData_Entity ) HYDROGUI_ObjComboBox::GetObject() const
+{
+  int anIndex = myObject->currentIndex();
+  if( anIndex>=0 && anIndex<myObjects.Length() )
+    return myObjects.Value( myObjects.Lower() + anIndex );
+  else
+    Handle( HYDROData_Entity )();
+}
+
index 1697309f1268b053fb556fce0541d6c9f060f1a9..5f983c44acfd78d85ea9b3cbbfc9b92d9d19d978 100644 (file)
@@ -42,10 +42,12 @@ public:
     void                        setObjectFilter( HYDROGUI_ObjComboBoxFilter* );
 
     QString                     selectedObject() const;
-    void                        setSectedObject( const QString& );
+    void                        setSelectedObject( const QString& );
 
     void                        reset();
 
+    Handle( HYDROData_Entity )  GetObject() const;
+
 signals:
     void                        objectSelected( const QString& );
 
@@ -56,7 +58,7 @@ private slots:
     void                        updateSelection();
 
 protected:
-    QStringList                 objectNames() const;
+    QStringList                 objectNames( HYDROData_SequenceOfObjects& ) const;
     SUIT_SelectionMgr*          selectionMgr() const;
 
 private:
@@ -64,6 +66,7 @@ private:
     QComboBox*                  myObject;
     HYDROGUI_Module*            myModule;
     HYDROGUI_ObjComboBoxFilter* myFilter;
+    HYDROData_SequenceOfObjects myObjects;
 };
 
 class HYDROGUI_ObjComboBoxFilter
index b3bebbf017cfa1435104bd53c1a5fb989ec4bf4e..74eb0a8e108c3c8b1af1713ba420474426dca43a 100644 (file)
@@ -207,6 +207,8 @@ void HYDROGUI_Module::createActions()
   createAction( SubmersibleId, "SUBMERSIBLE", "SUBMERSIBLE_ICO" );
   createAction( ExportPolylineId, "EXPORT_POLYLINE", "EXPORT_POLYLINE_ICO" );
 
+  createAction( SplitPolylinesId, "SPLIT_POLYLINES", "SPLIT_POLYLINES_ICO" );
+  createAction( MergePolylinesId, "MERGE_POLYLINES", "MERGE_POLYLINES_ICO" );
 }
 
 void HYDROGUI_Module::createMenus()
index c7594b45bae9aa06f283a76b438944b487dca047..add3b8bb55537cd04b741006c4f1358ed000779d 100644 (file)
@@ -143,7 +143,7 @@ QString HYDROGUI_ProfileInterpolateDlg::river() const
 
 void HYDROGUI_ProfileInterpolateDlg::setRiver( const QString& theName )
 {
-    myRiver->setSectedObject( theName );
+    myRiver->setSelectedObject( theName );
 }
 
 QString HYDROGUI_ProfileInterpolateDlg::profileStart() const
@@ -153,7 +153,7 @@ QString HYDROGUI_ProfileInterpolateDlg::profileStart() const
 
 void HYDROGUI_ProfileInterpolateDlg::setProfileStart( const QString& theName )
 {
-    myProfileStart->setSectedObject( theName );
+    myProfileStart->setSelectedObject( theName );
 }
 
 QString HYDROGUI_ProfileInterpolateDlg::profileFinish() const
@@ -163,7 +163,7 @@ QString HYDROGUI_ProfileInterpolateDlg::profileFinish() const
 
 void HYDROGUI_ProfileInterpolateDlg::setProfileFinish( const QString& theName )
 {
-    myProfileFinish->setSectedObject( theName );
+    myProfileFinish->setSelectedObject( theName );
 }
 
 int HYDROGUI_ProfileInterpolateDlg::profileNumber() const
index 2ca6d905b6a74ea417063a852a74352614e5bbe9..55418b2b81ea0702dfa671b428d46a794acd8c89 100644 (file)
@@ -71,7 +71,7 @@ QString HYDROGUI_RiverBottomDlg::getRiverName() const
 
 void HYDROGUI_RiverBottomDlg::setRiverName( const QString& theName )
 {
-    myRivers->setSectedObject( theName );
+    myRivers->setSelectedObject( theName );
 }
 
 bool HYDROGUI_RiverBottomDlg::isOk( const Handle(HYDROData_Entity)& theEntity ) const
index 47b52138dd814577cbf585d8e26369d8ff8dee07..5a702d1608ef20750b7c7c6dde91ed697bf301c3 100644 (file)
 //
 
 #include <HYDROGUI_SplitPolylinesDlg.h>
+#include <HYDROGUI_ObjComboBox.h>
+#include <HYDROGUI_ObjListBox.h>
+#include <HYDROGUI_Tool.h>
+#include <QtxDoubleSpinBox.h>
 #include <QFrame>
 #include <QGridLayout>
+#include <QTabWidget>
+#include <gp_Pnt2d.hxx>
 
 HYDROGUI_SplitPolylinesDlg::HYDROGUI_SplitPolylinesDlg( HYDROGUI_Module* theModule, const QString& theTitle )
 : HYDROGUI_InputPanel( theModule, theTitle )
@@ -29,9 +35,73 @@ HYDROGUI_SplitPolylinesDlg::HYDROGUI_SplitPolylinesDlg( HYDROGUI_Module* theModu
   QGridLayout* aLayout = new QGridLayout( aFrame );
   aLayout->setMargin( 5 );
   aLayout->setSpacing( 5 );
+
+  myTab = new QTabWidget( aFrame );
+  aLayout->addWidget( myTab, 0, 0 );
+
+  QFrame* aPointPage = new QFrame();
+  QGridLayout* aPointPageLayout = new QGridLayout( aPointPage );
+
+  myTab->addTab( aPointPage, tr( "BY_POINT" ) );
+
+  QFrame* aToolPage = new QFrame();
+  myTab->addTab( aToolPage, tr( "BY_TOOL" ) );
+
+  QFrame* aSplitPage = new QFrame();
+  myTab->addTab( aSplitPage, tr( "COMPLETE_SPLIT" ) );
 }
 
 HYDROGUI_SplitPolylinesDlg::~HYDROGUI_SplitPolylinesDlg()
 {
 }
 
+HYDROGUI_SplitPolylinesDlg::Mode HYDROGUI_SplitPolylinesDlg::GetMode() const
+{
+  return ( Mode )myTab->currentIndex();
+}
+
+Handle( HYDROData_PolylineXY ) HYDROGUI_SplitPolylinesDlg::GetMainPolyline() const
+{
+  switch( GetMode() )
+  {
+  case ByPoint:
+    return Handle( HYDROData_PolylineXY )::DownCast( myMainPolyline1->GetObject() );
+  case ByTool:
+    return Handle( HYDROData_PolylineXY )::DownCast( myMainPolyline2->GetObject() );
+  default:
+    return Handle( HYDROData_PolylineXY )();
+  }
+}
+
+Handle( HYDROData_PolylineXY ) HYDROGUI_SplitPolylinesDlg::GetToolPolyline() const
+{
+  if( GetMode()==ByTool )
+    return Handle( HYDROData_PolylineXY )::DownCast( myToolPolyline->GetObject() );
+  else
+    return Handle( HYDROData_PolylineXY )();
+}
+
+gp_Pnt2d HYDROGUI_SplitPolylinesDlg::GetPoint() const
+{
+  return gp_Pnt2d( myX->value(), myY->value() );
+}
+
+HYDROData_SequenceOfObjects HYDROGUI_SplitPolylinesDlg::GetPolylines() const
+{
+  if( GetMode()==Split )
+    return myPolylines->selectedObjects();
+  else
+    return HYDROData_SequenceOfObjects();
+}
+
+void HYDROGUI_SplitPolylinesDlg::setPolylinesFromSelection()
+{
+  Handle( HYDROData_Entity ) anObject = HYDROGUI_Tool::GetSelectedObject( module() );
+  if( anObject.IsNull() || anObject->GetKind() != KIND_POLYLINEXY )
+    return;
+
+  QString aName = anObject->GetName();
+  myMainPolyline1->setObjectName( aName );
+  myMainPolyline2->setObjectName( aName );
+  myPolylines->setObjectsFromSelection();
+}
index 3dca4fba869b43615d28ecef1558273cf4166e5d..0d09934e257550d0a9067db2a977e7516568565e 100644 (file)
 #define HYDROGUI_SplitPolylinesDlg_H
 
 #include "HYDROGUI_InputPanel.h"
+#include <HYDROData_PolylineXY.h>
+
+class QTabWidget;
+class QtxDoubleSpinBox;
+class HYDROGUI_ObjComboBox;
+class HYDROGUI_ObjListBox;
+class gp_Pnt2d;
 
 class HYDROGUI_SplitPolylinesDlg : public HYDROGUI_InputPanel
 {
   Q_OBJECT
 
+public:
+  enum Mode { ByPoint, ByTool, Split };
+
 public:
   HYDROGUI_SplitPolylinesDlg( HYDROGUI_Module* theModule, const QString& theTitle );
   virtual ~HYDROGUI_SplitPolylinesDlg();
+
+  Mode GetMode() const; 
+  Handle( HYDROData_PolylineXY ) GetMainPolyline() const;
+  Handle( HYDROData_PolylineXY ) GetToolPolyline() const;
+  gp_Pnt2d GetPoint() const;
+  HYDROData_SequenceOfObjects GetPolylines() const;
+
+  void setPolylinesFromSelection();
+
+private:
+  QTabWidget* myTab;
+  QtxDoubleSpinBox* myX;
+  QtxDoubleSpinBox* myY;
+  HYDROGUI_ObjComboBox* myMainPolyline1;
+  HYDROGUI_ObjComboBox* myMainPolyline2;
+  HYDROGUI_ObjComboBox* myToolPolyline;
+  HYDROGUI_ObjListBox*  myPolylines;
 };
 
 #endif
index 233e79a38e9acc46cc4d8428d0b476f4fc7a7d0f..07a49d3be89aa597e0c1500eb9fab1be1d126220 100644 (file)
@@ -18,6 +18,9 @@
 
 #include <HYDROGUI_SplitPolylinesOp.h>
 #include <HYDROGUI_SplitPolylinesDlg.h>
+#include <HYDROGUI_UpdateFlags.h>
+#include <HYDROData_PolylineOperator.h>
+#include <gp_Pnt2d.hxx>
 
 HYDROGUI_SplitPolylinesOp::HYDROGUI_SplitPolylinesOp( HYDROGUI_Module* theModule )
 : HYDROGUI_Operation( theModule )
@@ -33,7 +36,13 @@ void HYDROGUI_SplitPolylinesOp::startOperation()
 {
   HYDROGUI_Operation::startOperation();
 
-  //TODO
+  HYDROGUI_SplitPolylinesDlg* aPanel = 
+    ::qobject_cast<HYDROGUI_SplitPolylinesDlg*>( inputPanel() );
+  if ( !aPanel )
+    return;
+
+  aPanel->setPolylinesFromSelection();
+
 }
 
 HYDROGUI_InputPanel* HYDROGUI_SplitPolylinesOp::createInputPanel() const
@@ -45,16 +54,29 @@ bool HYDROGUI_SplitPolylinesOp::processApply( int& theUpdateFlags,
                                               QString& theErrorMsg,
                                               QStringList& theBrowseObjectsEntries )
 {
-  /*TODO:
-  HYDROGUI_LocalCSDlg* aPanel = ::qobject_cast<HYDROGUI_LocalCSDlg*>( inputPanel() );
+  HYDROGUI_SplitPolylinesDlg* aPanel = ::qobject_cast<HYDROGUI_SplitPolylinesDlg*>( inputPanel() );
   if ( !aPanel )
     return false;
 
-  double aLX = aPanel->GetLocalX();
-  double aLY = aPanel->GetLocalY();
-  doc()->SetLocalCS( aLX, aLY );
+  Handle( HYDROData_PolylineXY ) aMainPolyline = aPanel->GetMainPolyline();
+  Handle( HYDROData_PolylineXY ) aToolPolyline = aPanel->GetToolPolyline();
+  HYDROData_SequenceOfObjects aPolylinesList = aPanel->GetPolylines();
+  gp_Pnt2d aPoint = aPanel->GetPoint();
 
+  HYDROData_PolylineOperator anOp;
+  switch( aPanel->GetMode() )
+  {
+  case HYDROGUI_SplitPolylinesDlg::ByPoint:
+    anOp.Split( aMainPolyline, aPoint );
+    break;
+  case HYDROGUI_SplitPolylinesDlg::ByTool:
+    anOp.Split( aMainPolyline, aToolPolyline );
+    break;
+  case HYDROGUI_SplitPolylinesDlg::Split:
+    anOp.Split( aPolylinesList );
+    break;
+  }
+  
   theUpdateFlags = UF_Model | UF_OCCViewer | UF_OCC_Forced | UF_VTKViewer;
-  */
   return true;
 }
index a33c7cf991b24fe01e1d8567888de7a8ba02d737..88c56649dc78e6229d3094d10d4991f04f204812 100644 (file)
@@ -946,6 +946,14 @@ Would you like to remove all references from the image?</translation>
       <source>DSK_SPLIT_IMAGE</source>
       <translation>Split image</translation>
     </message>
+    <message>
+      <source>DSK_SPLIT_POLYLINES</source>
+      <translation>Split polylines</translation>
+    </message>
+    <message>
+      <source>DSK_MERGE_POLYLINES</source>
+      <translation>Merge polylines</translation>
+    </message>
     <message>
       <source>DSK_UNDO</source>
       <translation>Undo</translation>
@@ -1238,6 +1246,14 @@ Would you like to remove all references from the image?</translation>
       <source>MEN_SPLIT_IMAGE</source>
       <translation>Split image</translation>
     </message>
+    <message>
+      <source>MEN_SPLIT_POLYLINES</source>
+      <translation>Split polylines</translation>
+    </message>
+    <message>
+      <source>MEN_MERGE_POLYLINES</source>
+      <translation>Merge polylines</translation>
+    </message>
     <message>
       <source>MEN_UNDO</source>
       <translation>Undo</translation>
@@ -1499,6 +1515,14 @@ Would you like to remove all references from the image?</translation>
       <source>STB_SPLIT_IMAGE</source>
       <translation>Split image</translation>
     </message>
+    <message>
+      <source>STB_SPLIT_POLYLINES</source>
+      <translation>Split polylines</translation>
+    </message>
+    <message>
+      <source>STB_MERGE_POLYLINES</source>
+      <translation>Merge polylines</translation>
+    </message>
     <message>
       <source>STB_UNDO</source>
       <translation>Undo</translation>
@@ -2754,4 +2778,20 @@ Polyline should consist from one not closed curve.</translation>
     </message>
   </context>
 
+  <context>
+    <name>HYDROGUI_SplitPolylinesDlg</name>
+    <message>
+      <source>POLYLINES</source>
+      <translation>Polylines</translation>
+    </message>
+    <message>
+      <source>INCLUDE</source>
+      <translation>Include</translation>
+    </message>
+    <message>
+      <source>EXCLUDE</source>
+      <translation>Exclude</translation>
+    </message>
+  </context>
+
 </TS>