mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#2770 Fracture : Extract startTimer()
This commit is contained in:
parent
95151193e9
commit
4eec46cbdc
@ -17,12 +17,15 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "RiaCompletionTypeCalculationScheduler.h"
|
||||
|
||||
#include "RiaApplication.h"
|
||||
|
||||
#include "Rim3dView.h"
|
||||
#include "RimEclipseCase.h"
|
||||
#include "RimEclipseCaseCollection.h"
|
||||
#include "RimOilField.h"
|
||||
#include "RimProject.h"
|
||||
|
||||
#include "RiuMainWindow.h"
|
||||
#include "RiuViewer.h"
|
||||
|
||||
@ -53,14 +56,7 @@ void RiaCompletionTypeCalculationScheduler::scheduleRecalculateCompletionTypeAnd
|
||||
m_eclipseCasesToRecalculate.push_back(eclipseCase);
|
||||
}
|
||||
|
||||
if (!m_recalculateCompletionTypeTimer)
|
||||
{
|
||||
m_recalculateCompletionTypeTimer = new QTimer(this);
|
||||
m_recalculateCompletionTypeTimer->setSingleShot(true);
|
||||
connect(m_recalculateCompletionTypeTimer, SIGNAL(timeout()), this, SLOT(slotRecalculateCompletionType()));
|
||||
}
|
||||
|
||||
m_recalculateCompletionTypeTimer->start(1500);
|
||||
startTimer();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -70,14 +66,7 @@ void RiaCompletionTypeCalculationScheduler::scheduleRecalculateCompletionTypeAnd
|
||||
{
|
||||
m_eclipseCasesToRecalculate.push_back(eclipseCase);
|
||||
|
||||
if (!m_recalculateCompletionTypeTimer)
|
||||
{
|
||||
m_recalculateCompletionTypeTimer = new QTimer(this);
|
||||
m_recalculateCompletionTypeTimer->setSingleShot(true);
|
||||
connect(m_recalculateCompletionTypeTimer, SIGNAL(timeout()), this, SLOT(slotRecalculateCompletionType()));
|
||||
}
|
||||
|
||||
m_recalculateCompletionTypeTimer->start(1500);
|
||||
startTimer();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -120,3 +109,18 @@ RiaCompletionTypeCalculationScheduler::~RiaCompletionTypeCalculationScheduler()
|
||||
{
|
||||
delete m_recalculateCompletionTypeTimer;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiaCompletionTypeCalculationScheduler::startTimer()
|
||||
{
|
||||
if (!m_recalculateCompletionTypeTimer)
|
||||
{
|
||||
m_recalculateCompletionTypeTimer = new QTimer(this);
|
||||
m_recalculateCompletionTypeTimer->setSingleShot(true);
|
||||
connect(m_recalculateCompletionTypeTimer, SIGNAL(timeout()), this, SLOT(slotRecalculateCompletionType()));
|
||||
}
|
||||
|
||||
m_recalculateCompletionTypeTimer->start(1500);
|
||||
}
|
||||
|
@ -18,14 +18,15 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <QObject>
|
||||
#include <vector>
|
||||
#include "cafPdmPointer.h"
|
||||
|
||||
#include <QObject>
|
||||
|
||||
#include <vector>
|
||||
|
||||
class QTimer;
|
||||
class RimEclipseCase;
|
||||
|
||||
|
||||
class RiaCompletionTypeCalculationScheduler : public QObject
|
||||
{
|
||||
Q_OBJECT;
|
||||
@ -44,6 +45,9 @@ private:
|
||||
RiaCompletionTypeCalculationScheduler(const RiaCompletionTypeCalculationScheduler& o) = delete;
|
||||
void operator=(const RiaCompletionTypeCalculationScheduler& o) = delete;
|
||||
|
||||
void startTimer();
|
||||
|
||||
private:
|
||||
std::vector<caf::PdmPointer<RimEclipseCase> > m_eclipseCasesToRecalculate;
|
||||
QTimer* m_recalculateCompletionTypeTimer;
|
||||
};
|
||||
|
@ -394,7 +394,6 @@ const RigVirtualPerforationTransmissibilities* RimEclipseCase::computeAndGetVirt
|
||||
}
|
||||
}
|
||||
|
||||
;
|
||||
for (const auto& wellRes : rigEclipseCase->wellResults())
|
||||
{
|
||||
std::vector<std::vector<RigCompletionData>> completionsPerTimeStep;
|
||||
|
Loading…
Reference in New Issue
Block a user