Adds immediate migration results in progress
This commit is contained in:
2102 files changed
+17482
-15071
No files matched your search
+3
-3
@@ -98,7 +98,7 @@ void BldConfigDialog::fillCbx()
|
||||
|
||||
bool BldConfigDialog::apply()
|
||||
{
|
||||
DEBUG_LOG() << Q_FUNC_INFO;
|
||||
DEBUG_LOG(m_logger) << Q_FUNC_INFO;
|
||||
|
||||
if (m_ui->chbOwnership->isChecked())
|
||||
{
|
||||
@@ -134,8 +134,8 @@ bool BldConfigDialog::apply()
|
||||
|
||||
requestData.resetContamination(m_ui->chbResetContamination->isChecked());
|
||||
|
||||
DEBUG_LOG() << Q_FUNC_INFO << "currentIndex: " << m_ui->cmbStatus->currentIndex();
|
||||
DEBUG_LOG() << Q_FUNC_INFO << "currentData: " << state;
|
||||
DEBUG_LOG(m_logger) << Q_FUNC_INFO << "currentIndex: " << m_ui->cmbStatus->currentIndex();
|
||||
DEBUG_LOG(m_logger) << Q_FUNC_INFO << "currentData: " << state;
|
||||
|
||||
return m_ftc->setBuildingStatesRequest(requestData, this);
|
||||
});
|
||||
|
||||
+2
@@ -45,9 +45,11 @@ private slots:
|
||||
void slotCmbStatusCurrentIndexChanged(int index);
|
||||
|
||||
private:
|
||||
NGL::INGLLogger &m_logger;
|
||||
void fillCbx();
|
||||
|
||||
private:
|
||||
NGL::INGLLogger &m_logger;
|
||||
void retranslate() override;
|
||||
bool apply() override final;
|
||||
|
||||
|
||||
+14
-14
@@ -48,7 +48,7 @@ bool BuildingHistoryDialogModel::initModel(int mseId,
|
||||
connect(dtc.get(), &Interface::Dtc::historyStateChanged,
|
||||
this, &BuildingHistoryDialogModel::onHistoryStateChanged);
|
||||
|
||||
DEBUG_LOG() << "m_mseId=" << m_mseId;
|
||||
DEBUG_LOG(m_logger) << "m_mseId=" << m_mseId;
|
||||
reinitModel(dtc->historyState(m_mseId).stateHistory());
|
||||
return true;
|
||||
}
|
||||
@@ -80,7 +80,7 @@ QVariant BuildingHistoryDialogModel::data(const QModelIndex &index, int role) co
|
||||
|
||||
void BuildingHistoryDialogModel::onHistoryStateChanged(const Buildings::HistoryState &data, DataModification modType)
|
||||
{
|
||||
DEBUG_LOG() << "onHistoryStateChanged";
|
||||
DEBUG_LOG(m_logger) << "onHistoryStateChanged";
|
||||
if (m_mseId != data.mseId())
|
||||
return;
|
||||
|
||||
@@ -154,14 +154,14 @@ QString BuildingHistoryDialogModel::getOriginatorName(const HistoryStateItemEx &
|
||||
|
||||
QString BuildingHistoryDialogModel::getContaminations(const std::vector< Buildings::ContaminationState > &contaminationStates) const
|
||||
{
|
||||
DEBUG_LOG() << "BuildingHistoryDialogModel::getContaminations";
|
||||
DEBUG_LOG(m_logger) << "BuildingHistoryDialogModel::getContaminations";
|
||||
QStringList contaminationList;
|
||||
for (const auto &cs : contaminationStates)
|
||||
{
|
||||
AreaEffectSimulation::AesItem item;
|
||||
m_aesDtc->aesItemFromId(cs.aesId(), item);
|
||||
const ProjectDataManagement::GearClass &gc = m_pdmDtc->gearClassFromChargeTypeId(item.chargeStruct().chargeTypeId());
|
||||
DEBUG_LOG() << "gc=" << gc;
|
||||
DEBUG_LOG(m_logger) << "gc=" << gc;
|
||||
if (gc == ProjectDataManagement::GearClass::Unknown)
|
||||
continue;
|
||||
QString gearClassName = ProjectDataManagement::toString(gc).trimmed();
|
||||
@@ -169,14 +169,14 @@ QString BuildingHistoryDialogModel::getContaminations(const std::vector< Buildin
|
||||
if (!contaminationList.contains(gearClassName))
|
||||
contaminationList.append(gearClassName);
|
||||
else
|
||||
DEBUG_LOG() << "contaminationList.contains(gearClassName)" << gearClassName;
|
||||
DEBUG_LOG(m_logger) << "contaminationList.contains(gearClassName)" << gearClassName;
|
||||
}
|
||||
return contaminationList.join(QStringLiteral("+"));
|
||||
}
|
||||
|
||||
void BuildingHistoryDialogModel::reinitModel(const std::vector<Buildings::HistoryStateItem> &newData)
|
||||
{
|
||||
DEBUG_LOG() << "BuildingHistoryDialogModel::reinitModel size=" << newData.size();
|
||||
DEBUG_LOG(m_logger) << "BuildingHistoryDialogModel::reinitModel size=" << newData.size();
|
||||
int indexModel = 0;
|
||||
|
||||
int contaminationOffest = 0;
|
||||
@@ -189,16 +189,16 @@ void BuildingHistoryDialogModel::reinitModel(const std::vector<Buildings::Histor
|
||||
|
||||
for (size_t stateHistoryIndex = 0; stateHistoryIndex < newData.size(); ++stateHistoryIndex)
|
||||
{
|
||||
DEBUG_LOG() << "\n\nstateHistoryIndex=" << stateHistoryIndex;
|
||||
DEBUG_LOG(m_logger) << "\n\nstateHistoryIndex=" << stateHistoryIndex;
|
||||
|
||||
|
||||
if (((newData.at(stateHistoryIndex).contaminationStates().size() > 0 && stateHistoryIndex == 0)
|
||||
|| (stateHistoryIndex > 0 && (newData.at(stateHistoryIndex).contaminationStates().size() > newData.at(stateHistoryIndex - 1).contaminationStates().size())))
|
||||
&& (stateHistoryIndex > 0))
|
||||
DEBUG_LOG() << "1. State ist Kontamination";
|
||||
DEBUG_LOG(m_logger) << "1. State ist Kontamination";
|
||||
else
|
||||
{
|
||||
DEBUG_LOG() << "State aus StateItem nehmen: stateHistoryIndex=" << stateHistoryIndex;
|
||||
DEBUG_LOG(m_logger) << "State aus StateItem nehmen: stateHistoryIndex=" << stateHistoryIndex;
|
||||
auto &data = m_vecData[stateHistoryIndex];
|
||||
data = HistoryStateItemEx(newData.at(stateHistoryIndex));
|
||||
data.chargeTypeName = getChargeTypeName(data.chargeTypeId());
|
||||
@@ -212,7 +212,7 @@ void BuildingHistoryDialogModel::reinitModel(const std::vector<Buildings::Histor
|
||||
data.contamination.clear();
|
||||
else
|
||||
data.contamination = QStringLiteral("C");
|
||||
DEBUG_LOG() << "indexModel=" << indexModel
|
||||
DEBUG_LOG(m_logger) << "indexModel=" << indexModel
|
||||
<< " chargeTypeId=" << data.chargeTypeId()
|
||||
<< " chargeTypeName=" << getChargeTypeName(data.chargeTypeId())
|
||||
<< " originatorName=" << getOriginatorName(data);
|
||||
@@ -227,7 +227,7 @@ void BuildingHistoryDialogModel::reinitModel(const std::vector<Buildings::Histor
|
||||
|
||||
AreaEffectSimulation::AesItem item;
|
||||
m_aesDtc->aesItemFromId(contaminationState.aesId(), item);
|
||||
DEBUG_LOG() << "m_vecData.size=" << m_vecData.size()
|
||||
DEBUG_LOG(m_logger) << "m_vecData.size=" << m_vecData.size()
|
||||
<< " indexModel=" << indexModel
|
||||
<< " newData.size()=" << newData.size()
|
||||
<< " contaminationOffest=" << contaminationOffest;
|
||||
@@ -235,13 +235,13 @@ void BuildingHistoryDialogModel::reinitModel(const std::vector<Buildings::Histor
|
||||
|
||||
if (stateHistoryIndex > 0)
|
||||
{
|
||||
DEBUG_LOG() << "stateHistoryIndex=" << stateHistoryIndex
|
||||
DEBUG_LOG(m_logger) << "stateHistoryIndex=" << stateHistoryIndex
|
||||
<< " contaminationIndex="
|
||||
<< " newData.at(stateHistoryIndex-1).contaminationStates().size() =" << newData.at(stateHistoryIndex - 1).contaminationStates().size();
|
||||
if (contaminationIndex < newData.at(stateHistoryIndex - 1).contaminationStates().size())
|
||||
{
|
||||
contaminationIndex++;
|
||||
DEBUG_LOG() << "continue";
|
||||
DEBUG_LOG(m_logger) << "continue";
|
||||
continue;
|
||||
}
|
||||
}
|
||||
@@ -262,7 +262,7 @@ void BuildingHistoryDialogModel::reinitModel(const std::vector<Buildings::Histor
|
||||
data.contamination = QStringLiteral("C");
|
||||
::rti::core::int64 time = item.effectStart().get();
|
||||
data.time(time);
|
||||
DEBUG_LOG() << " indexModel=" << indexModel
|
||||
DEBUG_LOG(m_logger) << " indexModel=" << indexModel
|
||||
<< " AesId=" << contaminationState.aesId()
|
||||
<< " chargeTypeId=" << data.chargeTypeId()
|
||||
<< " chargeTypeName=" << getChargeTypeName(data.chargeTypeId())
|
||||
|
||||
+2
@@ -80,6 +80,8 @@ private Q_SLOTS:
|
||||
void onHistoryStateChanged(const HistoryState &data, DataModification modType);
|
||||
|
||||
private:
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
void reinitModel(const std::vector<Buildings::HistoryStateItem> &newData);
|
||||
QString getChargeTypeName(int chargeTypeId, bool shortName = true) const;
|
||||
QString getOriginatorName(const HistoryStateItemEx &data) const;
|
||||
|
||||
+3
-3
@@ -84,7 +84,7 @@ bool HitLineInfoDialog::init(LtsSession::LtsSession *session)
|
||||
{
|
||||
if (data.id() == m_hitLineId)
|
||||
{
|
||||
DEBUG_LOG() << "Found Building HitLine Id: " << data.id();
|
||||
DEBUG_LOG(m_logger) << "Found Building HitLine Id: " << data.id();
|
||||
m_hitLineInfo = data;
|
||||
m_participantOriginator = m_ppmDtc->participant(data.originatorParticipantId());
|
||||
showHitLineInfos();
|
||||
@@ -92,14 +92,14 @@ bool HitLineInfoDialog::init(LtsSession::LtsSession *session)
|
||||
});
|
||||
|
||||
if (!m_isInitialized)
|
||||
WARNING_LOG() << "Non Building HitLineInfo data found for id: " << m_hitLineId;
|
||||
WARNING_LOG(m_logger) << "Non Building HitLineInfo data found for id: " << m_hitLineId;
|
||||
return m_isInitialized;
|
||||
}
|
||||
|
||||
|
||||
void HitLineInfoDialog::showHitLineInfos()
|
||||
{
|
||||
DEBUG_LOG() << Q_FUNC_INFO << " id:" << m_hitLineId;
|
||||
DEBUG_LOG(m_logger) << Q_FUNC_INFO << " id:" << m_hitLineId;
|
||||
|
||||
if (m_hitLineInfo.buildingId() <= 0 || m_hitLineInfo.originatorParticipantId() <= 0)
|
||||
return;
|
||||
|
||||
+2
@@ -75,6 +75,8 @@ public:
|
||||
bool init(LtsSession::LtsSession *session);
|
||||
|
||||
private:
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
void retranslate() override;
|
||||
void showHitLineInfos();
|
||||
QString getContaminations(const std::vector<ContaminationState> &contaminationStates) const;
|
||||
|
||||
+3
-4
@@ -82,10 +82,9 @@ public:
|
||||
|
||||
namespace Buildings
|
||||
{
|
||||
BldInfoDialog::BldInfoDialog(int bldEntityId, const QString &menuGroup, QWidget *parent)
|
||||
: InfoDialogBase(bldEntityId, menuGroup, QStringLiteral("BldInfoDialog"), LtsWidgets::ButtonCombination::CloseOnly, parent)
|
||||
, m_ui(new Ui::BldInfoDialog)
|
||||
{
|
||||
BldInfoDialog::BldInfoDialog(int bldEntityId, const QString &menuGroup, QWidget *parent) : InfoDialogBase(bldEntityId, menuGroup, QStringLiteral("BldInfoDialog"), LtsWidgets::ButtonCombination::CloseOnly, parent)
|
||||
, m_ui(new Ui::BldInfoDialog),
|
||||
m_logger(NGL::NGLLoggerBootstrap::getLogger()) {
|
||||
DEBUG_LOG(m_logger) << LOGFUNCTION << " START" << ", bldEntityId=" << bldEntityId;
|
||||
|
||||
m_ui->setupUi(this);
|
||||
|
||||
+2
@@ -69,6 +69,8 @@ public:
|
||||
bool init(LtsSession::LtsSession *session) override;
|
||||
|
||||
private:
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
template <typename ReturnType, typename Container, typename Key>
|
||||
static ReturnType constFinder(const Container &container, const Key &key) noexcept(false)
|
||||
{
|
||||
|
||||
+2
@@ -67,6 +67,8 @@ private Q_SLOTS:
|
||||
void onHistoryStateChanged(const BridgeStatus &data, DataModification modType);
|
||||
|
||||
private:
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
void reinitModel(const QMap<int, BridgeStatus> &newData);
|
||||
int m_ddsId;
|
||||
std::shared_ptr<Interface::Dtc> m_dtc;
|
||||
|
||||
+2
-2
@@ -76,13 +76,13 @@ void InfoDialogBase::onFindOnMap()
|
||||
if (m_session->getForeignGuiInterface<SituationMap::ForeignGuiInterface>(ifc))
|
||||
ifc->centerMapToBuildingObject(m_mseId);
|
||||
else
|
||||
WARNING_LOG() << Q_FUNC_INFO << "getForeignGuiInterface<SituationMap::ForeignGuiInterface> failed!";
|
||||
WARNING_LOG(m_logger) << Q_FUNC_INFO << "getForeignGuiInterface<SituationMap::ForeignGuiInterface> failed!";
|
||||
}
|
||||
|
||||
|
||||
void InfoDialogBase::onShowDetails()
|
||||
{
|
||||
DEBUG_LOG() << Q_FUNC_INFO;
|
||||
DEBUG_LOG(m_logger) << Q_FUNC_INFO;
|
||||
BldConfigDialog *dialog = new BldConfigDialog(m_mseId, buildingDisplayName(), this);
|
||||
|
||||
if (dialog->init(m_session))
|
||||
|
||||
+2
@@ -57,10 +57,12 @@ protected slots:
|
||||
void onShowEgcuMonitor();
|
||||
|
||||
protected:
|
||||
NGL::INGLLogger &m_logger;
|
||||
virtual void showBuildingInfos() = 0;
|
||||
virtual QString buildingDisplayName() const = 0;
|
||||
|
||||
protected:
|
||||
NGL::INGLLogger &m_logger;
|
||||
int m_mseId = -1;
|
||||
QString m_menuGroup;
|
||||
int m_exerciseId;
|
||||
|
||||
+4
-5
@@ -9,13 +9,12 @@
|
||||
namespace Buildings
|
||||
{
|
||||
|
||||
RelayInfoWidget::RelayInfoWidget(int id, QWidget *parent)
|
||||
: QWidget(parent)
|
||||
RelayInfoWidget::RelayInfoWidget(int id, QWidget *parent) : QWidget(parent)
|
||||
, m_id(id)
|
||||
, m_state(false)
|
||||
, m_ui(new Ui::RelayInfoWidget)
|
||||
{
|
||||
DEBUG_LOG() << "RelayInfoWidget";
|
||||
, m_ui(new Ui::RelayInfoWidget),
|
||||
m_logger(NGL::NGLLoggerBootstrap::getLogger()) {
|
||||
DEBUG_LOG(m_logger) << "RelayInfoWidget";
|
||||
m_ui->setupUi(this);
|
||||
|
||||
m_ui->ledStatus->setAspectHint(LtsWidgets::LtsLedWidget::AspectHint::WidthIsHeight);
|
||||
|
||||
@@ -44,6 +44,8 @@ private slots:
|
||||
void onButtonClicked();
|
||||
|
||||
private:
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
int m_id;
|
||||
bool m_state;
|
||||
Ui::RelayInfoWidget *m_ui;
|
||||
|
||||
Reference in new issue
Block a user