Adds immediate migration results in progress
This commit is contained in:
2102 files changed
+17482
-15071
No files matched your search
+2
-2
@@ -54,7 +54,7 @@ bool ConflictsDialog::init(LtsSession::LtsSession *session,
|
||||
|
||||
if (m_scheduleId <= 0)
|
||||
{
|
||||
ERROR_LOG() << "Invalid id for Instrumentation plan: " << m_scheduleId;
|
||||
ERROR_LOG(m_logger) << "Invalid id for Instrumentation plan: " << m_scheduleId;
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -64,7 +64,7 @@ bool ConflictsDialog::init(LtsSession::LtsSession *session,
|
||||
|
||||
if (!m_sourceModel->initModel(m_scheduleId, m_anotherScheduleId, m_dtc))
|
||||
{
|
||||
ERROR_LOG() << "Could not init ConflictsDialogModel";
|
||||
ERROR_LOG(m_logger) << "Could not init ConflictsDialogModel";
|
||||
delete m_sourceModel;
|
||||
m_sourceModel = nullptr;
|
||||
return false;
|
||||
|
||||
+9
-9
@@ -128,7 +128,7 @@ bool ConflictsDialogModel::initModel(int scheduleId,
|
||||
if (!(dtc->enableMainStructureElement() &&
|
||||
dtc->enableMainSchedule()))
|
||||
{
|
||||
ERROR_LOG() << "Could not enable Data Topics";
|
||||
ERROR_LOG(m_logger) << "Could not enable Data Topics";
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -302,7 +302,7 @@ void ConflictsDialogModel::initData()
|
||||
|
||||
if (mountingPoint.mountingPointState() == compareMountingPointState)
|
||||
{
|
||||
DEBUG_LOG() << "No conflict for mounting point id = " << currentElement.id() << " - " << currentElement.name();
|
||||
DEBUG_LOG(m_logger) << "No conflict for mounting point id = " << currentElement.id() << " - " << currentElement.name();
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -314,11 +314,11 @@ void ConflictsDialogModel::initData()
|
||||
mpData.conflictState = compareMountingPointState;
|
||||
mpData.mpType = currentElement.mountingPointTypeId();
|
||||
|
||||
DEBUG_LOG() << "## MP Id = " << mpData.id;
|
||||
DEBUG_LOG() << "## MP Name = " << mpData.name;
|
||||
DEBUG_LOG() << "## Aim state = " << mpData.aimState;
|
||||
DEBUG_LOG(m_logger) << "## MP Id = " << mpData.id;
|
||||
DEBUG_LOG(m_logger) << "## MP Name = " << mpData.name;
|
||||
DEBUG_LOG(m_logger) << "## Aim state = " << mpData.aimState;
|
||||
|
||||
DEBUG_LOG() << "Adding mounting point id = " << mpData.id << " - " << mpData.name;
|
||||
DEBUG_LOG(m_logger) << "Adding mounting point id = " << mpData.id << " - " << mpData.name;
|
||||
|
||||
item = new NGLTreeItem(QVariant::fromValue(mpData));
|
||||
}
|
||||
@@ -338,16 +338,16 @@ void ConflictsDialogModel::initData()
|
||||
parentIndex = m_mountingPointIndexes.value(path.at(path.size() - 2), indexFromItem(m_rootItem));
|
||||
if (!parentIndex.isValid())
|
||||
{
|
||||
DEBUG_LOG() << "Did not find parent for structure element with id " << currentElement.id() << " mseid: " << mse.id();
|
||||
DEBUG_LOG(m_logger) << "Did not find parent for structure element with id " << currentElement.id() << " mseid: " << mse.id();
|
||||
for (const StructureElement &se : mse.elements())
|
||||
DEBUG_LOG() << " se: " << se.id() << ", " << se.displayName() << ", " << se.name();
|
||||
DEBUG_LOG(m_logger) << " se: " << se.id() << ", " << se.displayName() << ", " << se.name();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
parentIndex = groupIndex.isValid() ? groupIndex : indexFromItem(m_rootItem);
|
||||
DEBUG_LOG() << "Insert row under root: " << currentElement.displayName();
|
||||
DEBUG_LOG(m_logger) << "Insert row under root: " << currentElement.displayName();
|
||||
}
|
||||
|
||||
insertRow(rowCount(parentIndex), parentIndex, item);
|
||||
|
||||
+1
@@ -70,6 +70,7 @@ public:
|
||||
public slots:
|
||||
void onConflictedDataChanged();
|
||||
private:
|
||||
NGL::INGLLogger &m_logger;
|
||||
void initData();
|
||||
|
||||
|
||||
|
||||
+21
-21
@@ -26,7 +26,7 @@ OverviewDialog::OverviewDialog(const QString &menuGroup, LtsSession::LtsSession
|
||||
, m_ui(new Ui::OverviewDialog)
|
||||
, m_menuGroup(menuGroup)
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START";
|
||||
m_ui->setupUi(this);
|
||||
m_timerUpdateView = new QTimer(this);
|
||||
m_timerUpdateView->setSingleShot(true);
|
||||
@@ -36,19 +36,19 @@ OverviewDialog::OverviewDialog(const QString &menuGroup, LtsSession::LtsSession
|
||||
connect(m_ui->cbBasePlan, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &OverviewDialog::onCbBasePlanIndexChanged);
|
||||
|
||||
setOnlineHelpFilename(QStringLiteral("Ressourcen-Overview"));
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
OverviewDialog::~OverviewDialog()
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START";
|
||||
delete m_ui;
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
void OverviewDialog::aboutToClose()
|
||||
{
|
||||
DEBUG_LOG() << "About to close";
|
||||
DEBUG_LOG(m_logger) << "About to close";
|
||||
if (m_session->baseLayout()->getWidget(m_menuGroup, QStringLiteral("OverviewConflicts")))
|
||||
m_session->baseLayout()->getWidget(m_menuGroup, QStringLiteral("OverviewConflicts"))->closeRequest();
|
||||
}
|
||||
@@ -69,7 +69,7 @@ bool OverviewDialog::init(int planId,
|
||||
const std::shared_ptr<Interface::Ftc> &ftc,
|
||||
const std::shared_ptr<ForeignDataInterface> &dataInterface)
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START";
|
||||
m_scheduleId = planId;
|
||||
m_dtc = dtc;
|
||||
m_ftc = ftc;
|
||||
@@ -93,32 +93,32 @@ bool OverviewDialog::init(int planId,
|
||||
|
||||
|
||||
connect(m_timerUpdateView, &QTimer::timeout, this, &OverviewDialog::reloadModel);
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
return true;
|
||||
}
|
||||
|
||||
void OverviewDialog::setCbBasePlan()
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START";
|
||||
m_ui->cbBasePlan->clear();
|
||||
m_ui->cbBasePlan->addItem(tr("Actual Mountings"), 0);
|
||||
m_ui->cbBasePlan->insertSeparator(1);
|
||||
for (auto ms : m_dtc->mainSchedules())
|
||||
m_ui->cbBasePlan->addItem(QString::fromStdString(ms.name()), ms.id());
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
|
||||
void OverviewDialog::setCbComparePlan()
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START";
|
||||
m_ui->cbComparePlan->clear();
|
||||
m_ui->cbComparePlan->addItem(tr("All active(*) plans"),0);
|
||||
m_ui->cbComparePlan->insertSeparator(1);
|
||||
for (auto ms : m_dtc->mainSchedules())
|
||||
m_ui->cbComparePlan->addItem((ms.statusId() == ScheduleStatus_def::Active ? QLatin1Literal("* ") : QLatin1Literal(" ")) +
|
||||
QString::fromStdString(ms.name()), ms.id());
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
void OverviewDialog::onPrint()
|
||||
@@ -150,7 +150,7 @@ void OverviewDialog::onPrint()
|
||||
|
||||
void OverviewDialog::onScheduleIdChanged(int32_t scheduleId)
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START";
|
||||
if (m_scheduleId == scheduleId)
|
||||
return;
|
||||
setCbComparePlan();
|
||||
@@ -163,30 +163,30 @@ void OverviewDialog::onScheduleIdChanged(int32_t scheduleId)
|
||||
m_session->baseLayout()->getWidget(m_menuGroup, QStringLiteral("OverviewConflicts"))->closeRequest();
|
||||
|
||||
retranslate();
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
void OverviewDialog::onCbComparePlanIndexChanged(int index)
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START";
|
||||
Q_UNUSED(index);
|
||||
updateOverviewData();
|
||||
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
void OverviewDialog::onCbBasePlanIndexChanged(int index)
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START";
|
||||
Q_UNUSED(index);
|
||||
updateOverviewData();
|
||||
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
void OverviewDialog::onPlansDataChanged()
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START";
|
||||
updateOverviewData();
|
||||
ConflictsDialog *dialog = static_cast<ConflictsDialog*>(m_session->baseLayout()->getWidget(m_menuGroup, QStringLiteral("OverviewConflicts")));
|
||||
if (dialog)
|
||||
@@ -194,7 +194,7 @@ void OverviewDialog::onPlansDataChanged()
|
||||
dialog->updateModel();
|
||||
}
|
||||
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
void OverviewDialog::updateOverviewData()
|
||||
@@ -204,7 +204,7 @@ void OverviewDialog::updateOverviewData()
|
||||
|
||||
void OverviewDialog::reloadModel()
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START";
|
||||
if (m_model == nullptr)
|
||||
return;
|
||||
|
||||
@@ -217,7 +217,7 @@ void OverviewDialog::reloadModel()
|
||||
if (m_session->baseLayout()->getWidget(m_menuGroup, QStringLiteral("OverviewConflicts")))
|
||||
m_session->baseLayout()->getWidget(m_menuGroup, QStringLiteral("OverviewConflicts"))->closeRequest();
|
||||
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
}
|
||||
+14
-14
@@ -31,7 +31,7 @@ OverviewDialogModel::OverviewDialogModel(QObject *parent)
|
||||
, m_comparedScheduleId(0)
|
||||
, m_dtc(nullptr)
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START";
|
||||
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@ OverviewDialogModel::OverviewDialogModel(QObject *parent)
|
||||
m_refMap[MountingPointType_def::IndoorCamera] = 2;
|
||||
m_refMap[MountingPointType_def::IndoorIPS] = 3;
|
||||
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
QVariant OverviewDialogModel::data(const QModelIndex &index, int role) const
|
||||
@@ -113,7 +113,7 @@ bool OverviewDialogModel::initModel(int32_t mainScheduleId,
|
||||
const std::shared_ptr<Interface::Dtc> &dtc,
|
||||
int32_t comparedScheduleId, int32_t basePlanId)
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START";
|
||||
m_dtc = dtc;
|
||||
m_loadedScheduleId = mainScheduleId;
|
||||
m_comparedScheduleId = comparedScheduleId;
|
||||
@@ -124,19 +124,19 @@ bool OverviewDialogModel::initModel(int32_t mainScheduleId,
|
||||
if (!m_dtc->mainSchedules().contains(m_loadedScheduleId))
|
||||
{
|
||||
m_loadedScheduleId = -1;
|
||||
ERROR_LOG() << "Invalid scheduleId = " << mainScheduleId;
|
||||
ERROR_LOG(m_logger) << "Invalid scheduleId = " << mainScheduleId;
|
||||
return false;
|
||||
}
|
||||
|
||||
DEBUG_LOG() << "[INITIAL] loaded: "<<m_loadedScheduleId<<" cmp: "<<m_comparedScheduleId<<" sim: "<<m_basePlanId;
|
||||
DEBUG_LOG(m_logger) << "[INITIAL] loaded: "<<m_loadedScheduleId<<" cmp: "<<m_comparedScheduleId<<" sim: "<<m_basePlanId;
|
||||
|
||||
if (!initData())
|
||||
{
|
||||
ERROR_LOG() << "Could not init data";
|
||||
ERROR_LOG(m_logger) << "Could not init data";
|
||||
return false;
|
||||
}
|
||||
|
||||
DEBUG_LOG() << "initModel successful";
|
||||
DEBUG_LOG(m_logger) << "initModel successful";
|
||||
|
||||
|
||||
connect(m_dtc.get(), &Interface::Dtc::mainStructureElementChanged,
|
||||
@@ -146,13 +146,13 @@ bool OverviewDialogModel::initModel(int32_t mainScheduleId,
|
||||
connect(m_dtc.get(), &Interface::Dtc::instrumentationAssetChanged,
|
||||
this, &OverviewDialogModel::initData, Qt::UniqueConnection);
|
||||
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
return true;
|
||||
}
|
||||
|
||||
bool OverviewDialogModel::initData()
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START";
|
||||
|
||||
#ifdef BENCHMARK
|
||||
QElapsedTimer elapsedTimer1;
|
||||
@@ -173,9 +173,9 @@ bool OverviewDialogModel::initData()
|
||||
setNewData();
|
||||
|
||||
for ( int mppId : std::as_const(m_conflictedStructureElementIds))
|
||||
DEBUG_LOG() << "Conflicted structure element id = " << mppId;
|
||||
DEBUG_LOG(m_logger) << "Conflicted structure element id = " << mppId;
|
||||
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -213,7 +213,7 @@ bool OverviewDialogModel::hasConflictedMountingPoints()
|
||||
|
||||
QHash<int, MountingPointPlan> OverviewDialogModel::mergePlans(const QHash<int, MountingPointPlan> &currPlan, const int cmpPlanId)
|
||||
{
|
||||
DEBUG_LOG()<<"[MERGE PLANs] currPlanId: "<<m_loadedScheduleId<<" ; cmpPlanId: "<<cmpPlanId;
|
||||
DEBUG_LOG(m_logger)<<"[MERGE PLANs] currPlanId: "<<m_loadedScheduleId<<" ; cmpPlanId: "<<cmpPlanId;
|
||||
QHash<int, MountingPointPlan> mergedPlan = currPlan;
|
||||
|
||||
const auto msConst = m_dtc->mainSchedules();
|
||||
@@ -243,7 +243,7 @@ QHash<int, MountingPointPlan> OverviewDialogModel::mergePlans(const QHash<int, M
|
||||
if ((basePlanMpp.mountingPointState() == MountingPointState::Equipped && currentMpp.mountingPointState() == MountingPointState::Empty) ||
|
||||
(basePlanMpp.mountingPointState() == MountingPointState::Empty && currentMpp.mountingPointState() == MountingPointState::Equipped))
|
||||
{
|
||||
DEBUG_LOG()<<" conflicted name: "<<currentMpp.structureElementId();
|
||||
DEBUG_LOG(m_logger)<<" conflicted name: "<<currentMpp.structureElementId();
|
||||
mergedPlan[currentMpp.structureElementId()].mountingPointState(MountingPointState::Idle);
|
||||
m_conflictedStructureElementIds.insert(basePlanMpp.structureElementId());
|
||||
}
|
||||
@@ -279,7 +279,7 @@ void OverviewDialogModel::setNewData()
|
||||
QHash<int , MountingPointPlan> baseMountingPointPlans;
|
||||
|
||||
|
||||
DEBUG_LOG() << "We compare plan " << m_basePlanId << " with " << m_comparedScheduleId;
|
||||
DEBUG_LOG(m_logger) << "We compare plan " << m_basePlanId << " with " << m_comparedScheduleId;
|
||||
|
||||
baseMountingPointPlans.clear();
|
||||
m_conflictedStructureElementIds.clear();
|
||||
|
||||
+2
@@ -56,6 +56,8 @@ public:
|
||||
QMap<MountingPointType, int> getOtherActiveNeeded(const int &currPlanId);
|
||||
|
||||
private:
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
QHash<int, MountingPointPlan> mergePlans(const QHash<int, MountingPointPlan> &currPlan, const int cmpPlanId);
|
||||
void setTotalCmpActiveNeed(const QMap<int, MountingPointPlan> &mergedPlan);
|
||||
MountingPointType getMountingPointTypeId(int structureElementId);
|
||||
|
||||
+13
-13
@@ -27,7 +27,7 @@ OverviewMountingPointListDialog::OverviewMountingPointListDialog(const QString &
|
||||
, m_printMountingAction(new QAction(tr("To Mount"), this))
|
||||
, m_printUnmountingAction(new QAction(tr("To Unmount"), this))
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START";
|
||||
|
||||
setAttribute(Qt::WA_DeleteOnClose);
|
||||
m_ui->setupUi(this);
|
||||
@@ -39,14 +39,14 @@ OverviewMountingPointListDialog::OverviewMountingPointListDialog(const QString &
|
||||
connect(m_actionMenu, &QMenu::triggered, this, &OverviewMountingPointListDialog::onPrint);
|
||||
|
||||
m_buttonBox->setMenu(LtsWidgets::DialogButton::Print, m_actionMenu);
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
OverviewMountingPointListDialog::~OverviewMountingPointListDialog()
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START";
|
||||
delete m_ui;
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@ bool OverviewMountingPointListDialog::init(LtsSession::LtsSession *session,
|
||||
const std::shared_ptr<ForeignDataInterface> &dataInterface,
|
||||
int32_t scheduleId)
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START, scheduleId=" << scheduleId;
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START, scheduleId=" << scheduleId;
|
||||
m_dtc = dtc;
|
||||
m_dataIfc = dataInterface;
|
||||
m_session = session;
|
||||
@@ -68,30 +68,30 @@ bool OverviewMountingPointListDialog::init(LtsSession::LtsSession *session,
|
||||
|
||||
if (!m_ftc->enableInstrumentationAssetModify())
|
||||
{
|
||||
ERROR_LOG() << "Could not enable FT InstrumentationAssetModify of ISM";
|
||||
ERROR_LOG(m_logger) << "Could not enable FT InstrumentationAssetModify of ISM";
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!m_ftc->enableMountingPointPlanModify())
|
||||
{
|
||||
ERROR_LOG() << "Could not enable FT enableMountingPointPlansModify of ISM";
|
||||
ERROR_LOG(m_logger) << "Could not enable FT enableMountingPointPlansModify of ISM";
|
||||
return false;
|
||||
}
|
||||
|
||||
DEBUG_LOG() << Q_FUNC_INFO << " new ViewMountingPointListModel...";
|
||||
DEBUG_LOG(m_logger) << Q_FUNC_INFO << " new ViewMountingPointListModel...";
|
||||
delete m_sourceModel;
|
||||
m_sourceModel = new ViewMountingPointListModel(this);
|
||||
|
||||
if (!m_sourceModel->initModel(m_dtc, m_dataIfc, m_scheduleId))
|
||||
{
|
||||
ERROR_LOG() << "Could not init model";
|
||||
ERROR_LOG(m_logger) << "Could not init model";
|
||||
delete m_sourceModel;
|
||||
m_sourceModel = nullptr;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
DEBUG_LOG() << Q_FUNC_INFO << " new m_mountedPointSortProxyModel ...";
|
||||
DEBUG_LOG(m_logger) << Q_FUNC_INFO << " new m_mountedPointSortProxyModel ...";
|
||||
delete m_mountedPointSortProxyModel;
|
||||
m_mountedPointSortProxyModel = new ViewMountingPointListSortModel(this);
|
||||
m_mountedPointSortProxyModel->setVisibleState(MountingPointState::Equipped);
|
||||
@@ -103,7 +103,7 @@ bool OverviewMountingPointListDialog::init(LtsSession::LtsSession *session,
|
||||
m_ui->mountingPointListView->setSortingEnabled(true);
|
||||
|
||||
|
||||
DEBUG_LOG() << Q_FUNC_INFO << " new m_unmountedPointSortProxyModel ...";
|
||||
DEBUG_LOG(m_logger) << Q_FUNC_INFO << " new m_unmountedPointSortProxyModel ...";
|
||||
delete m_unmountedPointSortProxyModel;
|
||||
m_unmountedPointSortProxyModel = new ViewMountingPointListSortModel(this);
|
||||
m_unmountedPointSortProxyModel->setVisibleState(MountingPointState::Empty);
|
||||
@@ -133,7 +133,7 @@ bool OverviewMountingPointListDialog::init(LtsSession::LtsSession *session,
|
||||
|
||||
|
||||
|
||||
DEBUG_LOG() << Q_FUNC_INFO << " filter... ...";
|
||||
DEBUG_LOG(m_logger) << Q_FUNC_INFO << " filter... ...";
|
||||
const auto filters = { MountingPointType::BuildingSensorModule,
|
||||
|
||||
|
||||
@@ -215,7 +215,7 @@ bool OverviewMountingPointListDialog::init(LtsSession::LtsSession *session,
|
||||
|
||||
retranslate();
|
||||
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
+12
-12
@@ -28,11 +28,11 @@ ViewMountingPointListModel::ViewMountingPointListModel(QObject *parent)
|
||||
, m_dtc(nullptr)
|
||||
, m_dataChangedTimer(new QTimer(this))
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START";
|
||||
m_dataChangedTimer->setSingleShot(true);
|
||||
m_dataChangedTimer->setInterval(100);
|
||||
connect(m_dataChangedTimer, &QTimer::timeout, this, &ViewMountingPointListModel::emitDataChanged);
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
|
||||
@@ -105,7 +105,7 @@ bool ViewMountingPointListModel::initModel(const std::shared_ptr<Interface::Dtc>
|
||||
const std::shared_ptr<ForeignDataInterface> &dataInterface,
|
||||
int32_t requestedScheduleId)
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START, scheduleId=" << requestedScheduleId;
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START, scheduleId=" << requestedScheduleId;
|
||||
|
||||
if (m_dtc == dtc)
|
||||
return true;
|
||||
@@ -113,7 +113,7 @@ bool ViewMountingPointListModel::initModel(const std::shared_ptr<Interface::Dtc>
|
||||
if (!(dtc->enableMainStructureElement() &&
|
||||
dtc->enableMountingPointAsset()))
|
||||
{
|
||||
ERROR_LOG() << "Could not enable Datatopics";
|
||||
ERROR_LOG(m_logger) << "Could not enable Datatopics";
|
||||
return false;
|
||||
}
|
||||
m_dtc = dtc;
|
||||
@@ -132,11 +132,11 @@ bool ViewMountingPointListModel::initModel(const std::shared_ptr<Interface::Dtc>
|
||||
connect(m_dataInterface.get(), &ForeignDataInterface::mountingPointChanged,
|
||||
this, &ViewMountingPointListModel::onMountingPointChanged);
|
||||
|
||||
DEBUG_LOG() << "initModel successful";
|
||||
DEBUG_LOG(m_logger) << "initModel successful";
|
||||
|
||||
initData();
|
||||
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -177,7 +177,7 @@ inline int getFakeBuildingGroupId(int seId)
|
||||
|
||||
void ViewMountingPointListModel::initData()
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START, m_scheduleId=" << m_scheduleId;
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START, m_scheduleId=" << m_scheduleId;
|
||||
|
||||
|
||||
#ifdef BENCHMARK
|
||||
@@ -311,9 +311,9 @@ void ViewMountingPointListModel::initData()
|
||||
parentIndex = m_mountingPointIndexes.value(path.at(path.size() - 2), indexFromItem(m_visRoot));
|
||||
if (!parentIndex.isValid())
|
||||
{
|
||||
ERROR_LOG() << "Did not find parent for structure element with id " << currentElement.id() << " mseid: " << mse.id();
|
||||
ERROR_LOG(m_logger) << "Did not find parent for structure element with id " << currentElement.id() << " mseid: " << mse.id();
|
||||
for (const StructureElement &se : mse.elements())
|
||||
ERROR_LOG() << " se: " << se.id() << ", " << se.displayName() << ", " << se.name();
|
||||
ERROR_LOG(m_logger) << " se: " << se.id() << ", " << se.displayName() << ", " << se.name();
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -345,18 +345,18 @@ void ViewMountingPointListModel::initData()
|
||||
qCritical() << " ViewMountingPointListModel::initData-BENCHMARK: m_scheduleId=" << m_scheduleId << " took " << elapsedTimer1.elapsed() << " [ms]";
|
||||
#endif
|
||||
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
bool ViewMountingPointListModel::mountingPointHasAssetMounted(int32_t mountingPointId, const QMap<qint32, MountingPointAsset> &mountingPointAssetMap)
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START";
|
||||
for (const MountingPointAsset &mpa : mountingPointAssetMap)
|
||||
{
|
||||
if (mpa.structureElementId() == mountingPointId)
|
||||
return true;
|
||||
}
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
+2
@@ -90,6 +90,8 @@ private Q_SLOTS:
|
||||
void emitDataChanged();
|
||||
|
||||
private:
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
void initData();
|
||||
void initMountedData();
|
||||
void initUnmountedData();
|
||||
|
||||
Reference in new issue
Block a user