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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user