]> SALOME platform Git repositories - modules/hydro.git/commitdiff
Salome HOME
1) HYDRO feature 6: Update of objects (T 1.2)
authorouv <ouv@opencascade.com>
Tue, 3 Sep 2013 12:55:21 +0000 (12:55 +0000)
committerouv <ouv@opencascade.com>
Tue, 3 Sep 2013 12:55:21 +0000 (12:55 +0000)
2) Fixed bug with broken selection in object browser
3) Fixed bug with incorrect update of anchors of image frame

16 files changed:
src/HYDROGUI/CMakeLists.txt
src/HYDROGUI/HYDROGUI.vcproj
src/HYDROGUI/HYDROGUI_DataObject.cxx
src/HYDROGUI/HYDROGUI_DataObject.h
src/HYDROGUI/HYDROGUI_DeleteOp.cxx
src/HYDROGUI/HYDROGUI_ImportImageOp.cxx
src/HYDROGUI/HYDROGUI_Module.cxx
src/HYDROGUI/HYDROGUI_Operations.cxx
src/HYDROGUI/HYDROGUI_Operations.h
src/HYDROGUI/HYDROGUI_PrsImageFrame.cxx
src/HYDROGUI/HYDROGUI_Tool.cxx
src/HYDROGUI/HYDROGUI_Tool.h
src/HYDROGUI/HYDROGUI_TwoImagesOp.cxx
src/HYDROGUI/HYDROGUI_UpdateImageOp.cxx [new file with mode: 0644]
src/HYDROGUI/HYDROGUI_UpdateImageOp.h [new file with mode: 0644]
src/HYDROGUI/resources/HYDROGUI_msg_en.ts

index 582f61de1d98e2c3ec9dedad78eb4acc61ffe839..44f68a464878df222e212bdc8e2b104241b0282e 100644 (file)
@@ -3,6 +3,7 @@ include(../../CMake/UseQT4EXT.cmake)
 
 set(PROJECT_HEADERS 
     HYDROGUI.h
+    HYDROGUI_AISCurve.h
     HYDROGUI_ColorWidget.h
     HYDROGUI_DataModel.h
     HYDROGUI_DataObject.h
@@ -34,13 +35,14 @@ set(PROJECT_HEADERS
     HYDROGUI_TwoImagesDlg.h
     HYDROGUI_TwoImagesOp.h
     HYDROGUI_UpdateFlags.h
+    HYDROGUI_UpdateImageOp.h
     HYDROGUI_VisualStateOp.h
-    HYDROGUI_AISCurve.h
 )
 
 QT4_WRAP_CPP(PROJECT_HEADERS_MOC ${PROJECT_HEADERS})
 
 set(PROJECT_SOURCES 
+    HYDROGUI_AISCurve.cxx
     HYDROGUI_ColorWidget.cxx
     HYDROGUI_DataModel.cxx
     HYDROGUI_DataObject.cxx
@@ -71,8 +73,8 @@ set(PROJECT_SOURCES
     HYDROGUI_Tool.cxx
     HYDROGUI_TwoImagesDlg.cxx
     HYDROGUI_TwoImagesOp.cxx
+    HYDROGUI_UpdateImageOp.cxx
     HYDROGUI_VisualStateOp.cxx
-    HYDROGUI_AISCurve.cxx
 )
 
 add_definitions(
index 013aacc4d6238ed6a0cbe80b9025e55fe2e41e72..36723c6ef9ddbc35b85f1023e962cb8c3b7038e5 100644 (file)
                                RelativePath=".\HYDROGUI_TwoImagesOp.cxx"
                                >
                        </File>
+                       <File
+                               RelativePath=".\HYDROGUI_UpdateImageOp.cxx"
+                               >
+                       </File>
                        <File
                                RelativePath=".\HYDROGUI_VisualStateOp.cxx"
                                >
                                RelativePath=".\HYDROGUI_UpdateFlags.h"
                                >
                        </File>
+                       <File
+                               RelativePath=".\HYDROGUI_UpdateImageOp.h"
+                               >
+                               <FileConfiguration
+                                       Name="Debug|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCustomBuildTool"
+                                               Description="Generating moc_$(InputName).cxx"
+                                               CommandLine="$(QTDIR)\bin\moc.exe $(InputPath) -o moc\moc_$(InputName).cxx"
+                                               Outputs="moc/moc_$(InputName).cxx"
+                                       />
+                               </FileConfiguration>
+                       </File>
                        <File
                                RelativePath=".\HYDROGUI_VisualStateOp.h"
                                >
                                RelativePath=".\moc\moc_HYDROGUI_TwoImagesOp.cxx"
                                >
                        </File>
+                       <File
+                               RelativePath=".\moc\moc_HYDROGUI_UpdateImageOp.cxx"
+                               >
+                       </File>
                        <File
                                RelativePath=".\moc\moc_HYDROGUI_VisualStateOp.cxx"
                                >
index c760d195a9ef14140f5e264844d2631dcc1a953d..bbd53f6b68e42d0484d48c6c10770242dad26829 100644 (file)
@@ -22,6 +22,8 @@
 
 #include "HYDROGUI_DataObject.h"
 
+#include <HYDROData_Image.h>
+
 #include <SUIT_DataObject.h>
 
 #include <TDF_Tool.hxx>
@@ -58,6 +60,18 @@ QString HYDROGUI_DataObject::name() const
   return QString();
 }
 
+QFont HYDROGUI_DataObject::font( const int theId ) const
+{
+  QFont aFont = LightApp_DataObject::font( theId );
+  if( theId == NameId )
+  {
+    Handle(HYDROData_Image) anImage = Handle(HYDROData_Image)::DownCast( modelObject() );
+    if( !anImage.IsNull() && anImage->MustBeUpdated() )
+      aFont.setItalic( true );
+  }
+  return aFont;
+}
+
 QString HYDROGUI_DataObject::dataObjectEntry( const Handle(HYDROData_Object)& theObject )
 {
   QString aEntryStr = QString::null;
index 33b53a36a8914b97a74ee413828d788b9ea1afb8..baa09573a5c73ed844deae9e444a4a736c996cc8 100644 (file)
@@ -68,6 +68,11 @@ public:
    */
   virtual QString name() const;
 
+  /**
+   * Returns the font of displayed object name.
+   */
+  virtual QFont font( const int = SUIT_DataObject::NameId ) const;
+
   /**
    * Returns the model data object.
    */
index 46eb2fb52288939184e71af49f5afc1203555b1c..1e9b8008e62fab87a4309244c7e2650145dd9e7c 100644 (file)
@@ -47,12 +47,40 @@ void HYDROGUI_DeleteOp::startOperation()
 {
   HYDROGUI_Operation::startOperation();
 
+  HYDROData_SequenceOfObjects aFullSeq; // selected objects with their back-references
+  QStringList aFullNames;
+
   HYDROData_SequenceOfObjects aSeq = HYDROGUI_Tool::GetSelectedObjects( module() );
   if( !aSeq.IsEmpty() )
   {
+    for( Standard_Integer anIndex = 1, aLength = aSeq.Length(); anIndex <= aLength; anIndex++ )
+    {
+      Handle(HYDROData_Object) anObject = aSeq.Value( anIndex );
+      if( !anObject.IsNull() )
+      {
+        aFullSeq.Append( anObject );
+        aFullNames.append( anObject->GetName() );
+
+        // collect the back-references
+        ObjectKind aKind = anObject->GetKind();
+        if( aKind == KIND_IMAGE || aKind == KIND_POLYLINE )
+        {
+          HYDROData_SequenceOfObjects anObjects;
+          QStringList aNames;
+          HYDROGUI_Tool::GetObjectBackReferences( module(), anObject, anObjects, aNames );
+          aFullSeq.Append( anObjects );
+          aFullNames.append( aNames );
+        }
+      }
+    }
+
+    aFullNames.removeDuplicates();
+    aFullNames.sort();
+
+    QString aList = aFullNames.join( "\n" );
     int anAnswer = SUIT_MessageBox::question( module()->getApp()->desktop(),
                                               tr( "DELETE_OBJECTS" ),
-                                              tr( "CONFIRM_DELETION" ),
+                                              tr( "CONFIRM_DELETION" ).arg( aList ),
                                               QMessageBox::Yes | QMessageBox::No,
                                               QMessageBox::No );
     if( anAnswer == QMessageBox::No )
@@ -63,10 +91,10 @@ void HYDROGUI_DeleteOp::startOperation()
   }
 
   startDocOperation();
-  for( Standard_Integer anIndex = 1, aLength = aSeq.Length(); anIndex <= aLength; anIndex++ )
+  for( Standard_Integer anIndex = 1, aLength = aFullSeq.Length(); anIndex <= aLength; anIndex++ )
   {
-    Handle(HYDROData_Object) anObject = aSeq.Value( anIndex );
-    if( !anObject.IsNull() )
+    Handle(HYDROData_Object) anObject = aFullSeq.Value( anIndex );
+    if( !anObject.IsNull() && !anObject->IsRemoved() )
       anObject->Remove();
   }
   commitDocOperation();
index 15da4b459e780e10c3ade6a37252da601254a676..d2da0a5c9da2f5534300dc5e8469d0142b62c9ab 100644 (file)
@@ -31,6 +31,8 @@
 
 #include <HYDROData_Iterator.h>
 
+#include <HYDROOperations_Factory.h>
+
 #include <GraphicsView_ViewManager.h>
 #include <GraphicsView_ViewPort.h>
 #include <GraphicsView_Viewer.h>
@@ -301,7 +303,12 @@ bool HYDROGUI_ImportImageOp::processApply( int& theUpdateFlags,
   // must be done after all checks and before calling SetVisible() method below
   closePreview();
 
-  anImageObj->SetVisible( HYDROGUI_Tool::GetActiveGraphicsViewId( module() ), true );
+  if( !myIsEdit )
+    anImageObj->SetVisible( HYDROGUI_Tool::GetActiveGraphicsViewId( module() ), true );
+
+  if( myIsEdit )
+    if( HYDROOperations_Factory* aFactory = HYDROOperations_Factory::Factory() )
+      aFactory->UpdateImage( doc(), anImageObj );
 
   theUpdateFlags = UF_Model | UF_Viewer | UF_GV_Forced;
   return true;
index 2c95f19a24fc043d7caf3b9aea7e251de8ba35a5..cf2220bafb939c5bf3a4dadbd26d19234c524248 100644 (file)
@@ -149,6 +149,7 @@ void HYDROGUI_Module::contextMenuPopup( const QString& theClient,
 
   bool anIsImage = false;
   bool anIsCompositeImage = false;
+  bool anIsMustBeUpdatedImage = false;
   bool anIsPolyline = false;
   bool anIsVisualState = false;
 
@@ -169,7 +170,10 @@ void HYDROGUI_Module::contextMenuPopup( const QString& theClient,
         anIsImage = true;
         Handle(HYDROData_Image) anImage = Handle(HYDROData_Image)::DownCast( anObject );
         if( !anImage.IsNull() )
+        {
           anIsCompositeImage = anImage->NbReferences() > 0;
+          anIsMustBeUpdatedImage = anImage->MustBeUpdated();
+        }
       }
       else if( anObject->GetKind() == KIND_POLYLINE )
         anIsPolyline = true;
@@ -183,7 +187,14 @@ void HYDROGUI_Module::contextMenuPopup( const QString& theClient,
     theMenu->addAction( action( SaveVisualStateId ) );
     theMenu->addSeparator();
   }
-  else if( anIsSelection && aSeq.Length() == 1 )
+
+  if( anIsSelection && anIsMustBeUpdatedImage )
+  {
+    theMenu->addAction( action( UpdateImageId ) );
+    theMenu->addSeparator();
+  }
+
+  if( anIsSelection && aSeq.Length() == 1 )
   {
     if( anIsImage )
     {
@@ -237,11 +248,19 @@ void HYDROGUI_Module::update( const int flags )
   // from one of the methods called below
   setUpdateEnabled( false );
 
-  if( ( flags & UF_Model ) && getDataModel() )
+  if( ( flags & UF_Model ) && getDataModel() && getApp() )
+  {
     getDataModel()->update( getStudyId() );
 
-  if( ( flags & UF_ObjBrowser ) && getApp() )
+    // Temporary workaround to prevent breaking
+    // the selection in the object browser
+    qApp->processEvents();
     getApp()->updateObjectBrowser( true );
+  }
+
+  // Object browser is currently updated by using UF_Model flag
+  //if( ( flags & UF_ObjBrowser ) && getApp() )
+  //  getApp()->updateObjectBrowser( true );
 
   if( ( flags & UF_Viewer ) )
     updateGV( flags & UF_GV_Init,
index 101a44251b0169a842c6138b4247eee09489cf6c..e5e3ea7788b1f6cccb76381d5693f5f83325ed65 100644 (file)
@@ -33,6 +33,7 @@
 #include "HYDROGUI_ShowHideOp.h"
 #include "HYDROGUI_TwoImagesOp.h"
 #include "HYDROGUI_UpdateFlags.h"
+#include "HYDROGUI_UpdateImageOp.h"
 #include "HYDROGUI_VisualStateOp.h"
 
 #include <CAM_Application.h>
@@ -74,6 +75,7 @@ void HYDROGUI_Module::createActions()
   createAction( EditCompositeImageId, "EDIT_COMPOSITE_IMAGE" );
   createAction( ObserveImageId, "OBSERVE_IMAGE" );
   createAction( ExportImageId, "EXPORT_IMAGE" );
+  createAction( UpdateImageId, "UPDATE_IMAGE" );
 
   createAction( CreatePolylineId, "CREATE_POLYLINE" );
   createAction( EditPolylineId, "EDIT_POLYLINE" ); 
@@ -236,6 +238,9 @@ LightApp_Operation* HYDROGUI_Module::createOperation( const int theId ) const
   case ExportImageId:
     anOp = new HYDROGUI_ExportImageOp( aModule );
     break;
+  case UpdateImageId:
+    anOp = new HYDROGUI_UpdateImageOp( aModule );
+    break;
   case CreatePolylineId:
   case EditPolylineId:
     anOp = new HYDROGUI_PolylineOp( aModule, theId == EditPolylineId );
index d68f4bcb17dfd1c70fb8fb66cac472b5ee8fc933..012320351e3e5c75529829429ea01af38ef8056a 100644 (file)
@@ -38,6 +38,7 @@ enum OperationId
   EditCompositeImageId,
   ObserveImageId,
   ExportImageId,
+  UpdateImageId,
 
   CreatePolylineId,
   EditPolylineId,
index 058d0ea6ea38d75804ef0846a99fb72ac291db5c..f5aaade5dea264a3a3bbbeb876b53c3a553b9692 100644 (file)
@@ -164,14 +164,26 @@ QRectF HYDROGUI_PrsImageFrame::UnscaledGraphicsEllipseItem::boundingRect() const
   if( !aParent )
     return aRect;
 
-  QTransform aTransform = aParent->getViewTransform();
-  double aScale = aTransform.m11(); // same as m22(), viewer specific
-  if( fabs( aScale ) < EPSILON )
+  // take into account a transformation of the base image item
+  double aXScale = 1.0;
+  double aYScale = 1.0;
+  if( QGraphicsItem* aGrandParent = aParent->parentItem() )
+  {
+    QTransform aTransform = aGrandParent->transform();
+    QLineF aLine( 0, 0, 1, 1 );
+    aLine = aTransform.map( aLine );
+    aXScale = aLine.dx();
+    aYScale = aLine.dy();
+  }
+
+  QTransform aViewTransform = aParent->getViewTransform();
+  double aScale = aViewTransform.m11(); // same as m22(), viewer specific
+  if( fabs( aScale ) < EPSILON || fabs( aXScale ) < EPSILON || fabs( aYScale ) < EPSILON)
     return aRect;
 
   QPointF aCenter = aRect.center();
-  double aWidth = aRect.width() / aScale;
-  double aHeight = aRect.height() / aScale;
+  double aWidth = aRect.width() / aScale / aXScale;
+  double aHeight = aRect.height() / aScale / aYScale;
 
   aRect = QRectF( aCenter.x() - aWidth / 2, aCenter.y() - aHeight / 2, aWidth, aHeight );
   return aRect;
@@ -205,7 +217,6 @@ void HYDROGUI_PrsImageFrame::UnscaledGraphicsEllipseItem::paint(
   thePainter->save();
   thePainter->setTransform( GenerateTranslationOnlyTransform( thePainter->transform(),
                                                               myBasePoint ) );
-
   QGraphicsEllipseItem::paint( thePainter, theOption, theWidget );
   thePainter->restore();
 }
index 5aeadb6178fd74df3e50021d8317ca55c17379f8..991dff2564ed7865717bc2d6fad8e44ae9f42eaf 100644 (file)
@@ -332,3 +332,58 @@ QList<size_t> HYDROGUI_Tool::GetGraphicsViewIdList( HYDROGUI_Module* theModule )
   }
   return aList;
 }
+
+void HYDROGUI_Tool::GetObjectReferences( const Handle(HYDROData_Image)& theImage,
+                                         HYDROData_SequenceOfObjects& theRefObjects,
+                                         QStringList& theRefNames )
+{
+  if( theImage.IsNull() )
+    return;
+
+  for( int anIndex = 0, aNbRef = theImage->NbReferences(); anIndex < aNbRef; anIndex++ )
+  {
+    Handle(HYDROData_Image) aRefImage = theImage->Reference( anIndex );
+    if( !aRefImage.IsNull() && !aRefImage->IsRemoved() )
+    {
+      QString aName = aRefImage->GetName();
+      if( !theRefNames.contains( aName ) )
+      {
+        theRefObjects.Append( aRefImage );
+        theRefNames.append( aRefImage->GetName() );
+        GetObjectReferences( aRefImage, theRefObjects, theRefNames );
+      }
+    }
+  }
+}
+
+void HYDROGUI_Tool::GetObjectBackReferences( HYDROGUI_Module* theModule,
+                                             const Handle(HYDROData_Object)& theObj,
+                                             HYDROData_SequenceOfObjects& theBackRefObjects,
+                                             QStringList& theBackRefNames )
+{
+  if( theObj.IsNull() )
+    return;
+
+  Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( theModule->getStudyId() );
+  if( aDocument.IsNull() )
+    return;
+
+  QString aName = theObj->GetName();
+
+  HYDROData_Iterator anIterator( aDocument, KIND_IMAGE );
+  for( ; anIterator.More(); anIterator.Next() )
+  {
+    Handle(HYDROData_Image) anImage = Handle(HYDROData_Image)::DownCast( anIterator.Current() );
+    if( !anImage.IsNull() )
+    {
+      HYDROData_SequenceOfObjects aRefObjects;
+      QStringList aRefNames;
+      GetObjectReferences( anImage, aRefObjects, aRefNames );
+      if( aRefNames.contains( aName ) )
+      {
+        theBackRefObjects.Append( anImage );
+        theBackRefNames.append( anImage->GetName() );
+      }
+    }
+  }
+}
index 6cb51e936bd9de88e4a1e698d4432302506435ab..35ab64743bb4a04479a8022545858a1d3540872f 100644 (file)
@@ -23,7 +23,7 @@
 #ifndef HYDROGUI_TOOL_H
 #define HYDROGUI_TOOL_H
 
-#include <HYDROData_Object.h>
+#include <HYDROData_Image.h>
 
 #include <GraphicsView_Defs.h>
 #include <GraphicsView_ViewPort.h>
@@ -189,6 +189,28 @@ public:
    * \return list of view ids
    */
   static QList<size_t>            GetGraphicsViewIdList( HYDROGUI_Module* theModule );
+
+  /**
+   * \brief Get the list of references (recursively) for the specified image object
+   * \param theImage image data object
+   * \param theRefObjects list of reference objects
+   * \param theRefNames list of reference object names
+   */
+  static void                     GetObjectReferences( const Handle(HYDROData_Image)& theImage,
+                                                       HYDROData_SequenceOfObjects& theRefObjects,
+                                                       QStringList& theRefNames );
+
+  /**
+   * \brief Get the list of back-references for the specified object
+   * \param theModule module
+   * \param theObj data object
+   * \param theBackRefObjects list of back-reference objects
+   * \param theBackRefNames list of back-reference object names
+   */
+  static void                     GetObjectBackReferences( HYDROGUI_Module* theModule,
+                                                           const Handle(HYDROData_Object)& theObj,
+                                                           HYDROData_SequenceOfObjects& theBackRefObjects,
+                                                           QStringList& theBackRefNames );
 };
 
 #endif
index fd30943f2c16c312ce0f30400c86021f1b77cd3d..3422f245580f5acc27f6b2468f4b814c93fb2ecd 100644 (file)
@@ -177,10 +177,13 @@ bool HYDROGUI_TwoImagesOp::processApply( int& theUpdateFlags,
   aResult->AppendReference( anImage2 );
   aFactory->UpdateImage( doc(), aResult );
 
-  size_t aViewId = HYDROGUI_Tool::GetActiveGraphicsViewId( module() );
-  anImage1->SetVisible( aViewId, false );
-  anImage2->SetVisible( aViewId, false );
-  aResult->SetVisible( aViewId, true );
+  if( !myIsEdit )
+  {
+    size_t aViewId = HYDROGUI_Tool::GetActiveGraphicsViewId( module() );
+    anImage1->SetVisible( aViewId, false );
+    anImage2->SetVisible( aViewId, false );
+    aResult->SetVisible( aViewId, true );
+  }
 
   theUpdateFlags = UF_Model | UF_Viewer | UF_GV_Forced;
   return true;
diff --git a/src/HYDROGUI/HYDROGUI_UpdateImageOp.cxx b/src/HYDROGUI/HYDROGUI_UpdateImageOp.cxx
new file mode 100644 (file)
index 0000000..09d31a9
--- /dev/null
@@ -0,0 +1,66 @@
+// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+//
+// Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+// 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.
+//
+// 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 "HYDROGUI_UpdateImageOp.h"
+
+#include "HYDROGUI_Module.h"
+#include "HYDROGUI_Tool.h"
+#include "HYDROGUI_UpdateFlags.h"
+
+#include <HYDROData_Document.h>
+#include <HYDROData_Image.h>
+
+#include <HYDROOperations_Factory.h>
+
+HYDROGUI_UpdateImageOp::HYDROGUI_UpdateImageOp( HYDROGUI_Module* theModule )
+: HYDROGUI_Operation( theModule )
+{
+  setName( tr( "UPDATE_IMAGE" ) );
+}
+
+HYDROGUI_UpdateImageOp::~HYDROGUI_UpdateImageOp()
+{
+}
+
+void HYDROGUI_UpdateImageOp::startOperation()
+{
+  HYDROGUI_Operation::startOperation();
+
+  startDocOperation();
+
+  HYDROData_SequenceOfObjects aSeq = HYDROGUI_Tool::GetSelectedObjects( module() );
+  for( Standard_Integer anIndex = 1, aLength = aSeq.Length(); anIndex <= aLength; anIndex++ )
+  {
+    Handle(HYDROData_Image) anImage =
+      Handle(HYDROData_Image)::DownCast( aSeq.Value( anIndex ) );
+    if( !anImage.IsNull() && anImage->MustBeUpdated() )
+    {
+      HYDROOperations_Factory* aFactory = HYDROOperations_Factory::Factory();
+      aFactory->UpdateImage( doc(), anImage );
+    }
+  }
+
+  commitDocOperation();
+
+  module()->update( UF_Model | UF_Viewer | UF_GV_Forced );
+  commit();
+}
diff --git a/src/HYDROGUI/HYDROGUI_UpdateImageOp.h b/src/HYDROGUI/HYDROGUI_UpdateImageOp.h
new file mode 100644 (file)
index 0000000..fa01143
--- /dev/null
@@ -0,0 +1,40 @@
+// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+//
+// Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+// 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.
+//
+// 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 HYDROGUI_UPDATEIMAGEOP_H
+#define HYDROGUI_UPDATEIMAGEOP_H
+
+#include "HYDROGUI_Operation.h"
+
+class HYDROGUI_UpdateImageOp : public HYDROGUI_Operation
+{
+  Q_OBJECT
+
+public:
+  HYDROGUI_UpdateImageOp( HYDROGUI_Module* theModule );
+  virtual ~HYDROGUI_UpdateImageOp();
+
+protected:
+  virtual void               startOperation();
+};
+
+#endif
index 94b4e554317fc00674ae221f0863b73b9edb682c..d3fb9693472518d49490daace61fc8b0cbd70143 100644 (file)
@@ -62,7 +62,9 @@ does not exist or you have not enough permissions to open it.</translation>
     </message>
     <message>
       <source>CONFIRM_DELETION</source>
-      <translation>Do you really want to delete the selected object(s)?</translation>
+      <translation>The following objects (including the dependencies) will be deleted:
+%1
+Do you want to continue?</translation>
     </message>
   </context>
   
@@ -285,6 +287,10 @@ file cannot be correctly imported for a Bathymetry definition.</translation>
       <source>DSK_UNDO</source>
       <translation>Undo</translation>
     </message>
+    <message>
+      <source>DSK_UPDATE_IMAGE</source>
+      <translation>Update image</translation>
+    </message>
     <message>
       <source>HYDRO_TOOLBAR</source>
       <translation>HYDRO toolbar</translation>
@@ -373,6 +379,10 @@ file cannot be correctly imported for a Bathymetry definition.</translation>
       <source>MEN_UNDO</source>
       <translation>Undo</translation>
     </message>
+    <message>
+      <source>MEN_UPDATE_IMAGE</source>
+      <translation>Update image</translation>
+    </message>
     <message>
       <source>STB_CREATE_POLYLINE</source>
       <translation>Create polyline</translation>
@@ -453,6 +463,10 @@ file cannot be correctly imported for a Bathymetry definition.</translation>
       <source>STB_UNDO</source>
       <translation>Undo</translation>
     </message>
+    <message>
+      <source>STB_UPDATE_IMAGE</source>
+      <translation>Update image</translation>
+    </message>
   </context>
   
   <context>
@@ -554,7 +568,15 @@ file cannot be correctly imported for a Bathymetry definition.</translation>
       <translation>Fuse</translation>
     </message>
   </context>
-  
+
+  <context>
+    <name>HYDROGUI_UpdateImageOp</name>
+    <message>
+      <source>UPDATE_IMAGE</source>
+      <translation>Update image</translation>
+    </message>
+  </context>
+
   <context>
     <name>HYDROGUI_VisualStateOp</name>
     <message>