Adds immediate migration results in progress
This commit is contained in:
2102 files changed
+17482
-15071
No files matched your search
+3
-3
@@ -175,7 +175,7 @@ bool BuildingEdit::apply()
|
||||
|
||||
|
||||
|
||||
DEBUG_LOG() << "fortifyFactors.size()=" << fortifyFactors.size();
|
||||
DEBUG_LOG(m_logger) << "fortifyFactors.size()=" << fortifyFactors.size();
|
||||
if (fortifyFactors.size())
|
||||
{
|
||||
m_requestHelper->addRequest([this, fortifyFactors]()
|
||||
@@ -187,7 +187,7 @@ bool BuildingEdit::apply()
|
||||
fortifyRequest.fortifyFactors().reserve(fortifyFactors.size());
|
||||
for (const auto &e : fortifyFactors)
|
||||
{
|
||||
DEBUG_LOG() << "push_back= databaseId=" << e.structureElementId()
|
||||
DEBUG_LOG(m_logger) << "push_back= databaseId=" << e.structureElementId()
|
||||
<< " fortifyFactor=" << e.fortifyFactor();
|
||||
fortifyRequest.fortifyFactors().push_back(Buildings::FortifyFactor(e.structureElementId(), e.fortifyFactor()));
|
||||
}
|
||||
@@ -305,7 +305,7 @@ bool BuildingEdit::sendBuildingStateRequest(ProjectDataManagement::Vulnerability
|
||||
requestData.buildings(buildings);
|
||||
requestData.vulnerabilityState(state);
|
||||
|
||||
DEBUG_LOG() << Q_FUNC_INFO << "currentData: " << state;
|
||||
DEBUG_LOG(m_logger) << Q_FUNC_INFO << "currentData: " << state;
|
||||
|
||||
return m_bldFtc->setBuildingStatesRequest(requestData, this);
|
||||
});
|
||||
|
||||
+2
@@ -58,6 +58,8 @@ private slots:
|
||||
void onDestroyElement();
|
||||
|
||||
protected:
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
void retranslate() override;
|
||||
bool apply() override;
|
||||
|
||||
|
||||
+10
-10
@@ -16,8 +16,8 @@ namespace BuildingViewer
|
||||
{
|
||||
BuildingEditModel::BuildingEditModel(QObject *parent,
|
||||
const std::shared_ptr<InfrastructureManagement::Interface::Dtc> &ismDtc,
|
||||
const std::shared_ptr<Buildings::Interface::Dtc> &bldDtc)
|
||||
: NGLTreeModel(parent, new NGLTreeItem(QVariant()), {
|
||||
const std::shared_ptr<Buildings::Interface::Dtc> &bldDtc) : NGLTreeModel(parent, new NGLTreeItem(QVariant()),,
|
||||
m_logger(NGL::NGLLoggerBootstrap::getLogger()) {
|
||||
tr("Selected Building"),
|
||||
QStringLiteral("Name (DEBUG)"),
|
||||
QStringLiteral("MountingPointId (DEBUG)"),
|
||||
@@ -76,7 +76,7 @@ QVariant BuildingEditModel::data(const QModelIndex &index, int role) const
|
||||
|
||||
bool BuildingEditModel::slotUpdateRow(const BuildingViewer::TreeItem &room, const bool fortifyChanged)
|
||||
{
|
||||
DEBUG_LOG() << "slotUpdateRow isBuilding=" << room.isBuilding()
|
||||
DEBUG_LOG(m_logger) << "slotUpdateRow isBuilding=" << room.isBuilding()
|
||||
<< " isFloor" << room.isFloor()
|
||||
<< " isRoom" << room.isRoom();
|
||||
|
||||
@@ -122,7 +122,7 @@ bool BuildingEditModel::onInsertRow(int &row, const QModelIndex &parent, const B
|
||||
|
||||
bool BuildingEditModel::init(int32_t mseId)
|
||||
{
|
||||
INFO_LOG() << "init mseId=" << mseId;
|
||||
INFO_LOG(m_logger) << "init mseId=" << mseId;
|
||||
NGLTreeModel::resetModel();
|
||||
m_mapRoomsWithChangedFortifyFactor.clear();
|
||||
|
||||
@@ -141,7 +141,7 @@ bool BuildingEditModel::init(int32_t mseId)
|
||||
const std::vector<InfrastructureManagement::StructureElement> &vecElements = building.elements();
|
||||
for (const auto &se : vecElements)
|
||||
{
|
||||
DEBUG_LOG() << "se: " << se;
|
||||
DEBUG_LOG(m_logger) << "se: " << se;
|
||||
if (se.structureElementTypeId() == InfrastructureManagement::StructureElementType::Building)
|
||||
{
|
||||
BuildingViewer::TreeItem rootItemBuilding(se);
|
||||
@@ -163,7 +163,7 @@ bool BuildingEditModel::init(int32_t mseId)
|
||||
|
||||
for (const auto &se : vecElements)
|
||||
{
|
||||
DEBUG_LOG() << "se: =" << se;
|
||||
DEBUG_LOG(m_logger) << "se: =" << se;
|
||||
if (se.structureElementTypeId() == InfrastructureManagement::StructureElementType_def::Floor)
|
||||
{
|
||||
BuildingViewer::TreeItem itemRoom(se);
|
||||
@@ -208,7 +208,7 @@ bool BuildingEditModel::init(int32_t mseId)
|
||||
}
|
||||
catch (const std::out_of_range &e)
|
||||
{
|
||||
WARNING_LOG() << "Caught exception while trying to get superior id for building " << rootName << " with room with mounting point id: " << se.mountingPointId() << ": " << e.what();
|
||||
WARNING_LOG(m_logger) << "Caught exception while trying to get superior id for building " << rootName << " with room with mounting point id: " << se.mountingPointId() << ": " << e.what();
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -231,7 +231,7 @@ bool BuildingEditModel::init(int32_t mseId)
|
||||
int parentId = item.hasSuperior() ? item.getSuperior() : rootId;
|
||||
if (!parentItemIndexCache.contains(parentId))
|
||||
{
|
||||
ERROR_LOG() << "Invalid building structure! Tree can not be built!";
|
||||
ERROR_LOG(m_logger) << "Invalid building structure! Tree can not be built!";
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -255,7 +255,7 @@ QModelIndex BuildingEditModel::modelIndexByMountingPointId(int mountingPointId)
|
||||
if (privateData(mi)->data().value<TreeItem>().mountingPointId() == mountingPointId)
|
||||
return mi;
|
||||
}
|
||||
WARNING_LOG()<<"Could not find modelindex for given room mountig point id: " << mountingPointId;
|
||||
WARNING_LOG(m_logger)<<"Could not find modelindex for given room mountig point id: " << mountingPointId;
|
||||
return {};
|
||||
}
|
||||
|
||||
@@ -265,7 +265,7 @@ QModelIndex BuildingEditModel::modelIndexByStructureElementId(int structureEleme
|
||||
auto it = m_mapModelIndices.find(structureElementId);
|
||||
if (it == m_mapModelIndices.end())
|
||||
{
|
||||
WARNING_LOG()<<"Could not find modelindex for given room structreElementId: " << structureElementId;
|
||||
WARNING_LOG(m_logger)<<"Could not find modelindex for given room structreElementId: " << structureElementId;
|
||||
return {};
|
||||
}
|
||||
return it.value();
|
||||
|
||||
+2
@@ -50,6 +50,8 @@ signals:
|
||||
void signalModelDataChanged();
|
||||
|
||||
private:
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
QVariant data(const QModelIndex &index, int role) const override final;
|
||||
bool onInsertRow(int &row, const QModelIndex &parent, const BuildingViewer::TreeItem &folderData);
|
||||
|
||||
|
||||
Reference in new issue
Block a user