mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-23 07:15:35 +08:00
Ref T28, using background updater in mapping tool
This commit is contained in:
committed by
Mathew Sutcliffe
parent
f4af5e6cc1
commit
66e729b090
@@ -8,6 +8,7 @@
|
||||
*/
|
||||
|
||||
#include "swiftdata.h"
|
||||
#include "blackcore/db/backgrounddataupdater.h"
|
||||
#include "blackcore/data/globalsetup.h"
|
||||
#include "blackgui/components/datamaininfoareacomponent.h"
|
||||
#include "blackgui/components/dbmappingcomponent.h"
|
||||
@@ -36,6 +37,7 @@ using namespace BlackMisc::Network;
|
||||
using namespace BlackMisc::Simulation;
|
||||
using namespace BlackCore;
|
||||
using namespace BlackCore::Data;
|
||||
using namespace BlackCore::Db;
|
||||
using namespace BlackGui;
|
||||
using namespace BlackGui::Components;
|
||||
using namespace BlackConfig;
|
||||
@@ -151,6 +153,28 @@ void CSwiftData::performGracefulShutdown()
|
||||
// void
|
||||
}
|
||||
|
||||
void CSwiftData::consolidationSettingChanged()
|
||||
{
|
||||
int consolidationSecs = m_consolidationSettings.get();
|
||||
if (consolidationSecs < 0)
|
||||
{
|
||||
if (m_updater)
|
||||
{
|
||||
m_updater->gracefulShutdown();
|
||||
m_updater.reset(nullptr);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!m_updater)
|
||||
{
|
||||
m_updater.reset(new CBackgroundDataUpdater(this));
|
||||
m_updater->start(QThread::LowestPriority);
|
||||
}
|
||||
m_updater->startUpdating(consolidationSecs);
|
||||
}
|
||||
}
|
||||
|
||||
void CSwiftData::displayConsole()
|
||||
{
|
||||
ui->comp_MainInfoArea->displayConsole();
|
||||
|
||||
Reference in New Issue
Block a user