Adds immediate migration results in progress
This commit is contained in:
2102 files changed
+17482
-15071
No files matched your search
+8
-8
@@ -15,8 +15,8 @@ namespace Evaluations
|
||||
|
||||
|
||||
|
||||
TopicEditorEvaluationModel::TopicEditorEvaluationModel(QObject *parent)
|
||||
: NGLTreeModel(parent, new NGLTreeItem(QVariant()), { tr("Id"), tr("Name"), tr("Weight"), tr("Start Time"), tr("Situation"), tr("Video"), tr("Audio") })
|
||||
TopicEditorEvaluationModel::TopicEditorEvaluationModel(QObject *parent) : NGLTreeModel(parent, new NGLTreeItem(QVariant()),,
|
||||
m_logger(NGL::NGLLoggerBootstrap::getLogger()) { tr("Id"), tr("Name"), tr("Weight"), tr("Start Time"), tr("Situation"), tr("Video"), tr("Audio") })
|
||||
{}
|
||||
|
||||
|
||||
@@ -120,7 +120,7 @@ bool TopicEditorEvaluationModel::initModel(const std::shared_ptr<Interface::Dtc>
|
||||
{
|
||||
if (!dtc)
|
||||
return false;
|
||||
DEBUG_LOG() << "initModel Folder";
|
||||
DEBUG_LOG(m_logger) << "initModel Folder";
|
||||
|
||||
NGLTreeModel::resetModel();
|
||||
|
||||
@@ -144,7 +144,7 @@ bool TopicEditorEvaluationModel::initModel(const std::shared_ptr<Interface::Dtc>
|
||||
|
||||
if (!parentItemIndexCache.contains(parentId))
|
||||
{
|
||||
ERROR_LOG() << "Invalid folder structure";
|
||||
ERROR_LOG(m_logger) << "Invalid folder structure";
|
||||
return false;
|
||||
}
|
||||
else
|
||||
@@ -156,7 +156,7 @@ bool TopicEditorEvaluationModel::initModel(const std::shared_ptr<Interface::Dtc>
|
||||
data.setValue(crit);
|
||||
onInsertRow(rowPos, pIndex, data);
|
||||
parentItemIndexCache.insert(criteriumId+10000, index(rowPos, 0, pIndex));
|
||||
DEBUG_LOG() << "Added to tree (criterium id, parent id) : (" << criteriumId << ", " << parentId << ")";
|
||||
DEBUG_LOG(m_logger) << "Added to tree (criterium id, parent id) : (" << criteriumId << ", " << parentId << ")";
|
||||
}
|
||||
|
||||
for (QMap<qint32, Evaluations::EvaluationElement>::const_iterator iter2 = elemMap.constBegin();
|
||||
@@ -170,7 +170,7 @@ bool TopicEditorEvaluationModel::initModel(const std::shared_ptr<Interface::Dtc>
|
||||
|
||||
if (!parentItemIndexCache.contains(parentId))
|
||||
{
|
||||
ERROR_LOG() << "Invalid folder structure";
|
||||
ERROR_LOG(m_logger) << "Invalid folder structure";
|
||||
return false;
|
||||
}
|
||||
else
|
||||
@@ -183,7 +183,7 @@ bool TopicEditorEvaluationModel::initModel(const std::shared_ptr<Interface::Dtc>
|
||||
onInsertRow(rowPos, pIndex, data);
|
||||
int elementId = elem.id();
|
||||
parentItemIndexCache.insert(elementId,index(rowPos, 0, pIndex));
|
||||
DEBUG_LOG() << "Added to tree (element id, parent id) : (" << elementId << ", " << parentId << ")";
|
||||
DEBUG_LOG(m_logger) << "Added to tree (element id, parent id) : (" << elementId << ", " << parentId << ")";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -194,7 +194,7 @@ bool TopicEditorEvaluationModel::initModel(const std::shared_ptr<Interface::Dtc>
|
||||
|
||||
bool TopicEditorEvaluationModel::onInsertRow(int &row, const QModelIndex &parent, const QVariant &data)
|
||||
{
|
||||
DEBUG_LOG() << "onInsertRow";
|
||||
DEBUG_LOG(m_logger) << "onInsertRow";
|
||||
|
||||
row = rowCount(parent);
|
||||
NGLTreeItem *item = new NGLTreeItem(data, QIcon());
|
||||
|
||||
+2
@@ -47,6 +47,8 @@ public slots:
|
||||
bool onInsertRow(int &row, const QModelIndex &parent, const QVariant &data);
|
||||
|
||||
private:
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
+12
-12
@@ -59,13 +59,13 @@ bool EvaluationTopicEditor::fetchInterfaces()
|
||||
{
|
||||
if (!m_session->getDtc<Evaluations::DataInterface>(m_evlDtc))
|
||||
{
|
||||
ERROR_LOG() << "Failed to retrieve Evl Dtc";
|
||||
ERROR_LOG(m_logger) << "Failed to retrieve Evl Dtc";
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!m_session->getForeignGuiInterface<OperatorManagement::ForeignGuiComboboxInterface>(m_opmCbxIfc))
|
||||
{
|
||||
ERROR_LOG() << "Failed to retrieve Evl ForeignGuiInterface";
|
||||
ERROR_LOG(m_logger) << "Failed to retrieve Evl ForeignGuiInterface";
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -74,7 +74,7 @@ bool EvaluationTopicEditor::fetchInterfaces()
|
||||
|
||||
initOperatorComboBox();
|
||||
|
||||
DEBUG_LOG() << "fillOperatorComboBox m_operatorId = " << m_operatorId;
|
||||
DEBUG_LOG(m_logger) << "fillOperatorComboBox m_operatorId = " << m_operatorId;
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -83,19 +83,19 @@ bool EvaluationTopicEditor::fetchInterfaces()
|
||||
|
||||
void EvaluationTopicEditor::updateInternalData()
|
||||
{
|
||||
DEBUG_LOG() << Q_FUNC_INFO;
|
||||
DEBUG_LOG(m_logger) << Q_FUNC_INFO;
|
||||
|
||||
if (!hasTopicDataProperties())
|
||||
return;
|
||||
|
||||
m_operatorId = getTopicDataValue(QStringLiteral("operatorId")).toInt();
|
||||
DEBUG_LOG() << "operator id = " << m_operatorId;
|
||||
DEBUG_LOG(m_logger) << "operator id = " << m_operatorId;
|
||||
|
||||
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() << "element id = " << m_evlElement.id();
|
||||
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());
|
||||
@@ -156,8 +156,8 @@ bool EvaluationTopicEditor::apply2()
|
||||
setTopicDataProperty(QStringLiteral("audio"), m_evlElement.audio());
|
||||
setTopicDataProperty(QStringLiteral("video"), m_evlElement.video());
|
||||
|
||||
DEBUG_LOG() << "operator id = " << m_operatorId << ", element id = " << m_evlElement.id();
|
||||
DEBUG_LOG() << "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())
|
||||
{
|
||||
@@ -184,7 +184,7 @@ bool EvaluationTopicEditor::apply2()
|
||||
data.duration = m_evlElement.duration();
|
||||
data.properties = m_topicData.properties;
|
||||
|
||||
DEBUG_LOG() << "topicData - properties: " << QJsonDocument(m_topicData.properties).toJson(QJsonDocument::Compact);
|
||||
DEBUG_LOG(m_logger) << "topicData - properties: " << QJsonDocument(m_topicData.properties).toJson(QJsonDocument::Compact);
|
||||
|
||||
emit topicEditorRequested(data);
|
||||
}
|
||||
@@ -221,7 +221,7 @@ bool EvaluationTopicEditor::apply2()
|
||||
void EvaluationTopicEditor::onOperatorChanged()
|
||||
{
|
||||
m_operatorId = m_ui->cbxOperator->currentData().toInt();
|
||||
DEBUG_LOG() << "operator id = " << m_operatorId;
|
||||
DEBUG_LOG(m_logger) << "operator id = " << m_operatorId;
|
||||
|
||||
m_model->initModel(m_evlDtc, m_operatorId);
|
||||
m_ui->trvEvaluations->expandAll();
|
||||
@@ -232,11 +232,11 @@ void EvaluationTopicEditor::onSelectionChanged(const QItemSelection &selected, c
|
||||
Q_UNUSED(selected);
|
||||
Q_UNUSED(deselected);
|
||||
|
||||
DEBUG_LOG() << Q_FUNC_INFO;
|
||||
DEBUG_LOG(m_logger) << Q_FUNC_INFO;
|
||||
|
||||
QModelIndex index = m_ui->trvEvaluations->currentIndex();
|
||||
m_evlElement = m_model->getEvaluationElement(index);
|
||||
DEBUG_LOG() << "element id = " << m_evlElement.id();
|
||||
DEBUG_LOG(m_logger) << "element id = " << m_evlElement.id();
|
||||
|
||||
m_topicData.description = QString::number(m_evlElement.id());
|
||||
slotChangesMade();
|
||||
|
||||
+2
@@ -32,6 +32,8 @@ public:
|
||||
bool fetchInterfaces();
|
||||
|
||||
private:
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
void updateInternalData() override final;
|
||||
void retranslate() override final;
|
||||
|
||||
|
||||
Reference in new issue
Block a user