anAttr->SetID(TDataStd_Integer::GetID());
DEBTRACE("GetQuadtreeNodes init " << this << " " << key);
HYDROData_QuadtreeNode* aQuadtree = new HYDROData_QuadtreeNode(0, 30, 5, 0.);
- myQuadtrees[key] = aQuadtree;
Nodes_3D* aListOfNodes = new Nodes_3D();
}
DEBTRACE(" GetQuadtreeNodes call setNodesAndCompute");
aQuadtree->setNodesAndCompute(aListOfNodes);
+
+ Handle(Message_ProgressIndicator) aZIProgress = HYDROData_Tool::GetZIProgress();
+ if ( aZIProgress && aZIProgress->UserBreak() ) {
+ return 0;
+ }
+
+ myQuadtrees[key] = aQuadtree;
+
return aQuadtree;
}
if (!aLabel.FindAttribute(TDataStd_RealArray::GetID(), aCoordsArray))
return 0;
+ HYDROData_Tool::SetTriangulationStatus(HYDROData_Tool::Running);
+
Handle(TDataStd_Integer) anAttr = TDataStd_Integer::Set( myLab.FindChild( DataTag_Delaunay ), key );
anAttr->SetID(TDataStd_Integer::GetID());
DEBTRACE("GetVtkDelaunay2D init " << this << " " << key);
vtkPolyData* data = delaunay2D->GetOutput();
data->BuildLinks();
myDelaunay2D[key] = data;
+
+ HYDROData_Tool::SetTriangulationStatus(HYDROData_Tool::Finished);
+
return data;
}
double aResAltitude = anInvalidAltitude;
// --- find the nearest point in the bathymetry cloud, with quadtree
+ Handle(Message_ProgressIndicator) aZIProgress = HYDROData_Tool::GetZIProgress();
HYDROData_QuadtreeNode* aQuadtree = GetQuadtreeNodes();
- if (!aQuadtree)
+ if (!aQuadtree || (aZIProgress && aZIProgress->UserBreak()))
{
DEBTRACE(" no Quadtree");
return aResAltitude;
#include <TopTools_ListIteratorOfListOfShape.hxx>
#include <TDataStd_Integer.hxx>
+#include <Message_ProgressSentry.hxx>
+
//#define DEB_CALCULATION 1
#ifdef DEB_CALCULATION
#include <BRepTools.hxx>
DEBTRACE("HYDROData_CalculationCase::GetAltitudesForPoints " << theRegion->GetName().toStdString());
NCollection_Sequence<double> aResSeq;
- for ( int i = 1, n = thePoints.Length(); i <= n; ++i )
- {
- const gp_XY& thePnt = thePoints.Value( i );
+ Handle(Message_ProgressIndicator) aZIProgress = HYDROData_Tool::GetZIProgress();
+ if ( aZIProgress ) {
+ aZIProgress->Reset();
+ }
+
+ QFuture<void> aFuture = QtConcurrent::run([&]() {
+ int aNbPoints = thePoints.Length();
+
+ Message_ProgressSentry aPSentry(HYDROData_Tool::GetZIProgress(), "GetAltitudesForPoints", 0, aNbPoints, 1);
+ for ( int i = 1, n = aNbPoints; i <= n && aPSentry.More(); ++i, aPSentry.Next() )
+ {
+ const gp_XY& thePnt = thePoints.Value( i );
- double anAltitude = GetAltitudeForPoint( thePnt, theRegion, theMethod );
- aResSeq.Append( anAltitude );
+ double anAltitude = GetAltitudeForPoint( thePnt, theRegion, theMethod );
+ aResSeq.Append( anAltitude );
+ }
+ });
+
+ while( aFuture.isRunning() ) {
+ if ( aZIProgress ) {
+ aZIProgress->Show( Standard_True );
+ QThread::usleep(500);
+ }
}
+ aZIProgress->Show( Standard_True );
return aResSeq;
}
#include <ShapeAnalysis_FreeBounds.hxx>
+HYDROData_Tool::ExecStatus HYDROData_Tool::myTriangulationStatus = ExecStatus::None;
+
static int aMaxNameId = INT_MAX;
static int aMaxColorNb = 92000;
void HYDROData_Tool::WriteStringsToFile( QFile& theFile,
return aPI;
}
+void HYDROData_Tool::SetZIProgress(const Handle(Message_ProgressIndicator)& thePI)
+{
+ BathymetryInterpolationProgress() = thePI;
+}
+
+const Handle(Message_ProgressIndicator)& HYDROData_Tool::GetZIProgress()
+{
+ return BathymetryInterpolationProgress();
+}
+
+Handle(Message_ProgressIndicator)& HYDROData_Tool::BathymetryInterpolationProgress()
+{
+ static Handle(Message_ProgressIndicator) aPI = NULL;
+ return aPI;
+}
+
+void HYDROData_Tool::SetTriangulationStatus(const ExecStatus& theStatus)
+{
+ myTriangulationStatus = theStatus;
+}
+
+const HYDROData_Tool::ExecStatus& HYDROData_Tool::GetTriangulationStatus()
+{
+ return myTriangulationStatus;
+}
+
std::ostream& operator<<( std::ostream& theStream, const QString& theText )
{
theStream << theText.toStdString();
class QColor;
class QFile;
class TCollection_ExtendedString;
+
#ifdef WIN32
enum TopAbs_State;
#else
class HYDRODATA_EXPORT HYDROData_Tool {
+public:
+ enum ExecStatus
+ {
+ None,
+ Running,
+ Finished
+ };
+
public:
static void WriteStringsToFile( QFile& theFile,
static void SetSIProgress(const Handle(Message_ProgressIndicator)& thePI);
static const Handle(Message_ProgressIndicator)& GetSIProgress();
+ static void SetZIProgress(const Handle(Message_ProgressIndicator)& thePI);
+ static const Handle(Message_ProgressIndicator)& GetZIProgress();
+
+ static void SetTriangulationStatus(const ExecStatus& theStatus);
+ static const ExecStatus& GetTriangulationStatus();
+
private:
static Handle(Message_ProgressIndicator)& StricklerInterpolationProgress();
+ static Handle(Message_ProgressIndicator)& BathymetryInterpolationProgress();
+ static ExecStatus myTriangulationStatus;
};
inline bool ValuesEquals( const double& theFirst, const double& theSecond )
#ifndef _HYDROData_Tree_HXX_
#define _HYDROData_Tree_HXX_
+#include <HYDROData_Tool.h>
+#include <Message_ProgressSentry.hxx>
+
//================================================================================
//! Data limiting the tree height
root = root->myFather;
rootSize = root->maxSize();
}
+
+ Handle(Message_ProgressIndicator) aZIProgress = myLevel == 0 ? HYDROData_Tool::GetZIProgress() : NULL;
+ Message_ProgressSentry aPSentry(aZIProgress, "QuadTree", 0, NB_CHILDREN + 1, 1);
+
for (int i = 0; i < NB_CHILDREN; i++)
{
// The child is of the same type than its father (For instance, a HYDROData_OctreeNode)
// --- After building the NB_CHILDREN boxes, we put the data into the children.
buildChildrenData();
+ if (aPSentry.More()) {
+ aPSentry.Next();
+ }
+
// --- After we pass to the next level of the Tree
- for (int i = 0; i < NB_CHILDREN; i++)
+ for (int i = 0; i < NB_CHILDREN && aPSentry.More(); i++, aPSentry.Next()) {
myChildren[i]->buildChildren();
+ }
+
+ aPSentry.Relieve();
}
/*!
HYDROGUI_SetBoundaryTypePolygonDlg.h
HYDROGUI_MeasurementToolOp.h
HYDROGUI_MeasurementToolDlg.h
- HYDROGUI_ProgressIndicator.h
+ HYDROGUI_SIProgressIndicator.h
+ HYDROGUI_ZIProgressIndicator.h
)
QT_WRAP_MOC(PROJECT_HEADERS_MOC ${PROJECT_HEADERS})
HYDROGUI_SetBoundaryTypePolygonDlg.cxx
HYDROGUI_MeasurementToolOp.cxx
HYDROGUI_MeasurementToolDlg.cxx
- HYDROGUI_ProgressIndicator.cxx
+ HYDROGUI_SIProgressIndicator.cxx
+ HYDROGUI_ZIProgressIndicator.cxx
)
add_definitions(
#include "HYDROGUI_ShowHideOp.h"
#include "HYDROGUI_Overview.h"
#include <HYDROGUI_ProfileDlg.h>
-#include <HYDROGUI_ProgressIndicator.h>
+#include <HYDROGUI_SIProgressIndicator.h>
+#include <HYDROGUI_ZIProgressIndicator.h>
#include <HYDROData_Tool.h>
#include <HYDROData_Image.h>
#include <HYDROData_Stream.h>
myOCCDisplayer = new HYDROGUI_OCCDisplayer( this );
myVTKDisplayer = new HYDROGUI_VTKPrsDisplayer( this );
- HYDROData_Tool::SetSIProgress( new HYDROGUI_ProgressIndicator( theApp->desktop(), tr( "STRICKLER_INTERPOLATION_TLT" ) ) );
+ HYDROData_Tool::SetSIProgress( new HYDROGUI_SIProgressIndicator( theApp->desktop() ) );
+ HYDROData_Tool::SetZIProgress( new HYDROGUI_ZIProgressIndicator( theApp->desktop() ) );
}
bool HYDROGUI_Module::activateModule( SUIT_Study* theStudy )
+++ /dev/null
-// 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 "HYDROGUI_ProgressIndicator.h"
-
-#include <QProgressBar>
-#include <QVBoxLayout>
-#include <QApplication>
-
-IMPLEMENT_STANDARD_RTTIEXT(HYDROGUI_ProgressIndicator, Message_ProgressIndicator)
-
-HYDROGUI_ProgressIndicator::HYDROGUI_ProgressIndicator( QWidget* theParent, const QString& theName )
-: QtxDialog( theParent, true, false, QtxDialog::Cancel ), myUserBreak(false)
-{
- setWindowTitle( theName );
-
- QVBoxLayout* aLayout = new QVBoxLayout( mainFrame() );
- aLayout->setMargin( 5 );
- aLayout->setSpacing( 5 );
-
- myBar = new QProgressBar( mainFrame() );
-
- aLayout->addWidget( myBar );
-
- setButtonText( Cancel, tr("CANCEL") );
- setButtonPosition( Center, Cancel );
- setMinimumWidth( 350 );
-}
-
-HYDROGUI_ProgressIndicator::~HYDROGUI_ProgressIndicator()
-{
-}
-
-Standard_Boolean HYDROGUI_ProgressIndicator::Show(const Standard_Boolean theForce)
-{
- Standard_Real aPosition = GetPosition();
- Standard_Boolean isUserBreak = UserBreak();
-
- bool isFinished = aPosition >= 1 || ( isUserBreak && GetNbScopes() < 2 );
- if ( isFinished ) {
- if ( result() != Accepted ) {
- QDialog::accept();
- }
- } else if (!isVisible()) {
- open();
- }
-
- if ( theForce ) {
- if ( !isUserBreak ) {
- int aNbSteps = myBar->maximum() - myBar->minimum();
- int aValue = int( aPosition * aNbSteps );
- myBar->setValue(aValue);
- }
-
- QApplication::processEvents();
- }
-
- return true;
-}
-
-Standard_Boolean HYDROGUI_ProgressIndicator::UserBreak()
-{
- return myUserBreak;
-}
-
-void HYDROGUI_ProgressIndicator::Reset()
-{
- Message_ProgressIndicator::Reset();
- setButtonText( Cancel, tr("CANCEL") );
- setButtonEnabled( true, Cancel );
- myUserBreak = false;
-}
-
-void HYDROGUI_ProgressIndicator::reject()
-{
- myUserBreak = true;
- setButtonText( Cancel, tr("CANCELLING") );
- setButtonEnabled( false, Cancel );
- QApplication::processEvents();
-}
\ No newline at end of file
+++ /dev/null
-// 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 HYDROGUI_PROGRESSINDICATOR_H
-#define HYDROGUI_PROGRESSINDICATOR_H
-
-#include <QtxDialog.h>
-
-#include <Message_ProgressIndicator.hxx>
-
-class QProgressBar;
-
-class HYDROGUI_ProgressIndicator : public QtxDialog, public Message_ProgressIndicator
-{
- Q_OBJECT
-
-public:
- HYDROGUI_ProgressIndicator( QWidget* theParent, const QString& theName );
- virtual ~HYDROGUI_ProgressIndicator();
-
- virtual Standard_Boolean Show (const Standard_Boolean theForce);
-
- virtual Standard_Boolean UserBreak();
-
- virtual void Reset();
-
-protected slots:
- virtual void reject();
-
-private:
- QProgressBar* myBar;
- bool myUserBreak;
-
-public:
- DEFINE_STANDARD_RTTIEXT (HYDROGUI_ProgressIndicator, Message_ProgressIndicator)
-};
-
-#endif
--- /dev/null
+// 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 "HYDROGUI_SIProgressIndicator.h"
+
+#include <QProgressBar>
+#include <QVBoxLayout>
+#include <QApplication>
+
+IMPLEMENT_STANDARD_RTTIEXT(HYDROGUI_SIProgressIndicator, Message_ProgressIndicator)
+
+HYDROGUI_SIProgressIndicator::HYDROGUI_SIProgressIndicator( QWidget* theParent )
+: QtxDialog( theParent, true, false, QtxDialog::Cancel ), myUserBreak(Standard_False)
+{
+ setWindowTitle( tr( "STRICKLER_INTERPOLATION_TLT" ) );
+
+ QVBoxLayout* aLayout = new QVBoxLayout( mainFrame() );
+ aLayout->setMargin( 5 );
+ aLayout->setSpacing( 5 );
+
+ myBar = new QProgressBar( mainFrame() );
+
+ aLayout->addWidget( myBar );
+
+ setButtonText( Cancel, tr("CANCEL") );
+ setButtonPosition( Center, Cancel );
+ setMinimumWidth( 350 );
+}
+
+HYDROGUI_SIProgressIndicator::~HYDROGUI_SIProgressIndicator()
+{
+}
+
+Standard_Boolean HYDROGUI_SIProgressIndicator::Show(const Standard_Boolean theForce)
+{
+ Standard_Real aPosition = GetPosition();
+ Standard_Boolean isUserBreak = UserBreak();
+
+ bool isFinished = aPosition >= 1 || ( isUserBreak && GetNbScopes() < 2 );
+ if ( isFinished ) {
+ if ( result() != Accepted ) {
+ QDialog::accept();
+ }
+ } else if (!isVisible()) {
+ open();
+ }
+
+ if ( theForce ) {
+ if ( !isUserBreak ) {
+ int aNbSteps = myBar->maximum() - myBar->minimum();
+ int aValue = int( aPosition * aNbSteps );
+ myBar->setValue(aValue);
+ }
+
+ QApplication::processEvents();
+ }
+
+ return true;
+}
+
+Standard_Boolean HYDROGUI_SIProgressIndicator::UserBreak()
+{
+ return myUserBreak;
+}
+
+void HYDROGUI_SIProgressIndicator::Reset()
+{
+ Message_ProgressIndicator::Reset();
+ setButtonText( Cancel, tr("CANCEL") );
+ setButtonEnabled( true, Cancel );
+ myUserBreak = Standard_False;
+}
+
+void HYDROGUI_SIProgressIndicator::reject()
+{
+ myUserBreak = Standard_True;
+ setButtonText( Cancel, tr("CANCELLING") );
+ setButtonEnabled( false, Cancel );
+ QApplication::processEvents();
+}
\ No newline at end of file
--- /dev/null
+// 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 HYDROGUI_SIPROGRESSINDICATOR_H
+#define HYDROGUI_SIPROGRESSINDICATOR_H
+
+#include <QtxDialog.h>
+
+#include <Message_ProgressIndicator.hxx>
+
+class QProgressBar;
+
+class HYDROGUI_SIProgressIndicator : public QtxDialog, public Message_ProgressIndicator
+{
+ Q_OBJECT
+
+public:
+ HYDROGUI_SIProgressIndicator( QWidget* theParent );
+ virtual ~HYDROGUI_SIProgressIndicator();
+
+ virtual Standard_Boolean Show (const Standard_Boolean theForce);
+
+ virtual Standard_Boolean UserBreak();
+
+ virtual void Reset();
+
+protected slots:
+ virtual void reject();
+
+private:
+ QProgressBar* myBar;
+ Standard_Boolean myUserBreak;
+
+public:
+ DEFINE_STANDARD_RTTIEXT (HYDROGUI_SIProgressIndicator, Message_ProgressIndicator)
+};
+
+#endif
--- /dev/null
+// 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 "HYDROGUI_ZIProgressIndicator.h"
+#include "HYDROGUI_Tool.h"
+
+#include "HYDROData_Tool.h"
+
+#include <QLabel>
+#include <QProgressBar>
+#include <QVBoxLayout>
+#include <QApplication>
+
+IMPLEMENT_STANDARD_RTTIEXT(HYDROGUI_ZIProgressIndicator, Message_ProgressIndicator)
+
+HYDROGUI_ZIProgressIndicator::HYDROGUI_ZIProgressIndicator( QWidget* theParent )
+: QtxDialog( theParent, true, false, QtxDialog::Cancel ), myUserBreak(Standard_False),
+ myQuadTreePosition(0)
+{
+ setWindowTitle( tr( "BATHYMETRY_INTERPOLATION_TLT" ) );
+
+ QVBoxLayout* aLayout = new QVBoxLayout( mainFrame() );
+ aLayout->setMargin( 5 );
+ aLayout->setSpacing( 5 );
+
+ myQuadTreeBar = new QProgressBar( mainFrame() );
+ myTriangulationState = new QLabel( tr( "PENDING" ), mainFrame() );
+ mySummaryBar = new QProgressBar( mainFrame() );
+
+ QString aBold("<b>%1</b>");
+
+ aLayout->addWidget( new QLabel( aBold.arg( tr( "QUADTREE_STAGE" ) ) ) );
+ aLayout->addWidget( myQuadTreeBar );
+ aLayout->addSpacing( 10 );
+ aLayout->addWidget( new QLabel( aBold.arg( tr( "TRIANGULATION_STAGE" ) ) ) );
+ aLayout->addWidget( myTriangulationState );
+ aLayout->addSpacing( 10 );
+ aLayout->addWidget( new QLabel( aBold.arg( tr( "EXPLORATION_STAGE" ) ) ) );
+ aLayout->addWidget( mySummaryBar );
+
+ setButtonText( Cancel, tr( "CANCEL" ) );
+ setButtonPosition( Center, Cancel );
+ setMinimumWidth( 350 );
+}
+
+HYDROGUI_ZIProgressIndicator::~HYDROGUI_ZIProgressIndicator()
+{
+}
+
+Standard_Boolean HYDROGUI_ZIProgressIndicator::Show(const Standard_Boolean theForce)
+{
+ Standard_Boolean isUserBreak = UserBreak();
+ Standard_Real aPosition = GetPosition();
+
+ if ( !theForce ) {
+ // quadtree
+ for ( Standard_Integer i = 1; i <= GetNbScopes(); i++ ) {
+ Message_ProgressScale aScope = GetScope(i);
+ QString aName = HYDROGUI_Tool::ToQString( aScope.GetName() );
+ if ( aName != "QuadTree" ) {
+ continue;
+ }
+
+ Standard_Real aMin = aScope.GetMin();
+ Standard_Real aMax = aScope.GetMax();
+ Standard_Real aScopeValue = aScope.BaseToLocal( aPosition );
+ myQuadTreePosition = aScopeValue / (aMax - aMin);
+ break;
+ }
+ } else {
+ if ( !isUserBreak ) {
+ myQuadTreeBar->setValue( int( myQuadTreePosition * 100 ) );
+ mySummaryBar->setValue( int( aPosition * 100 ) );
+ HYDROData_Tool::ExecStatus aStatus = HYDROData_Tool::GetTriangulationStatus();
+ if ( aStatus == HYDROData_Tool::Running ) {
+ myTriangulationState->setText( tr("IN_PROGRESS") );
+ } else if ( aStatus == HYDROData_Tool::Finished ) {
+ myTriangulationState->setText( tr("COMPLETED") );
+ }
+ }
+
+ bool isFinished = aPosition >= 1 || ( isUserBreak && GetNbScopes() < 2 );
+ if ( isFinished ) {
+ if ( result() != Accepted ) {
+ QDialog::accept();
+ }
+ } else if ( !isVisible() ) {
+ open();
+ }
+
+
+ QApplication::processEvents();
+ }
+
+ return true;
+}
+
+Standard_Boolean HYDROGUI_ZIProgressIndicator::UserBreak()
+{
+ return myUserBreak;
+}
+
+void HYDROGUI_ZIProgressIndicator::Reset()
+{
+ Message_ProgressIndicator::Reset();
+ myTriangulationState->setText( tr( "PENDING" ) );
+ setButtonText( Cancel, tr("CANCEL") );
+ setButtonEnabled( true, Cancel );
+ myUserBreak = Standard_False;
+}
+
+void HYDROGUI_ZIProgressIndicator::reject()
+{
+ myUserBreak = Standard_True;
+ setButtonText( Cancel, tr("CANCELLING") );
+ setButtonEnabled( false, Cancel );
+ QApplication::processEvents();
+}
\ No newline at end of file
--- /dev/null
+// 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 HYDROGUI_BATHPROGRESSINDICATOR_H
+#define HYDROGUI_BATHPROGRESSINDICATOR_H
+
+#include <QtxDialog.h>
+
+#include <Message_ProgressIndicator.hxx>
+
+class QLabel;
+class QProgressBar;
+
+class HYDROGUI_ZIProgressIndicator : public QtxDialog, public Message_ProgressIndicator
+{
+ Q_OBJECT
+
+public:
+ HYDROGUI_ZIProgressIndicator( QWidget* theParent );
+ virtual ~HYDROGUI_ZIProgressIndicator();
+
+ virtual Standard_Boolean Show (const Standard_Boolean theForce);
+
+ virtual Standard_Boolean UserBreak();
+
+ virtual void Reset();
+
+protected slots:
+ virtual void reject();
+
+private:
+ QProgressBar* myQuadTreeBar;
+ QLabel* myTriangulationState;
+ QProgressBar* mySummaryBar;
+
+ Standard_Real myQuadTreePosition;
+ Standard_Boolean myUserBreak;
+
+public:
+ DEFINE_STANDARD_RTTIEXT (HYDROGUI_ZIProgressIndicator, Message_ProgressIndicator)
+};
+
+#endif
<source>PREF_POLYLINE_ARROW_SIZE</source>\r
<translation>Polyline arrow size</translation>\r
</message>\r
-\r
- <message>\r
- <source>STRICKLER_INTERPOLATION_TLT</source>\r
- <translation>Strickler coefficient interpolation</translation>\r
- </message>\r
</context>\r
\r
<context>\r
</context>\r
\r
<context>\r
- <name>HYDROGUI_ProgressIndicator</name>\r
+ <name>HYDROGUI_SIProgressIndicator</name>\r
+ <message>\r
+ <source>STRICKLER_INTERPOLATION_TLT</source>\r
+ <translation>Strickler coefficient interpolation</translation>\r
+ </message>\r
<message>\r
<source>CANCELLING</source>\r
<translation>Cancelling...</translation>\r
</message>\r
</context>\r
\r
+ <context>\r
+ <name>HYDROGUI_ZIProgressIndicator</name>\r
+ <message>\r
+ <source>BATHYMETRY_INTERPOLATION_TLT</source>\r
+ <translation>Bathymetry interpolation</translation>\r
+ </message>\r
+ <message>\r
+ <source>OBJECT</source>\r
+ <translation>Object: %1</translation>\r
+ </message>\r
+ <message>\r
+ <source>QUADTREE_STAGE</source>\r
+ <translation>Quadtree calculation</translation>\r
+ </message>\r
+ <message>\r
+ <source>TRIANGULATION_STAGE</source>\r
+ <translation>Triangulation of the point cloud</translation>\r
+ </message>\r
+ <message>\r
+ <source>EXPLORATION_STAGE</source>\r
+ <translation>Exploration of the mesh nodes</translation>\r
+ </message>\r
+ <message>\r
+ <source>PENDING</source>\r
+ <translation>Pending</translation>\r
+ </message>\r
+ <message>\r
+ <source>IN_PROGRESS</source>\r
+ <translation>In progress</translation>\r
+ </message>\r
+ <message>\r
+ <source>COMPLETED</source>\r
+ <translation>Completed</translation>\r
+ </message> \r
+ <message>\r
+ <source>CANCELLING</source>\r
+ <translation>Cancelling...</translation>\r
+ </message>\r
+ </context>\r
\r
</TS>\r