Adds immediate migration results in progress
This commit is contained in:
2102 files changed
+17482
-15071
No files matched your search
+17
-17
@@ -70,12 +70,12 @@ bool AsmEditTrainingAreaDialog::init(LtsSession::LtsSessionDataDds *session,
|
||||
m_session = session;
|
||||
if (!m_session->getDtc<AssetManagement::DataInterface>(m_asmDtc))
|
||||
{
|
||||
ERROR_LOG() << "AsmEditTrainingAreaDialog::init() Could not enable DTC from ASM";
|
||||
ERROR_LOG(m_logger) << "AsmEditTrainingAreaDialog::init() Could not enable DTC from ASM";
|
||||
return false;
|
||||
}
|
||||
if(!m_session->getFtc<AssetManagement::DataInterface>(m_asmFtc))
|
||||
{
|
||||
ERROR_LOG() << "AsmEditTrainingAreaDialog::init() Could not enable FTC from ASM";
|
||||
ERROR_LOG(m_logger) << "AsmEditTrainingAreaDialog::init() Could not enable FTC from ASM";
|
||||
return false;
|
||||
}
|
||||
m_asmFtc->enableTrainingAreaRemove(true);
|
||||
@@ -85,7 +85,7 @@ bool AsmEditTrainingAreaDialog::init(LtsSession::LtsSessionDataDds *session,
|
||||
|
||||
if (!sitMapGuiIfc)
|
||||
{
|
||||
ERROR_LOG() << Q_FUNC_INFO << " Invalid shared_ptr sitMapGuiIfc!";
|
||||
ERROR_LOG(m_logger) << Q_FUNC_INFO << " Invalid shared_ptr sitMapGuiIfc!";
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -93,7 +93,7 @@ bool AsmEditTrainingAreaDialog::init(LtsSession::LtsSessionDataDds *session,
|
||||
AssetManagement::TrainingArea ta = AssetManagement::TrainingArea();
|
||||
if(trainingAreaId == 0)
|
||||
{
|
||||
DEBUG_LOG() << Q_FUNC_INFO << " New training area ";
|
||||
DEBUG_LOG(m_logger) << Q_FUNC_INFO << " New training area ";
|
||||
ta.id() = 0;
|
||||
ta.name() = QStringLiteral("newArea").toStdString();
|
||||
ta.width() = 12800;
|
||||
@@ -105,12 +105,12 @@ bool AsmEditTrainingAreaDialog::init(LtsSession::LtsSessionDataDds *session,
|
||||
ta = m_asmDtc->trainingArea(trainingAreaId);
|
||||
if(ta.id()<= 0)
|
||||
{
|
||||
ERROR_LOG() << Q_FUNC_INFO << " training area not valid id: "<< trainingAreaId;
|
||||
ERROR_LOG(m_logger) << Q_FUNC_INFO << " training area not valid id: "<< trainingAreaId;
|
||||
return false;
|
||||
}
|
||||
|
||||
m_dialogTitle = tr("Edit Training Area: %1").arg(QString::fromStdString(ta.name()));
|
||||
DEBUG_LOG() << Q_FUNC_INFO << " edit training area " <<trainingAreaId;
|
||||
DEBUG_LOG(m_logger) << Q_FUNC_INFO << " edit training area " <<trainingAreaId;
|
||||
}
|
||||
|
||||
m_trainingArea = ta;
|
||||
@@ -183,7 +183,7 @@ void AsmEditTrainingAreaDialog::getPosition()
|
||||
m_sitMapGuiIfc->getCoordinate(this, SLOT(onCoordinate(QPointF)), nullptr);
|
||||
break;
|
||||
case SituationMap::MapMode::Undefined:
|
||||
ERROR_LOG() << Q_FUNC_INFO << " ModeMode == Undefined ";
|
||||
ERROR_LOG(m_logger) << Q_FUNC_INFO << " ModeMode == Undefined ";
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -202,7 +202,7 @@ void AsmEditTrainingAreaDialog::onRectData(const QPointF ¢erPoint, double wi
|
||||
m_trainingArea.width() = width;
|
||||
m_trainingArea.bottomLeft() = convert(btmLeft);
|
||||
|
||||
DEBUG_LOG() << "Pos X: " << centerPoint.x() << " Y: " << centerPoint.y() << " W: " << width << " H: " << height;
|
||||
DEBUG_LOG(m_logger) << "Pos X: " << centerPoint.x() << " Y: " << centerPoint.y() << " W: " << width << " H: " << height;
|
||||
|
||||
showPreviewObject();
|
||||
}
|
||||
@@ -235,7 +235,7 @@ void AsmEditTrainingAreaDialog::onCoordinate(const QPointF ¢erPoint)
|
||||
m_trainingArea.width() = width;
|
||||
m_trainingArea.bottomLeft() = convert(btmLeft);
|
||||
|
||||
DEBUG_LOG() << "Pos X: " << centerPoint.x() << " Y: " << centerPoint.y() << " W: " << width << " H: " << height;
|
||||
DEBUG_LOG(m_logger) << "Pos X: " << centerPoint.x() << " Y: " << centerPoint.y() << " W: " << width << " H: " << height;
|
||||
|
||||
showPreviewObject();
|
||||
|
||||
@@ -245,10 +245,10 @@ void AsmEditTrainingAreaDialog::onCoordinate(const QPointF ¢erPoint)
|
||||
|
||||
void AsmEditTrainingAreaDialog::onEditClicked()
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START Editing..";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START Editing..";
|
||||
if (!m_sitMapGuiIfc || m_trainingArea.id() < 0)
|
||||
{
|
||||
ERROR_LOG() << "onEditClicked: sitMapGuiIfc or trainingArea_id: "<<m_trainingArea.id()<<" invalid! ";
|
||||
ERROR_LOG(m_logger) << "onEditClicked: sitMapGuiIfc or trainingArea_id: "<<m_trainingArea.id()<<" invalid! ";
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -263,7 +263,7 @@ void AsmEditTrainingAreaDialog::onEditClicked()
|
||||
m_ui->sbWidth->value(),
|
||||
m_ui->sbHeight->value());
|
||||
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END Edit";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END Edit";
|
||||
|
||||
onSelectionChanged();
|
||||
|
||||
@@ -279,7 +279,7 @@ void AsmEditTrainingAreaDialog::showPreviewObject()
|
||||
{
|
||||
if (!m_sitMapGuiIfc || m_previewPolygon.size() == 0)
|
||||
{
|
||||
TRACE_LOG() << " AsmEditTrainingAreaDialog::showPreviewObject(): m_sitMapGuiIfc invalid or polygon empty ";
|
||||
TRACE_LOG(m_logger) << " AsmEditTrainingAreaDialog::showPreviewObject(): m_sitMapGuiIfc invalid or polygon empty ";
|
||||
return;
|
||||
}
|
||||
m_sitMapGuiIfc->displayPreviewObject(this, m_previewPolygon, true);
|
||||
@@ -292,7 +292,7 @@ QPointF AsmEditTrainingAreaDialog::getCentPos(TrainingArea ta)
|
||||
ta.bottomLeft().lat());
|
||||
|
||||
QPointF centerPoint = utmCoordinate.geographic((ta.width() / 2.0), ta.height() / 2.0);
|
||||
TRACE_LOG() << Q_FUNC_INFO << " coord: x: "<< centerPoint.x() <<" y: "<< centerPoint.y();
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " coord: x: "<< centerPoint.x() <<" y: "<< centerPoint.y();
|
||||
|
||||
return centerPoint;
|
||||
}
|
||||
@@ -306,7 +306,7 @@ bool AsmEditTrainingAreaDialog::apply()
|
||||
|
||||
if(!m_asmFtc)
|
||||
{
|
||||
ERROR_LOG() << Q_FUNC_INFO << " Can not retrieve AssetManagement::FTC";
|
||||
ERROR_LOG(m_logger) << Q_FUNC_INFO << " Can not retrieve AssetManagement::FTC";
|
||||
return false;
|
||||
}
|
||||
double height = m_ui->sbHeight->value();
|
||||
@@ -325,7 +325,7 @@ bool AsmEditTrainingAreaDialog::apply()
|
||||
return m_asmFtc->trainingAreaModifyRequest(req, this);
|
||||
});
|
||||
|
||||
TRACE_LOG() << Q_FUNC_INFO << " scucess=" << success;
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " scucess=" << success;
|
||||
return success;
|
||||
}
|
||||
|
||||
@@ -346,7 +346,7 @@ QPolygonF AsmEditTrainingAreaDialog::getTrainingArea(const TrainingArea &ta)
|
||||
QPolygonF polygonF;
|
||||
if(!m_asmDtc)
|
||||
{
|
||||
ERROR_LOG() << " m_asmDtc is not valid!";
|
||||
ERROR_LOG(m_logger) << " m_asmDtc is not valid!";
|
||||
return{};
|
||||
}
|
||||
AssetManagement::TrainingArea ddsTrainingArea = ta;
|
||||
|
||||
+1
@@ -48,6 +48,7 @@ private slots:
|
||||
void onEditClicked();
|
||||
void onSelectionChanged();
|
||||
private:
|
||||
NGL::INGLLogger &m_logger;
|
||||
void retranslate() override;
|
||||
void onTrainingAreaModifyReply(const Core::FunctionReplyObject &reply) override final { m_requestHelper->requestReply(reply); }
|
||||
void onTrainingAreaRemoveReply(const Core::FunctionReplyObject &reply) override final { m_requestHelper->requestReply(reply); }
|
||||
|
||||
+18
-18
@@ -63,19 +63,19 @@ bool AsmTrainingAreaDialog::init(LtsSession::LtsSessionDataDds *session, const s
|
||||
|
||||
if (!m_session->getDtc<AssetManagement::DataInterface>(m_asmDtc))
|
||||
{
|
||||
ERROR_LOG() << "Could not enable DTC from ASM";
|
||||
ERROR_LOG(m_logger) << "Could not enable DTC from ASM";
|
||||
return false;
|
||||
}
|
||||
if(!m_session->getFtc<AssetManagement::DataInterface>(m_asmFtc))
|
||||
{
|
||||
ERROR_LOG() << "Could not enable FTC from ASM";
|
||||
ERROR_LOG(m_logger) << "Could not enable FTC from ASM";
|
||||
return false;
|
||||
}
|
||||
|
||||
m_sitMapGuiIfc = sitMapGuiIfc;
|
||||
if(!m_sitMapGuiIfc)
|
||||
{
|
||||
ERROR_LOG() << "m_sitMapGuiIfc is invalid ";
|
||||
ERROR_LOG(m_logger) << "m_sitMapGuiIfc is invalid ";
|
||||
return false;
|
||||
}
|
||||
bool bRet = true;
|
||||
@@ -86,11 +86,11 @@ bool AsmTrainingAreaDialog::init(LtsSession::LtsSessionDataDds *session, const s
|
||||
|
||||
if(!bRet)
|
||||
{
|
||||
ERROR_LOG() << "Could not enable dtc or ftc from ASM";
|
||||
ERROR_LOG(m_logger) << "Could not enable dtc or ftc from ASM";
|
||||
return false;
|
||||
}
|
||||
|
||||
INFO_LOG() << "Ftc && Dtc enabled from ASM";
|
||||
INFO_LOG(m_logger) << "Ftc && Dtc enabled from ASM";
|
||||
|
||||
delete m_model;
|
||||
m_model = new AsmTrainingAreaDialogModel(this);
|
||||
@@ -134,12 +134,12 @@ void AsmTrainingAreaDialog::onAddTrainingArea()
|
||||
addDialog(dialog, m_menuGroup, identifier, LtsWidgets::LayoutArea::eDialogTab);
|
||||
}
|
||||
|
||||
TRACE_LOG() << Q_FUNC_INFO << " adding temp training Area ";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " adding temp training Area ";
|
||||
}
|
||||
|
||||
void AsmTrainingAreaDialog::onRemoveTrainingArea()
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START" ;
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START" ;
|
||||
QModelIndexList indexList = m_ui->trainingAreaView->selectedRows();
|
||||
if (indexList.size() == 0)
|
||||
return;
|
||||
@@ -147,7 +147,7 @@ void AsmTrainingAreaDialog::onRemoveTrainingArea()
|
||||
TrainingArea req = m_model->getRowData(indexList.front().row());
|
||||
if (req.id() < 0)
|
||||
{
|
||||
ERROR_LOG() << Q_FUNC_INFO << " invalid id:bt"<< req.id();
|
||||
ERROR_LOG(m_logger) << Q_FUNC_INFO << " invalid id:bt"<< req.id();
|
||||
return;
|
||||
}
|
||||
if (!m_viewedTaIds.contains(req.id()))
|
||||
@@ -157,7 +157,7 @@ void AsmTrainingAreaDialog::onRemoveTrainingArea()
|
||||
return m_asmFtc->trainingAreaRemoveRequest(TrainingAreaRemoveRequest(req.id()), this);
|
||||
});
|
||||
|
||||
TRACE_LOG() << Q_FUNC_INFO << " success = " << success;
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " success = " << success;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -165,7 +165,7 @@ void AsmTrainingAreaDialog::onRemoveTrainingArea()
|
||||
tr("Cannot remove currently edited Training Area"));
|
||||
}
|
||||
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
void AsmTrainingAreaDialog::onEditTrainingArea()
|
||||
@@ -176,7 +176,7 @@ void AsmTrainingAreaDialog::onEditTrainingArea()
|
||||
TrainingArea taItem = m_model->getRowData(indexList.front().row());
|
||||
if (taItem.id() < 0)
|
||||
{
|
||||
ERROR_LOG() << "onEditTrainingArea invalid id = "<< taItem.id();
|
||||
ERROR_LOG(m_logger) << "onEditTrainingArea invalid id = "<< taItem.id();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -205,16 +205,16 @@ void AsmTrainingAreaDialog::onEditTrainingArea()
|
||||
void AsmTrainingAreaDialog::onSelectionChanged()
|
||||
{
|
||||
enaDisa();
|
||||
DEBUG_LOG() << "onSelectionChanged() called !";
|
||||
DEBUG_LOG(m_logger) << "onSelectionChanged() called !";
|
||||
const QModelIndex curIdx = m_ui->trainingAreaView->currentIndex();
|
||||
if (!curIdx.isValid())
|
||||
return;
|
||||
|
||||
AssetManagement::TrainingArea taItem = m_model->getRowData(curIdx.row());
|
||||
DEBUG_LOG() << "onSelectionChanged() selected training area id: "<<taItem.id();
|
||||
DEBUG_LOG(m_logger) << "onSelectionChanged() selected training area id: "<<taItem.id();
|
||||
if(taItem.id() < 0)
|
||||
{
|
||||
ERROR_LOG() << "onEditTrainingArea invalid id"<< taItem.id();
|
||||
ERROR_LOG(m_logger) << "onEditTrainingArea invalid id"<< taItem.id();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -236,13 +236,13 @@ QPolygonF AsmTrainingAreaDialog::getTrainingArea(int trainingAreaId)
|
||||
{
|
||||
if(!m_asmDtc)
|
||||
{
|
||||
ERROR_LOG() << Q_FUNC_INFO << " m_asmDtc is not valid!";
|
||||
ERROR_LOG(m_logger) << Q_FUNC_INFO << " m_asmDtc is not valid!";
|
||||
return {};
|
||||
}
|
||||
const AssetManagement::TrainingArea &ddsTrainingArea = m_asmDtc->trainingArea(trainingAreaId);
|
||||
if (ddsTrainingArea.id() != trainingAreaId)
|
||||
{
|
||||
ERROR_LOG() << Q_FUNC_INFO << " TrainingArea not found, trainingAreaId = " << trainingAreaId;
|
||||
ERROR_LOG(m_logger) << Q_FUNC_INFO << " TrainingArea not found, trainingAreaId = " << trainingAreaId;
|
||||
return {};
|
||||
}
|
||||
|
||||
@@ -280,7 +280,7 @@ void AsmTrainingAreaDialog::showAllTrainingAreas()
|
||||
for (int row = 0; row < rowCount; ++row)
|
||||
{
|
||||
const TrainingArea ¤tArea = m_model->getRowData(row);
|
||||
INFO_LOG() << " row = " << row << " ; currentArea = " << currentArea;
|
||||
INFO_LOG(m_logger) << " row = " << row << " ; currentArea = " << currentArea;
|
||||
const QPolygonF &poly = getTrainingArea(currentArea);
|
||||
polyVec.append(poly);
|
||||
}
|
||||
@@ -292,7 +292,7 @@ void AsmTrainingAreaDialog::showPreviewObject()
|
||||
{
|
||||
if (!this->m_sitMapGuiIfc || m_previewPolygon.size() == 0)
|
||||
{
|
||||
TRACE_LOG() << " showPreviewObject(): m_sitMapGuiIfc invalid or polygon empty ";
|
||||
TRACE_LOG(m_logger) << " showPreviewObject(): m_sitMapGuiIfc invalid or polygon empty ";
|
||||
return;
|
||||
}
|
||||
this->m_sitMapGuiIfc->displayPreviewObject(this, m_previewPolygon, true);
|
||||
|
||||
+1
@@ -53,6 +53,7 @@ private slots:
|
||||
void onSelectionChanged();
|
||||
|
||||
private:
|
||||
NGL::INGLLogger &m_logger;
|
||||
void retranslate() override;
|
||||
void onTrainingAreaModifyReply(const Core::FunctionReplyObject &reply) override final { m_requestHelper->requestReply(reply); }
|
||||
void onTrainingAreaRemoveReply(const Core::FunctionReplyObject &reply) override final { m_requestHelper->requestReply(reply); }
|
||||
|
||||
+1
-1
@@ -34,7 +34,7 @@ bool AsmTrainingAreaDialogModel::initModel(const std::shared_ptr<Interface::Dtc>
|
||||
});
|
||||
|
||||
} else {
|
||||
WARNING_LOG() << Q_FUNC_INFO << " no m_asmDtc";
|
||||
WARNING_LOG(m_logger) << Q_FUNC_INFO << " no m_asmDtc";
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
+3
@@ -34,6 +34,9 @@ public:
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
bool m_hideRemoved;
|
||||
std::shared_ptr<Interface::Dtc> m_asmDtc;
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user