Adds immediate migration results
This commit is contained in:
2395 files changed
+357322
-2524
No files matched your search
+7
-3
@@ -5,8 +5,12 @@
|
||||
# Created by Patric Karwat, SLSE, 2016-10-05
|
||||
#
|
||||
|
||||
FIND_PACKAGE(KDReports REQUIRED)
|
||||
FIND_PACKAGE(KDChart REQUIRED)
|
||||
FIND_PACKAGE(KDReports)
|
||||
FIND_PACKAGE(KDChart)
|
||||
IF (NOT KDReports_FOUND OR NOT KDChart_FOUND)
|
||||
MESSAGE(WARNING "KDReports or KDChart not found; skipping ReportViewer")
|
||||
RETURN()
|
||||
ENDIF()
|
||||
|
||||
SET(rep_report_viewer_gui_SRCS
|
||||
rep_report_viewer_gui_plugin.cpp
|
||||
@@ -81,7 +85,7 @@ NGL_WRAP_UI(rep_report_viewer_gui_SRCS
|
||||
NGL_ADD_LIBRARY(WS RepReportViewerGuiPlugin MODULE ${rep_report_viewer_gui_SRCS})
|
||||
NGL_TARGET_LINK_LIBRARIES(RepReportViewerGuiPlugin
|
||||
AsbDataPluginInterface
|
||||
Qt5::Widgets
|
||||
Qt6::Widgets
|
||||
KDReports::KDReports
|
||||
KDChart::KDChart
|
||||
NGLLogger
|
||||
|
||||
+3
-2
@@ -2,6 +2,7 @@
|
||||
|
||||
|
||||
#include "rep_air_support_model.h"
|
||||
#include <utility>
|
||||
|
||||
#include <PluginInterfaces/gui_plugin_interface.h>
|
||||
#include <Plugins/ProjectDataManagement/pdm_data_plugin_interface.h>
|
||||
@@ -336,7 +337,7 @@ void AirSupportModel::fillReportData()
|
||||
QVector<int> bigTotal(5, 0);
|
||||
|
||||
resultDataTable resData;
|
||||
for (const QJsonValue &arrVal : qAsConst(m_reportJsonArray))
|
||||
for (const QJsonValue &arrVal : std::as_const(m_reportJsonArray))
|
||||
{
|
||||
const QJsonObject obj = arrVal.toObject();
|
||||
|
||||
@@ -419,7 +420,7 @@ void AirSupportModel::fillPieData()
|
||||
QMap<QPair<int,double>, QVector<int> > sums;
|
||||
|
||||
resultDataPie resPieData;
|
||||
for (const QJsonValue &arrVal : qAsConst(m_reportJsonArray))
|
||||
for (const QJsonValue &arrVal : std::as_const(m_reportJsonArray))
|
||||
{
|
||||
const QJsonObject obj = arrVal.toObject();
|
||||
|
||||
|
||||
+2
-1
@@ -2,6 +2,7 @@
|
||||
|
||||
|
||||
#include "rep_building_damage_model.h"
|
||||
#include <utility>
|
||||
|
||||
#include <PluginInterfaces/gui_plugin_interface.h>
|
||||
#include <Plugins/ReportManagement/rep_data_plugin_interface.h>
|
||||
@@ -162,7 +163,7 @@ void BuildingDamageModel::fillReportData()
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "fillReportData(): m_reportJsonArray.size() = " << m_reportJsonArray.size();
|
||||
|
||||
for (const QJsonValue &arrVal : qAsConst(m_reportJsonArray))
|
||||
for (const QJsonValue &arrVal : std::as_const(m_reportJsonArray))
|
||||
{
|
||||
const QJsonObject obj = arrVal.toObject();
|
||||
|
||||
|
||||
+2
-1
@@ -2,6 +2,7 @@
|
||||
|
||||
|
||||
#include "rep_charge_administration_model.h"
|
||||
#include <utility>
|
||||
|
||||
#include <PluginInterfaces/gui_plugin_interface.h>
|
||||
#include <Plugins/ProjectDataManagement/pdm_data_plugin_interface.h>
|
||||
@@ -190,7 +191,7 @@ void ChargeAdministrationModel::fillReportData()
|
||||
int bigTotal[6] = {0, 0, 0, 0, 0, 0};
|
||||
ProjectDataManagement::EffectSource effectSourceId = ProjectDataManagement::EffectSource::ES_Unknown;
|
||||
|
||||
for (const QJsonValue &arrVal : qAsConst(m_reportJsonArray))
|
||||
for (const QJsonValue &arrVal : std::as_const(m_reportJsonArray))
|
||||
{
|
||||
const QJsonObject obj = arrVal.toObject();
|
||||
|
||||
|
||||
+2
-1
@@ -2,6 +2,7 @@
|
||||
|
||||
|
||||
#include "rep_charge_resupply_model.h"
|
||||
#include <utility>
|
||||
|
||||
#include <PluginInterfaces/gui_plugin_interface.h>
|
||||
#include <Plugins/ProjectDataManagement/pdm_data_plugin_interface.h>
|
||||
@@ -258,7 +259,7 @@ void ChargeResupplyModel::fillReportData()
|
||||
|
||||
QVector<int> bigTotal(5, 0);
|
||||
|
||||
for (const QJsonValue &arrVal : qAsConst(m_reportJsonArray))
|
||||
for (const QJsonValue &arrVal : std::as_const(m_reportJsonArray))
|
||||
{
|
||||
const QJsonObject obj = arrVal.toObject();
|
||||
|
||||
|
||||
+3
-2
@@ -2,6 +2,7 @@
|
||||
|
||||
|
||||
#include "rep_firings_model.h"
|
||||
#include <utility>
|
||||
|
||||
#include <PluginInterfaces/gui_plugin_interface.h>
|
||||
#include <Plugins/ProjectDataManagement/pdm_data_plugin_interface.h>
|
||||
@@ -322,7 +323,7 @@ void FiringsModel::fillReportData()
|
||||
QVector<int> bigTotal(4, 0);
|
||||
|
||||
resultDataTable resData;
|
||||
for (const QJsonValue &arrVal : qAsConst(m_reportJsonArray))
|
||||
for (const QJsonValue &arrVal : std::as_const(m_reportJsonArray))
|
||||
{
|
||||
const QJsonObject obj = arrVal.toObject();
|
||||
|
||||
@@ -402,7 +403,7 @@ void FiringsModel::fillPieData()
|
||||
QMap<QPair<int,double>, QVector<int> > sums;
|
||||
|
||||
resultDataPie resPieData;
|
||||
for (const QJsonValue &arrVal : qAsConst(m_reportJsonArray))
|
||||
for (const QJsonValue &arrVal : std::as_const(m_reportJsonArray))
|
||||
{
|
||||
const QJsonObject obj = arrVal.toObject();
|
||||
|
||||
|
||||
+2
-1
@@ -2,6 +2,7 @@
|
||||
|
||||
|
||||
#include "rep_maintenance_model.h"
|
||||
#include <utility>
|
||||
|
||||
#include <PluginInterfaces/gui_plugin_interface.h>
|
||||
#include <Plugins/ParticipantManagement/ppm_data_plugin_interface.h>
|
||||
@@ -199,7 +200,7 @@ void MaintenanceModel::fillReportData()
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "fillReportData(): m_reportJsonArray.size() = " << m_reportJsonArray.size();
|
||||
|
||||
for (const QJsonValue &arrVal : qAsConst(m_reportJsonArray))
|
||||
for (const QJsonValue &arrVal : std::as_const(m_reportJsonArray))
|
||||
{
|
||||
const QJsonObject obj = arrVal.toObject();
|
||||
|
||||
|
||||
+3
-2
@@ -2,6 +2,7 @@
|
||||
|
||||
|
||||
#include "rep_medevac_nine_liner_model.h"
|
||||
#include <utility>
|
||||
|
||||
#include <PluginInterfaces/gui_plugin_interface.h>
|
||||
#include <Plugins/Evaluations/evl_data_plugin_interface.h>
|
||||
@@ -164,7 +165,7 @@ void MedevacNineLinerModel::fillReportData()
|
||||
{
|
||||
ERROR_LOG(m_logger) << "fillReportData(): m_reportJsonArray.size() = " << m_reportJsonArray.size();
|
||||
|
||||
for (const QJsonValue &arrVal : qAsConst(m_reportJsonArray))
|
||||
for (const QJsonValue &arrVal : std::as_const(m_reportJsonArray))
|
||||
{
|
||||
const QJsonObject obj = arrVal.toObject();
|
||||
|
||||
@@ -186,7 +187,7 @@ void MedevacNineLinerModel::fillReportData()
|
||||
|
||||
INFO_LOG(m_logger) << "linesCategory size: " << linesCategory.size();
|
||||
|
||||
for (const Evaluations::Database::SanCategoryLine &cl : qAsConst(linesCategory))
|
||||
for (const Evaluations::Database::SanCategoryLine &cl : std::as_const(linesCategory))
|
||||
{
|
||||
switch (cl.line) {
|
||||
case 3:
|
||||
|
||||
+2
-1
@@ -2,6 +2,7 @@
|
||||
|
||||
|
||||
#include "rep_mine_area_model.h"
|
||||
#include <utility>
|
||||
|
||||
#include <PluginInterfaces/gui_plugin_interface.h>
|
||||
#include <Plugins/ParticipantManagement/ppm_data_plugin_interface.h>
|
||||
@@ -211,7 +212,7 @@ void MineAreaModel::fillReportData()
|
||||
|
||||
QVector<int> bigTotal(3, 0);
|
||||
|
||||
for (const QJsonValue &arrVal : qAsConst(m_reportJsonArray))
|
||||
for (const QJsonValue &arrVal : std::as_const(m_reportJsonArray))
|
||||
{
|
||||
const QJsonObject obj = arrVal.toObject();
|
||||
|
||||
|
||||
+2
-1
@@ -2,6 +2,7 @@
|
||||
|
||||
|
||||
#include "rep_nbc_model.h"
|
||||
#include <utility>
|
||||
|
||||
#include <PluginInterfaces/gui_plugin_interface.h>
|
||||
#include <Plugins/ParticipantManagement/ppm_data_plugin_interface.h>
|
||||
@@ -264,7 +265,7 @@ void NbcModel::fillReportData()
|
||||
|
||||
QVector<int> bigTotal(3, 0);
|
||||
|
||||
for (const QJsonValue &arrVal : qAsConst(m_reportJsonArray))
|
||||
for (const QJsonValue &arrVal : std::as_const(m_reportJsonArray))
|
||||
{
|
||||
const QJsonObject obj = arrVal.toObject();
|
||||
|
||||
|
||||
+2
-1
@@ -2,6 +2,7 @@
|
||||
|
||||
|
||||
#include "rep_participant_distance_model.h"
|
||||
#include <utility>
|
||||
|
||||
#include <PluginInterfaces/gui_plugin_interface.h>
|
||||
#include <Plugins/ParticipantManagement/ppm_data_plugin_interface.h>
|
||||
@@ -205,7 +206,7 @@ void ParticipantDistanceModel::fillReportData()
|
||||
long bigTotal = 0;
|
||||
QHash<int, long> sums;
|
||||
|
||||
for (const QJsonValue &arrVal : qAsConst(m_reportJsonArray))
|
||||
for (const QJsonValue &arrVal : std::as_const(m_reportJsonArray))
|
||||
{
|
||||
const QJsonObject obj = arrVal.toObject();
|
||||
|
||||
|
||||
+2
-1
@@ -2,6 +2,7 @@
|
||||
|
||||
|
||||
#include "rep_sanitation_material_model.h"
|
||||
#include <utility>
|
||||
|
||||
#include <PluginInterfaces/gui_plugin_interface.h>
|
||||
#include <Plugins/ProjectDataManagement/pdm_data_plugin_interface.h>
|
||||
@@ -241,7 +242,7 @@ void SanitationMaterialModel::fillReportData()
|
||||
|
||||
QMap<int, QVector<int> > totals;
|
||||
|
||||
for (const QJsonValue &arrVal : qAsConst(m_reportJsonArray))
|
||||
for (const QJsonValue &arrVal : std::as_const(m_reportJsonArray))
|
||||
{
|
||||
const QJsonObject obj = arrVal.toObject();
|
||||
|
||||
|
||||
+5
-4
@@ -2,6 +2,7 @@
|
||||
|
||||
|
||||
#include "rep_treatment_model.h"
|
||||
#include <utility>
|
||||
|
||||
#include <PluginInterfaces/gui_plugin_interface.h>
|
||||
#include <Plugins/ParticipantManagement/ppm_data_plugin_interface.h>
|
||||
@@ -455,7 +456,7 @@ void TreatmentModel::fillReportData()
|
||||
if (m_report.reportType() == ReportType::Treatment)
|
||||
fillParticipantMap();
|
||||
|
||||
for (const QJsonValue &arrVal : qAsConst(m_reportJsonArray))
|
||||
for (const QJsonValue &arrVal : std::as_const(m_reportJsonArray))
|
||||
{
|
||||
const QJsonObject obj = arrVal.toObject();
|
||||
|
||||
@@ -662,7 +663,7 @@ void TreatmentModel::fillReportData()
|
||||
m_amountInjuryTotal = resDataTotal.amountInjuryTotal;
|
||||
|
||||
|
||||
for ( const QMap<int,QSet<int>> &map : qAsConst(m_treatmentIntervalMap))
|
||||
for ( const QMap<int,QSet<int>> &map : std::as_const(m_treatmentIntervalMap))
|
||||
{
|
||||
INFO_LOG(m_logger) << "not entered RS: " << map[PIE_notEnteredRecueArea].size();
|
||||
pie.results[PIE_platin] += map[PIE_platin].size();
|
||||
@@ -672,10 +673,10 @@ void TreatmentModel::fillReportData()
|
||||
}
|
||||
|
||||
pie.results[PIE_enterRescueArea] = 0;
|
||||
for (const QSet<int> &set : qAsConst(m_rescueStationNotTreated))
|
||||
for (const QSet<int> &set : std::as_const(m_rescueStationNotTreated))
|
||||
pie.results[PIE_enterRescueArea] += set.size();
|
||||
|
||||
for (const QSet<int> &set : qAsConst(m_rescueStationTreated))
|
||||
for (const QSet<int> &set : std::as_const(m_rescueStationTreated))
|
||||
pie.results[PIE_enterRescueArea] += set.size();
|
||||
|
||||
|
||||
|
||||
+2
-1
@@ -2,6 +2,7 @@
|
||||
|
||||
|
||||
#include "rep_treatment_timeline_model.h"
|
||||
#include <utility>
|
||||
|
||||
#include <PluginInterfaces/gui_plugin_interface.h>
|
||||
#include <Plugins/ParticipantManagement/ppm_data_plugin_interface.h>
|
||||
@@ -313,7 +314,7 @@ void TreatmentTimelineModel::fillReportData()
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "fillReportData(): m_reportJsonArray.size() = " << m_reportJsonArray.size();
|
||||
|
||||
for (const QJsonValue &arrVal : qAsConst(m_reportJsonArray))
|
||||
for (const QJsonValue &arrVal : std::as_const(m_reportJsonArray))
|
||||
{
|
||||
const QJsonObject obj = arrVal.toObject();
|
||||
|
||||
|
||||
+2
-1
@@ -2,6 +2,7 @@
|
||||
|
||||
|
||||
#include "rep_unit_power_model.h"
|
||||
#include <utility>
|
||||
|
||||
#include <ProjectDataManagement/pdm_to_string.h>
|
||||
#include <Plugins/ReportManagement/rep_data_plugin_interface.h>
|
||||
@@ -180,7 +181,7 @@ QVariant UnitPowerModel::headerData(int section, Qt::Orientation orientation, in
|
||||
void UnitPowerModel::fillReportData()
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "fillReportData(): m_reportJsonArray.size() = " << m_reportJsonArray.size();
|
||||
for (const QJsonValue &arrVal : qAsConst(m_reportJsonArray))
|
||||
for (const QJsonValue &arrVal : std::as_const(m_reportJsonArray))
|
||||
{
|
||||
const QJsonObject obj = arrVal.toObject();
|
||||
|
||||
|
||||
+4
-3
@@ -2,6 +2,7 @@
|
||||
|
||||
|
||||
#include "rep_report_edit.h"
|
||||
#include <utility>
|
||||
#include "rep_report_interval.h"
|
||||
#include "rep_report_preview.h"
|
||||
#include "ui_rep_report_edit.h"
|
||||
@@ -1207,10 +1208,10 @@ void ReportEdit::setParticipantAndUnitIds(const std::vector<int32_t> &part, cons
|
||||
|
||||
QItemSelectionModel *selectionModel = new QItemSelectionModel(m_participantProxyModel);
|
||||
QModelIndexList indexes = m_participantModel->getIndexesByParticipantIds(part);
|
||||
for (const QModelIndex &index : qAsConst(indexes))
|
||||
for (const QModelIndex &index : std::as_const(indexes))
|
||||
selectionModel->select(m_participantProxyModel->mapFromSource(index), QItemSelectionModel::Select | QItemSelectionModel::Rows);
|
||||
indexes = m_participantModel->getIndexesByParticipantIds(units);
|
||||
for (const QModelIndex &index : qAsConst(indexes))
|
||||
for (const QModelIndex &index : std::as_const(indexes))
|
||||
selectionModel->select(m_participantProxyModel->mapFromSource(index), QItemSelectionModel::Select | QItemSelectionModel::Rows);
|
||||
m_ui->treeViewParticipants->setSelectionModel(selectionModel);
|
||||
|
||||
@@ -1303,7 +1304,7 @@ std::vector<int> ReportEdit::getChargeIds() const
|
||||
{
|
||||
std::vector<int> ret;
|
||||
ret.reserve(m_chargeTypes.size());
|
||||
for (int val : qAsConst(m_chargeTypes))
|
||||
for (int val : std::as_const(m_chargeTypes))
|
||||
ret.push_back(val);
|
||||
if (ret.size())
|
||||
return ret;
|
||||
|
||||
+5
-4
@@ -2,6 +2,7 @@
|
||||
|
||||
|
||||
#include "rep_report_model.h"
|
||||
#include <utility>
|
||||
#include <ngltools/ngltools_dtg.h>
|
||||
#include <ReportManagement/rep_translation.h>
|
||||
#include <ParticipantManagement/ppm_translation.h>
|
||||
@@ -180,7 +181,7 @@ void ReportModel::onUpdateComboboxFilterData()
|
||||
QSet<ReportType> availableReportTypes;
|
||||
QSet<VisualisationType> availableVisualisationTypes;
|
||||
QSet<int> availablePartyIds;
|
||||
for (const auto &data : qAsConst(m_vecData))
|
||||
for (const auto &data : std::as_const(m_vecData))
|
||||
{
|
||||
availableReportTypes.insert(data.reportType());
|
||||
availableVisualisationTypes.insert(data.visualisationType());
|
||||
@@ -195,7 +196,7 @@ void ReportModel::updateComboboxFilterData(const QSet<ReportType> &availableRepo
|
||||
{
|
||||
LtsWidgets::ComboboxFilterContent cfc;
|
||||
LtsWidgets::ComboboxFilterData cfd;
|
||||
for (const auto &i : qAsConst(availableReportTypes))
|
||||
for (const auto &i : std::as_const(availableReportTypes))
|
||||
{
|
||||
cfd.data = i.underlying();
|
||||
cfd.text = ReportManagement::toString(i);
|
||||
@@ -205,7 +206,7 @@ void ReportModel::updateComboboxFilterData(const QSet<ReportType> &availableRepo
|
||||
m_cbxReportType = cfc.toVariant();
|
||||
|
||||
cfc.data.clear();
|
||||
for (const auto &i : qAsConst(availableVisualisationTypes))
|
||||
for (const auto &i : std::as_const(availableVisualisationTypes))
|
||||
{
|
||||
cfd.data = i.underlying();
|
||||
cfd.text = ReportManagement::toString(i);
|
||||
@@ -215,7 +216,7 @@ void ReportModel::updateComboboxFilterData(const QSet<ReportType> &availableRepo
|
||||
m_cbxVisualisationType = cfc.toVariant();
|
||||
|
||||
cfc.data.clear();
|
||||
for (const int i : qAsConst(availablePartyIds))
|
||||
for (const int i : std::as_const(availablePartyIds))
|
||||
{
|
||||
cfd.data = i;
|
||||
cfd.text = ParticipantManagement::trPartyName(m_ppmDtc->party(i).name());
|
||||
|
||||
Reference in new issue
Block a user