Adds immediate migration results in progress
This commit is contained in:
2102 files changed
+17482
-15071
No files matched your search
+1
-1
@@ -53,7 +53,7 @@ bool ApproachingPointsDialog::init(const std::shared_ptr<Interface::Dtc> &dtc,
|
||||
m_model = new ApproachingPointsDialogModel(this);
|
||||
if (!m_model->initModel(dtc))
|
||||
{
|
||||
ERROR_LOG() << "Could not init model";
|
||||
ERROR_LOG(m_logger) << "Could not init model";
|
||||
delete m_model;
|
||||
m_model = nullptr;
|
||||
return false;
|
||||
|
||||
+2
@@ -49,6 +49,8 @@ private Q_SLOTS:
|
||||
void onAddApproachingPoint();
|
||||
|
||||
private:
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
void retranslate() override;
|
||||
void tableColumnOrganiserSetting() override;
|
||||
|
||||
|
||||
+1
-1
@@ -66,7 +66,7 @@ bool ApproachingPointsDialogModel::initModel(const std::shared_ptr<Interface::Dt
|
||||
};
|
||||
dtc->mainStructureElements(cb);
|
||||
|
||||
INFO_LOG() << "initModel successful";
|
||||
INFO_LOG(m_logger) << "initModel successful";
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
+2
@@ -32,6 +32,8 @@ public:
|
||||
};
|
||||
|
||||
protected:
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
bool isFiltered(const InfrastructureManagement::MainStructureElement &data, DataModification modType) const override;
|
||||
|
||||
private:
|
||||
|
||||
+2
@@ -49,6 +49,8 @@ private slots:
|
||||
void getPosition();
|
||||
|
||||
private:
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
void retranslate() override;
|
||||
void fillCbDepartureDirection();
|
||||
void setData(const MainStructureElement &approachingPoint);
|
||||
|
||||
+18
-18
@@ -265,7 +265,7 @@ InstrumentationAsset AssetListDialog::importData(const QVector<QStringRef> &segm
|
||||
{
|
||||
if (bOk)
|
||||
*bOk = false;
|
||||
WARNING_LOG() << "Could not determine mounting point type from barcode: " << dmc.toString();
|
||||
WARNING_LOG(m_logger) << "Could not determine mounting point type from barcode: " << dmc.toString();
|
||||
}
|
||||
|
||||
return asset;
|
||||
@@ -411,40 +411,40 @@ bool AssetListDialog::init(const std::shared_ptr<Interface::Dtc> &dtc,
|
||||
|
||||
if (!m_ftc->enableStructureElementModify())
|
||||
{
|
||||
ERROR_LOG() << "Could not enable FT StructureElementModify of ISM";
|
||||
ERROR_LOG(m_logger) << "Could not enable FT StructureElementModify of ISM";
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!m_ftc->enableMountingPointAssetModify())
|
||||
{
|
||||
ERROR_LOG() << "Could not enable FT MountingPointAssetModify of ISM";
|
||||
ERROR_LOG(m_logger) << "Could not enable FT MountingPointAssetModify of ISM";
|
||||
return false;
|
||||
}
|
||||
if (!m_ftc->enableMountingPointAssetRemove())
|
||||
{
|
||||
ERROR_LOG() << "Could not enable FT MountingPointAssetRemove of ISM";
|
||||
ERROR_LOG(m_logger) << "Could not enable FT MountingPointAssetRemove of ISM";
|
||||
return false;
|
||||
}
|
||||
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->enableInstrumentationAssetUnmount())
|
||||
{
|
||||
ERROR_LOG() << "Could not enable FT InstrumentationAssetUnmount of ISM";
|
||||
ERROR_LOG(m_logger) << "Could not enable FT InstrumentationAssetUnmount of ISM";
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!m_cmoFtc->enableTriggerUpdate())
|
||||
{
|
||||
ERROR_LOG() << "Could not enable FT TriggerUpdate of CMO";
|
||||
ERROR_LOG(m_logger) << "Could not enable FT TriggerUpdate of CMO";
|
||||
return false;
|
||||
}
|
||||
|
||||
if(m_ftc->enableInstrumentationAssetSetState() == false)
|
||||
{
|
||||
ERROR_LOG()<<"Couldn't enable InstrumentationAssetSetState";
|
||||
ERROR_LOG(m_logger)<<"Couldn't enable InstrumentationAssetSetState";
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -455,7 +455,7 @@ bool AssetListDialog::init(const std::shared_ptr<Interface::Dtc> &dtc,
|
||||
|
||||
if (!m_model->initModel(m_dtc, m_cmoDtc))
|
||||
{
|
||||
ERROR_LOG() << "Could not init model";
|
||||
ERROR_LOG(m_logger) << "Could not init model";
|
||||
delete m_model;
|
||||
m_model = nullptr;
|
||||
return false;
|
||||
@@ -610,7 +610,7 @@ void AssetListDialog::onImportClicked()
|
||||
QVector<QStringRef> segments = line.splitRef(QLatin1Char(';'));
|
||||
if (segments.size() < 10)
|
||||
{
|
||||
WARNING_LOG() << "Skipping line '" << line << "' - to few data";
|
||||
WARNING_LOG(m_logger) << "Skipping line '" << line << "' - to few data";
|
||||
continue;
|
||||
}
|
||||
const InstrumentationAsset ia = importData(segments, &bOk);
|
||||
@@ -649,7 +649,7 @@ void AssetListDialog::onExportClicked()
|
||||
AssetFilterDialog *filterDialog = new AssetFilterDialog(m_model, this);
|
||||
if (!filterDialog->init(m_ui->assetListView->selectionModel()->selectedRows().size() > 0))
|
||||
{
|
||||
ERROR_LOG() << "Unexpected error";
|
||||
ERROR_LOG(m_logger) << "Unexpected error";
|
||||
return;
|
||||
}
|
||||
filterDialog->fillAssetComboBoxes();
|
||||
@@ -678,7 +678,7 @@ void AssetListDialog::onUnmountButtonClicked()
|
||||
StructureElement se;
|
||||
if(m_dtc->getStructureElementInMntPointAssetByAssetId(asset.id(), se) == false)
|
||||
{
|
||||
WARNING_LOG()<<" asset not mounted. name: "<<asset.name()<< " id: "<<asset.id();
|
||||
WARNING_LOG(m_logger)<<" asset not mounted. name: "<<asset.name()<< " id: "<<asset.id();
|
||||
continue;
|
||||
}
|
||||
InstrumentationAssetUnmountRequest req(asset.id());
|
||||
@@ -691,7 +691,7 @@ void AssetListDialog::onUnmountButtonClicked()
|
||||
if(m_requestHelper->hasRequests() &&
|
||||
m_requestHelper->startRequests() == false)
|
||||
{
|
||||
ERROR_LOG()<<" Couldn't unmount selected assets";
|
||||
ERROR_LOG(m_logger)<<" Couldn't unmount selected assets";
|
||||
}
|
||||
|
||||
m_buttonBox->setButtonEnabled(LtsWidgets::DialogButton::Load,false);
|
||||
@@ -753,7 +753,7 @@ void AssetListDialog::onFilterSelected(const AssetFilterDialog::Export &exp, con
|
||||
|
||||
void AssetListDialog::onCustomContextMenuRequested(const QPoint &globalPos, const QModelIndex &indexSrc)
|
||||
{
|
||||
DEBUG_LOG() << Q_FUNC_INFO << " START, indexSrc" << indexSrc.row();
|
||||
DEBUG_LOG(m_logger) << Q_FUNC_INFO << " START, indexSrc" << indexSrc.row();
|
||||
if (!indexSrc.isValid())
|
||||
return;
|
||||
|
||||
@@ -777,7 +777,7 @@ void AssetListDialog::onReachabilityUpdateAction()
|
||||
if (bhasHostnameForTriggerUpdate)
|
||||
{
|
||||
m_hostsForUpdate.insert(QString::fromStdString(ia.hostname()));
|
||||
DEBUG_LOG() << Q_FUNC_INFO << " trigger update for " << ia;
|
||||
DEBUG_LOG(m_logger) << Q_FUNC_INFO << " trigger update for " << ia;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -786,7 +786,7 @@ void AssetListDialog::onReachabilityUpdateAction()
|
||||
|
||||
void AssetListDialog::onHostsForUpdateNotifyTimeout()
|
||||
{
|
||||
INFO_LOG() << Q_FUNC_INFO << " START, hostsForUpdate.size() = " << m_hostsForUpdate.size();
|
||||
INFO_LOG(m_logger) << Q_FUNC_INFO << " START, hostsForUpdate.size() = " << m_hostsForUpdate.size();
|
||||
|
||||
if (!m_cmoFtc)
|
||||
return;
|
||||
@@ -794,7 +794,7 @@ void AssetListDialog::onHostsForUpdateNotifyTimeout()
|
||||
return;
|
||||
|
||||
for (auto item : std::as_const(m_hostsForUpdate))
|
||||
DEBUG_LOG() << Q_FUNC_INFO << " host = " << item;
|
||||
DEBUG_LOG(m_logger) << Q_FUNC_INFO << " host = " << item;
|
||||
|
||||
|
||||
std::vector<std::string> hostnameStd;
|
||||
@@ -806,7 +806,7 @@ void AssetListDialog::onHostsForUpdateNotifyTimeout()
|
||||
ComponentMonitor::TriggerUpdate request;
|
||||
request.hostnames(hostnameStd);
|
||||
|
||||
DEBUG_LOG() << Q_FUNC_INFO << " TriggerUpdate - request = " << request;
|
||||
DEBUG_LOG(m_logger) << Q_FUNC_INFO << " TriggerUpdate - request = " << request;
|
||||
|
||||
m_requestHelper->addRequest([request, this]()
|
||||
{
|
||||
|
||||
+2
@@ -74,6 +74,8 @@ public:
|
||||
void onInstrumentationAssetChanged();
|
||||
|
||||
private:
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
void retranslate() override;
|
||||
bool apply() override final;
|
||||
void tableColumnOrganiserSetting() override;
|
||||
|
||||
+3
-3
@@ -310,12 +310,12 @@ bool AssetListDialogModel::initModel(const std::shared_ptr<Interface::Dtc> &dtc,
|
||||
|
||||
if (!m_dtc->enableInstrumentationAsset())
|
||||
{
|
||||
ERROR_LOG() << "Could not enable Datatopic InstrumentationAsset of the Data Topic Client";
|
||||
ERROR_LOG(m_logger) << "Could not enable Datatopic InstrumentationAsset of the Data Topic Client";
|
||||
return false;
|
||||
}
|
||||
if (!m_cmoDtc->enableComponentStatus())
|
||||
{
|
||||
ERROR_LOG() << "Could not enable Datatopic enableComponentStatus of cmo";
|
||||
ERROR_LOG(m_logger) << "Could not enable Datatopic enableComponentStatus of cmo";
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -366,7 +366,7 @@ bool AssetListDialogModel::initModel(const std::shared_ptr<Interface::Dtc> &dtc,
|
||||
connect(this, &AssetListDialogModel::modelReset, this, &AssetListDialogModel::onUpdateFilter);
|
||||
onUpdateFilter();
|
||||
|
||||
INFO_LOG() << "initModel successfull";
|
||||
INFO_LOG(m_logger) << "initModel successfull";
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
+1
@@ -44,6 +44,7 @@ private slots:
|
||||
void slotSetAssetToDefect();
|
||||
void slotClose();
|
||||
private:
|
||||
NGL::INGLLogger &m_logger;
|
||||
bool apply(const InstrumentationAssetState newState) ;
|
||||
|
||||
Ui::EditAssetDialog *m_ui;
|
||||
|
||||
+2
-2
@@ -45,13 +45,13 @@ void SetPropertiesDialog::init()
|
||||
|
||||
if (error.error != QJsonParseError::NoError)
|
||||
{
|
||||
ERROR_LOG() << error.errorString();
|
||||
ERROR_LOG(m_logger) << error.errorString();
|
||||
return;
|
||||
}
|
||||
|
||||
if (!doc.isObject())
|
||||
{
|
||||
ERROR_LOG() << "Properties String is no JSON-Object";
|
||||
ERROR_LOG(m_logger) << "Properties String is no JSON-Object";
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
+2
@@ -25,6 +25,8 @@ public:
|
||||
~SetPropertiesDialog();
|
||||
|
||||
private:
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
void init();
|
||||
private Q_SLOTS:
|
||||
void onOkClicked();
|
||||
|
||||
+3
-3
@@ -46,13 +46,13 @@ ExerciseAssignmentDialog::ExerciseAssignmentDialog(LtsSession::LtsSession *sessi
|
||||
|
||||
if (!m_ftc->enableMainStructureElementModify())
|
||||
{
|
||||
ERROR_LOG() << "Could not enable FT MainStructureElementModify of ISM";
|
||||
ERROR_LOG(m_logger) << "Could not enable FT MainStructureElementModify of ISM";
|
||||
throw std::exception();
|
||||
}
|
||||
|
||||
if (!exmDtc->enableExercise())
|
||||
{
|
||||
ERROR_LOG() << "Could not enable DT Exercise of EXM";
|
||||
ERROR_LOG(m_logger) << "Could not enable DT Exercise of EXM";
|
||||
throw std::exception();
|
||||
}
|
||||
|
||||
@@ -241,7 +241,7 @@ bool ExerciseAssignmentDialog::apply()
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
ERROR_LOG() << "can't parse json for mseId " << ri.mseId << " and excId " << ri.exerciseId << " - using new json";
|
||||
ERROR_LOG(m_logger) << "can't parse json for mseId " << ri.mseId << " and excId " << ri.exerciseId << " - using new json";
|
||||
Q_ASSERT(false);
|
||||
}
|
||||
|
||||
|
||||
+2
@@ -41,6 +41,8 @@ private slots:
|
||||
void onPrint();
|
||||
|
||||
private:
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
void onMainStructureElementChanged(const InfrastructureManagement::MainStructureElement &mse, DataModification modType);
|
||||
void retranslate() override;
|
||||
bool apply() override;
|
||||
|
||||
+4
-5
@@ -45,7 +45,7 @@ void ExerciseAssignmentDialogModel::addMse(int mseId, int sectionId, const QStri
|
||||
return;
|
||||
}
|
||||
}
|
||||
ERROR_LOG() << "Did not find section with enum value " << sectionId;
|
||||
ERROR_LOG(m_logger) << "Did not find section with enum value " << sectionId;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -244,14 +244,13 @@ QVector<RequestInfos> ExerciseAssignmentDialogModel::getRequestInfos(bool all) c
|
||||
|
||||
|
||||
|
||||
TreeItem::TreeItem(int mseId, int sectionId, const QString &displayName, int exerciseId, TreeItem *parentItem)
|
||||
: m_mseId(mseId)
|
||||
TreeItem::TreeItem(int mseId, int sectionId, const QString &displayName, int exerciseId, TreeItem *parentItem) : m_mseId(mseId)
|
||||
, m_sectionId(sectionId)
|
||||
, m_displayName(displayName)
|
||||
, m_exerciseId(exerciseId)
|
||||
, m_originalExerciseId(exerciseId)
|
||||
, m_parentItem(parentItem)
|
||||
{
|
||||
, m_parentItem(parentItem),
|
||||
m_logger(NGL::NGLLoggerBootstrap::getLogger()) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
+2
@@ -35,6 +35,8 @@ signals:
|
||||
void doRefilter(const QSet<QModelIndex> &setToExpand);
|
||||
|
||||
protected:
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
bool filterAcceptsRow(const int sourceRow, const QModelIndex &sourceParent) const override;
|
||||
bool lessThan(const QModelIndex &left, const QModelIndex &rioght) const override;
|
||||
QVariant headerData(int section, Qt::Orientation orientation, int role) const override;
|
||||
|
||||
+8
-8
@@ -65,7 +65,7 @@ bool MountingPointInfoDialog::init(const std::shared_ptr<InfrastructureManagemen
|
||||
const std::shared_ptr<ForeignDataInterface> &ismIfc,
|
||||
const std::shared_ptr<AudioVideoManagement::ForeignDataInterface> &avmIfc)
|
||||
{
|
||||
DEBUG_LOG() << "Initializing MountingPointInfoDialog ...";
|
||||
DEBUG_LOG(m_logger) << "Initializing MountingPointInfoDialog ...";
|
||||
|
||||
disconnect();
|
||||
m_dtc = dtc;
|
||||
@@ -216,11 +216,11 @@ bool MountingPointInfoDialog::init(const std::shared_ptr<InfrastructureManagemen
|
||||
break;
|
||||
case InfrastructureManagement::MountingPointType::Unknown:
|
||||
default:
|
||||
WARNING_LOG() << "Unknown MountingPointType found for assetId " << m_assetId << ": " << toString(mountingPointData.mountingPointTypeId());
|
||||
WARNING_LOG(m_logger) << "Unknown MountingPointType found for assetId " << m_assetId << ": " << toString(mountingPointData.mountingPointTypeId());
|
||||
break;
|
||||
}
|
||||
|
||||
DEBUG_LOG() << "Initializing MountingPointInfoDialog done :)";
|
||||
DEBUG_LOG(m_logger) << "Initializing MountingPointInfoDialog done :)";
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -260,7 +260,7 @@ void MountingPointInfoDialog::onShowStream() const
|
||||
{
|
||||
if (!m_avmIfc)
|
||||
{
|
||||
ERROR_LOG() << "m_avmIfc is not loaded.";
|
||||
ERROR_LOG(m_logger) << "m_avmIfc is not loaded.";
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -271,7 +271,7 @@ void MountingPointInfoDialog::onAnnouncement() const
|
||||
{
|
||||
if (!m_avmIfc)
|
||||
{
|
||||
ERROR_LOG() << "m_avmIfc is not loaded.";
|
||||
ERROR_LOG(m_logger) << "m_avmIfc is not loaded.";
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -281,7 +281,7 @@ void MountingPointInfoDialog::onAnnouncement() const
|
||||
void MountingPointInfoDialog::showAsset(const InfrastructureManagement::InstrumentationAsset &asset)
|
||||
{
|
||||
removeAsset();
|
||||
DEBUG_LOG() << "Showing new asset";
|
||||
DEBUG_LOG(m_logger) << "Showing new asset";
|
||||
|
||||
m_assetId = asset.id();
|
||||
|
||||
@@ -308,7 +308,7 @@ void MountingPointInfoDialog::showAsset(const InfrastructureManagement::Instrume
|
||||
|
||||
void MountingPointInfoDialog::removeAsset()
|
||||
{
|
||||
DEBUG_LOG() << "Removing asset information";
|
||||
DEBUG_LOG(m_logger) << "Removing asset information";
|
||||
|
||||
m_assetId = -1;
|
||||
m_ui->gbxAsset->hide();
|
||||
@@ -322,7 +322,7 @@ void MountingPointInfoDialog::removeAsset()
|
||||
|
||||
void MountingPointInfoDialog::addAssetProperty(const QString &propName, const QString &propValue)
|
||||
{
|
||||
DEBUG_LOG() << "Adding asset property "
|
||||
DEBUG_LOG(m_logger) << "Adding asset property "
|
||||
<< propName
|
||||
<< ':'
|
||||
<< propValue;
|
||||
|
||||
+2
@@ -40,6 +40,8 @@ private Q_SLOTS:
|
||||
void onAnnouncement() const;
|
||||
|
||||
private:
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
void retranslate() override;
|
||||
|
||||
void showAsset(const InfrastructureManagement::InstrumentationAsset &asset);
|
||||
|
||||
+22
-22
@@ -70,17 +70,17 @@ MountingPointListDialog::MountingPointListDialog(const QString &menuGroup, QWidg
|
||||
, m_scheduleId(-1)
|
||||
, m_ui(new Ui::MountingPointListDialog)
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START";
|
||||
|
||||
m_ui->setupUi(this);
|
||||
setOnlineHelpFilename(QStringLiteral("Ressourcen-Mounting_Point_List"));
|
||||
m_buttonBox->connectButton(LtsWidgets::DialogButton::Print, this, &MountingPointListDialog::onPrint);
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
MountingPointListDialog::~MountingPointListDialog()
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START";
|
||||
m_mapGuiInterface->removeObjectIndicator();
|
||||
m_mapGuiInterface->setSkipMapObjectSelectionDialog(false);
|
||||
|
||||
@@ -95,7 +95,7 @@ MountingPointListDialog::~MountingPointListDialog()
|
||||
delete m_ui;
|
||||
delete m_ddsSelector;
|
||||
delete m_requestHelper;
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
void MountingPointListDialog::retranslate()
|
||||
@@ -112,7 +112,7 @@ bool MountingPointListDialog::init(LtsSession::LtsSession *session,
|
||||
const std::shared_ptr<SituationMap::ForeignGuiInterface> &mapIfc,
|
||||
const std::shared_ptr<FilterManagement::ForeignFltBuildingComponentGuiInterface> fltBuildingComponentIfc)
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START";
|
||||
m_dtc = dtc;
|
||||
m_ftc = ftc;
|
||||
m_dataIfc = dataInterface;
|
||||
@@ -126,43 +126,43 @@ bool MountingPointListDialog::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->enableInstrumentationAssetModify())
|
||||
{
|
||||
ERROR_LOG() << "Could not enable FT enableInstrumentationAssetModify of ISM";
|
||||
ERROR_LOG(m_logger) << "Could not enable FT enableInstrumentationAssetModify of ISM";
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!m_ftc->enableInstrumentationAssetRemove())
|
||||
{
|
||||
ERROR_LOG() << "Could not enable FT enableInstrumentationAssetRemove of ISM";
|
||||
ERROR_LOG(m_logger) << "Could not enable FT enableInstrumentationAssetRemove of ISM";
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!m_ftc->enableInstrumentationAssetUnmount())
|
||||
{
|
||||
ERROR_LOG() << "Could not enable FT enableInstrumentationAssetUnmount of ISM";
|
||||
ERROR_LOG(m_logger) << "Could not enable FT enableInstrumentationAssetUnmount of ISM";
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!m_ftc->enableMountingPointAssetModify())
|
||||
{
|
||||
ERROR_LOG() << "Could not enable FT MountingPointAssetModify of ISM";
|
||||
ERROR_LOG(m_logger) << "Could not enable FT MountingPointAssetModify of ISM";
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!m_ftc->enableMountingPointAssetRemove())
|
||||
{
|
||||
ERROR_LOG() << "Could not enable FT MountingPointAssetRemove of ISM";
|
||||
ERROR_LOG(m_logger) << "Could not enable FT MountingPointAssetRemove of ISM";
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!m_ftc->enableStructureElementModify())
|
||||
{
|
||||
ERROR_LOG() << "Could not enable FT enableStructureElementModify of ISM";
|
||||
ERROR_LOG(m_logger) << "Could not enable FT enableStructureElementModify of ISM";
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -183,7 +183,7 @@ bool MountingPointListDialog::init(LtsSession::LtsSession *session,
|
||||
m_sourceModel->setMntPointFilterTypes(filters);
|
||||
if (!m_sourceModel->initModel(m_dtc, m_dataIfc))
|
||||
{
|
||||
ERROR_LOG() << "Could not init model";
|
||||
ERROR_LOG(m_logger) << "Could not init model";
|
||||
delete m_sourceModel;
|
||||
m_sourceModel = nullptr;
|
||||
return false;
|
||||
@@ -255,7 +255,7 @@ bool MountingPointListDialog::init(LtsSession::LtsSession *session,
|
||||
m_buildingComponentSettings->addChangedCallback(this);
|
||||
else
|
||||
{
|
||||
ERROR_LOG() << Q_FUNC_INFO << " addChangedCallback fltBuildingComponentIfc failed";
|
||||
ERROR_LOG(m_logger) << Q_FUNC_INFO << " addChangedCallback fltBuildingComponentIfc failed";
|
||||
#ifdef LTS_DEBUG
|
||||
Q_ASSERT(false);
|
||||
#endif
|
||||
@@ -264,7 +264,7 @@ bool MountingPointListDialog::init(LtsSession::LtsSession *session,
|
||||
onBuildingComponentSettingsChanged();
|
||||
}else
|
||||
{
|
||||
ERROR_LOG() << "No BuildingCOmponentIfc ";
|
||||
ERROR_LOG(m_logger) << "No BuildingCOmponentIfc ";
|
||||
}
|
||||
|
||||
|
||||
@@ -340,7 +340,7 @@ bool MountingPointListDialog::init(LtsSession::LtsSession *session,
|
||||
this, &MountingPointListDialog::onInfoMountButtonClicked, Qt::UniqueConnection);
|
||||
onUpdateInfoMountButtonAndBehaviour();
|
||||
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -352,7 +352,7 @@ void MountingPointListDialog::getMountingPointPlanData(const QModelIndex &index,
|
||||
if (item->data().canConvert<SimpleMountingPointData>())
|
||||
{
|
||||
const SimpleMountingPointData &data = item->data().value<SimpleMountingPointData>();
|
||||
DEBUG_LOG() << "Item: " << m_sourceModel->data(index, Qt::DisplayRole).toString()
|
||||
DEBUG_LOG(m_logger) << "Item: " << m_sourceModel->data(index, Qt::DisplayRole).toString()
|
||||
<< ", Structure Element Id: " << data.id;
|
||||
|
||||
if (mppMap.contains(data.id))
|
||||
@@ -362,7 +362,7 @@ void MountingPointListDialog::getMountingPointPlanData(const QModelIndex &index,
|
||||
}
|
||||
else if (data.aimState != MountingPointState_def::Idle)
|
||||
{
|
||||
DEBUG_LOG() << "Not available in Map. Desired: " << data.aimState;
|
||||
DEBUG_LOG(m_logger) << "Not available in Map. Desired: " << data.aimState;
|
||||
modify.push_back(MountingPointPlan(data.id, data.aimState));
|
||||
}
|
||||
}
|
||||
@@ -418,7 +418,7 @@ void MountingPointListDialog::onMountingPointAssetRemoveReply(const Core::Functi
|
||||
|
||||
void MountingPointListDialog::onBuildingComponentSettingsChanged()
|
||||
{
|
||||
DEBUG_LOG() << Q_FUNC_INFO << " START";
|
||||
DEBUG_LOG(m_logger) << Q_FUNC_INFO << " START";
|
||||
|
||||
|
||||
|
||||
@@ -452,7 +452,7 @@ void MountingPointListDialog::onBuildingComponentSettingsChanged()
|
||||
|
||||
m_sortProxyModel->setFloorFilter(visibleFloors);
|
||||
}
|
||||
DEBUG_LOG() << Q_FUNC_INFO << " END";
|
||||
DEBUG_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
bool MountingPointListDialog::apply()
|
||||
@@ -688,7 +688,7 @@ void MountingPointListDialog::onUnmountButtonClicked()
|
||||
});
|
||||
|
||||
if (!ret)
|
||||
WARNING_LOG()<<" couldn't unmount asset on MountingPoinAsset id: "<<req.id();
|
||||
WARNING_LOG(m_logger)<<" couldn't unmount asset on MountingPoinAsset id: "<<req.id();
|
||||
else
|
||||
m_buttonBox->setButtonEnabled(LtsWidgets::DialogButton::Load,false);
|
||||
}
|
||||
@@ -703,7 +703,7 @@ void MountingPointListDialog::onUnmountButtonClicked()
|
||||
}
|
||||
else
|
||||
{
|
||||
ERROR_LOG()<<" Couldn't convert to SimpleMountingPointData: ";
|
||||
ERROR_LOG(m_logger)<<" Couldn't convert to SimpleMountingPointData: ";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+2
@@ -107,6 +107,8 @@ private slots:
|
||||
void onUpdateInfoMountButtonAndBehaviour();
|
||||
|
||||
private:
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
void retranslate() override;
|
||||
bool apply() override final;
|
||||
bool isIncludedId(int32_t mountingPointId) const;
|
||||
|
||||
+13
-13
@@ -28,11 +28,11 @@ MountingPointListDialogModel::MountingPointListDialogModel(QObject *parent)
|
||||
, m_scheduleId(-1)
|
||||
, 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, &MountingPointListDialogModel::emitDataChanged);
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
|
||||
@@ -87,11 +87,11 @@ QVariant MountingPointListDialogModel::data(const QModelIndex &index, int role)
|
||||
const SimpleMountingPointData itemData = item->data().value<SimpleMountingPointData>();
|
||||
if (itemData.mpType.underlying() == MountingPointType::Unknown)
|
||||
{
|
||||
ERROR_LOG() << "unknown!!!";
|
||||
ERROR_LOG(m_logger) << "unknown!!!";
|
||||
return QVariant();
|
||||
}
|
||||
|
||||
ERROR_LOG() << "mpType = " << itemData.mpType.underlying();
|
||||
ERROR_LOG(m_logger) << "mpType = " << itemData.mpType.underlying();
|
||||
if(itemData.mpType == MountingPointType::OutdoorIPS)
|
||||
return MountingPointType::IndoorIPS;
|
||||
|
||||
@@ -113,14 +113,14 @@ QVariant MountingPointListDialogModel::data(const QModelIndex &index, int role)
|
||||
|
||||
bool MountingPointListDialogModel::initModel(const std::shared_ptr<Interface::Dtc> &dtc, const std::shared_ptr<ForeignDataInterface> &dataInterface)
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START";
|
||||
if (m_dtc == dtc)
|
||||
return true;
|
||||
|
||||
if (!(dtc->enableMainStructureElement() &&
|
||||
dtc->enableMountingPointAsset()))
|
||||
{
|
||||
ERROR_LOG() << "Could not enable Datatopics";
|
||||
ERROR_LOG(m_logger) << "Could not enable Datatopics";
|
||||
return false;
|
||||
}
|
||||
m_dtc = dtc;
|
||||
@@ -131,14 +131,14 @@ bool MountingPointListDialogModel::initModel(const std::shared_ptr<Interface::Dt
|
||||
connect(m_dataInterface.get(), &ForeignDataInterface::mountingPointChanged,
|
||||
this, &MountingPointListDialogModel::onMountingPointChanged);
|
||||
|
||||
DEBUG_LOG() << "initModel successful";
|
||||
DEBUG_LOG(m_logger) << "initModel successful";
|
||||
|
||||
initData();
|
||||
|
||||
beginResetModel();
|
||||
endResetModel();
|
||||
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START";
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -149,7 +149,7 @@ QModelIndex MountingPointListDialogModel::getIndexOfVisibleRootItem() const
|
||||
|
||||
void MountingPointListDialogModel::initData()
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START";
|
||||
|
||||
#ifdef BENCHMARK
|
||||
QElapsedTimer elapsedTimer1;
|
||||
@@ -265,9 +265,9 @@ void MountingPointListDialogModel::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
|
||||
@@ -294,7 +294,7 @@ void MountingPointListDialogModel::initData()
|
||||
qCritical() << " MountingPointListDialogModel::init-BENCHMARK: took " << elapsedTimer1.elapsed() << " [ms]";
|
||||
#endif
|
||||
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
QSet<int> MountingPointListDialogModel::getAvailableFloors() const
|
||||
@@ -441,7 +441,7 @@ void MountingPointListDialogModel::onScheduleIdChanged(int32_t scheduleId)
|
||||
if (scheduleId == m_scheduleId)
|
||||
return;
|
||||
|
||||
DEBUG_LOG() << "onScheduleIdChanged: " << scheduleId;
|
||||
DEBUG_LOG(m_logger) << "onScheduleIdChanged: " << scheduleId;
|
||||
|
||||
m_scheduleId = scheduleId;
|
||||
|
||||
|
||||
+2
@@ -92,6 +92,8 @@ private slots:
|
||||
void emitDataChanged();
|
||||
|
||||
private:
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
void initData();
|
||||
friend class MountingPointListSortModel;
|
||||
|
||||
|
||||
+3
-3
@@ -21,7 +21,7 @@ MountingPointSelector::MountingPointSelector(const std::shared_ptr<Interface::Dt
|
||||
{
|
||||
if (!m_ftc->enableMountingPointPlanModify())
|
||||
{
|
||||
ERROR_LOG() << "Could not enable FT MountingPointPlanModify of ISM";
|
||||
ERROR_LOG(m_logger) << "Could not enable FT MountingPointPlanModify of ISM";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,10 +31,10 @@ void MountingPointSelector::onMountingPointPlanModifyReply(const Core::FunctionR
|
||||
m_requestHelper->requestReply(replyObject);
|
||||
|
||||
if (replyObject.error())
|
||||
ERROR_LOG() << "MountingPointPlansRemove error: "
|
||||
ERROR_LOG(m_logger) << "MountingPointPlansRemove error: "
|
||||
<< replyObject.str();
|
||||
else
|
||||
DEBUG_LOG() << "MountingPointPlansRemove success";
|
||||
DEBUG_LOG(m_logger) << "MountingPointPlansRemove success";
|
||||
}
|
||||
|
||||
|
||||
|
||||
+2
@@ -28,6 +28,8 @@ public:
|
||||
void onMountingPointPlanModifyReply(const Core::FunctionReplyObject &replyObject) override final;
|
||||
|
||||
protected:
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
void startModifyRequest(const std::vector<MountingPointPlan> &data);
|
||||
|
||||
protected:
|
||||
|
||||
+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();
|
||||
|
||||
+3
-4
@@ -9,11 +9,10 @@
|
||||
namespace InfrastructureManagement
|
||||
{
|
||||
|
||||
NewPlanDialog::NewPlanDialog(LtsSession::LtsSession *session, QWidget *parent)
|
||||
: QDialog(parent)
|
||||
NewPlanDialog::NewPlanDialog(LtsSession::LtsSession *session, QWidget *parent) : QDialog(parent)
|
||||
, m_ui(new Ui::NewPlanDialog)
|
||||
, m_session(session)
|
||||
{
|
||||
, m_session(session),
|
||||
m_logger(NGL::NGLLoggerBootstrap::getLogger()) {
|
||||
setWindowTitle(tr("Create New Plan"));
|
||||
m_ui->setupUi(this);
|
||||
|
||||
|
||||
+2
@@ -29,6 +29,8 @@ public:
|
||||
bool getData(QString &name, qint64 &begin, qint64 &end, int &status);
|
||||
|
||||
private:
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
Ui::NewPlanDialog* m_ui;
|
||||
std::shared_ptr<ForeignGuiComboboxInterface> m_ismGuiCbx{nullptr};
|
||||
LtsSession::LtsSession *m_session{nullptr};
|
||||
|
||||
+3
-4
@@ -20,13 +20,12 @@
|
||||
namespace InfrastructureManagement
|
||||
{
|
||||
|
||||
PlanChooser::PlanChooser(const std::shared_ptr<Interface::Dtc> &dtc, QWidget *parent)
|
||||
: QDialog(parent)
|
||||
PlanChooser::PlanChooser(const std::shared_ptr<Interface::Dtc> &dtc, QWidget *parent) : QDialog(parent)
|
||||
, m_ui(new Ui::PlanChooser)
|
||||
, m_model(nullptr)
|
||||
, m_dtc(dtc)
|
||||
, m_selected(false)
|
||||
{
|
||||
, m_selected(false),
|
||||
m_logger(NGL::NGLLoggerBootstrap::getLogger()) {
|
||||
LtsWidgets::LtsGlobalWaitDialog::getInstance()->setVisible(false);
|
||||
|
||||
m_ui->setupUi(this);
|
||||
|
||||
+2
@@ -32,6 +32,8 @@ public:
|
||||
void selectPlan(int planId);
|
||||
|
||||
private:
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
Ui::PlanChooser *m_ui{nullptr};
|
||||
PlanDialogModel *m_model{nullptr};
|
||||
LtsSession::LtsSession *m_session{nullptr};
|
||||
|
||||
+2
-2
@@ -47,7 +47,7 @@ bool ScheduleDifferencesListDialog::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;
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@ bool ScheduleDifferencesListDialog::init(LtsSession::LtsSession *session,
|
||||
|
||||
if (!m_sourceModel->initModel(m_scheduleId, m_dtc))
|
||||
{
|
||||
ERROR_LOG() << "Could not init ScheduleDifferencesListDialogModel";
|
||||
ERROR_LOG(m_logger) << "Could not init ScheduleDifferencesListDialogModel";
|
||||
delete m_sourceModel;
|
||||
m_sourceModel = nullptr;
|
||||
return false;
|
||||
|
||||
+5
-5
@@ -75,28 +75,28 @@ bool ScheduleDifferencesListDialogModel::initModel(int scheduleId,
|
||||
m_scheduleId = scheduleId;
|
||||
if (m_scheduleId <= 0)
|
||||
{
|
||||
ERROR_LOG() << "Invalid scheduleId = " << m_scheduleId;
|
||||
ERROR_LOG(m_logger) << "Invalid scheduleId = " << m_scheduleId;
|
||||
return false;
|
||||
}
|
||||
|
||||
QList<MountingPointPlan> diff;
|
||||
bool isComplete = m_dtc->getScheduleDifferences(m_scheduleId, diff);
|
||||
|
||||
DEBUG_LOG() << "Plan id = " << m_scheduleId << ", Differences = " << diff.size();
|
||||
DEBUG_LOG(m_logger) << "Plan id = " << m_scheduleId << ", Differences = " << diff.size();
|
||||
|
||||
if (isComplete)
|
||||
{
|
||||
WARNING_LOG() << "Instrumentation plan is complete. No differences to show.";
|
||||
WARNING_LOG(m_logger) << "Instrumentation plan is complete. No differences to show.";
|
||||
return false;
|
||||
}
|
||||
|
||||
for (const MountingPointPlan &mpp : std::as_const(diff))
|
||||
{
|
||||
DEBUG_LOG() << "Adding to model MPP = " << mpp.id();
|
||||
DEBUG_LOG(m_logger) << "Adding to model MPP = " << mpp.id();
|
||||
insertRow(mpp);
|
||||
}
|
||||
|
||||
DEBUG_LOG() << "initModel successful";
|
||||
DEBUG_LOG(m_logger) << "initModel successful";
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
+9
-9
@@ -29,7 +29,7 @@ PlanTimeLineDialog::PlanTimeLineDialog(LtsSession::LtsSession *session, const QS
|
||||
, m_ui(new Ui::PlanTimeLineDialog)
|
||||
, m_logger(getLogger(QStringLiteral("PlanTimeLineDialog")))
|
||||
{
|
||||
DEBUG_LOG() << Q_FUNC_INFO << " ";
|
||||
DEBUG_LOG(m_logger) << Q_FUNC_INFO << " ";
|
||||
|
||||
m_ui->setupUi(this);
|
||||
|
||||
@@ -52,7 +52,7 @@ PlanTimeLineDialog::~PlanTimeLineDialog()
|
||||
|
||||
bool PlanTimeLineDialog::init(const std::shared_ptr<InfrastructureManagement::Interface::Dtc> &dtc, const std::shared_ptr<Interface::Ftc> &ftc, const std::shared_ptr<ForeignDataInterface> &dataInterface, InfrastructureManagement::ForeignResourceManagementGuiInterface *ismGuiIfc)
|
||||
{
|
||||
DEBUG_LOG() << "Start init FileManagementDialogWidget...";
|
||||
DEBUG_LOG(m_logger) << "Start init FileManagementDialogWidget...";
|
||||
|
||||
m_dtc = dtc;
|
||||
m_ftc = ftc;
|
||||
@@ -68,7 +68,7 @@ bool PlanTimeLineDialog::init(const std::shared_ptr<InfrastructureManagement::In
|
||||
|
||||
if (!bRet)
|
||||
{
|
||||
ERROR_LOG() << "Could not enable DTC/FTC from ISM";
|
||||
ERROR_LOG(m_logger) << "Could not enable DTC/FTC from ISM";
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -85,7 +85,7 @@ bool PlanTimeLineDialog::init(const std::shared_ptr<InfrastructureManagement::In
|
||||
m_model = new PlanTimelineModel(m_ui->timeline->view(), this);
|
||||
if (!m_model->initModel(m_dtc, m_dataIfc))
|
||||
{
|
||||
ERROR_LOG() << "Could not init model";
|
||||
ERROR_LOG(m_logger) << "Could not init model";
|
||||
delete m_model;
|
||||
m_model = nullptr;
|
||||
return false;
|
||||
@@ -133,7 +133,7 @@ void PlanTimeLineDialog::setScheduleId(const int scheduleId)
|
||||
return;
|
||||
}
|
||||
|
||||
DEBUG_LOG() << "ism_plan_tln_dialog: setScheduleId = " << m_scheduleId;
|
||||
DEBUG_LOG(m_logger) << "ism_plan_tln_dialog: setScheduleId = " << m_scheduleId;
|
||||
|
||||
ismIfc->setScheduleId(m_scheduleId);
|
||||
|
||||
@@ -158,7 +158,7 @@ void PlanTimeLineDialog::onLoad()
|
||||
int scheduleId = m_model->getScheduleIdOfItem(m_selectedItem);
|
||||
if (scheduleId == -1)
|
||||
{
|
||||
ERROR_LOG() << "onLoad failed: Could not find model for selected item:" << m_selectedItem;
|
||||
ERROR_LOG(m_logger) << "onLoad failed: Could not find model for selected item:" << m_selectedItem;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -231,7 +231,7 @@ void PlanTimeLineDialog::onApply()
|
||||
int seId = m_model->getScheduleIdOfItem(itemId);
|
||||
if (seId == -1)
|
||||
{
|
||||
WARNING_LOG() << "Could not find schedule for item id:" << itemId;
|
||||
WARNING_LOG(m_logger) << "Could not find schedule for item id:" << itemId;
|
||||
continue;
|
||||
}
|
||||
InfrastructureManagement::MainSchedule mse = m_dtc->mainSchedule(seId);
|
||||
@@ -311,13 +311,13 @@ void PlanTimeLineDialog::updateTimeLine()
|
||||
|
||||
if (m_scheduleId == -1)
|
||||
{
|
||||
ERROR_LOG() << "Invalid schedule id: timeline update aborted!";
|
||||
ERROR_LOG(m_logger) << "Invalid schedule id: timeline update aborted!";
|
||||
return;
|
||||
}
|
||||
|
||||
if (m_model!= nullptr && !m_model->updateModel())
|
||||
{
|
||||
ERROR_LOG() << "Invalid model!";
|
||||
ERROR_LOG(m_logger) << "Invalid model!";
|
||||
return;
|
||||
}
|
||||
resizeView();
|
||||
|
||||
+7
-7
@@ -24,7 +24,7 @@ PlanTimelineModel::PlanTimelineModel(TimelineView *tlv, QObject *parent)
|
||||
|
||||
bool PlanTimelineModel::initModel(const std::shared_ptr<InfrastructureManagement::Interface::Dtc> &dtc, const std::shared_ptr<ForeignDataInterface> &dataInterface)
|
||||
{
|
||||
DEBUG_LOG() << "Start init FileManagement timeline model...";
|
||||
DEBUG_LOG(m_logger) << "Start init FileManagement timeline model...";
|
||||
|
||||
if (m_dtc == dtc)
|
||||
return true;
|
||||
@@ -42,17 +42,17 @@ bool PlanTimelineModel::initModel(const std::shared_ptr<InfrastructureManagement
|
||||
|
||||
if (!bRet)
|
||||
{
|
||||
ERROR_LOG() << "Could not enable ISM DTC Main schedule or Structure elements";
|
||||
ERROR_LOG(m_logger) << "Could not enable ISM DTC Main schedule or Structure elements";
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!setModel())
|
||||
{
|
||||
ERROR_LOG() << "Could not set timeline model";
|
||||
ERROR_LOG(m_logger) << "Could not set timeline model";
|
||||
return false;
|
||||
}
|
||||
|
||||
INFO_LOG() << "initModel successful";
|
||||
INFO_LOG(m_logger) << "initModel successful";
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -62,7 +62,7 @@ bool PlanTimelineModel::setModel()
|
||||
{
|
||||
if (m_scheduleId == -1)
|
||||
{
|
||||
WARNING_LOG() << "Invalid scheduleId " << m_scheduleId;
|
||||
WARNING_LOG(m_logger) << "Invalid scheduleId " << m_scheduleId;
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -102,12 +102,12 @@ bool PlanTimelineModel::setModel()
|
||||
}
|
||||
catch (const std::exception &e)
|
||||
{
|
||||
ERROR_LOG() << "## Unable to add item or track to model. Exception: " << e.what();
|
||||
ERROR_LOG(m_logger) << "## Unable to add item or track to model. Exception: " << e.what();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else
|
||||
WARNING_LOG() << "Time start/end not set for schedule id " << mse.id();
|
||||
WARNING_LOG(m_logger) << "Time start/end not set for schedule id " << mse.id();
|
||||
}
|
||||
return true;
|
||||
|
||||
|
||||
+13
-13
@@ -69,7 +69,7 @@ bool BuildingMountPointDialog::init(const std::shared_ptr<Interface::Dtc> &dtc,
|
||||
|
||||
if (!m_model->initModel(m_dtc))
|
||||
{
|
||||
ERROR_LOG() << "Could not init model";
|
||||
ERROR_LOG(m_logger) << "Could not init model";
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -94,7 +94,7 @@ bool BuildingMountPointDialog::init(const std::shared_ptr<Interface::Dtc> &dtc,
|
||||
|
||||
if (!m_ftc->enableMainStructureElementModify())
|
||||
{
|
||||
ERROR_LOG() << "Could not enable FT MainStructureElementModify of ISM";
|
||||
ERROR_LOG(m_logger) << "Could not enable FT MainStructureElementModify of ISM";
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -217,7 +217,7 @@ bool BuildingMountPointDialog::exportData(const std::vector<StructureElement> &s
|
||||
|
||||
void BuildingMountPointDialog::onExportClicked()
|
||||
{
|
||||
DEBUG_LOG() << "**** onExportClicked() ";
|
||||
DEBUG_LOG(m_logger) << "**** onExportClicked() ";
|
||||
|
||||
const QModelIndexList indexList = m_ui->tvBuildings->selectionModel()->selectedRows();
|
||||
if (indexList.isEmpty())
|
||||
@@ -251,14 +251,14 @@ void BuildingMountPointDialog::onExportClicked()
|
||||
tr("CSV-Files (*.csv)"));
|
||||
if (!fileNameTemplate.contains(placeholder))
|
||||
{
|
||||
ERROR_LOG() << " no placeholder '" << placeholder << "'";
|
||||
ERROR_LOG(m_logger) << " no placeholder '" << placeholder << "'";
|
||||
LtsWidgets::LtsMessageDialog::showMessage(this, tr("The name must have a placeholder (%1). Please try again.").arg(placeholder));
|
||||
return;
|
||||
}
|
||||
const QString &dir = QFileInfo(fileNameTemplate).absolutePath();
|
||||
|
||||
fileNameTemplate.replace(placeholder, QStringLiteral("%1"));
|
||||
DEBUG_LOG() << " fileNameTemplate after '" << fileNameTemplate << "'";
|
||||
DEBUG_LOG(m_logger) << " fileNameTemplate after '" << fileNameTemplate << "'";
|
||||
for (auto idxItem : indexList)
|
||||
{
|
||||
const QModelIndex &idx = m_proxyModel->mapToSource(idxItem);
|
||||
@@ -266,16 +266,16 @@ void BuildingMountPointDialog::onExportClicked()
|
||||
const QString bldgName = QString::fromStdString(m_model->getMainStructureElement(idx).name());
|
||||
if (bldgName.isEmpty())
|
||||
{
|
||||
ERROR_LOG() << " bldgName is empty";
|
||||
ERROR_LOG(m_logger) << " bldgName is empty";
|
||||
LtsWidgets::LtsMessageDialog::showMessage(this, tr("Name is empty").arg(dir));
|
||||
return;
|
||||
}
|
||||
|
||||
const QString &fileName = QString(fileNameTemplate).arg(bldgName);
|
||||
DEBUG_LOG() << " fileName '" << fileName << "'";
|
||||
DEBUG_LOG(m_logger) << " fileName '" << fileName << "'";
|
||||
|
||||
if (!exportData(structureElements, fileName))
|
||||
ERROR_LOG() << " exportData failed bldgName " << bldgName;
|
||||
ERROR_LOG(m_logger) << " exportData failed bldgName " << bldgName;
|
||||
}
|
||||
|
||||
LtsWidgets::LtsMessageDialog::showMessage(this,
|
||||
@@ -312,7 +312,7 @@ void BuildingMountPointDialog::onExportAllClicked()
|
||||
|
||||
void BuildingMountPointDialog::onImportClicked()
|
||||
{
|
||||
DEBUG_LOG() << "**** onImportClicked() ";
|
||||
DEBUG_LOG(m_logger) << "**** onImportClicked() ";
|
||||
|
||||
QModelIndexList indexList = m_ui->tvBuildings->selectionModel()->selectedRows();
|
||||
if (indexList.isEmpty() || indexList.size() > 1)
|
||||
@@ -342,7 +342,7 @@ void BuildingMountPointDialog::onImportClicked()
|
||||
int colBarcode = 0;
|
||||
int colMountingPointId = 1;
|
||||
|
||||
DEBUG_LOG() << "colBarcode: " << colBarcode
|
||||
DEBUG_LOG(m_logger) << "colBarcode: " << colBarcode
|
||||
<< ", colMountingPointId: " << colMountingPointId;
|
||||
|
||||
m_importedModelIndex = m_proxyModel->mapToSource(indexList.at(0));
|
||||
@@ -358,7 +358,7 @@ void BuildingMountPointDialog::onImportClicked()
|
||||
if (colMountingPointId >= values.size() ||
|
||||
colBarcode >= values.size())
|
||||
{
|
||||
WARNING_LOG() << "skipping line - to few data: '" << line << "'";
|
||||
WARNING_LOG(m_logger) << "skipping line - to few data: '" << line << "'";
|
||||
continue;
|
||||
}
|
||||
QString newBarCode = values.at(colBarcode).toString();
|
||||
@@ -378,7 +378,7 @@ void BuildingMountPointDialog::onImportClicked()
|
||||
barcodes.insert(curMountingPointId, newBarCode);
|
||||
prevMountingPointId = curMountingPointId;
|
||||
}
|
||||
DEBUG_LOG() << "mountingPoint: " << curMountingPointId
|
||||
DEBUG_LOG(m_logger) << "mountingPoint: " << curMountingPointId
|
||||
<< ", new barcode: " << newBarCode;
|
||||
}
|
||||
file.close();
|
||||
@@ -432,7 +432,7 @@ bool BuildingMountPointDialog::apply()
|
||||
|
||||
void BuildingMountPointDialog::onResetClicked()
|
||||
{
|
||||
DEBUG_LOG() << "**** onResetClicked() ";
|
||||
DEBUG_LOG(m_logger) << "**** onResetClicked() ";
|
||||
|
||||
m_model->resetNewItems(m_importedModelIndex);
|
||||
m_model->resetNewBarcodes(m_importedModelIndex);
|
||||
|
||||
+2
@@ -53,6 +53,8 @@ private slots:
|
||||
bool apply() override;
|
||||
|
||||
private:
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
bool exportData(const std::vector<StructureElement> &structureElements, const QString &fileName);
|
||||
void expandCollapseRecursivly(const QModelIndex &idx, bool bExpand);
|
||||
|
||||
|
||||
+4
-4
@@ -356,7 +356,7 @@ void BuildingMountPointModel::modifyBuilding(const MainStructureElement &mse)
|
||||
if (!building)
|
||||
{
|
||||
|
||||
WARNING_LOG()<<">>> not found section: "<<gse.id()<<" not exist. new one will be added ";
|
||||
WARNING_LOG(m_logger)<<">>> not found section: "<<gse.id()<<" not exist. new one will be added ";
|
||||
findAndRemoveBuilding(mse);
|
||||
return addBuilding(mse);
|
||||
}
|
||||
@@ -383,7 +383,7 @@ void BuildingMountPointModel::modifyBuilding(const MainStructureElement &mse)
|
||||
|
||||
if (!buildingSeId)
|
||||
{
|
||||
ERROR_LOG() << "Found no structure element with type 'Building' in content: " << mse;
|
||||
ERROR_LOG(m_logger) << "Found no structure element with type 'Building' in content: " << mse;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -480,7 +480,7 @@ void BuildingMountPointModel::removeBuildingByGroupId(const MainStructureElement
|
||||
|
||||
if (bfound == false)
|
||||
{
|
||||
ERROR_LOG()<<"No mse with Id: ( "<<mse.id()<<" ) | groupId: "<<mse.groupId()<<" | sectionId: "<<section<<" found!";
|
||||
ERROR_LOG(m_logger)<<"No mse with Id: ( "<<mse.id()<<" ) | groupId: "<<mse.groupId()<<" | sectionId: "<<section<<" found!";
|
||||
}
|
||||
|
||||
}
|
||||
@@ -527,7 +527,7 @@ void BuildingMountPointModel::insertChildren(int parentId,
|
||||
auto it = structureElements.constFind(childId);
|
||||
if (it == structureElements.constEnd())
|
||||
{
|
||||
ERROR_LOG() << "Can not find structure element with id " << childId << " - ignoring";
|
||||
ERROR_LOG(m_logger) << "Can not find structure element with id " << childId << " - ignoring";
|
||||
continue;
|
||||
}
|
||||
const StructureElement &data = it.value();
|
||||
|
||||
+1
@@ -23,6 +23,7 @@ struct StructureElementTreeItem : public NGLTreeItem
|
||||
return m_dispName;
|
||||
}
|
||||
private:
|
||||
NGL::INGLLogger &m_logger;
|
||||
mutable QString m_dispName;
|
||||
};
|
||||
|
||||
|
||||
+29
-29
@@ -30,7 +30,7 @@ PlanDialog::PlanDialog(const QString &menuGroup, LtsSession::LtsSession * sessio
|
||||
, m_ui(new Ui::PlanDialog)
|
||||
, m_logger(getLogger(QStringLiteral("PlanDialog")))
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START";
|
||||
m_ui->setupUi(this);
|
||||
m_buttonBox->connectButton(LtsWidgets::DialogButton::Print, this, &PlanDialog::onPrint);
|
||||
m_buttonBox->connectButton(LtsWidgets::DialogButton::Remove, this, &PlanDialog::onRemove);
|
||||
@@ -47,14 +47,14 @@ PlanDialog::PlanDialog(const QString &menuGroup, LtsSession::LtsSession * sessio
|
||||
connect(m_ui->planView, &LtsDataView::LtsDataView::doubleClicked, this, &PlanDialog::onEdit);
|
||||
|
||||
setOnlineHelpFilename(QStringLiteral("Ressourcen-Plans"));
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
PlanDialog::~PlanDialog()
|
||||
{
|
||||
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 PlanDialog::retranslate()
|
||||
@@ -74,7 +74,7 @@ bool PlanDialog::init(int scheduleId, const std::shared_ptr<Interface::Dtc> &dtc
|
||||
const std::shared_ptr<ForeignDataInterface> &dataInterface,
|
||||
ForeignResourceManagementGuiInterface *ismGuiIfc)
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START";
|
||||
|
||||
m_scheduleId = scheduleId;
|
||||
m_dtc = dtc;
|
||||
@@ -96,7 +96,7 @@ bool PlanDialog::init(int scheduleId, const std::shared_ptr<Interface::Dtc> &dtc
|
||||
|
||||
if (!bRet)
|
||||
{
|
||||
ERROR_LOG() << "Could not enable DTC or FTC from ISM";
|
||||
ERROR_LOG(m_logger) << "Could not enable DTC or FTC from ISM";
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -111,17 +111,17 @@ bool PlanDialog::init(int scheduleId, const std::shared_ptr<Interface::Dtc> &dtc
|
||||
connect(m_dataIfc.get(), &ForeignDataInterface::scheduleIdChanged, this, &PlanDialog::onScheduleIdchanged);
|
||||
m_ui->planView->setToolTip(tr("Current Instrumentation Plan Id = %1").arg(m_scheduleId));
|
||||
|
||||
DEBUG_LOG() << "m_scheduleId = " << m_scheduleId;
|
||||
DEBUG_LOG(m_logger) << "m_scheduleId = " << m_scheduleId;
|
||||
|
||||
setScheduleId(m_scheduleId);
|
||||
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
return true;
|
||||
}
|
||||
|
||||
void PlanDialog::setScheduleId(const int scheduleId)
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START";
|
||||
m_scheduleId = scheduleId;
|
||||
|
||||
std::shared_ptr<InfrastructureManagement::ForeignDataInterface> ismIfc;
|
||||
@@ -131,7 +131,7 @@ void PlanDialog::setScheduleId(const int scheduleId)
|
||||
return;
|
||||
}
|
||||
|
||||
DEBUG_LOG() << "setScheduleId = " << m_scheduleId;
|
||||
DEBUG_LOG(m_logger) << "setScheduleId = " << m_scheduleId;
|
||||
|
||||
ismIfc->setScheduleId(m_scheduleId);
|
||||
|
||||
@@ -144,7 +144,7 @@ void PlanDialog::setScheduleId(const int scheduleId)
|
||||
|
||||
m_ui->planView->setToolTip(tr("Current Instrumentation Plan Id = %1").arg(m_scheduleId));
|
||||
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
void PlanDialog::onPrint()
|
||||
@@ -154,11 +154,11 @@ void PlanDialog::onPrint()
|
||||
|
||||
void PlanDialog::onMainScheduleChanged(const MainSchedule &data, DataModification modType)
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START";
|
||||
m_scheduleId = data.id();
|
||||
enaDisa();
|
||||
Q_UNUSED(modType);
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
void PlanDialog::onScheduleIdchanged(int32_t id)
|
||||
@@ -169,7 +169,7 @@ void PlanDialog::onScheduleIdchanged(int32_t id)
|
||||
|
||||
void PlanDialog::onLoad()
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START";
|
||||
QModelIndexList indexList = m_ui->planView->selectedRows();
|
||||
|
||||
if (indexList.size() == 0)
|
||||
@@ -187,12 +187,12 @@ void PlanDialog::onLoad()
|
||||
setScheduleId(m_scheduleId);
|
||||
m_ismGuiIfc->setPlanId(m_scheduleId);
|
||||
enaDisa();
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
void PlanDialog::onRemove()
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START";
|
||||
QModelIndexList indexList = m_ui->planView->selectedRows();
|
||||
|
||||
if (indexList.size() == 0)
|
||||
@@ -244,12 +244,12 @@ void PlanDialog::onRemove()
|
||||
{
|
||||
return m_ftc->mainScheduleRemoveRequest(rmReq, this);
|
||||
});
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
void PlanDialog::enaDisa()
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START";
|
||||
m_buttonBox->setButtonEnabled(LtsWidgets::DialogButton::Add, true);
|
||||
m_buttonBox->setButtonEnabled(LtsWidgets::DialogButton::Print, true);
|
||||
|
||||
@@ -272,12 +272,12 @@ void PlanDialog::enaDisa()
|
||||
m_buttonBox->setButtonEnabled(LtsWidgets::DialogButton::Edit, (indexList.size() == 1) );
|
||||
m_buttonBox->setButtonEnabled(LtsWidgets::DialogButton::Show, (indexList.size() == 1) );
|
||||
m_buttonBox->setButtonEnabled(LtsWidgets::DialogButton::Save, (indexList.size() == 1 && !isComplete) );
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
void PlanDialog::onEdit()
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START";
|
||||
QModelIndexList indexList = m_ui->planView->selectedRows();
|
||||
if (indexList.size() == 0)
|
||||
return;
|
||||
@@ -286,7 +286,7 @@ void PlanDialog::onEdit()
|
||||
if (item.id() < 0 )
|
||||
return;
|
||||
|
||||
DEBUG_LOG() << "onEdit schedule with id = " << item.id();
|
||||
DEBUG_LOG(m_logger) << "onEdit schedule with id = " << item.id();
|
||||
|
||||
PlanEditDialog *dialog = new PlanEditDialog(this);
|
||||
if (!dialog->init(m_session, item.id(), m_dtc, m_ftc, m_ismGuiCbx))
|
||||
@@ -296,12 +296,12 @@ void PlanDialog::onEdit()
|
||||
}
|
||||
|
||||
addDialog(dialog, m_menuGroup, QStringLiteral("EditSchedule%1").arg(item.id()), LtsWidgets::LayoutArea::eDialogTab);
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
void PlanDialog::onAdd()
|
||||
{
|
||||
DEBUG_LOG() << "onAdd";
|
||||
DEBUG_LOG(m_logger) << "onAdd";
|
||||
PlanEditDialog *dialog = new PlanEditDialog(this);
|
||||
if (!dialog->init(m_session, 0, m_dtc, m_ftc, m_ismGuiCbx))
|
||||
{
|
||||
@@ -313,7 +313,7 @@ void PlanDialog::onAdd()
|
||||
|
||||
void PlanDialog::onCheck()
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START";
|
||||
QModelIndexList indexList = m_ui->planView->selectedRows();
|
||||
if (indexList.size() == 0)
|
||||
return;
|
||||
@@ -322,7 +322,7 @@ void PlanDialog::onCheck()
|
||||
if (item.id() < 0 )
|
||||
return;
|
||||
|
||||
DEBUG_LOG() << "show Differences schedule with id = " << item.id();
|
||||
DEBUG_LOG(m_logger) << "show Differences schedule with id = " << item.id();
|
||||
|
||||
|
||||
|
||||
@@ -341,13 +341,13 @@ void PlanDialog::onCheck()
|
||||
}
|
||||
|
||||
addDialog(dialog, m_menuGroup, QStringLiteral("ShowDifferences%1").arg(item.id()), LtsWidgets::LayoutArea::eDialogTab);
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
|
||||
void PlanDialog::onCopy()
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START";
|
||||
QModelIndexList indexList = m_ui->planView->selectedRows();
|
||||
if (indexList.size() == 0)
|
||||
return;
|
||||
@@ -356,7 +356,7 @@ void PlanDialog::onCopy()
|
||||
if (item.id() < 0 )
|
||||
return;
|
||||
|
||||
DEBUG_LOG() << "onCopy schedule with id = " << item.id();
|
||||
DEBUG_LOG(m_logger) << "onCopy schedule with id = " << item.id();
|
||||
|
||||
MainScheduleCopyRequest req;
|
||||
req.id(item.id());
|
||||
@@ -366,7 +366,7 @@ void PlanDialog::onCopy()
|
||||
return m_ftc->mainScheduleCopyRequest(req, this);
|
||||
});
|
||||
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
|
||||
|
||||
+2
@@ -50,6 +50,8 @@ public:
|
||||
void setScheduleId(const int scheduleId);
|
||||
|
||||
protected:
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
void onMainScheduleRemoveReply(const Core::FunctionReplyObject &replyObject) override final
|
||||
{
|
||||
m_requestHelper->requestReply(replyObject);
|
||||
|
||||
+6
-6
@@ -19,27 +19,27 @@ PlanDialogModel::PlanDialogModel(QObject *parent)
|
||||
parent)
|
||||
, m_dtc(nullptr)
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
|
||||
PlanDialogModel::~PlanDialogModel()
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
|
||||
bool PlanDialogModel::initModel(const std::shared_ptr<Interface::Dtc> &dtc)
|
||||
{
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START";
|
||||
m_dtc = dtc;
|
||||
|
||||
connect(m_dtc.get(), &Interface::Dtc::mainScheduleChanged, this, &PlanDialogModel::onDataChanged);
|
||||
m_dtc->mainSchedules([this](const MainSchedule &ms){ onDataChanged(ms, DataModification::eAdded); });
|
||||
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
+2
@@ -36,6 +36,8 @@ public:
|
||||
};
|
||||
|
||||
private:
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
std::shared_ptr<Interface::Dtc> m_dtc;
|
||||
};
|
||||
|
||||
|
||||
+2
@@ -47,6 +47,8 @@ public:
|
||||
~PlanEditDialog();
|
||||
|
||||
protected:
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
void onMainScheduleModifyReply(const Core::FunctionReplyObject &replyObject) override final { m_requestHelper->requestReply(replyObject); }
|
||||
void enaDisa();
|
||||
|
||||
|
||||
Reference in new issue
Block a user