Complete Qt6 migration: full clean build green across groups G1-G12 incl. runtime plugin set

new_docker_build.sh gains Group 12 (212 GUI/Data plugins); fixes LtsUtilsGuiDds visibility (LTO-stripped exports), LtsProjectionWorkstation unity name shadow, 6 unity-off dirs (dup file-scope statics, ddsftc INTERFACE sources) and reconfigures BUILD_FILTERMANAGEMENT/BUILD_PLUGINS_SERVICEMONITOR=ON
This commit is contained in:
berrux-dev committed 2026-10-20 09:36:57 +02:00
1 parent eb1d949edc
commit 815e16368e
1718 files changed
+126739 -18495

No files matched your search

@@ -1,6 +1,7 @@
#include "evl_topic_editor_model.h"
#include <NGLLogger/NGLLoggerBootstrap.h>
#include <Evaluations/evl_translation.h>
#include <QtCore/QDateTime>
@@ -11,9 +12,9 @@ namespace Evaluations
{
TopicEditorEvaluationModel::TopicEditorEvaluationModel(QObject* parent)
: NGLTreeModel(parent, new NGLTreeItem(QVariant()), ,
m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()){tr("Id"), tr("Name"), tr("Weight"), tr("Start Time"),
tr("Situation"), tr("Video"), tr("Audio")})
: NGLTreeModel(parent, new NGLTreeItem(QVariant()), {tr("Id"), tr("Name"), tr("Weight"), tr("Start Time"),
tr("Situation"), tr("Video"), tr("Audio")})
, m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger())
{
}
@@ -57,15 +58,15 @@ QVariant TopicEditorEvaluationModel::data(const QModelIndex& index, int role) co
switch (index.column())
{
case NAME:
return QString::fromStdString(crt.name());
return QString::fromStdString(crt.name);
case ID:
return crt.id();
return crt.id;
default:
break;
}
}
else if (role == Qt::UserRole)
return crt.id();
return crt.id;
}
else if (item->data().canConvert<Evaluations::EvaluationElement>())
{
@@ -77,23 +78,23 @@ QVariant TopicEditorEvaluationModel::data(const QModelIndex& index, int role) co
switch (index.column())
{
case ID:
return elem.id();
return elem.id;
case NAME:
return QString::fromStdString(elem.note());
return QString::fromStdString(elem.note);
case WEIGHT:
return elem.rating();
return elem.rating;
case SITUATION:
return elem.situation() ? tr("Yes") : tr("No");
return elem.situation ? tr("Yes") : tr("No");
case AUDIO:
return elem.audio() ? tr("Yes") : tr("No");
return elem.audio ? tr("Yes") : tr("No");
case VIDEO:
return elem.video() ? tr("Yes") : tr("No");
return elem.video ? tr("Yes") : tr("No");
case START_TIME:
return QDateTime::fromMSecsSinceEpoch(elem.timestamp());
return QDateTime::fromMSecsSinceEpoch(elem.timestamp);
}
}
else if (role == Qt::UserRole)
return elem.id();
return elem.id;
}
return QVariant();
}
@@ -132,7 +133,7 @@ bool TopicEditorEvaluationModel::initModel(const std::shared_ptr<Interface::Dtc>
int parentId = 0;
EvaluationCriterium crit = iter.value();
if (crit.operatorId() != operatorId)
if (crit.operatorId != operatorId)
continue;
if (!parentItemIndexCache.contains(parentId))
@@ -157,7 +158,7 @@ bool TopicEditorEvaluationModel::initModel(const std::shared_ptr<Interface::Dtc>
iter2 != elemMap.constEnd(); ++iter2)
{
Evaluations::EvaluationElement elem = iter2.value();
if (elem.criteriumId() != criteriumId)
if (elem.criteriumId != criteriumId)
continue;
parentId = criteriumId + 10000;
@@ -175,7 +176,7 @@ bool TopicEditorEvaluationModel::initModel(const std::shared_ptr<Interface::Dtc>
QVariant data;
data.setValue(elem);
onInsertRow(rowPos, pIndex, data);
int elementId = elem.id();
int elementId = elem.id;
parentItemIndexCache.insert(elementId, index(rowPos, 0, pIndex));
DEBUG_LOG(m_logger) << "Added to tree (element id, parent id) : (" << elementId << ", " << parentId
<< ")";
@@ -1,6 +1,7 @@
#include "topic_editor.h"
#include <NGLLogger/NGLLoggerBootstrap.h>
#include "ui_topic_editor.h"
@@ -19,6 +20,7 @@ namespace Evaluations
EvaluationTopicEditor::EvaluationTopicEditor(LtsSession::LtsSession* session, QWidget* parent)
: TopicEditorBase::TopicEditor(parent), m_session(session), m_ui(new Ui::EvaluationTopicEditor)
, m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger())
{
m_ui->setupUi(this);
init(m_ui->widget);
@@ -81,12 +83,12 @@ void EvaluationTopicEditor::updateInternalData()
m_ui->cbxOperator->setCurrentIndex(m_ui->cbxOperator->findData(m_operatorId));
m_model->initModel(m_evlDtc, m_operatorId);
m_evlElement.id(getTopicDataValue(QStringLiteral("elementId")).toDouble());
DEBUG_LOG(m_logger) << "element id = " << m_evlElement.id();
m_evlElement.timestamp(getTopicDataValue(QStringLiteral("start")).toDouble());
m_evlElement.situation(getTopicDataValue(QStringLiteral("situation")).toBool());
m_evlElement.audio(getTopicDataValue(QStringLiteral("audio")).toBool());
m_evlElement.video(getTopicDataValue(QStringLiteral("video")).toBool());
m_evlElement.id = getTopicDataValue(QStringLiteral("elementId")).toDouble();
DEBUG_LOG(m_logger) << "element id = " << m_evlElement.id;
m_evlElement.timestamp = getTopicDataValue(QStringLiteral("start")).toDouble();
m_evlElement.situation = getTopicDataValue(QStringLiteral("situation")).toBool();
m_evlElement.audio = getTopicDataValue(QStringLiteral("audio")).toBool();
m_evlElement.video = getTopicDataValue(QStringLiteral("video")).toBool();
selectElement();
}
@@ -100,8 +102,8 @@ void EvaluationTopicEditor::selectElement()
{
QModelIndex idx;
QItemSelectionModel* selectionModel = m_ui->trvEvaluations->selectionModel();
if (m_evlElement.id() > 0)
idx = m_model->getIndex(m_evlElement.id());
if (m_evlElement.id > 0)
idx = m_model->getIndex(m_evlElement.id);
if (idx.isValid())
selectionModel->setCurrentIndex(idx, QItemSelectionModel::SelectCurrent | QItemSelectionModel::Rows);
else
@@ -123,7 +125,7 @@ void EvaluationTopicEditor::initOperatorComboBox()
auto it =
std::find_if(evaluationCriteria.constBegin(), evaluationCriteria.constEnd(),
[this, operatorId](const EvaluationCriterium& ec) { return ec.operatorId() == operatorId; });
[this, operatorId](const EvaluationCriterium& ec) { return ec.operatorId == operatorId; });
if (it == evaluationCriteria.constEnd())
m_ui->cbxOperator->removeItem(index);
}
@@ -133,27 +135,27 @@ void EvaluationTopicEditor::initOperatorComboBox()
bool EvaluationTopicEditor::apply2()
{
setTopicDataProperty(QStringLiteral("operatorId"), m_operatorId);
setTopicDataProperty(QStringLiteral("elementId"), m_evlElement.id());
setTopicDataProperty(QStringLiteral("start"), m_evlElement.timestamp());
setTopicDataProperty(QStringLiteral("situation"), m_evlElement.situation());
setTopicDataProperty(QStringLiteral("audio"), m_evlElement.audio());
setTopicDataProperty(QStringLiteral("video"), m_evlElement.video());
setTopicDataProperty(QStringLiteral("elementId"), m_evlElement.id);
setTopicDataProperty(QStringLiteral("start"), static_cast<qint64>(m_evlElement.timestamp));
setTopicDataProperty(QStringLiteral("situation"), m_evlElement.situation);
setTopicDataProperty(QStringLiteral("audio"), m_evlElement.audio);
setTopicDataProperty(QStringLiteral("video"), m_evlElement.video);
DEBUG_LOG(m_logger) << "operator id = " << m_operatorId << ", element id = " << m_evlElement.id();
DEBUG_LOG(m_logger) << "timestamp: " << m_evlElement.timestamp();
DEBUG_LOG(m_logger) << "operator id = " << m_operatorId << ", element id = " << m_evlElement.id;
DEBUG_LOG(m_logger) << "timestamp: " << m_evlElement.timestamp;
if (m_evlElement.situation())
if (m_evlElement.situation)
{
TopicEditorBase::TopicData data;
data.topicType = TopicEditorBase::TopicType::Situation;
setTopicDataProperty(QStringLiteral("end"), m_evlElement.timestamp() + m_evlElement.duration() * 1000);
setTopicDataProperty(QStringLiteral("end"), static_cast<qint64>(m_evlElement.timestamp + m_evlElement.duration * 1000));
setTopicDataProperty(QStringLiteral("speed"), 1.0);
if (m_evlElement.situationContent())
if (m_evlElement.situationContent)
{
QJsonParseError error;
QJsonDocument doc(QJsonDocument::fromJson(
QString::fromStdString(m_evlElement.situationContent().get()).toUtf8(), &error));
QString::fromStdString(m_evlElement.situationContent.get()).toUtf8(), &error));
if (error.error == QJsonParseError::NoError)
{
@@ -166,7 +168,7 @@ bool EvaluationTopicEditor::apply2()
tr("The selected marker has invalid filter and/or map settings."));
}
data.duration = m_evlElement.duration();
data.duration = m_evlElement.duration;
data.properties = m_topicData.properties;
DEBUG_LOG(m_logger) << "topicData - properties: "
@@ -175,26 +177,26 @@ bool EvaluationTopicEditor::apply2()
emit topicEditorRequested(data);
}
if (m_evlElement.audio())
if (m_evlElement.audio)
{
TopicEditorBase::TopicData data;
data.topicType = TopicEditorBase::TopicType::Audio;
setTopicDataProperty(QStringLiteral("end"), m_evlElement.timestamp() + m_evlElement.duration() * 1000);
LtsUtils::JsonObject jsonObj = LtsUtils::JsonObject::fromJson(m_evlElement.audioContent().get());
setTopicDataProperty(QStringLiteral("end"), static_cast<qint64>(m_evlElement.timestamp + m_evlElement.duration * 1000));
LtsUtils::JsonObject jsonObj = LtsUtils::JsonObject::fromJson(m_evlElement.audioContent.get());
setTopicDataProperty(QStringLiteral("stream"), jsonObj.value<QString>("actualStream"));
data.duration = m_evlElement.duration();
data.duration = m_evlElement.duration;
data.properties = m_topicData.properties;
emit topicEditorRequested(data);
}
if (m_evlElement.video())
if (m_evlElement.video)
{
LtsUtils::JsonObject jsonObj = LtsUtils::JsonObject::fromJson(m_evlElement.videoContent().get());
LtsUtils::JsonObject jsonObj = LtsUtils::JsonObject::fromJson(m_evlElement.videoContent.get());
TopicEditorBase::TopicData data;
data.topicType = TopicEditorBase::TopicType::Video;
setTopicDataProperty(QStringLiteral("end"), m_evlElement.timestamp() + m_evlElement.duration() * 1000);
setTopicDataProperty(QStringLiteral("end"), static_cast<qint64>(m_evlElement.timestamp + m_evlElement.duration * 1000));
setTopicDataProperty(QStringLiteral("stream"), jsonObj.value<QString>("actualStream"));
data.duration = m_evlElement.duration();
data.duration = m_evlElement.duration;
data.properties = m_topicData.properties;
emit topicEditorRequested(data);
}
@@ -220,9 +222,9 @@ void EvaluationTopicEditor::onSelectionChanged(const QItemSelection& selected, c
QModelIndex index = m_ui->trvEvaluations->currentIndex();
m_evlElement = m_model->getEvaluationElement(index);
DEBUG_LOG(m_logger) << "element id = " << m_evlElement.id();
DEBUG_LOG(m_logger) << "element id = " << m_evlElement.id;
m_topicData.description = QString::number(m_evlElement.id());
m_topicData.description = QString::number(m_evlElement.id);
slotChangesMade();
}
@@ -1,6 +1,7 @@
#include "evl_dialog.h"
#include <NGLLogger/NGLLoggerBootstrap.h>
#include "evl_edit_dialog.h"
#include "evl_element_dialog.h"
@@ -20,6 +21,7 @@ CriteriumDialog::CriteriumDialog(const QString& menuGroup, LtsSession::LtsSessio
m_proxyModel(new CriteriumFilterModel(this)), m_session(session), m_ui(new Ui::CriteriumDialog),
m_menuGroup(menuGroup), m_ownEvaluationElements(ownEvlElements),
m_requestHelper(new LtsUtils::RequestHelper(this))
, m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger())
{
DEBUG_LOG(m_logger) << "CriteriumDialog ctor";
m_ui->setupUi(this);
@@ -51,7 +53,7 @@ void CriteriumDialog::enaDisa()
int selected = m_ui->widget->selectedRows().size();
const QModelIndex srcIdx = m_ui->widget->currentIndex();
int operatorId = m_model->getRowData(srcIdx.row()).operatorId();
int operatorId = m_model->getRowData(srcIdx.row()).operatorId;
if (m_currentOperatorId == operatorId)
m_buttonBox->setButtonEnabled(LtsWidgets::DialogButton::Load, true && selected == 1);
@@ -92,7 +94,7 @@ void CriteriumDialog::slotEdit()
DEBUG_LOG(m_logger) << "CriteriumDialog::slotEdit";
const QModelIndex srcIdx = m_ui->widget->currentIndex();
editCriterium(m_model->getRowData(srcIdx.row()).id());
editCriterium(m_model->getRowData(srcIdx.row()).id);
}
void CriteriumDialog::slotRemove()
@@ -102,8 +104,8 @@ void CriteriumDialog::slotRemove()
if (!selIndex.isValid())
return;
Core::RemoveElementRequest req(m_model->getRowData(selIndex.row()).id());
DEBUG_LOG(m_logger) << "Removing criterium id = " << req.id();
Core::RemoveElementRequest req(m_model->getRowData(selIndex.row()).id);
DEBUG_LOG(m_logger) << "Removing criterium id = " << req.id;
m_requestHelper->startSingleRequest([req, this]() { return m_ftc->evlCriteriumRemoveRequest(req, this); });
if (m_requestHelper->failed())
@@ -116,7 +118,7 @@ void CriteriumDialog::slotEditElements()
if (!selIndex.isValid())
return;
int criteriumId = m_model->getRowData(selIndex.row()).id();
int criteriumId = m_model->getRowData(selIndex.row()).id;
addDialog(LtsWidgets::initDialog(new ElementDialog(), criteriumId, m_exerciseId, m_menuGroup, m_dtc, m_ftc,
m_exmDtc, m_avmDataIfc, m_fltParticipantIfc, m_fltAesIfc,
m_fltBuildingComponentIfc, m_session),
@@ -165,8 +167,8 @@ bool CriteriumDialog::init(
for (auto i = criteria.constBegin(); i != criteria.constEnd(); ++i)
{
const EvaluationCriterium& p = (*i);
DEBUG_LOG(m_logger) << "Criterium: id = " << p.id() << ", name = " << p.name().c_str()
<< ", desc = " << p.description().c_str();
DEBUG_LOG(m_logger) << "Criterium: id = " << p.id << ", name = " << p.name.c_str()
<< ", desc = " << p.description.c_str();
}
connect(m_ui->widget, &LtsDataView::LtsDataView::signalSelectionChanged, this, &CriteriumDialog::enaDisa,
@@ -1,6 +1,7 @@
#include "evl_edit_dialog.h"
#include <NGLLogger/NGLLoggerBootstrap.h>
#include "ui_evl_edit_dialog.h"
@@ -17,6 +18,7 @@ namespace Evaluations
CriteriumEditDialog::CriteriumEditDialog(QWidget* parent)
: LtsWidgets::LtsDialog(parent, LtsWidgets::ButtonCombination::OkCancel),
m_requestHelper(new LtsUtils::RequestHelper(this)), m_ui(new Ui::CriteriumEditDialog)
, m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger())
{
DEBUG_LOG(m_logger) << "CriteriumEditDialog ctor";
@@ -50,10 +52,10 @@ bool CriteriumEditDialog::init(int criteriumId, LtsSession::LtsSession* session,
if (m_criteriumId > 0)
{
Evaluations::EvaluationCriterium eval = m_dtc->evaluationCriterium(m_criteriumId);
m_ui->leName->setText(QString::fromStdString(eval.name()));
m_ui->teDesc->setText(QString::fromStdString(eval.description()));
m_ui->leName->setText(QString::fromStdString(eval.name));
m_ui->teDesc->setText(QString::fromStdString(eval.description));
m_ui->cbxOperators->setCurrentIndex(m_ui->cbxOperators->findData(eval.operatorId()));
m_ui->cbxOperators->setCurrentIndex(m_ui->cbxOperators->findData(eval.operatorId));
}
else
{
@@ -76,10 +78,10 @@ bool CriteriumEditDialog::apply()
{
EvlCriteriumModifyRequest req;
req.id(m_criteriumId);
req.name(m_ui->leName->text().toStdString());
req.description(m_ui->teDesc->toPlainText().toStdString());
req.operatorId(m_ui->cbxOperators->currentData().toInt());
req.id = m_criteriumId;
req.name = m_ui->leName->text().toStdString();
req.description = m_ui->teDesc->toPlainText().toStdString();
req.operatorId = m_ui->cbxOperators->currentData().toInt();
return m_requestHelper->startSingleRequest([this, req]() { return m_ftc->evlCriteriumModifyRequest(req, this); });
}
@@ -1,6 +1,7 @@
#include "evl_edit_element_dialog.h"
#include <NGLLogger/NGLLoggerBootstrap.h>
#include "ui_evl_edit_element_dialog.h"
@@ -26,6 +27,7 @@ namespace Evaluations
ElementEditDialog::ElementEditDialog(QWidget*)
: LtsWidgets::LtsDialog(nullptr, LtsWidgets::ButtonCombination::OkCancel),
m_requestHelper(new LtsUtils::RequestHelper(this)), m_ui(new Ui::ElementEditDialog)
, m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger())
{
DEBUG_LOG(m_logger) << "ElementEditDialog ctor";
@@ -88,17 +90,17 @@ bool ElementEditDialog::init(
if (m_elementId > 0)
{
Evaluations::EvaluationElement eval = m_dtc->evaluationElement(m_elementId);
m_ui->cbxRating->setCurrentIndex(m_ui->cbxRating->findData(eval.rating()));
m_ui->teDesc->setText(QString::fromStdString(eval.note()));
m_ui->lblStartTime->setText(DTG::toStringMSec(eval.timestamp()));
m_ui->cbxRating->setCurrentIndex(m_ui->cbxRating->findData(eval.rating));
m_ui->teDesc->setText(QString::fromStdString(eval.note));
m_ui->lblStartTime->setText(DTG::toStringMSec(eval.timestamp));
ERROR_LOG(m_logger) << "set start time label to " << m_ui->lblStartTime->text();
m_startTime = eval.timestamp();
m_startTime = eval.timestamp;
m_ui->cbSituation->setChecked(eval.situation());
m_ui->cbVideo->setChecked(eval.video());
m_ui->cbAudio->setChecked(eval.audio());
m_ui->cbSituation->setChecked(eval.situation);
m_ui->cbVideo->setChecked(eval.video);
m_ui->cbAudio->setChecked(eval.audio);
m_ui->cbxPhase->setCurrentIndex(m_ui->cbxPhase->findData(eval.phaseId()));
m_ui->cbxPhase->setCurrentIndex(m_ui->cbxPhase->findData(eval.phaseId));
}
if (m_avmDataIfc && m_avmDataIfc->hasAvsSession())
@@ -139,13 +141,13 @@ bool ElementEditDialog::apply()
{
EvlElementModifyRequest req;
req.id(m_elementId);
req.criteriumId(m_criteriumId);
req.rating(m_ui->cbxRating->currentData().toInt());
req.note(m_ui->teDesc->toPlainText().toStdString());
req.timestamp(m_startTime);
req.duration((QDateTime::currentMSecsSinceEpoch() - m_startTime) / 1000);
req.phaseId(m_ui->cbxPhase->currentData().toInt());
req.id = m_elementId;
req.criteriumId = m_criteriumId;
req.rating = m_ui->cbxRating->currentData().toInt();
req.note = m_ui->teDesc->toPlainText().toStdString();
req.timestamp = m_startTime;
req.duration = (QDateTime::currentMSecsSinceEpoch() - m_startTime) / 1000;
req.phaseId = m_ui->cbxPhase->currentData().toInt();
QJsonObject obj;
if (m_ui->cbSituation->isChecked())
@@ -160,21 +162,21 @@ bool ElementEditDialog::apply()
root[QStringLiteral("filters")] = getFilterSettings();
req.situationContent().set(QJsonDocument(root).toJson().constData());
req.situationContent.set(QJsonDocument(root).toJson().constData());
}
if (m_ui->cbVideo->isChecked() && m_ui->cbxVideoChannel->currentData().isValid())
{
obj[QStringLiteral("actualStream")] = QJsonValue(m_ui->cbxVideoChannel->currentData().toString());
obj[QStringLiteral("allStreams")] = QJsonValue(QString(m_videoStreams.join(QStringLiteral(", "))));
req.videoContent().set(QJsonDocument(obj).toJson().constData());
req.videoContent.set(QJsonDocument(obj).toJson().constData());
}
if (m_ui->cbAudio->isChecked() && !m_ui->cbxRadioCircuit->currentText().isNull())
{
obj[QStringLiteral("actualStream")] = QJsonValue(m_ui->cbxRadioCircuit->currentText());
obj[QStringLiteral("allStreams")] = QJsonValue(QString(m_audioStreams.join(QStringLiteral(", "))));
req.audioContent().set(QJsonDocument(obj).toJson().constData());
req.audioContent.set(QJsonDocument(obj).toJson().constData());
}
return m_requestHelper->startSingleRequest([this, req]() { return m_ftc->evlElementModifyRequest(req, this); });
@@ -188,8 +190,8 @@ void ElementEditDialog::fillPhasesComboBox()
m_ui->cbxPhase->addItem(tr("<not set>"), 0);
auto cb = [this](const ExerciseManagement::ExercisePhase& ph) {
if (ph.exerciseId() == m_exerciseId)
m_ui->cbxPhase->addItem(QString::fromStdString(ph.name()), ph.id());
if (ph.exerciseId == m_exerciseId)
m_ui->cbxPhase->addItem(QString::fromStdString(ph.name), ph.id);
};
m_exmDtc->exercisePhases(cb);
@@ -1,6 +1,7 @@
#include "evl_element_dialog.h"
#include <NGLLogger/NGLLoggerBootstrap.h>
#include "evl_edit_element_dialog.h"
#include "evl_element_model.h"
@@ -14,6 +15,7 @@ namespace Evaluations
ElementDialog::ElementDialog(QWidget* parent)
: LtsWidgets::LtsDialog(parent, LtsWidgets::ButtonCombination::CloseOnly), m_model(new ElementDialogModel(this)),
m_ui(new Ui::ElementDialog), m_requestHelper(new LtsUtils::RequestHelper(this))
, m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger())
{
DEBUG_LOG(m_logger) << "ElementDialog ctor";
m_ui->setupUi(this);
@@ -51,7 +53,7 @@ void ElementDialog::slotEdit()
{
DEBUG_LOG(m_logger) << "ElementDialog::slotEdit";
addElementEditDialog(m_model->getRowData(m_ui->widget->currentIndex().row()).id());
addElementEditDialog(m_model->getRowData(m_ui->widget->currentIndex().row()).id);
}
void ElementDialog::addElementEditDialog(int elementId)
@@ -76,9 +78,9 @@ void ElementDialog::slotRemove()
return;
m_requestHelper->startSingleRequest([this]() {
DEBUG_LOG(m_logger) << "Removing element id = " << m_model->getRowData(m_ui->widget->currentIndex().row()).id();
DEBUG_LOG(m_logger) << "Removing element id = " << m_model->getRowData(m_ui->widget->currentIndex().row()).id;
return m_ftc->evlElementRemoveRequest(
EvlElementRemoveRequest(m_model->getRowData(m_ui->widget->currentIndex().row()).id(), m_criteriumId), this);
EvlElementRemoveRequest(m_model->getRowData(m_ui->widget->currentIndex().row()).id, m_criteriumId), this);
});
if (m_requestHelper->failed())
@@ -126,7 +128,7 @@ bool ElementDialog::init(
#endif
auto cb = [this](const Evaluations::EvaluationElement& e) {
DEBUG_LOG(m_logger) << "Element: id = " << e.id() << ", medium = " << e.rating();
DEBUG_LOG(m_logger) << "Element: id = " << e.id << ", medium = " << e.rating;
};
m_dtc->evaluationElements(cb);
@@ -1,6 +1,7 @@
#include "evl_element_model.h"
#include <NGLLogger/NGLLoggerBootstrap.h>
#include <AudioVideoManagement/stream_name_mapping.h>
#include <LtsUtilsCore/json_object.h>
@@ -15,6 +16,7 @@ ElementDialogModel::ElementDialogModel(QObject* parent)
{tr("Id"), tr("Situation"), tr("Video"), tr("Audio"), tr("Start Time"), tr("Duration"), tr("Rating"),
tr("Radio Circuit"), tr("Video Channel"), tr("Note"), tr("Phase")},
parent)
, m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger())
{
}
@@ -29,7 +31,7 @@ bool ElementDialogModel::initModel(const std::shared_ptr<Interface::Dtc>& dtc,
connect(dtc.get(), &Interface::Dtc::evaluationElementChanged, this, &ElementDialogModel::onDataChanged);
auto cb = [this, criteriumId](const EvaluationElement& e) {
if (e.criteriumId() == criteriumId)
if (e.criteriumId == criteriumId)
insertRow(e);
};
dtc->evaluationElements(cb);
@@ -49,31 +51,31 @@ QVariant ElementDialogModel::data(const QModelIndex& index, int role) const
switch (index.column())
{
case Id:
return eval.id();
return eval.id;
case Situation:
return eval.situation() ? tr("Yes") : tr("No");
return eval.situation ? tr("Yes") : tr("No");
case Video:
return eval.video() ? tr("Yes") : tr("No");
return eval.video ? tr("Yes") : tr("No");
case Audio:
return eval.audio() ? tr("Yes") : tr("No");
return eval.audio ? tr("Yes") : tr("No");
case Timestamp:
return QDateTime::fromMSecsSinceEpoch(eval.timestamp());
return QDateTime::fromMSecsSinceEpoch(eval.timestamp);
case Duration:
return eval.duration();
return eval.duration;
case Rating:
return eval.rating();
return eval.rating;
case RadioCircuit:
if (eval.audioContent().is_set())
if (eval.audioContent.has_value())
{
LtsUtils::JsonObject jsonObj = LtsUtils::JsonObject::fromJson(eval.audioContent().get());
LtsUtils::JsonObject jsonObj = LtsUtils::JsonObject::fromJson(eval.audioContent.get());
return jsonObj.value<QString>("actualStream");
}
else
return QString();
case VideoChannel:
if (eval.videoContent().is_set())
if (eval.videoContent.has_value())
{
LtsUtils::JsonObject jsonObj = LtsUtils::JsonObject::fromJson(eval.videoContent().get());
LtsUtils::JsonObject jsonObj = LtsUtils::JsonObject::fromJson(eval.videoContent.get());
QString streamName = jsonObj.value<QString>("actualStream");
QString displayName = m_avmDataIfc->streamNameMapping()->displayName(streamName);
return displayName;
@@ -81,9 +83,9 @@ QVariant ElementDialogModel::data(const QModelIndex& index, int role) const
else
return QString();
case Note:
return QString::fromStdString(eval.note());
return QString::fromStdString(eval.note);
case Phase:
return QString::fromStdString(m_exmDtc->exercisePhase(eval.phaseId()).name());
return QString::fromStdString(m_exmDtc->exercisePhase(eval.phaseId).name);
}
return QVariant();
@@ -105,7 +107,7 @@ bool ElementDialogProxyModel::lessThan(const QModelIndex& source_left, const QMo
switch (source_left.column())
{
case ElementDialogModel::Timestamp:
return dataLeft.timestamp() < dataRight.timestamp();
return dataLeft.timestamp < dataRight.timestamp;
case ElementDialogModel::Id:
case ElementDialogModel::Situation:
case ElementDialogModel::Video:
@@ -138,7 +140,7 @@ bool ElementDialogProxyModel::filterAcceptsRow(int source_row, const QModelIndex
return LtsWidgets::LtsColumnFilterProxyModel::filterAcceptsRow(source_row, source_parent);
const auto& data = m_sourceModel->m_vecData.at(source_row);
if (data.criteriumId() != m_criteriumId)
if (data.criteriumId != m_criteriumId)
return false;
return LtsWidgets::LtsColumnFilterProxyModel::filterAcceptsRow(source_row, source_parent);
}
@@ -1,6 +1,7 @@
#include "evl_model.h"
#include <NGLLogger/NGLLoggerBootstrap.h>
#include <Evaluations/evl_translation.h>
@@ -10,6 +11,7 @@ namespace Evaluations
CriteriumDialogModel::CriteriumDialogModel(QObject* parent)
: LtsWidgets::LtsAbstractTableModel<EvaluationCriterium>({tr("Id"), tr("Name"), tr("Description"), tr("Operator")},
parent)
, m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger())
{
}
@@ -34,13 +36,13 @@ QVariant CriteriumDialogModel::data(const QModelIndex& index, int role) const
switch (index.column())
{
case Id:
return eval.id();
return eval.id;
case Name:
return QString::fromStdString(eval.name());
return QString::fromStdString(eval.name);
case Description:
return QString::fromStdString(eval.description());
return QString::fromStdString(eval.description);
case Operator:
return QString::fromStdString(m_opmDtc->user(eval.operatorId()).name());
return QString::fromStdString(m_opmDtc->user(eval.operatorId).name);
}
return QVariant();
@@ -68,7 +70,7 @@ bool CriteriumFilterModel::filterAcceptsRow(int source_row, const QModelIndex& s
return LtsWidgets::LtsColumnFilterProxyModel::filterAcceptsRow(source_row, source_parent);
const auto& data = m_sourceModel->m_vecData.at(source_row);
if (data.operatorId() != m_operatorId)
if (data.operatorId != m_operatorId)
return false;
return LtsWidgets::LtsColumnFilterProxyModel::filterAcceptsRow(source_row, source_parent);
}