Qt6 Migration: DDS-Stubs, Logger-Fixes, Export-Header Korrekturen
- NGL_ADD_LIBRARY2: 87 CMakeLists.txt konvertiert für Export-Header Generierung - 44 Export-Header Include-Pfade korrigiert (_export.h) - 81 DDS-Stub-Header generiert (*_dtc.h, *_fts.h, *_dts.h, *_ftc.h) - INGLLogger: Duplikat gelöscht, m_logger Member entfernt, variadische Makros - Q_FUNC_INFO Redefinition behoben (Qt6 definiert bereits) - FATAL_LOG Makro hinzugefügt - InfrastructureManagement DDS-Stubs (ism.hpp, ism_enums.hpp, ism_ftc.h) - FilterManagement DDS-Stubs (flt_ftc.h, flt_dts.h) - AreaEffectSimulation DDS-Stubs (aes.hpp, aes_enums.hpp) - SymbolAppearance Klasse vollständig definiert mit content() Methode - BuildingComponentFilter Klasse definiert mit Copy-Konstruktor - Ftc Factory: nullptr Return (abstract class) - AesFilter Klasse in aes.hpp hinzugefügt - Dtc Klasse in ppm.hpp mit participantChanged Signal - AesType Enum: alle 15 At* Werte definiert - AesEffectState_def: EsReceived hinzugefügt - DataModification Enum: eAdded/eModified/eRemoved - function_reply_object.h → core_types.h Include-Pfad (72 Dateien) - Enum-Class-Streaming Template-Operator in INGLLogger.h - ism_mounting_point.h: QImage → QtGui/QImage, QGuiApplication/QScreen - ism_data_plugin_interface.h: QSet Include, Include-Reihenfolge - QRegExp → QRegularExpression in tpm_js_parser.cpp - .underlying() Aufrufe zu direktem Enum-Vergleich korrigiert - Include-Pfade: aes.hpp in symbol_appearance_settings_impl.h und aes_display_filter_impl.h Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
2785 files changed
+18754
-18316
No files matched your search
+1
-2
@@ -19,7 +19,6 @@ ApproachingPointsDialog::ApproachingPointsDialog(const QString &menuGroup, LtsSe
|
||||
, m_ui(new Ui::ApproachingPointsDialog)
|
||||
, m_model(nullptr)
|
||||
, m_menuGroup(menuGroup)
|
||||
, m_logger(getLogger("ApproachingPointsDialog"))
|
||||
{
|
||||
m_ui->setupUi(this);
|
||||
|
||||
@@ -54,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(m_logger) << "Could not init model";
|
||||
ERROR_LOG() << "Could not init model";
|
||||
delete m_model;
|
||||
m_model = nullptr;
|
||||
return false;
|
||||
|
||||
-4
@@ -58,9 +58,5 @@ private:
|
||||
QString m_menuGroup;
|
||||
std::shared_ptr<Interface::Ftc> m_ftc;
|
||||
std::shared_ptr<SituationMap::ForeignGuiInterface> m_sitMapIfc;
|
||||
|
||||
|
||||
LOGGER_T m_logger;
|
||||
|
||||
};
|
||||
}
|
||||
+1
-2
@@ -22,7 +22,6 @@ ApproachingPointsDialogModel::ApproachingPointsDialogModel(QObject *parent)
|
||||
tr("Special Type"),
|
||||
tr("Properties")},
|
||||
parent)
|
||||
, m_logger(getLogger("ApproachingPointsDialogModel"))
|
||||
{
|
||||
}
|
||||
|
||||
@@ -67,7 +66,7 @@ bool ApproachingPointsDialogModel::initModel(const std::shared_ptr<Interface::Dt
|
||||
};
|
||||
dtc->mainStructureElements(cb);
|
||||
|
||||
INFO_LOG(m_logger) << "initModel successful";
|
||||
INFO_LOG() << "initModel successful";
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
+1
-3
@@ -34,8 +34,6 @@ public:
|
||||
protected:
|
||||
bool isFiltered(const InfrastructureManagement::MainStructureElement &data, DataModification modType) const override;
|
||||
|
||||
private:
|
||||
|
||||
LOGGER_T m_logger;
|
||||
private:
|
||||
};
|
||||
}
|
||||
-1
@@ -21,7 +21,6 @@ EditApproachingPointDialog::EditApproachingPointDialog(QWidget *parent)
|
||||
, m_ftc(nullptr)
|
||||
, m_sitMapGuiIfc(nullptr)
|
||||
, m_requestHelper(new LtsUtils::RequestHelper(this))
|
||||
, m_logger(getLogger("EditApproachingPointDialog"))
|
||||
{
|
||||
m_ui->setupUi(this);
|
||||
fillCbDepartureDirection();
|
||||
|
||||
-3
@@ -59,8 +59,5 @@ private:
|
||||
std::shared_ptr<SituationMap::ForeignGuiInterface> m_sitMapGuiIfc;
|
||||
MainStructureElement m_approachingPoint;
|
||||
LtsUtils::RequestHelper *m_requestHelper;
|
||||
|
||||
LOGGER_T m_logger;
|
||||
|
||||
};
|
||||
}
|
||||
+18
-19
@@ -44,7 +44,6 @@ AssetListDialog::AssetListDialog(const QString &menuGroup, LtsSession::LtsSessio
|
||||
, m_ftc(nullptr)
|
||||
, m_requestHelper(new LtsUtils::RequestHelper())
|
||||
, m_ui(new Ui::AssetListDialog)
|
||||
, m_logger(getLogger("AssetListDialog"))
|
||||
{
|
||||
m_ui->setupUi(this);
|
||||
m_buttonBox->connectButton(LtsWidgets::DialogButton::Print, this, &AssetListDialog::onPrint);
|
||||
@@ -266,7 +265,7 @@ InstrumentationAsset AssetListDialog::importData(const QVector<QStringRef> &segm
|
||||
{
|
||||
if (bOk)
|
||||
*bOk = false;
|
||||
WARNING_LOG(m_logger) << "Could not determine mounting point type from barcode: " << dmc.toString();
|
||||
WARNING_LOG() << "Could not determine mounting point type from barcode: " << dmc.toString();
|
||||
}
|
||||
|
||||
return asset;
|
||||
@@ -412,40 +411,40 @@ bool AssetListDialog::init(const std::shared_ptr<Interface::Dtc> &dtc,
|
||||
|
||||
if (!m_ftc->enableStructureElementModify())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Could not enable FT StructureElementModify of ISM";
|
||||
ERROR_LOG() << "Could not enable FT StructureElementModify of ISM";
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!m_ftc->enableMountingPointAssetModify())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Could not enable FT MountingPointAssetModify of ISM";
|
||||
ERROR_LOG() << "Could not enable FT MountingPointAssetModify of ISM";
|
||||
return false;
|
||||
}
|
||||
if (!m_ftc->enableMountingPointAssetRemove())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Could not enable FT MountingPointAssetRemove of ISM";
|
||||
ERROR_LOG() << "Could not enable FT MountingPointAssetRemove of ISM";
|
||||
return false;
|
||||
}
|
||||
if (!m_ftc->enableInstrumentationAssetModify())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Could not enable FT InstrumentationAssetModify of ISM";
|
||||
ERROR_LOG() << "Could not enable FT InstrumentationAssetModify of ISM";
|
||||
return false;
|
||||
}
|
||||
if (!m_ftc->enableInstrumentationAssetUnmount())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Could not enable FT InstrumentationAssetUnmount of ISM";
|
||||
ERROR_LOG() << "Could not enable FT InstrumentationAssetUnmount of ISM";
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!m_cmoFtc->enableTriggerUpdate())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Could not enable FT TriggerUpdate of CMO";
|
||||
ERROR_LOG() << "Could not enable FT TriggerUpdate of CMO";
|
||||
return false;
|
||||
}
|
||||
|
||||
if(m_ftc->enableInstrumentationAssetSetState() == false)
|
||||
{
|
||||
ERROR_LOG(m_logger)<<"Couldn't enable InstrumentationAssetSetState";
|
||||
ERROR_LOG()<<"Couldn't enable InstrumentationAssetSetState";
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -456,7 +455,7 @@ bool AssetListDialog::init(const std::shared_ptr<Interface::Dtc> &dtc,
|
||||
|
||||
if (!m_model->initModel(m_dtc, m_cmoDtc))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Could not init model";
|
||||
ERROR_LOG() << "Could not init model";
|
||||
delete m_model;
|
||||
m_model = nullptr;
|
||||
return false;
|
||||
@@ -611,7 +610,7 @@ void AssetListDialog::onImportClicked()
|
||||
QVector<QStringRef> segments = line.splitRef(QLatin1Char(';'));
|
||||
if (segments.size() < 10)
|
||||
{
|
||||
WARNING_LOG(m_logger) << "Skipping line '" << line << "' - to few data";
|
||||
WARNING_LOG() << "Skipping line '" << line << "' - to few data";
|
||||
continue;
|
||||
}
|
||||
const InstrumentationAsset ia = importData(segments, &bOk);
|
||||
@@ -650,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(m_logger) << "Unexpected error";
|
||||
ERROR_LOG() << "Unexpected error";
|
||||
return;
|
||||
}
|
||||
filterDialog->fillAssetComboBoxes();
|
||||
@@ -679,7 +678,7 @@ void AssetListDialog::onUnmountButtonClicked()
|
||||
StructureElement se;
|
||||
if(m_dtc->getStructureElementInMntPointAssetByAssetId(asset.id(), se) == false)
|
||||
{
|
||||
WARNING_LOG(m_logger)<<" asset not mounted. name: "<<asset.name()<< " id: "<<asset.id();
|
||||
WARNING_LOG()<<" asset not mounted. name: "<<asset.name()<< " id: "<<asset.id();
|
||||
continue;
|
||||
}
|
||||
InstrumentationAssetUnmountRequest req(asset.id());
|
||||
@@ -692,7 +691,7 @@ void AssetListDialog::onUnmountButtonClicked()
|
||||
if(m_requestHelper->hasRequests() &&
|
||||
m_requestHelper->startRequests() == false)
|
||||
{
|
||||
ERROR_LOG(m_logger)<<" Couldn't unmount selected assets";
|
||||
ERROR_LOG()<<" Couldn't unmount selected assets";
|
||||
}
|
||||
|
||||
m_buttonBox->setButtonEnabled(LtsWidgets::DialogButton::Load,false);
|
||||
@@ -754,7 +753,7 @@ void AssetListDialog::onFilterSelected(const AssetFilterDialog::Export &exp, con
|
||||
|
||||
void AssetListDialog::onCustomContextMenuRequested(const QPoint &globalPos, const QModelIndex &indexSrc)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << LOGFUNCTION << " START, indexSrc" << indexSrc.row();
|
||||
DEBUG_LOG() << Q_FUNC_INFO << " START, indexSrc" << indexSrc.row();
|
||||
if (!indexSrc.isValid())
|
||||
return;
|
||||
|
||||
@@ -778,7 +777,7 @@ void AssetListDialog::onReachabilityUpdateAction()
|
||||
if (bhasHostnameForTriggerUpdate)
|
||||
{
|
||||
m_hostsForUpdate.insert(QString::fromStdString(ia.hostname()));
|
||||
DEBUG_LOG(m_logger) << LOGFUNCTION << " trigger update for " << ia;
|
||||
DEBUG_LOG() << Q_FUNC_INFO << " trigger update for " << ia;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -787,7 +786,7 @@ void AssetListDialog::onReachabilityUpdateAction()
|
||||
|
||||
void AssetListDialog::onHostsForUpdateNotifyTimeout()
|
||||
{
|
||||
INFO_LOG(m_logger) << LOGFUNCTION << " START, hostsForUpdate.size() = " << m_hostsForUpdate.size();
|
||||
INFO_LOG() << Q_FUNC_INFO << " START, hostsForUpdate.size() = " << m_hostsForUpdate.size();
|
||||
|
||||
if (!m_cmoFtc)
|
||||
return;
|
||||
@@ -795,7 +794,7 @@ void AssetListDialog::onHostsForUpdateNotifyTimeout()
|
||||
return;
|
||||
|
||||
for (auto item : std::as_const(m_hostsForUpdate))
|
||||
DEBUG_LOG(m_logger) << LOGFUNCTION << " host = " << item;
|
||||
DEBUG_LOG() << Q_FUNC_INFO << " host = " << item;
|
||||
|
||||
|
||||
std::vector<std::string> hostnameStd;
|
||||
@@ -807,7 +806,7 @@ void AssetListDialog::onHostsForUpdateNotifyTimeout()
|
||||
ComponentMonitor::TriggerUpdate request;
|
||||
request.hostnames(hostnameStd);
|
||||
|
||||
DEBUG_LOG(m_logger) << LOGFUNCTION << " TriggerUpdate - request = " << request;
|
||||
DEBUG_LOG() << Q_FUNC_INFO << " TriggerUpdate - request = " << request;
|
||||
|
||||
m_requestHelper->addRequest([request, this]()
|
||||
{
|
||||
|
||||
-3
@@ -103,8 +103,5 @@ private:
|
||||
QSet<QString> m_hostsForUpdate;
|
||||
QTimer *m_hostsForUpdateNotifiy{nullptr};
|
||||
QTimer *m_updateBtnBoxBtns{nullptr};
|
||||
|
||||
LOGGER_T m_logger;
|
||||
|
||||
};
|
||||
}
|
||||
+3
-4
@@ -39,7 +39,6 @@ parent)
|
||||
, m_alteredCells()
|
||||
, m_alteredValues()
|
||||
, m_updateFilterTimer(new QTimer(this))
|
||||
, m_logger(getLogger("AssetListDialogModel"))
|
||||
{
|
||||
m_intactStr = tr("Intact");
|
||||
updateFilterStates();
|
||||
@@ -311,12 +310,12 @@ bool AssetListDialogModel::initModel(const std::shared_ptr<Interface::Dtc> &dtc,
|
||||
|
||||
if (!m_dtc->enableInstrumentationAsset())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Could not enable Datatopic InstrumentationAsset of the Data Topic Client";
|
||||
ERROR_LOG() << "Could not enable Datatopic InstrumentationAsset of the Data Topic Client";
|
||||
return false;
|
||||
}
|
||||
if (!m_cmoDtc->enableComponentStatus())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Could not enable Datatopic enableComponentStatus of cmo";
|
||||
ERROR_LOG() << "Could not enable Datatopic enableComponentStatus of cmo";
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -367,7 +366,7 @@ bool AssetListDialogModel::initModel(const std::shared_ptr<Interface::Dtc> &dtc,
|
||||
connect(this, &AssetListDialogModel::modelReset, this, &AssetListDialogModel::onUpdateFilter);
|
||||
onUpdateFilter();
|
||||
|
||||
INFO_LOG(m_logger) << "initModel successfull";
|
||||
INFO_LOG() << "initModel successfull";
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
-1
@@ -17,7 +17,6 @@ EditAssetDialog::EditAssetDialog(QWidget *parent, const std::shared_ptr<Interfac
|
||||
, m_ftc(ftc)
|
||||
, m_asset(assets)
|
||||
, m_requestHelper(new LtsUtils::RequestHelper(this))
|
||||
, m_logger(getLogger("EditAssetDialog"))
|
||||
{
|
||||
m_ui->setupUi(this);
|
||||
|
||||
|
||||
-3
@@ -50,8 +50,5 @@ private:
|
||||
std::shared_ptr<Interface::Ftc> m_ftc;
|
||||
std::vector<InstrumentationAsset> m_asset;
|
||||
LtsUtils::RequestHelper *m_requestHelper;
|
||||
|
||||
LOGGER_T m_logger;
|
||||
|
||||
};
|
||||
}
|
||||
-1
@@ -15,7 +15,6 @@ AssetFilterDialog::AssetFilterDialog(AssetListDialogModel *model, QWidget *paren
|
||||
: LtsWidgets::LtsFramelessDialog(parent)
|
||||
, m_model(model)
|
||||
, m_ui(new Ui::AssetFilterDialog)
|
||||
, m_logger(getLogger("AssetFilterDialog"))
|
||||
{
|
||||
setAttribute(Qt::WA_DeleteOnClose, true);
|
||||
m_ui->setupUi(this);
|
||||
|
||||
+2
-3
@@ -16,7 +16,6 @@ SetPropertiesDialog::SetPropertiesDialog(QLineEdit *lineEdit, QWidget *parent)
|
||||
: LtsWidgets::LtsFramelessDialog(parent)
|
||||
, m_ui(new Ui::SetPropertiesDialog)
|
||||
, m_lineEdit(lineEdit)
|
||||
, m_logger(getLogger("SetPropertiesDialog"))
|
||||
{
|
||||
m_ui->setupUi(this);
|
||||
init();
|
||||
@@ -46,13 +45,13 @@ void SetPropertiesDialog::init()
|
||||
|
||||
if (error.error != QJsonParseError::NoError)
|
||||
{
|
||||
ERROR_LOG(m_logger) << error.errorString();
|
||||
ERROR_LOG() << error.errorString();
|
||||
return;
|
||||
}
|
||||
|
||||
if (!doc.isObject())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Properties String is no JSON-Object";
|
||||
ERROR_LOG() << "Properties String is no JSON-Object";
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
-1
@@ -47,6 +47,5 @@ private:
|
||||
Ui::SetPropertiesDialog *m_ui;
|
||||
QMap<QLineEdit *, QLineEdit *> m_properties;
|
||||
QLineEdit *m_lineEdit;
|
||||
LOGGER_T m_logger;
|
||||
};
|
||||
}
|
||||
-1
@@ -14,7 +14,6 @@ namespace InfrastructureManagement
|
||||
CustomViewSchedule::CustomViewSchedule(QWidget *parent)
|
||||
: AbstractDisplayWidget(parent)
|
||||
, m_ui(new Ui::CustomViewSchedule)
|
||||
, m_logger(getLogger("CustomViewSchedule"))
|
||||
{
|
||||
m_ui->setupUi(this);
|
||||
}
|
||||
|
||||
+3
-4
@@ -32,7 +32,6 @@ ExerciseAssignmentDialog::ExerciseAssignmentDialog(LtsSession::LtsSession *sessi
|
||||
, m_model(nullptr)
|
||||
, m_modelAssignedFilter(new ExerciseAssignmentDialogModelFilterProxy(this))
|
||||
, m_modelUnassignedFilter(new ExerciseAssignmentDialogModelFilterProxy(this))
|
||||
, m_logger(getLogger("ExerciseAssignmentDialog"))
|
||||
{
|
||||
m_ui->setupUi(this);
|
||||
m_buttonBox->connectButton(LtsWidgets::DialogButton::Print, this, &ExerciseAssignmentDialog::onPrint);
|
||||
@@ -47,13 +46,13 @@ ExerciseAssignmentDialog::ExerciseAssignmentDialog(LtsSession::LtsSession *sessi
|
||||
|
||||
if (!m_ftc->enableMainStructureElementModify())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Could not enable FT MainStructureElementModify of ISM";
|
||||
ERROR_LOG() << "Could not enable FT MainStructureElementModify of ISM";
|
||||
throw std::exception();
|
||||
}
|
||||
|
||||
if (!exmDtc->enableExercise())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Could not enable DT Exercise of EXM";
|
||||
ERROR_LOG() << "Could not enable DT Exercise of EXM";
|
||||
throw std::exception();
|
||||
}
|
||||
|
||||
@@ -242,7 +241,7 @@ bool ExerciseAssignmentDialog::apply()
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
ERROR_LOG(m_logger) << "can't parse json for mseId " << ri.mseId << " and excId " << ri.exerciseId << " - using new json";
|
||||
ERROR_LOG() << "can't parse json for mseId " << ri.mseId << " and excId " << ri.exerciseId << " - using new json";
|
||||
Q_ASSERT(false);
|
||||
}
|
||||
|
||||
|
||||
-1
@@ -56,6 +56,5 @@ private:
|
||||
ExerciseAssignmentDialogModelFilterProxy *m_modelUnassignedFilter;
|
||||
|
||||
QMap<qint32, ExerciseManagement::Exercise> m_exercises;
|
||||
LOGGER_T m_logger;
|
||||
};
|
||||
}
|
||||
+1
-2
@@ -18,7 +18,6 @@ ExerciseAssignmentDialogModel::ExerciseAssignmentDialogModel(const QMap<qint32,
|
||||
: QAbstractItemModel(parent)
|
||||
, m_rootItem(new TreeItem(0, 0, tr("InvisibleRootItem"), -1))
|
||||
, m_exercises(exercises)
|
||||
, m_logger(getLogger("ExerciseAssignmentDialogModel"))
|
||||
{
|
||||
for (int it = BuildingGroup_def::UnknownGroup;
|
||||
it <= BuildingGroup_def::Salchau;
|
||||
@@ -46,7 +45,7 @@ void ExerciseAssignmentDialogModel::addMse(int mseId, int sectionId, const QStri
|
||||
return;
|
||||
}
|
||||
}
|
||||
ERROR_LOG(m_logger) << "Did not find section with enum value " << sectionId;
|
||||
ERROR_LOG() << "Did not find section with enum value " << sectionId;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
-2
@@ -24,7 +24,6 @@ public:
|
||||
ExerciseAssignmentDialogModelFilterProxy(QObject *parent)
|
||||
: QSortFilterProxyModel(parent)
|
||||
, m_exerciseId(0)
|
||||
, m_logger(getLogger("ExerciseAssignmentDialogModelFilterProxy"))
|
||||
{
|
||||
setRecursiveFilteringEnabled(true);
|
||||
}
|
||||
@@ -77,7 +76,6 @@ protected:
|
||||
private:
|
||||
int m_exerciseId;
|
||||
ExerciseAssignmentDialogModel *m_sourceModel;
|
||||
LOGGER_T m_logger;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
+8
-9
@@ -28,7 +28,6 @@ MountingPointInfoDialog::MountingPointInfoDialog(int32_t mountingPointId, int32_
|
||||
, m_dtc(nullptr)
|
||||
, m_ismIfc(nullptr)
|
||||
, m_avmIfc(nullptr)
|
||||
, m_logger(getLogger("MountingPointInfoDialog"))
|
||||
{
|
||||
m_ui->setupUi(this);
|
||||
m_ui->gbxAsset->hide();
|
||||
@@ -66,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(m_logger) << "Initializing MountingPointInfoDialog ...";
|
||||
DEBUG_LOG() << "Initializing MountingPointInfoDialog ...";
|
||||
|
||||
disconnect();
|
||||
m_dtc = dtc;
|
||||
@@ -217,11 +216,11 @@ bool MountingPointInfoDialog::init(const std::shared_ptr<InfrastructureManagemen
|
||||
break;
|
||||
case InfrastructureManagement::MountingPointType::Unknown:
|
||||
default:
|
||||
WARNING_LOG(m_logger) << "Unknown MountingPointType found for assetId " << m_assetId << ": " << toString(mountingPointData.mountingPointTypeId());
|
||||
WARNING_LOG() << "Unknown MountingPointType found for assetId " << m_assetId << ": " << toString(mountingPointData.mountingPointTypeId());
|
||||
break;
|
||||
}
|
||||
|
||||
DEBUG_LOG(m_logger) << "Initializing MountingPointInfoDialog done :)";
|
||||
DEBUG_LOG() << "Initializing MountingPointInfoDialog done :)";
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -261,7 +260,7 @@ void MountingPointInfoDialog::onShowStream() const
|
||||
{
|
||||
if (!m_avmIfc)
|
||||
{
|
||||
ERROR_LOG(m_logger) << "m_avmIfc is not loaded.";
|
||||
ERROR_LOG() << "m_avmIfc is not loaded.";
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -272,7 +271,7 @@ void MountingPointInfoDialog::onAnnouncement() const
|
||||
{
|
||||
if (!m_avmIfc)
|
||||
{
|
||||
ERROR_LOG(m_logger) << "m_avmIfc is not loaded.";
|
||||
ERROR_LOG() << "m_avmIfc is not loaded.";
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -282,7 +281,7 @@ void MountingPointInfoDialog::onAnnouncement() const
|
||||
void MountingPointInfoDialog::showAsset(const InfrastructureManagement::InstrumentationAsset &asset)
|
||||
{
|
||||
removeAsset();
|
||||
DEBUG_LOG(m_logger) << "Showing new asset";
|
||||
DEBUG_LOG() << "Showing new asset";
|
||||
|
||||
m_assetId = asset.id();
|
||||
|
||||
@@ -309,7 +308,7 @@ void MountingPointInfoDialog::showAsset(const InfrastructureManagement::Instrume
|
||||
|
||||
void MountingPointInfoDialog::removeAsset()
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Removing asset information";
|
||||
DEBUG_LOG() << "Removing asset information";
|
||||
|
||||
m_assetId = -1;
|
||||
m_ui->gbxAsset->hide();
|
||||
@@ -323,7 +322,7 @@ void MountingPointInfoDialog::removeAsset()
|
||||
|
||||
void MountingPointInfoDialog::addAssetProperty(const QString &propName, const QString &propValue)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Adding asset property "
|
||||
DEBUG_LOG() << "Adding asset property "
|
||||
<< propName
|
||||
<< ':'
|
||||
<< propValue;
|
||||
|
||||
-1
@@ -58,6 +58,5 @@ private:
|
||||
std::shared_ptr<InfrastructureManagement::ForeignDataInterface> m_ismIfc;
|
||||
std::shared_ptr<AudioVideoManagement::ForeignDataInterface> m_avmIfc;
|
||||
QVector<QLabel *> m_dynamicAssetPropLabels;
|
||||
LOGGER_T m_logger;
|
||||
};
|
||||
}
|
||||
+22
-23
@@ -69,19 +69,18 @@ MountingPointListDialog::MountingPointListDialog(const QString &menuGroup, QWidg
|
||||
, m_ddsSelector(nullptr)
|
||||
, m_scheduleId(-1)
|
||||
, m_ui(new Ui::MountingPointListDialog)
|
||||
, m_logger(getLogger("MountingPointListDialog"))
|
||||
{
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
|
||||
TRACE_LOG() << 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(m_logger) << LOGFUNCTION << " END";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
MountingPointListDialog::~MountingPointListDialog()
|
||||
{
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
m_mapGuiInterface->removeObjectIndicator();
|
||||
m_mapGuiInterface->setSkipMapObjectSelectionDialog(false);
|
||||
|
||||
@@ -96,7 +95,7 @@ MountingPointListDialog::~MountingPointListDialog()
|
||||
delete m_ui;
|
||||
delete m_ddsSelector;
|
||||
delete m_requestHelper;
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
void MountingPointListDialog::retranslate()
|
||||
@@ -113,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(m_logger) << LOGFUNCTION << " START";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
m_dtc = dtc;
|
||||
m_ftc = ftc;
|
||||
m_dataIfc = dataInterface;
|
||||
@@ -127,43 +126,43 @@ bool MountingPointListDialog::init(LtsSession::LtsSession *session,
|
||||
|
||||
if (!m_ftc->enableInstrumentationAssetModify())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Could not enable FT InstrumentationAssetModify of ISM";
|
||||
ERROR_LOG() << "Could not enable FT InstrumentationAssetModify of ISM";
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!m_ftc->enableInstrumentationAssetModify())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Could not enable FT enableInstrumentationAssetModify of ISM";
|
||||
ERROR_LOG() << "Could not enable FT enableInstrumentationAssetModify of ISM";
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!m_ftc->enableInstrumentationAssetRemove())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Could not enable FT enableInstrumentationAssetRemove of ISM";
|
||||
ERROR_LOG() << "Could not enable FT enableInstrumentationAssetRemove of ISM";
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!m_ftc->enableInstrumentationAssetUnmount())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Could not enable FT enableInstrumentationAssetUnmount of ISM";
|
||||
ERROR_LOG() << "Could not enable FT enableInstrumentationAssetUnmount of ISM";
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!m_ftc->enableMountingPointAssetModify())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Could not enable FT MountingPointAssetModify of ISM";
|
||||
ERROR_LOG() << "Could not enable FT MountingPointAssetModify of ISM";
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!m_ftc->enableMountingPointAssetRemove())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Could not enable FT MountingPointAssetRemove of ISM";
|
||||
ERROR_LOG() << "Could not enable FT MountingPointAssetRemove of ISM";
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!m_ftc->enableStructureElementModify())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Could not enable FT enableStructureElementModify of ISM";
|
||||
ERROR_LOG() << "Could not enable FT enableStructureElementModify of ISM";
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -184,7 +183,7 @@ bool MountingPointListDialog::init(LtsSession::LtsSession *session,
|
||||
m_sourceModel->setMntPointFilterTypes(filters);
|
||||
if (!m_sourceModel->initModel(m_dtc, m_dataIfc))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Could not init model";
|
||||
ERROR_LOG() << "Could not init model";
|
||||
delete m_sourceModel;
|
||||
m_sourceModel = nullptr;
|
||||
return false;
|
||||
@@ -256,7 +255,7 @@ bool MountingPointListDialog::init(LtsSession::LtsSession *session,
|
||||
m_buildingComponentSettings->addChangedCallback(this);
|
||||
else
|
||||
{
|
||||
ERROR_LOG(m_logger) << LOGFUNCTION << " addChangedCallback fltBuildingComponentIfc failed";
|
||||
ERROR_LOG() << Q_FUNC_INFO << " addChangedCallback fltBuildingComponentIfc failed";
|
||||
#ifdef LTS_DEBUG
|
||||
Q_ASSERT(false);
|
||||
#endif
|
||||
@@ -265,7 +264,7 @@ bool MountingPointListDialog::init(LtsSession::LtsSession *session,
|
||||
onBuildingComponentSettingsChanged();
|
||||
}else
|
||||
{
|
||||
ERROR_LOG(m_logger) << "No BuildingCOmponentIfc ";
|
||||
ERROR_LOG() << "No BuildingCOmponentIfc ";
|
||||
}
|
||||
|
||||
|
||||
@@ -341,7 +340,7 @@ bool MountingPointListDialog::init(LtsSession::LtsSession *session,
|
||||
this, &MountingPointListDialog::onInfoMountButtonClicked, Qt::UniqueConnection);
|
||||
onUpdateInfoMountButtonAndBehaviour();
|
||||
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -353,7 +352,7 @@ void MountingPointListDialog::getMountingPointPlanData(const QModelIndex &index,
|
||||
if (item->data().canConvert<SimpleMountingPointData>())
|
||||
{
|
||||
const SimpleMountingPointData &data = item->data().value<SimpleMountingPointData>();
|
||||
DEBUG_LOG(m_logger) << "Item: " << m_sourceModel->data(index, Qt::DisplayRole).toString()
|
||||
DEBUG_LOG() << "Item: " << m_sourceModel->data(index, Qt::DisplayRole).toString()
|
||||
<< ", Structure Element Id: " << data.id;
|
||||
|
||||
if (mppMap.contains(data.id))
|
||||
@@ -363,7 +362,7 @@ void MountingPointListDialog::getMountingPointPlanData(const QModelIndex &index,
|
||||
}
|
||||
else if (data.aimState != MountingPointState_def::Idle)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Not available in Map. Desired: " << data.aimState;
|
||||
DEBUG_LOG() << "Not available in Map. Desired: " << data.aimState;
|
||||
modify.push_back(MountingPointPlan(data.id, data.aimState));
|
||||
}
|
||||
}
|
||||
@@ -419,7 +418,7 @@ void MountingPointListDialog::onMountingPointAssetRemoveReply(const Core::Functi
|
||||
|
||||
void MountingPointListDialog::onBuildingComponentSettingsChanged()
|
||||
{
|
||||
DEBUG_LOG(m_logger) << LOGFUNCTION << " START";
|
||||
DEBUG_LOG() << Q_FUNC_INFO << " START";
|
||||
|
||||
|
||||
|
||||
@@ -453,7 +452,7 @@ void MountingPointListDialog::onBuildingComponentSettingsChanged()
|
||||
|
||||
m_sortProxyModel->setFloorFilter(visibleFloors);
|
||||
}
|
||||
DEBUG_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
DEBUG_LOG() << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
bool MountingPointListDialog::apply()
|
||||
@@ -689,7 +688,7 @@ void MountingPointListDialog::onUnmountButtonClicked()
|
||||
});
|
||||
|
||||
if (!ret)
|
||||
WARNING_LOG(m_logger)<<" couldn't unmount asset on MountingPoinAsset id: "<<req.id();
|
||||
WARNING_LOG()<<" couldn't unmount asset on MountingPoinAsset id: "<<req.id();
|
||||
else
|
||||
m_buttonBox->setButtonEnabled(LtsWidgets::DialogButton::Load,false);
|
||||
}
|
||||
@@ -704,7 +703,7 @@ void MountingPointListDialog::onUnmountButtonClicked()
|
||||
}
|
||||
else
|
||||
{
|
||||
ERROR_LOG(m_logger)<<" Couldn't convert to SimpleMountingPointData: ";
|
||||
ERROR_LOG()<<" Couldn't convert to SimpleMountingPointData: ";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
-2
@@ -153,7 +153,5 @@ private:
|
||||
|
||||
|
||||
Ui::MountingPointListDialog *m_ui{nullptr};
|
||||
LOGGER_T m_logger;
|
||||
|
||||
};
|
||||
}
|
||||
+13
-14
@@ -27,13 +27,12 @@ MountingPointListDialogModel::MountingPointListDialogModel(QObject *parent)
|
||||
, m_dtc(nullptr)
|
||||
, m_scheduleId(-1)
|
||||
, m_dataChangedTimer(new QTimer(this))
|
||||
, m_logger(getLogger("MountingPointListDialogModel"))
|
||||
{
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
m_dataChangedTimer->setSingleShot(true);
|
||||
m_dataChangedTimer->setInterval(100);
|
||||
connect(m_dataChangedTimer, &QTimer::timeout, this, &MountingPointListDialogModel::emitDataChanged);
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
|
||||
@@ -88,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(m_logger) << "unknown!!!";
|
||||
ERROR_LOG() << "unknown!!!";
|
||||
return QVariant();
|
||||
}
|
||||
|
||||
ERROR_LOG(m_logger) << "mpType = " << itemData.mpType.underlying();
|
||||
ERROR_LOG() << "mpType = " << itemData.mpType.underlying();
|
||||
if(itemData.mpType == MountingPointType::OutdoorIPS)
|
||||
return MountingPointType::IndoorIPS;
|
||||
|
||||
@@ -114,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(m_logger) << LOGFUNCTION << " START";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
if (m_dtc == dtc)
|
||||
return true;
|
||||
|
||||
if (!(dtc->enableMainStructureElement() &&
|
||||
dtc->enableMountingPointAsset()))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Could not enable Datatopics";
|
||||
ERROR_LOG() << "Could not enable Datatopics";
|
||||
return false;
|
||||
}
|
||||
m_dtc = dtc;
|
||||
@@ -132,14 +131,14 @@ bool MountingPointListDialogModel::initModel(const std::shared_ptr<Interface::Dt
|
||||
connect(m_dataInterface.get(), &ForeignDataInterface::mountingPointChanged,
|
||||
this, &MountingPointListDialogModel::onMountingPointChanged);
|
||||
|
||||
DEBUG_LOG(m_logger) << "initModel successful";
|
||||
DEBUG_LOG() << "initModel successful";
|
||||
|
||||
initData();
|
||||
|
||||
beginResetModel();
|
||||
endResetModel();
|
||||
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -150,7 +149,7 @@ QModelIndex MountingPointListDialogModel::getIndexOfVisibleRootItem() const
|
||||
|
||||
void MountingPointListDialogModel::initData()
|
||||
{
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
|
||||
#ifdef BENCHMARK
|
||||
QElapsedTimer elapsedTimer1;
|
||||
@@ -266,9 +265,9 @@ void MountingPointListDialogModel::initData()
|
||||
parentIndex = m_mountingPointIndexes.value(path.at(path.size() - 2), indexFromItem(m_visRoot));
|
||||
if (!parentIndex.isValid())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Did not find parent for structure element with id " << currentElement.id() << " mseid: " << mse.id();
|
||||
ERROR_LOG() << "Did not find parent for structure element with id " << currentElement.id() << " mseid: " << mse.id();
|
||||
for (const StructureElement &se : mse.elements())
|
||||
ERROR_LOG(m_logger) << " se: " << se.id() << ", " << se.displayName() << ", " << se.name();
|
||||
ERROR_LOG() << " se: " << se.id() << ", " << se.displayName() << ", " << se.name();
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -295,7 +294,7 @@ void MountingPointListDialogModel::initData()
|
||||
qCritical() << " MountingPointListDialogModel::init-BENCHMARK: took " << elapsedTimer1.elapsed() << " [ms]";
|
||||
#endif
|
||||
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
QSet<int> MountingPointListDialogModel::getAvailableFloors() const
|
||||
@@ -442,7 +441,7 @@ void MountingPointListDialogModel::onScheduleIdChanged(int32_t scheduleId)
|
||||
if (scheduleId == m_scheduleId)
|
||||
return;
|
||||
|
||||
DEBUG_LOG(m_logger) << "onScheduleIdChanged: " << scheduleId;
|
||||
DEBUG_LOG() << "onScheduleIdChanged: " << scheduleId;
|
||||
|
||||
m_scheduleId = scheduleId;
|
||||
|
||||
|
||||
-1
@@ -104,7 +104,6 @@ private:
|
||||
QSet<int> m_availableFloors;
|
||||
QSet<int> m_availableBuildingGroups;
|
||||
QVariant m_cbxFilterType;
|
||||
LOGGER_T m_logger;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
+3
-3
@@ -21,7 +21,7 @@ MountingPointSelector::MountingPointSelector(const std::shared_ptr<Interface::Dt
|
||||
{
|
||||
if (!m_ftc->enableMountingPointPlanModify())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Could not enable FT MountingPointPlanModify of ISM";
|
||||
ERROR_LOG() << "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(m_logger) << "MountingPointPlansRemove error: "
|
||||
ERROR_LOG() << "MountingPointPlansRemove error: "
|
||||
<< replyObject.str();
|
||||
else
|
||||
DEBUG_LOG(m_logger) << "MountingPointPlansRemove success";
|
||||
DEBUG_LOG() << "MountingPointPlansRemove success";
|
||||
}
|
||||
|
||||
|
||||
|
||||
-1
@@ -35,7 +35,6 @@ protected:
|
||||
std::shared_ptr<Interface::Ftc> m_ftc;
|
||||
std::shared_ptr<Interface::Dtc> m_dtc;
|
||||
LtsUtils::RequestHelper *m_requestHelper;
|
||||
LOGGER_T m_logger;
|
||||
};
|
||||
|
||||
}
|
||||
+2
-3
@@ -19,7 +19,6 @@ ConflictsDialog::ConflictsDialog(const QString &menuGroup, QWidget *parent)
|
||||
, m_ui(new Ui::ConflictsDialog)
|
||||
, m_sourceModel(nullptr)
|
||||
, m_menuGroup(menuGroup)
|
||||
, m_logger(getLogger("ConflictsDialog"))
|
||||
{
|
||||
m_ui->setupUi(this);
|
||||
setOnlineHelpFilename(QStringLiteral("Ressourcen-Conflicts"));
|
||||
@@ -55,7 +54,7 @@ bool ConflictsDialog::init(LtsSession::LtsSession *session,
|
||||
|
||||
if (m_scheduleId <= 0)
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Invalid id for Instrumentation plan: " << m_scheduleId;
|
||||
ERROR_LOG() << "Invalid id for Instrumentation plan: " << m_scheduleId;
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -65,7 +64,7 @@ bool ConflictsDialog::init(LtsSession::LtsSession *session,
|
||||
|
||||
if (!m_sourceModel->initModel(m_scheduleId, m_anotherScheduleId, m_dtc))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Could not init ConflictsDialogModel";
|
||||
ERROR_LOG() << "Could not init ConflictsDialogModel";
|
||||
delete m_sourceModel;
|
||||
m_sourceModel = nullptr;
|
||||
return false;
|
||||
|
||||
+9
-10
@@ -24,7 +24,6 @@ ConflictsDialogModel::ConflictsDialogModel(QObject *parent)
|
||||
, m_dtc(nullptr)
|
||||
, m_scheduleId(-1)
|
||||
, m_anotherScheduleId(-1)
|
||||
, m_logger(getLogger("OverviewConflictsDialogModel"))
|
||||
{
|
||||
|
||||
}
|
||||
@@ -129,7 +128,7 @@ bool ConflictsDialogModel::initModel(int scheduleId,
|
||||
if (!(dtc->enableMainStructureElement() &&
|
||||
dtc->enableMainSchedule()))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Could not enable Data Topics";
|
||||
ERROR_LOG() << "Could not enable Data Topics";
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -303,7 +302,7 @@ void ConflictsDialogModel::initData()
|
||||
|
||||
if (mountingPoint.mountingPointState() == compareMountingPointState)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "No conflict for mounting point id = " << currentElement.id() << " - " << currentElement.name();
|
||||
DEBUG_LOG() << "No conflict for mounting point id = " << currentElement.id() << " - " << currentElement.name();
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -315,11 +314,11 @@ void ConflictsDialogModel::initData()
|
||||
mpData.conflictState = compareMountingPointState;
|
||||
mpData.mpType = currentElement.mountingPointTypeId();
|
||||
|
||||
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() << "## MP Id = " << mpData.id;
|
||||
DEBUG_LOG() << "## MP Name = " << mpData.name;
|
||||
DEBUG_LOG() << "## Aim state = " << mpData.aimState;
|
||||
|
||||
DEBUG_LOG(m_logger) << "Adding mounting point id = " << mpData.id << " - " << mpData.name;
|
||||
DEBUG_LOG() << "Adding mounting point id = " << mpData.id << " - " << mpData.name;
|
||||
|
||||
item = new NGLTreeItem(QVariant::fromValue(mpData));
|
||||
}
|
||||
@@ -339,16 +338,16 @@ void ConflictsDialogModel::initData()
|
||||
parentIndex = m_mountingPointIndexes.value(path.at(path.size() - 2), indexFromItem(m_rootItem));
|
||||
if (!parentIndex.isValid())
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Did not find parent for structure element with id " << currentElement.id() << " mseid: " << mse.id();
|
||||
DEBUG_LOG() << "Did not find parent for structure element with id " << currentElement.id() << " mseid: " << mse.id();
|
||||
for (const StructureElement &se : mse.elements())
|
||||
DEBUG_LOG(m_logger) << " se: " << se.id() << ", " << se.displayName() << ", " << se.name();
|
||||
DEBUG_LOG() << " se: " << se.id() << ", " << se.displayName() << ", " << se.name();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
parentIndex = groupIndex.isValid() ? groupIndex : indexFromItem(m_rootItem);
|
||||
DEBUG_LOG(m_logger) << "Insert row under root: " << currentElement.displayName();
|
||||
DEBUG_LOG() << "Insert row under root: " << currentElement.displayName();
|
||||
}
|
||||
|
||||
insertRow(rowCount(parentIndex), parentIndex, item);
|
||||
|
||||
-3
@@ -81,9 +81,6 @@ private:
|
||||
QHash<int, QModelIndex> m_mountingPointIndexes;
|
||||
QSet<int> m_availableBuildingGroups;
|
||||
QList<MountingPointType> m_visibleTypes;
|
||||
|
||||
LOGGER_T m_logger;
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
+21
-22
@@ -25,9 +25,8 @@ OverviewDialog::OverviewDialog(const QString &menuGroup, LtsSession::LtsSession
|
||||
, m_session(session)
|
||||
, m_ui(new Ui::OverviewDialog)
|
||||
, m_menuGroup(menuGroup)
|
||||
, m_logger(getLogger("OverviewDialog"))
|
||||
{
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
m_ui->setupUi(this);
|
||||
m_timerUpdateView = new QTimer(this);
|
||||
m_timerUpdateView->setSingleShot(true);
|
||||
@@ -37,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(m_logger) << LOGFUNCTION << " END";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
OverviewDialog::~OverviewDialog()
|
||||
{
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
delete m_ui;
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
void OverviewDialog::aboutToClose()
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "About to close";
|
||||
DEBUG_LOG() << "About to close";
|
||||
if (m_session->baseLayout()->getWidget(m_menuGroup, QStringLiteral("OverviewConflicts")))
|
||||
m_session->baseLayout()->getWidget(m_menuGroup, QStringLiteral("OverviewConflicts"))->closeRequest();
|
||||
}
|
||||
@@ -70,7 +69,7 @@ bool OverviewDialog::init(int planId,
|
||||
const std::shared_ptr<Interface::Ftc> &ftc,
|
||||
const std::shared_ptr<ForeignDataInterface> &dataInterface)
|
||||
{
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
m_scheduleId = planId;
|
||||
m_dtc = dtc;
|
||||
m_ftc = ftc;
|
||||
@@ -94,32 +93,32 @@ bool OverviewDialog::init(int planId,
|
||||
|
||||
|
||||
connect(m_timerUpdateView, &QTimer::timeout, this, &OverviewDialog::reloadModel);
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
return true;
|
||||
}
|
||||
|
||||
void OverviewDialog::setCbBasePlan()
|
||||
{
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
|
||||
TRACE_LOG() << 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(m_logger) << LOGFUNCTION << " END";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
|
||||
void OverviewDialog::setCbComparePlan()
|
||||
{
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
|
||||
TRACE_LOG() << 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(m_logger) << LOGFUNCTION << " END";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
void OverviewDialog::onPrint()
|
||||
@@ -151,7 +150,7 @@ void OverviewDialog::onPrint()
|
||||
|
||||
void OverviewDialog::onScheduleIdChanged(int32_t scheduleId)
|
||||
{
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
if (m_scheduleId == scheduleId)
|
||||
return;
|
||||
setCbComparePlan();
|
||||
@@ -164,30 +163,30 @@ void OverviewDialog::onScheduleIdChanged(int32_t scheduleId)
|
||||
m_session->baseLayout()->getWidget(m_menuGroup, QStringLiteral("OverviewConflicts"))->closeRequest();
|
||||
|
||||
retranslate();
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
void OverviewDialog::onCbComparePlanIndexChanged(int index)
|
||||
{
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
Q_UNUSED(index);
|
||||
updateOverviewData();
|
||||
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
void OverviewDialog::onCbBasePlanIndexChanged(int index)
|
||||
{
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
Q_UNUSED(index);
|
||||
updateOverviewData();
|
||||
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
void OverviewDialog::onPlansDataChanged()
|
||||
{
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
updateOverviewData();
|
||||
ConflictsDialog *dialog = static_cast<ConflictsDialog*>(m_session->baseLayout()->getWidget(m_menuGroup, QStringLiteral("OverviewConflicts")));
|
||||
if (dialog)
|
||||
@@ -195,7 +194,7 @@ void OverviewDialog::onPlansDataChanged()
|
||||
dialog->updateModel();
|
||||
}
|
||||
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
void OverviewDialog::updateOverviewData()
|
||||
@@ -205,7 +204,7 @@ void OverviewDialog::updateOverviewData()
|
||||
|
||||
void OverviewDialog::reloadModel()
|
||||
{
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
if (m_model == nullptr)
|
||||
return;
|
||||
|
||||
@@ -218,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(m_logger) << LOGFUNCTION << " END";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
}
|
||||
+14
-15
@@ -30,9 +30,8 @@ OverviewDialogModel::OverviewDialogModel(QObject *parent)
|
||||
, m_loadedScheduleId(-1)
|
||||
, m_comparedScheduleId(0)
|
||||
, m_dtc(nullptr)
|
||||
, m_logger(getLogger("OverviewDialogModel"))
|
||||
{
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
|
||||
|
||||
|
||||
@@ -54,7 +53,7 @@ OverviewDialogModel::OverviewDialogModel(QObject *parent)
|
||||
m_refMap[MountingPointType_def::IndoorCamera] = 2;
|
||||
m_refMap[MountingPointType_def::IndoorIPS] = 3;
|
||||
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
QVariant OverviewDialogModel::data(const QModelIndex &index, int role) const
|
||||
@@ -114,7 +113,7 @@ bool OverviewDialogModel::initModel(int32_t mainScheduleId,
|
||||
const std::shared_ptr<Interface::Dtc> &dtc,
|
||||
int32_t comparedScheduleId, int32_t basePlanId)
|
||||
{
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
m_dtc = dtc;
|
||||
m_loadedScheduleId = mainScheduleId;
|
||||
m_comparedScheduleId = comparedScheduleId;
|
||||
@@ -125,19 +124,19 @@ bool OverviewDialogModel::initModel(int32_t mainScheduleId,
|
||||
if (!m_dtc->mainSchedules().contains(m_loadedScheduleId))
|
||||
{
|
||||
m_loadedScheduleId = -1;
|
||||
ERROR_LOG(m_logger) << "Invalid scheduleId = " << mainScheduleId;
|
||||
ERROR_LOG() << "Invalid scheduleId = " << mainScheduleId;
|
||||
return false;
|
||||
}
|
||||
|
||||
DEBUG_LOG(m_logger) << "[INITIAL] loaded: "<<m_loadedScheduleId<<" cmp: "<<m_comparedScheduleId<<" sim: "<<m_basePlanId;
|
||||
DEBUG_LOG() << "[INITIAL] loaded: "<<m_loadedScheduleId<<" cmp: "<<m_comparedScheduleId<<" sim: "<<m_basePlanId;
|
||||
|
||||
if (!initData())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Could not init data";
|
||||
ERROR_LOG() << "Could not init data";
|
||||
return false;
|
||||
}
|
||||
|
||||
DEBUG_LOG(m_logger) << "initModel successful";
|
||||
DEBUG_LOG() << "initModel successful";
|
||||
|
||||
|
||||
connect(m_dtc.get(), &Interface::Dtc::mainStructureElementChanged,
|
||||
@@ -147,13 +146,13 @@ bool OverviewDialogModel::initModel(int32_t mainScheduleId,
|
||||
connect(m_dtc.get(), &Interface::Dtc::instrumentationAssetChanged,
|
||||
this, &OverviewDialogModel::initData, Qt::UniqueConnection);
|
||||
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
return true;
|
||||
}
|
||||
|
||||
bool OverviewDialogModel::initData()
|
||||
{
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
|
||||
#ifdef BENCHMARK
|
||||
QElapsedTimer elapsedTimer1;
|
||||
@@ -174,9 +173,9 @@ bool OverviewDialogModel::initData()
|
||||
setNewData();
|
||||
|
||||
for ( int mppId : std::as_const(m_conflictedStructureElementIds))
|
||||
DEBUG_LOG(m_logger) << "Conflicted structure element id = " << mppId;
|
||||
DEBUG_LOG() << "Conflicted structure element id = " << mppId;
|
||||
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -214,7 +213,7 @@ bool OverviewDialogModel::hasConflictedMountingPoints()
|
||||
|
||||
QHash<int, MountingPointPlan> OverviewDialogModel::mergePlans(const QHash<int, MountingPointPlan> &currPlan, const int cmpPlanId)
|
||||
{
|
||||
DEBUG_LOG(m_logger)<<"[MERGE PLANs] currPlanId: "<<m_loadedScheduleId<<" ; cmpPlanId: "<<cmpPlanId;
|
||||
DEBUG_LOG()<<"[MERGE PLANs] currPlanId: "<<m_loadedScheduleId<<" ; cmpPlanId: "<<cmpPlanId;
|
||||
QHash<int, MountingPointPlan> mergedPlan = currPlan;
|
||||
|
||||
const auto msConst = m_dtc->mainSchedules();
|
||||
@@ -244,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(m_logger)<<" conflicted name: "<<currentMpp.structureElementId();
|
||||
DEBUG_LOG()<<" conflicted name: "<<currentMpp.structureElementId();
|
||||
mergedPlan[currentMpp.structureElementId()].mountingPointState(MountingPointState::Idle);
|
||||
m_conflictedStructureElementIds.insert(basePlanMpp.structureElementId());
|
||||
}
|
||||
@@ -280,7 +279,7 @@ void OverviewDialogModel::setNewData()
|
||||
QHash<int , MountingPointPlan> baseMountingPointPlans;
|
||||
|
||||
|
||||
DEBUG_LOG(m_logger) << "We compare plan " << m_basePlanId << " with " << m_comparedScheduleId;
|
||||
DEBUG_LOG() << "We compare plan " << m_basePlanId << " with " << m_comparedScheduleId;
|
||||
|
||||
baseMountingPointPlans.clear();
|
||||
m_conflictedStructureElementIds.clear();
|
||||
|
||||
-3
@@ -92,9 +92,6 @@ private:
|
||||
QMap<qint32, InfrastructureManagement::MountingPointAsset> m_mountingPointAssets;
|
||||
|
||||
QMap<MountingPointType, int> m_refMap;
|
||||
|
||||
LOGGER_T m_logger;
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
+13
-14
@@ -23,12 +23,11 @@ OverviewMountingPointListDialog::OverviewMountingPointListDialog(const QString &
|
||||
: LtsWidgets::LtsDialog(parent, LtsWidgets::ButtonCombination::CloseOnly)
|
||||
, m_menuGroup(menuGroup)
|
||||
, m_ui(new Ui::OverViewMountingPointListDialog)
|
||||
, m_logger(getLogger("OverviewMountingPointListDialog"))
|
||||
, m_actionMenu(new QMenu(this))
|
||||
, m_printMountingAction(new QAction(tr("To Mount"), this))
|
||||
, m_printUnmountingAction(new QAction(tr("To Unmount"), this))
|
||||
{
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
|
||||
setAttribute(Qt::WA_DeleteOnClose);
|
||||
m_ui->setupUi(this);
|
||||
@@ -40,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(m_logger) << LOGFUNCTION << " END";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
OverviewMountingPointListDialog::~OverviewMountingPointListDialog()
|
||||
{
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
delete m_ui;
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
|
||||
@@ -58,7 +57,7 @@ bool OverviewMountingPointListDialog::init(LtsSession::LtsSession *session,
|
||||
const std::shared_ptr<ForeignDataInterface> &dataInterface,
|
||||
int32_t scheduleId)
|
||||
{
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START, scheduleId=" << scheduleId;
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START, scheduleId=" << scheduleId;
|
||||
m_dtc = dtc;
|
||||
m_dataIfc = dataInterface;
|
||||
m_session = session;
|
||||
@@ -69,30 +68,30 @@ bool OverviewMountingPointListDialog::init(LtsSession::LtsSession *session,
|
||||
|
||||
if (!m_ftc->enableInstrumentationAssetModify())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Could not enable FT InstrumentationAssetModify of ISM";
|
||||
ERROR_LOG() << "Could not enable FT InstrumentationAssetModify of ISM";
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!m_ftc->enableMountingPointPlanModify())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Could not enable FT enableMountingPointPlansModify of ISM";
|
||||
ERROR_LOG() << "Could not enable FT enableMountingPointPlansModify of ISM";
|
||||
return false;
|
||||
}
|
||||
|
||||
DEBUG_LOG(m_logger) << LOGFUNCTION << " new ViewMountingPointListModel...";
|
||||
DEBUG_LOG() << 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(m_logger) << "Could not init model";
|
||||
ERROR_LOG() << "Could not init model";
|
||||
delete m_sourceModel;
|
||||
m_sourceModel = nullptr;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
DEBUG_LOG(m_logger) << LOGFUNCTION << " new m_mountedPointSortProxyModel ...";
|
||||
DEBUG_LOG() << Q_FUNC_INFO << " new m_mountedPointSortProxyModel ...";
|
||||
delete m_mountedPointSortProxyModel;
|
||||
m_mountedPointSortProxyModel = new ViewMountingPointListSortModel(this);
|
||||
m_mountedPointSortProxyModel->setVisibleState(MountingPointState::Equipped);
|
||||
@@ -104,7 +103,7 @@ bool OverviewMountingPointListDialog::init(LtsSession::LtsSession *session,
|
||||
m_ui->mountingPointListView->setSortingEnabled(true);
|
||||
|
||||
|
||||
DEBUG_LOG(m_logger) << LOGFUNCTION << " new m_unmountedPointSortProxyModel ...";
|
||||
DEBUG_LOG() << Q_FUNC_INFO << " new m_unmountedPointSortProxyModel ...";
|
||||
delete m_unmountedPointSortProxyModel;
|
||||
m_unmountedPointSortProxyModel = new ViewMountingPointListSortModel(this);
|
||||
m_unmountedPointSortProxyModel->setVisibleState(MountingPointState::Empty);
|
||||
@@ -134,7 +133,7 @@ bool OverviewMountingPointListDialog::init(LtsSession::LtsSession *session,
|
||||
|
||||
|
||||
|
||||
DEBUG_LOG(m_logger) << LOGFUNCTION << " filter... ...";
|
||||
DEBUG_LOG() << Q_FUNC_INFO << " filter... ...";
|
||||
const auto filters = { MountingPointType::BuildingSensorModule,
|
||||
|
||||
|
||||
@@ -216,7 +215,7 @@ bool OverviewMountingPointListDialog::init(LtsSession::LtsSession *session,
|
||||
|
||||
retranslate();
|
||||
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
+12
-13
@@ -26,14 +26,13 @@ ViewMountingPointListModel::ViewMountingPointListModel(QObject *parent)
|
||||
: NGLTreeModel(parent, new NGLTreeItem(QVariant()), { tr("Name"), tr("Type"), tr("Aim State") })
|
||||
, m_visRoot(new NGLTreeItem(tr("Mounting Points")))
|
||||
, m_dtc(nullptr)
|
||||
, m_logger(getLogger("ViewMountingPointListModel"))
|
||||
, m_dataChangedTimer(new QTimer(this))
|
||||
{
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
m_dataChangedTimer->setSingleShot(true);
|
||||
m_dataChangedTimer->setInterval(100);
|
||||
connect(m_dataChangedTimer, &QTimer::timeout, this, &ViewMountingPointListModel::emitDataChanged);
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
|
||||
@@ -106,7 +105,7 @@ bool ViewMountingPointListModel::initModel(const std::shared_ptr<Interface::Dtc>
|
||||
const std::shared_ptr<ForeignDataInterface> &dataInterface,
|
||||
int32_t requestedScheduleId)
|
||||
{
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START, scheduleId=" << requestedScheduleId;
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START, scheduleId=" << requestedScheduleId;
|
||||
|
||||
if (m_dtc == dtc)
|
||||
return true;
|
||||
@@ -114,7 +113,7 @@ bool ViewMountingPointListModel::initModel(const std::shared_ptr<Interface::Dtc>
|
||||
if (!(dtc->enableMainStructureElement() &&
|
||||
dtc->enableMountingPointAsset()))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Could not enable Datatopics";
|
||||
ERROR_LOG() << "Could not enable Datatopics";
|
||||
return false;
|
||||
}
|
||||
m_dtc = dtc;
|
||||
@@ -133,11 +132,11 @@ bool ViewMountingPointListModel::initModel(const std::shared_ptr<Interface::Dtc>
|
||||
connect(m_dataInterface.get(), &ForeignDataInterface::mountingPointChanged,
|
||||
this, &ViewMountingPointListModel::onMountingPointChanged);
|
||||
|
||||
DEBUG_LOG(m_logger) << "initModel successful";
|
||||
DEBUG_LOG() << "initModel successful";
|
||||
|
||||
initData();
|
||||
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -178,7 +177,7 @@ inline int getFakeBuildingGroupId(int seId)
|
||||
|
||||
void ViewMountingPointListModel::initData()
|
||||
{
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START, m_scheduleId=" << m_scheduleId;
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START, m_scheduleId=" << m_scheduleId;
|
||||
|
||||
|
||||
#ifdef BENCHMARK
|
||||
@@ -312,9 +311,9 @@ void ViewMountingPointListModel::initData()
|
||||
parentIndex = m_mountingPointIndexes.value(path.at(path.size() - 2), indexFromItem(m_visRoot));
|
||||
if (!parentIndex.isValid())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Did not find parent for structure element with id " << currentElement.id() << " mseid: " << mse.id();
|
||||
ERROR_LOG() << "Did not find parent for structure element with id " << currentElement.id() << " mseid: " << mse.id();
|
||||
for (const StructureElement &se : mse.elements())
|
||||
ERROR_LOG(m_logger) << " se: " << se.id() << ", " << se.displayName() << ", " << se.name();
|
||||
ERROR_LOG() << " se: " << se.id() << ", " << se.displayName() << ", " << se.name();
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -346,18 +345,18 @@ void ViewMountingPointListModel::initData()
|
||||
qCritical() << " ViewMountingPointListModel::initData-BENCHMARK: m_scheduleId=" << m_scheduleId << " took " << elapsedTimer1.elapsed() << " [ms]";
|
||||
#endif
|
||||
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
bool ViewMountingPointListModel::mountingPointHasAssetMounted(int32_t mountingPointId, const QMap<qint32, MountingPointAsset> &mountingPointAssetMap)
|
||||
{
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
for (const MountingPointAsset &mpa : mountingPointAssetMap)
|
||||
{
|
||||
if (mpa.structureElementId() == mountingPointId)
|
||||
return true;
|
||||
}
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
-1
@@ -109,7 +109,6 @@ private:
|
||||
QHash<int32_t, bool> m_mountingPointHasAssetMounted;
|
||||
|
||||
QSet<int> m_availableFloors;
|
||||
LOGGER_T m_logger;
|
||||
QTimer *m_dataChangedTimer{nullptr};
|
||||
|
||||
};
|
||||
|
||||
-1
@@ -13,7 +13,6 @@ NewPlanDialog::NewPlanDialog(LtsSession::LtsSession *session, QWidget *parent)
|
||||
: QDialog(parent)
|
||||
, m_ui(new Ui::NewPlanDialog)
|
||||
, m_session(session)
|
||||
, m_logger(getLogger("NewPlanDialog"))
|
||||
{
|
||||
setWindowTitle(tr("Create New Plan"));
|
||||
m_ui->setupUi(this);
|
||||
|
||||
-1
@@ -32,7 +32,6 @@ private:
|
||||
Ui::NewPlanDialog* m_ui;
|
||||
std::shared_ptr<ForeignGuiComboboxInterface> m_ismGuiCbx{nullptr};
|
||||
LtsSession::LtsSession *m_session{nullptr};
|
||||
LOGGER_T m_logger;
|
||||
};
|
||||
|
||||
}
|
||||
-1
@@ -26,7 +26,6 @@ PlanChooser::PlanChooser(const std::shared_ptr<Interface::Dtc> &dtc, QWidget *pa
|
||||
, m_model(nullptr)
|
||||
, m_dtc(dtc)
|
||||
, m_selected(false)
|
||||
, m_logger(getLogger("PlanChooser"))
|
||||
{
|
||||
LtsWidgets::LtsGlobalWaitDialog::getInstance()->setVisible(false);
|
||||
|
||||
|
||||
-2
@@ -38,8 +38,6 @@ private:
|
||||
std::shared_ptr<InfrastructureManagement::Interface::Dtc> m_dtc{nullptr};
|
||||
bool m_close{false};
|
||||
bool m_selected{false};
|
||||
LOGGER_T m_logger;
|
||||
|
||||
protected:
|
||||
void closeEvent(QCloseEvent *event) override;
|
||||
|
||||
|
||||
+2
-3
@@ -16,7 +16,6 @@ ScheduleDifferencesListDialog::ScheduleDifferencesListDialog(const QString &menu
|
||||
, m_ui(new Ui::ScheduleDifferencesListDialog)
|
||||
, m_sourceModel(nullptr)
|
||||
, m_menuGroup(menuGroup)
|
||||
, m_logger(getLogger("ScheduleDifferencesListDialog"))
|
||||
{
|
||||
m_ui->setupUi(this);
|
||||
setOnlineHelpFilename(QStringLiteral("Ressourcen-Completeness_Check"));
|
||||
@@ -48,7 +47,7 @@ bool ScheduleDifferencesListDialog::init(LtsSession::LtsSession *session,
|
||||
|
||||
if (m_scheduleId <= 0)
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Invalid id for Instrumentation plan: " << m_scheduleId;
|
||||
ERROR_LOG() << "Invalid id for Instrumentation plan: " << m_scheduleId;
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -58,7 +57,7 @@ bool ScheduleDifferencesListDialog::init(LtsSession::LtsSession *session,
|
||||
|
||||
if (!m_sourceModel->initModel(m_scheduleId, m_dtc))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Could not init ScheduleDifferencesListDialogModel";
|
||||
ERROR_LOG() << "Could not init ScheduleDifferencesListDialogModel";
|
||||
delete m_sourceModel;
|
||||
m_sourceModel = nullptr;
|
||||
return false;
|
||||
|
||||
+5
-6
@@ -20,7 +20,6 @@ ScheduleDifferencesListDialogModel::ScheduleDifferencesListDialogModel(QObject *
|
||||
tr("Asset Id"),
|
||||
tr("Asset Name")},
|
||||
parent)
|
||||
, m_logger(getLogger("ScheduleDifferencesListDialogModel"))
|
||||
{
|
||||
}
|
||||
|
||||
@@ -76,28 +75,28 @@ bool ScheduleDifferencesListDialogModel::initModel(int scheduleId,
|
||||
m_scheduleId = scheduleId;
|
||||
if (m_scheduleId <= 0)
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Invalid scheduleId = " << m_scheduleId;
|
||||
ERROR_LOG() << "Invalid scheduleId = " << m_scheduleId;
|
||||
return false;
|
||||
}
|
||||
|
||||
QList<MountingPointPlan> diff;
|
||||
bool isComplete = m_dtc->getScheduleDifferences(m_scheduleId, diff);
|
||||
|
||||
DEBUG_LOG(m_logger) << "Plan id = " << m_scheduleId << ", Differences = " << diff.size();
|
||||
DEBUG_LOG() << "Plan id = " << m_scheduleId << ", Differences = " << diff.size();
|
||||
|
||||
if (isComplete)
|
||||
{
|
||||
WARNING_LOG(m_logger) << "Instrumentation plan is complete. No differences to show.";
|
||||
WARNING_LOG() << "Instrumentation plan is complete. No differences to show.";
|
||||
return false;
|
||||
}
|
||||
|
||||
for (const MountingPointPlan &mpp : std::as_const(diff))
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Adding to model MPP = " << mpp.id();
|
||||
DEBUG_LOG() << "Adding to model MPP = " << mpp.id();
|
||||
insertRow(mpp);
|
||||
}
|
||||
|
||||
DEBUG_LOG(m_logger) << "initModel successful";
|
||||
DEBUG_LOG() << "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(m_logger) << LOGFUNCTION << " ";
|
||||
DEBUG_LOG() << 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(m_logger) << "Start init FileManagementDialogWidget...";
|
||||
DEBUG_LOG() << "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(m_logger) << "Could not enable DTC/FTC from ISM";
|
||||
ERROR_LOG() << "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(m_logger) << "Could not init model";
|
||||
ERROR_LOG() << "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(m_logger) << "ism_plan_tln_dialog: setScheduleId = " << m_scheduleId;
|
||||
DEBUG_LOG() << "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(m_logger) << "onLoad failed: Could not find model for selected item:" << m_selectedItem;
|
||||
ERROR_LOG() << "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(m_logger) << "Could not find schedule for item id:" << itemId;
|
||||
WARNING_LOG() << "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(m_logger) << "Invalid schedule id: timeline update aborted!";
|
||||
ERROR_LOG() << "Invalid schedule id: timeline update aborted!";
|
||||
return;
|
||||
}
|
||||
|
||||
if (m_model!= nullptr && !m_model->updateModel())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Invalid model!";
|
||||
ERROR_LOG() << "Invalid model!";
|
||||
return;
|
||||
}
|
||||
resizeView();
|
||||
|
||||
+7
-8
@@ -19,13 +19,12 @@ PlanTimelineModel::PlanTimelineModel(TimelineView *tlv, QObject *parent)
|
||||
, m_endTime(m_startTime + (LtsTimeline::ZoomFactor::OneDay))
|
||||
, m_scheduleId(-1)
|
||||
, m_tlv(tlv)
|
||||
, m_logger(getLogger("PlanTimeLineModel"))
|
||||
{
|
||||
}
|
||||
|
||||
bool PlanTimelineModel::initModel(const std::shared_ptr<InfrastructureManagement::Interface::Dtc> &dtc, const std::shared_ptr<ForeignDataInterface> &dataInterface)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Start init FileManagement timeline model...";
|
||||
DEBUG_LOG() << "Start init FileManagement timeline model...";
|
||||
|
||||
if (m_dtc == dtc)
|
||||
return true;
|
||||
@@ -43,17 +42,17 @@ bool PlanTimelineModel::initModel(const std::shared_ptr<InfrastructureManagement
|
||||
|
||||
if (!bRet)
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Could not enable ISM DTC Main schedule or Structure elements";
|
||||
ERROR_LOG() << "Could not enable ISM DTC Main schedule or Structure elements";
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!setModel())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Could not set timeline model";
|
||||
ERROR_LOG() << "Could not set timeline model";
|
||||
return false;
|
||||
}
|
||||
|
||||
INFO_LOG(m_logger) << "initModel successful";
|
||||
INFO_LOG() << "initModel successful";
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -63,7 +62,7 @@ bool PlanTimelineModel::setModel()
|
||||
{
|
||||
if (m_scheduleId == -1)
|
||||
{
|
||||
WARNING_LOG(m_logger) << "Invalid scheduleId " << m_scheduleId;
|
||||
WARNING_LOG() << "Invalid scheduleId " << m_scheduleId;
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -103,12 +102,12 @@ bool PlanTimelineModel::setModel()
|
||||
}
|
||||
catch (const std::exception &e)
|
||||
{
|
||||
ERROR_LOG(m_logger) << "## Unable to add item or track to model. Exception: " << e.what();
|
||||
ERROR_LOG() << "## Unable to add item or track to model. Exception: " << e.what();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else
|
||||
WARNING_LOG(m_logger) << "Time start/end not set for schedule id " << mse.id();
|
||||
WARNING_LOG() << "Time start/end not set for schedule id " << mse.id();
|
||||
}
|
||||
return true;
|
||||
|
||||
|
||||
+13
-14
@@ -24,7 +24,6 @@ BuildingMountPointDialog::BuildingMountPointDialog(QWidget *parent)
|
||||
, m_ftc(nullptr)
|
||||
, m_ismGuiIfc(nullptr)
|
||||
, m_requestHelper(new LtsUtils::RequestHelper(this))
|
||||
, m_logger(getLogger("BuildingMountPointDialog"))
|
||||
, m_importedModelIndex()
|
||||
{
|
||||
m_ui->setupUi(this);
|
||||
@@ -70,7 +69,7 @@ bool BuildingMountPointDialog::init(const std::shared_ptr<Interface::Dtc> &dtc,
|
||||
|
||||
if (!m_model->initModel(m_dtc))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Could not init model";
|
||||
ERROR_LOG() << "Could not init model";
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -95,7 +94,7 @@ bool BuildingMountPointDialog::init(const std::shared_ptr<Interface::Dtc> &dtc,
|
||||
|
||||
if (!m_ftc->enableMainStructureElementModify())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Could not enable FT MainStructureElementModify of ISM";
|
||||
ERROR_LOG() << "Could not enable FT MainStructureElementModify of ISM";
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -218,7 +217,7 @@ bool BuildingMountPointDialog::exportData(const std::vector<StructureElement> &s
|
||||
|
||||
void BuildingMountPointDialog::onExportClicked()
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "**** onExportClicked() ";
|
||||
DEBUG_LOG() << "**** onExportClicked() ";
|
||||
|
||||
const QModelIndexList indexList = m_ui->tvBuildings->selectionModel()->selectedRows();
|
||||
if (indexList.isEmpty())
|
||||
@@ -252,14 +251,14 @@ void BuildingMountPointDialog::onExportClicked()
|
||||
tr("CSV-Files (*.csv)"));
|
||||
if (!fileNameTemplate.contains(placeholder))
|
||||
{
|
||||
ERROR_LOG(m_logger) << " no placeholder '" << placeholder << "'";
|
||||
ERROR_LOG() << " 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(m_logger) << " fileNameTemplate after '" << fileNameTemplate << "'";
|
||||
DEBUG_LOG() << " fileNameTemplate after '" << fileNameTemplate << "'";
|
||||
for (auto idxItem : indexList)
|
||||
{
|
||||
const QModelIndex &idx = m_proxyModel->mapToSource(idxItem);
|
||||
@@ -267,16 +266,16 @@ void BuildingMountPointDialog::onExportClicked()
|
||||
const QString bldgName = QString::fromStdString(m_model->getMainStructureElement(idx).name());
|
||||
if (bldgName.isEmpty())
|
||||
{
|
||||
ERROR_LOG(m_logger) << " bldgName is empty";
|
||||
ERROR_LOG() << " bldgName is empty";
|
||||
LtsWidgets::LtsMessageDialog::showMessage(this, tr("Name is empty").arg(dir));
|
||||
return;
|
||||
}
|
||||
|
||||
const QString &fileName = QString(fileNameTemplate).arg(bldgName);
|
||||
DEBUG_LOG(m_logger) << " fileName '" << fileName << "'";
|
||||
DEBUG_LOG() << " fileName '" << fileName << "'";
|
||||
|
||||
if (!exportData(structureElements, fileName))
|
||||
ERROR_LOG(m_logger) << " exportData failed bldgName " << bldgName;
|
||||
ERROR_LOG() << " exportData failed bldgName " << bldgName;
|
||||
}
|
||||
|
||||
LtsWidgets::LtsMessageDialog::showMessage(this,
|
||||
@@ -313,7 +312,7 @@ void BuildingMountPointDialog::onExportAllClicked()
|
||||
|
||||
void BuildingMountPointDialog::onImportClicked()
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "**** onImportClicked() ";
|
||||
DEBUG_LOG() << "**** onImportClicked() ";
|
||||
|
||||
QModelIndexList indexList = m_ui->tvBuildings->selectionModel()->selectedRows();
|
||||
if (indexList.isEmpty() || indexList.size() > 1)
|
||||
@@ -343,7 +342,7 @@ void BuildingMountPointDialog::onImportClicked()
|
||||
int colBarcode = 0;
|
||||
int colMountingPointId = 1;
|
||||
|
||||
DEBUG_LOG(m_logger) << "colBarcode: " << colBarcode
|
||||
DEBUG_LOG() << "colBarcode: " << colBarcode
|
||||
<< ", colMountingPointId: " << colMountingPointId;
|
||||
|
||||
m_importedModelIndex = m_proxyModel->mapToSource(indexList.at(0));
|
||||
@@ -359,7 +358,7 @@ void BuildingMountPointDialog::onImportClicked()
|
||||
if (colMountingPointId >= values.size() ||
|
||||
colBarcode >= values.size())
|
||||
{
|
||||
WARNING_LOG(m_logger) << "skipping line - to few data: '" << line << "'";
|
||||
WARNING_LOG() << "skipping line - to few data: '" << line << "'";
|
||||
continue;
|
||||
}
|
||||
QString newBarCode = values.at(colBarcode).toString();
|
||||
@@ -379,7 +378,7 @@ void BuildingMountPointDialog::onImportClicked()
|
||||
barcodes.insert(curMountingPointId, newBarCode);
|
||||
prevMountingPointId = curMountingPointId;
|
||||
}
|
||||
DEBUG_LOG(m_logger) << "mountingPoint: " << curMountingPointId
|
||||
DEBUG_LOG() << "mountingPoint: " << curMountingPointId
|
||||
<< ", new barcode: " << newBarCode;
|
||||
}
|
||||
file.close();
|
||||
@@ -433,7 +432,7 @@ bool BuildingMountPointDialog::apply()
|
||||
|
||||
void BuildingMountPointDialog::onResetClicked()
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "**** onResetClicked() ";
|
||||
DEBUG_LOG() << "**** onResetClicked() ";
|
||||
|
||||
m_model->resetNewItems(m_importedModelIndex);
|
||||
m_model->resetNewBarcodes(m_importedModelIndex);
|
||||
|
||||
-1
@@ -64,7 +64,6 @@ private:
|
||||
std::shared_ptr<Interface::Ftc> m_ftc;
|
||||
ForeignResourceManagementGuiInterface *m_ismGuiIfc{nullptr};
|
||||
LtsUtils::RequestHelper *m_requestHelper{nullptr};
|
||||
LOGGER_T m_logger;
|
||||
QModelIndex m_importedModelIndex;
|
||||
};
|
||||
}
|
||||
+4
-5
@@ -28,7 +28,6 @@ BuildingMountPointModel::BuildingMountPointModel(QObject *parent)
|
||||
tr("Barcode (new)"),
|
||||
tr("Mounted Asset"),
|
||||
tr("Properties")})
|
||||
, m_logger(getLogger("BuildingMountPointModel"))
|
||||
{
|
||||
}
|
||||
|
||||
@@ -357,7 +356,7 @@ void BuildingMountPointModel::modifyBuilding(const MainStructureElement &mse)
|
||||
if (!building)
|
||||
{
|
||||
|
||||
WARNING_LOG(m_logger)<<">>> not found section: "<<gse.id()<<" not exist. new one will be added ";
|
||||
WARNING_LOG()<<">>> not found section: "<<gse.id()<<" not exist. new one will be added ";
|
||||
findAndRemoveBuilding(mse);
|
||||
return addBuilding(mse);
|
||||
}
|
||||
@@ -384,7 +383,7 @@ void BuildingMountPointModel::modifyBuilding(const MainStructureElement &mse)
|
||||
|
||||
if (!buildingSeId)
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Found no structure element with type 'Building' in content: " << mse;
|
||||
ERROR_LOG() << "Found no structure element with type 'Building' in content: " << mse;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -481,7 +480,7 @@ void BuildingMountPointModel::removeBuildingByGroupId(const MainStructureElement
|
||||
|
||||
if (bfound == false)
|
||||
{
|
||||
ERROR_LOG(m_logger)<<"No mse with Id: ( "<<mse.id()<<" ) | groupId: "<<mse.groupId()<<" | sectionId: "<<section<<" found!";
|
||||
ERROR_LOG()<<"No mse with Id: ( "<<mse.id()<<" ) | groupId: "<<mse.groupId()<<" | sectionId: "<<section<<" found!";
|
||||
}
|
||||
|
||||
}
|
||||
@@ -528,7 +527,7 @@ void BuildingMountPointModel::insertChildren(int parentId,
|
||||
auto it = structureElements.constFind(childId);
|
||||
if (it == structureElements.constEnd())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Can not find structure element with id " << childId << " - ignoring";
|
||||
ERROR_LOG() << "Can not find structure element with id " << childId << " - ignoring";
|
||||
continue;
|
||||
}
|
||||
const StructureElement &data = it.value();
|
||||
|
||||
-1
@@ -102,7 +102,6 @@ private:
|
||||
QHash<int, QModelIndex> m_buildingsIndexes;
|
||||
const int maxIntValue = std::numeric_limits<int>::max();
|
||||
QMap<int, MainStructureElement> m_mainStructureElements;
|
||||
NGL::INGLLogger &m_logger;
|
||||
std::shared_ptr<Interface::Dtc> m_dtc{nullptr};
|
||||
QSet<int> m_availableBuildingGroups;
|
||||
};
|
||||
|
||||
+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(m_logger) << LOGFUNCTION << " START";
|
||||
TRACE_LOG() << 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(m_logger) << LOGFUNCTION << " END";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
PlanDialog::~PlanDialog()
|
||||
{
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
delete m_ui;
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
TRACE_LOG() << 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(m_logger) << LOGFUNCTION << " START";
|
||||
TRACE_LOG() << 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(m_logger) << "Could not enable DTC or FTC from ISM";
|
||||
ERROR_LOG() << "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_logger) << "m_scheduleId = " << m_scheduleId;
|
||||
DEBUG_LOG() << "m_scheduleId = " << m_scheduleId;
|
||||
|
||||
setScheduleId(m_scheduleId);
|
||||
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
return true;
|
||||
}
|
||||
|
||||
void PlanDialog::setScheduleId(const int scheduleId)
|
||||
{
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
|
||||
TRACE_LOG() << 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(m_logger) << "setScheduleId = " << m_scheduleId;
|
||||
DEBUG_LOG() << "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(m_logger) << LOGFUNCTION << " END";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
void PlanDialog::onPrint()
|
||||
@@ -154,11 +154,11 @@ void PlanDialog::onPrint()
|
||||
|
||||
void PlanDialog::onMainScheduleChanged(const MainSchedule &data, DataModification modType)
|
||||
{
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
m_scheduleId = data.id();
|
||||
enaDisa();
|
||||
Q_UNUSED(modType);
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
TRACE_LOG() << 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(m_logger) << LOGFUNCTION << " START";
|
||||
TRACE_LOG() << 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(m_logger) << LOGFUNCTION << " END";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
void PlanDialog::onRemove()
|
||||
{
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
|
||||
TRACE_LOG() << 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(m_logger) << LOGFUNCTION << " END";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
void PlanDialog::enaDisa()
|
||||
{
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
|
||||
TRACE_LOG() << 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(m_logger) << LOGFUNCTION << " END";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
void PlanDialog::onEdit()
|
||||
{
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
|
||||
TRACE_LOG() << 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(m_logger) << "onEdit schedule with id = " << item.id();
|
||||
DEBUG_LOG() << "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(m_logger) << LOGFUNCTION << " END";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
void PlanDialog::onAdd()
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "onAdd";
|
||||
DEBUG_LOG() << "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(m_logger) << LOGFUNCTION << " START";
|
||||
TRACE_LOG() << 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(m_logger) << "show Differences schedule with id = " << item.id();
|
||||
DEBUG_LOG() << "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(m_logger) << LOGFUNCTION << " END";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
|
||||
void PlanDialog::onCopy()
|
||||
{
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
|
||||
TRACE_LOG() << 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(m_logger) << "onCopy schedule with id = " << item.id();
|
||||
DEBUG_LOG() << "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(m_logger) << LOGFUNCTION << " END";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
|
||||
|
||||
-1
@@ -97,7 +97,6 @@ private:
|
||||
LtsUtils::RequestHelper *m_requestHelper{nullptr};
|
||||
int m_scheduleId{-1};
|
||||
Ui::PlanDialog *m_ui{nullptr};
|
||||
NGL::INGLLogger &m_logger;
|
||||
};
|
||||
|
||||
}
|
||||
+6
-7
@@ -18,29 +18,28 @@ PlanDialogModel::PlanDialogModel(QObject *parent)
|
||||
tr("Complete")},
|
||||
parent)
|
||||
, m_dtc(nullptr)
|
||||
, m_logger(getLogger("PlanDialogModel"))
|
||||
{
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
|
||||
PlanDialogModel::~PlanDialogModel()
|
||||
{
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " START";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
|
||||
bool PlanDialogModel::initModel(const std::shared_ptr<Interface::Dtc> &dtc)
|
||||
{
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
|
||||
TRACE_LOG() << 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(m_logger) << LOGFUNCTION << " END";
|
||||
TRACE_LOG() << Q_FUNC_INFO << " END";
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
-1
@@ -37,7 +37,6 @@ public:
|
||||
|
||||
private:
|
||||
std::shared_ptr<Interface::Dtc> m_dtc;
|
||||
LOGGER_T m_logger;
|
||||
};
|
||||
|
||||
}
|
||||
-1
@@ -19,7 +19,6 @@ PlanEditDialog::PlanEditDialog(QWidget *parent)
|
||||
, m_dtc(nullptr)
|
||||
, m_ftc(nullptr)
|
||||
, m_requestHelper(new LtsUtils::RequestHelper(this))
|
||||
, m_logger(getLogger("PlanEditDialog"))
|
||||
{
|
||||
m_ui->setupUi(this);
|
||||
|
||||
|
||||
-1
@@ -62,7 +62,6 @@ private:
|
||||
std::shared_ptr<Interface::Ftc> m_ftc;
|
||||
std::shared_ptr<ForeignGuiComboboxInterface> m_ismGuiCbxIfc;
|
||||
LtsUtils::RequestHelper *m_requestHelper;
|
||||
NGL::INGLLogger &m_logger;
|
||||
};
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user