Adds immediate migration results in progress
This commit is contained in:
2102 files changed
+17482
-15071
No files matched your search
+9
-9
@@ -44,11 +44,11 @@ bool AssignCodificationDataTable::init(const std::shared_ptr<CodificationManagem
|
||||
const std::shared_ptr<ParticipantManagement::Interface::Dtc> &ppmDtc,
|
||||
LtsSession::LtsSession *session)
|
||||
{
|
||||
DEBUG_LOG() << "AssignCodificationDataTable::init()";
|
||||
DEBUG_LOG(m_logger) << "AssignCodificationDataTable::init()";
|
||||
|
||||
if (!dtc || !ftc || !session || !ppmDtc)
|
||||
{
|
||||
ERROR_LOG() << "AssignCodificationDataTable::init() Invalid shared_ptr!";
|
||||
ERROR_LOG(m_logger) << "AssignCodificationDataTable::init() Invalid shared_ptr!";
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -64,7 +64,7 @@ bool AssignCodificationDataTable::init(const std::shared_ptr<CodificationManagem
|
||||
|
||||
QMap<qint32, ParticipantManagement::Party> userVisibleParties;
|
||||
m_ppmDtc->visibleParties(userVisibleParties, LtsSessionData::LtsSessionData::getInstance()->getVisibleParties(m_session->exerciseId()));
|
||||
DEBUG_LOG() << "Number of parties visible to the user in the exercise: " << userVisibleParties.size();
|
||||
DEBUG_LOG(m_logger) << "Number of parties visible to the user in the exercise: " << userVisibleParties.size();
|
||||
|
||||
for (const ParticipantManagement::Party &party : std::as_const(userVisibleParties))
|
||||
{
|
||||
@@ -92,7 +92,7 @@ bool AssignCodificationDataTable::init(const std::shared_ptr<CodificationManagem
|
||||
cb->addItem(m_model->data(m_model->index(row, CodificationDataOverviewModel::Identifier), Qt::DisplayRole).toString(),
|
||||
m_model->data(m_model->index(row, CodificationDataOverviewModel::Id), Qt::DisplayRole));
|
||||
|
||||
DEBUG_LOG() << "Init Combobox[" << row << "]: PartyId: " << party.id()
|
||||
DEBUG_LOG(m_logger) << "Init Combobox[" << row << "]: PartyId: " << party.id()
|
||||
<< " Identifier: " << m_model->data(m_model->index(row, CodificationDataOverviewModel::Identifier), Qt::DisplayRole).toString()
|
||||
<< " CodTabId: " << m_model->data(m_model->index(row, CodificationDataOverviewModel::Id), Qt::DisplayRole).toInt();
|
||||
}
|
||||
@@ -104,17 +104,17 @@ bool AssignCodificationDataTable::init(const std::shared_ptr<CodificationManagem
|
||||
{
|
||||
tableId = 0;
|
||||
int assignedPartyId = m_model->data(m_model->index(row, CodificationDataOverviewModel::PartyIdHiddenColumn), Qt::DisplayRole).toInt();
|
||||
DEBUG_LOG() << "Assignment[" << row << "]: assignedPartyId: " << assignedPartyId;
|
||||
DEBUG_LOG(m_logger) << "Assignment[" << row << "]: assignedPartyId: " << assignedPartyId;
|
||||
|
||||
if (party.id() == assignedPartyId)
|
||||
{
|
||||
tableId = m_model->data(m_model->index(row, CodificationDataOverviewModel::Id), Qt::DisplayRole).toInt();
|
||||
DEBUG_LOG() << "Assignment[" << row << "]: assignedPartyId: " << assignedPartyId
|
||||
DEBUG_LOG(m_logger) << "Assignment[" << row << "]: assignedPartyId: " << assignedPartyId
|
||||
<< " tableId: " << tableId;
|
||||
break;
|
||||
}
|
||||
}
|
||||
DEBUG_LOG() << "Assignment currentIndex: " << cb->findData(tableId);
|
||||
DEBUG_LOG(m_logger) << "Assignment currentIndex: " << cb->findData(tableId);
|
||||
cb->setCurrentIndex(cb->findData(tableId));
|
||||
|
||||
m_ui->partyLayout->addWidget(cb, i, 1, 1, 1);
|
||||
@@ -128,7 +128,7 @@ bool AssignCodificationDataTable::init(const std::shared_ptr<CodificationManagem
|
||||
|
||||
bool AssignCodificationDataTable::apply()
|
||||
{
|
||||
DEBUG_LOG() << "AssignCodificationDataTable::apply()";
|
||||
DEBUG_LOG(m_logger) << "AssignCodificationDataTable::apply()";
|
||||
|
||||
removeAllAssignments();
|
||||
|
||||
@@ -138,7 +138,7 @@ bool AssignCodificationDataTable::apply()
|
||||
int partyId = cb->property("partyId").toInt();
|
||||
int tableId = cb->currentData().toInt();
|
||||
|
||||
DEBUG_LOG() << "Assignments: partyId: " << partyId
|
||||
DEBUG_LOG(m_logger) << "Assignments: partyId: " << partyId
|
||||
<< " codTableId: " << tableId;
|
||||
|
||||
if (tableId < 1)
|
||||
|
||||
+2
@@ -49,6 +49,8 @@ private Q_SLOTS:
|
||||
bool apply() override;
|
||||
|
||||
private:
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
void retranslate() override;
|
||||
|
||||
bool removeAllAssignments();
|
||||
|
||||
+11
-11
@@ -15,7 +15,7 @@ AuthenticationCodeModel::AuthenticationCodeModel(QObject *parent)
|
||||
, m_isEditMode(false)
|
||||
{
|
||||
memset(m_matrix, 0, sizeof m_matrix);
|
||||
DEBUG_LOG() << "ctor AuthenticationCodeModel";
|
||||
DEBUG_LOG(m_logger) << "ctor AuthenticationCodeModel";
|
||||
|
||||
}
|
||||
|
||||
@@ -24,11 +24,11 @@ bool AuthenticationCodeModel::init(const std::shared_ptr<CodificationManagement:
|
||||
int codificationDataId,
|
||||
bool isEditMode)
|
||||
{
|
||||
DEBUG_LOG() << "AuthenticationCodeModel::init()";
|
||||
DEBUG_LOG(m_logger) << "AuthenticationCodeModel::init()";
|
||||
if (!dtc)
|
||||
return false;
|
||||
|
||||
DEBUG_LOG() << "AuthenticationCodeModel::init()...";
|
||||
DEBUG_LOG(m_logger) << "AuthenticationCodeModel::init()...";
|
||||
|
||||
m_dtc = dtc;
|
||||
m_codificationDataId = codificationDataId;
|
||||
@@ -73,12 +73,12 @@ void AuthenticationCodeModel::resetMatrix()
|
||||
|
||||
bool AuthenticationCodeModel::setMatrixValuesCSV(const QString &csvData)
|
||||
{
|
||||
DEBUG_LOG() << "setMatrixValuesCSV: " << csvData;
|
||||
DEBUG_LOG(m_logger) << "setMatrixValuesCSV: " << csvData;
|
||||
|
||||
const QVector<QStringRef> slRows = csvData.splitRef(QLatin1Char('\n'));
|
||||
if (slRows.size() != rowCount())
|
||||
{
|
||||
ERROR_LOG() << "Invalid row data count." << " codificationDataId: " << m_codificationDataId
|
||||
ERROR_LOG(m_logger) << "Invalid row data count." << " codificationDataId: " << m_codificationDataId
|
||||
<< " Soll/Ist: " << rowCount() - 1 << "/" << slRows.size();
|
||||
return false;
|
||||
}
|
||||
@@ -88,7 +88,7 @@ bool AuthenticationCodeModel::setMatrixValuesCSV(const QString &csvData)
|
||||
const QVector<QStringRef> slColumns = slRows[row].split(QLatin1Char(';'));
|
||||
if (slColumns.size() != columnCount())
|
||||
{
|
||||
ERROR_LOG() << "Invalid column data count." << " codificationDataId: " << m_codificationDataId
|
||||
ERROR_LOG(m_logger) << "Invalid column data count." << " codificationDataId: " << m_codificationDataId
|
||||
<< " Soll/Ist: " << columnCount() - 1 << "/" << slColumns.size();
|
||||
return false;
|
||||
}
|
||||
@@ -194,7 +194,7 @@ QVariant AuthenticationCodeModel::data(const QModelIndex &index, int role) const
|
||||
|
||||
bool AuthenticationCodeModel::setData(const QModelIndex &index, const QVariant &value, int role)
|
||||
{
|
||||
DEBUG_LOG() << "setData() row/col: " << index.row() << "/" << index.column()
|
||||
DEBUG_LOG(m_logger) << "setData() row/col: " << index.row() << "/" << index.column()
|
||||
<< " char:" << value.toString() << " int:" << value.toInt();
|
||||
|
||||
bool bOk;
|
||||
@@ -202,7 +202,7 @@ bool AuthenticationCodeModel::setData(const QModelIndex &index, const QVariant &
|
||||
|
||||
if ((!bOk) || (val < 0) || (val > 99))
|
||||
{
|
||||
ERROR_LOG() << "setData() row/col: " << index.row() << "/" << index.column()
|
||||
ERROR_LOG(m_logger) << "setData() row/col: " << index.row() << "/" << index.column()
|
||||
<< " Invalid Input! " << value.toString() << " Required input value in the range 0-99.";
|
||||
return false;
|
||||
}
|
||||
@@ -236,7 +236,7 @@ void AuthenticationCodeModel::onCodificationDataChanged(const CodificationManage
|
||||
{
|
||||
const int id = data.id();
|
||||
|
||||
DEBUG_LOG() << "onCodificationDataChanged for CodificationData id: " << id
|
||||
DEBUG_LOG(m_logger) << "onCodificationDataChanged for CodificationData id: " << id
|
||||
<< " - AuthenticationCodeMatrix data: " << data.authenticationTableMatirx().c_str()
|
||||
<< " - modType: " << (int)modType;
|
||||
|
||||
@@ -245,7 +245,7 @@ void AuthenticationCodeModel::onCodificationDataChanged(const CodificationManage
|
||||
|
||||
if (modType == DataModification::eRemoved)
|
||||
{
|
||||
WARNING_LOG() << "CodificationData was removed. id: " << id << " ToDo: 'ShowCodificationData' Tab loeschen !?";
|
||||
WARNING_LOG(m_logger) << "CodificationData was removed. id: " << id << " ToDo: 'ShowCodificationData' Tab loeschen !?";
|
||||
|
||||
resetMatrix();
|
||||
return;
|
||||
@@ -253,7 +253,7 @@ void AuthenticationCodeModel::onCodificationDataChanged(const CodificationManage
|
||||
|
||||
if (modType == DataModification::eModified)
|
||||
{
|
||||
DEBUG_LOG() << "CodificationData was modifed. id: " << id << " - " << data.note();
|
||||
DEBUG_LOG(m_logger) << "CodificationData was modifed. id: " << id << " - " << data.note();
|
||||
|
||||
QString qs = QString::fromStdString(data.authenticationTableMatirx());
|
||||
setMatrixValuesCSV(qs);
|
||||
|
||||
+2
@@ -81,6 +81,8 @@ private:
|
||||
|
||||
|
||||
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
void setMatrix(const QVector <int> &data);
|
||||
|
||||
int m_matrix[13][5];
|
||||
|
||||
+7
-8
@@ -6,18 +6,17 @@
|
||||
|
||||
using namespace CodificationManagement;
|
||||
|
||||
CodeTableEditDelegate::CodeTableEditDelegate(QWidget *parent, TableType tableType)
|
||||
: QItemDelegate(parent)
|
||||
, m_tableType(tableType)
|
||||
{
|
||||
DEBUG_LOG() << "CodeTableEditDelegate::ctor()";
|
||||
CodeTableEditDelegate::CodeTableEditDelegate(QWidget *parent, TableType tableType) : QItemDelegate(parent)
|
||||
, m_tableType(tableType),
|
||||
m_logger(NGL::NGLLoggerBootstrap::getLogger()) {
|
||||
DEBUG_LOG(m_logger) << "CodeTableEditDelegate::ctor()";
|
||||
}
|
||||
|
||||
|
||||
QWidget *CodeTableEditDelegate::createEditor(QWidget *parent, const QStyleOptionViewItem &option,
|
||||
const QModelIndex &index) const
|
||||
{
|
||||
DEBUG_LOG() << "CodeTableEditDelegate::createEditor() TableType: " << m_tableType
|
||||
DEBUG_LOG(m_logger) << "CodeTableEditDelegate::createEditor() TableType: " << m_tableType
|
||||
<< " rox/column: " << index.row() << "/" << index.column() ;
|
||||
|
||||
Q_UNUSED(option)
|
||||
@@ -76,7 +75,7 @@ void CodeTableEditDelegate::setEditorData(QWidget *editor, const QModelIndex &in
|
||||
QVariant v = index.data(Qt::EditRole);
|
||||
le->setText(v.toString());
|
||||
|
||||
DEBUG_LOG() << "CodeTableEditDelegate::setEditorData() TableType: " << m_tableType
|
||||
DEBUG_LOG(m_logger) << "CodeTableEditDelegate::setEditorData() TableType: " << m_tableType
|
||||
<< " rox/column: " << index.row() << "/" << index.column()
|
||||
<< " Input: " << v.toString();
|
||||
|
||||
@@ -90,7 +89,7 @@ void CodeTableEditDelegate::setModelData(QWidget *editor, QAbstractItemModel *mo
|
||||
if (!le)
|
||||
return;
|
||||
|
||||
DEBUG_LOG() << "CodeTableEditDelegate::setModelData() TableType: " << m_tableType
|
||||
DEBUG_LOG(m_logger) << "CodeTableEditDelegate::setModelData() TableType: " << m_tableType
|
||||
<< " rox/column: " << index.row() << "/" << index.column()
|
||||
<< " Input: " << le->text();
|
||||
|
||||
|
||||
+2
@@ -43,6 +43,8 @@ public:
|
||||
const QModelIndex &index) const override;
|
||||
|
||||
private:
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
TableType m_tableType;
|
||||
};
|
||||
|
||||
|
||||
+1
-1
@@ -37,7 +37,7 @@ CodificationDataOverviewModel::CodificationDataOverviewModel(QObject *parent)
|
||||
bool CodificationDataOverviewModel::initModel(const std::shared_ptr<CodificationManagement::Interface::Dtc> &codDtc,
|
||||
const std::shared_ptr<ParticipantManagement::Interface::Dtc> &ppmDtc)
|
||||
{
|
||||
DEBUG_LOG() << "CodificationDataModel::initModel()";
|
||||
DEBUG_LOG(m_logger) << "CodificationDataModel::initModel()";
|
||||
|
||||
if (!codDtc || !ppmDtc)
|
||||
return false;
|
||||
|
||||
+2
@@ -51,6 +51,8 @@ public:
|
||||
friend class CodificationDataOverviewProxyModel;
|
||||
|
||||
private:
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
std::shared_ptr<CodificationManagement::Interface::Dtc> m_codDtc;
|
||||
std::shared_ptr<ParticipantManagement::Interface::Dtc> m_ppmDtc;
|
||||
};
|
||||
|
||||
+3
-3
@@ -131,7 +131,7 @@ void CodificationDataOverviewView::onShowCodificationData()
|
||||
|
||||
CodificationManagement::CodificationData codificationData = m_model->getRowData(row);
|
||||
|
||||
DEBUG_LOG() << "--- onShowCodificationData() "
|
||||
DEBUG_LOG(m_logger) << "--- onShowCodificationData() "
|
||||
<< " id: " << codificationData.id();
|
||||
|
||||
CodificationDataTableView *dialog = new CodificationDataTableView;
|
||||
@@ -145,7 +145,7 @@ void CodificationDataOverviewView::onShowCodificationData()
|
||||
|
||||
void CodificationDataOverviewView::onAddCodificationData()
|
||||
{
|
||||
DEBUG_LOG() << "--- onAddCodificationData() ";
|
||||
DEBUG_LOG(m_logger) << "--- onAddCodificationData() ";
|
||||
|
||||
CodificationDataTableEditView *dialog = new CodificationDataTableEditView(this);
|
||||
dialog->init(m_dtc, m_ftc, m_session, 0);
|
||||
@@ -165,7 +165,7 @@ void CodificationDataOverviewView::onEditCodificationData()
|
||||
|
||||
CodificationManagement::CodificationData codificationData = m_model->getRowData(row);
|
||||
|
||||
DEBUG_LOG() << "--- onEditCodificationData() "
|
||||
DEBUG_LOG(m_logger) << "--- onEditCodificationData() "
|
||||
<< " id: " << codificationData.id();
|
||||
|
||||
CodificationDataTableEditView *dialog = new CodificationDataTableEditView(this);
|
||||
|
||||
+3
@@ -40,6 +40,9 @@ public:
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
void retranslate() override;
|
||||
void onSelectionChanged();
|
||||
void onShowCodificationData();
|
||||
|
||||
+31
-31
@@ -53,11 +53,11 @@ bool CodificationDataTableEditView::init(const std::shared_ptr<CodificationManag
|
||||
LtsSession::LtsSession *session,
|
||||
int codificationDataId)
|
||||
{
|
||||
DEBUG_LOG() << "CodificationDataTableEditView::init() codificationDataId: " << codificationDataId;
|
||||
DEBUG_LOG(m_logger) << "CodificationDataTableEditView::init() codificationDataId: " << codificationDataId;
|
||||
|
||||
if (!dtc || !ftc || !session)
|
||||
{
|
||||
ERROR_LOG() << "CodificationDataTableEditView::init() Invalid shared_ptr!";
|
||||
ERROR_LOG(m_logger) << "CodificationDataTableEditView::init() Invalid shared_ptr!";
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -125,7 +125,7 @@ bool CodificationDataTableEditView::init(const std::shared_ptr<CodificationManag
|
||||
|
||||
void CodificationDataTableEditView::onLoadCodificationData()
|
||||
{
|
||||
DEBUG_LOG() << "CodificationDataTableEditView::onLoadCodificationData()";
|
||||
DEBUG_LOG(m_logger) << "CodificationDataTableEditView::onLoadCodificationData()";
|
||||
|
||||
QString note;
|
||||
CSVImport csvImport(m_numCodeModel, m_authenticationCodeModel, m_logisticalTermsModel,
|
||||
@@ -135,7 +135,7 @@ void CodificationDataTableEditView::onLoadCodificationData()
|
||||
|
||||
if (result == CSVImport::LoadOk)
|
||||
{
|
||||
DEBUG_LOG() << "Load CSV data ok!";
|
||||
DEBUG_LOG(m_logger) << "Load CSV data ok!";
|
||||
LtsWidgets::LtsMessageDialog::showMessage(this, tr("Load CSV data ok. The loaded data must be taken over with the 'Apply' or 'Add' button."), tr("CSV Import Info"));
|
||||
m_ui->pteNote->setPlainText(note);
|
||||
|
||||
@@ -153,14 +153,14 @@ void CodificationDataTableEditView::onLoadCodificationData()
|
||||
m_phraseTableModel->resetMatrix();
|
||||
m_ui->pteNote->clear();
|
||||
|
||||
ERROR_LOG() << "Load CSV data failed!";
|
||||
ERROR_LOG(m_logger) << "Load CSV data failed!";
|
||||
LtsWidgets::LtsMessageDialog::showMessage(this, tr("Load CSV data failed!"), tr("CSV Import Info"));
|
||||
return;
|
||||
}
|
||||
|
||||
if (result == CSVImport::UserAbort)
|
||||
{
|
||||
DEBUG_LOG() << "Load CSV data abort by user";
|
||||
DEBUG_LOG(m_logger) << "Load CSV data abort by user";
|
||||
LtsWidgets::LtsMessageDialog::showMessage(this, tr("Load CSV data abort by user"), tr("CSV Import Info"));
|
||||
}
|
||||
}
|
||||
@@ -168,34 +168,34 @@ void CodificationDataTableEditView::onLoadCodificationData()
|
||||
|
||||
void CodificationDataTableEditView::onSaveCodificationData()
|
||||
{
|
||||
DEBUG_LOG() << "CodificationDataTableEditView::onSaveCodificationData()";
|
||||
DEBUG_LOG(m_logger) << "CodificationDataTableEditView::onSaveCodificationData()";
|
||||
|
||||
CSVExport csvExport(m_numCodeModel, m_authenticationCodeModel, m_logisticalTermsModel,
|
||||
m_phraseTableModel, m_ui->pteNote->toPlainText(), this);
|
||||
|
||||
if (!csvExport.writeCSVData())
|
||||
ERROR_LOG() << "Write CSV data to file failed! id:" << m_codificationDataId;
|
||||
ERROR_LOG(m_logger) << "Write CSV data to file failed! id:" << m_codificationDataId;
|
||||
else
|
||||
DEBUG_LOG() << "Write CSV data to file ok! id:" << m_codificationDataId;
|
||||
DEBUG_LOG(m_logger) << "Write CSV data to file ok! id:" << m_codificationDataId;
|
||||
}
|
||||
|
||||
|
||||
void CodificationDataTableEditView::loadCodificationDataFromDatabase()
|
||||
{
|
||||
m_lastDdsCodificationData = m_dtc->codificationData(m_codificationDataId);
|
||||
DEBUG_LOG() << "Load from database: ---";
|
||||
DEBUG_LOG() << "NumCodeHorizontalHeader: " << m_lastDdsCodificationData.numeralCodeTableColumnIndex();
|
||||
DEBUG_LOG() << "NumCodeVerticalHeader: " << m_lastDdsCodificationData.numeralCodeTableRowIndex();
|
||||
DEBUG_LOG(m_logger) << "Load from database: ---";
|
||||
DEBUG_LOG(m_logger) << "NumCodeHorizontalHeader: " << m_lastDdsCodificationData.numeralCodeTableColumnIndex();
|
||||
DEBUG_LOG(m_logger) << "NumCodeVerticalHeader: " << m_lastDdsCodificationData.numeralCodeTableRowIndex();
|
||||
|
||||
DEBUG_LOG() << "AuthenticationMatrix: " << m_lastDdsCodificationData.authenticationTableMatirx();
|
||||
DEBUG_LOG(m_logger) << "AuthenticationMatrix: " << m_lastDdsCodificationData.authenticationTableMatirx();
|
||||
|
||||
DEBUG_LOG() << "LogisticalTermsHorizontalHeader: " << m_lastDdsCodificationData.logisticalTermTableColumnIndex();
|
||||
DEBUG_LOG() << "LogisticalTermsVerticalHeader: " << m_lastDdsCodificationData.logisticalTermTableRowIndex();
|
||||
DEBUG_LOG() << "LogisticalTermsMatrix :" << m_lastDdsCodificationData.logisticalTermTableMatrix();
|
||||
DEBUG_LOG(m_logger) << "LogisticalTermsHorizontalHeader: " << m_lastDdsCodificationData.logisticalTermTableColumnIndex();
|
||||
DEBUG_LOG(m_logger) << "LogisticalTermsVerticalHeader: " << m_lastDdsCodificationData.logisticalTermTableRowIndex();
|
||||
DEBUG_LOG(m_logger) << "LogisticalTermsMatrix :" << m_lastDdsCodificationData.logisticalTermTableMatrix();
|
||||
|
||||
DEBUG_LOG() << "PhraseTable :" << m_lastDdsCodificationData.phraseTable();
|
||||
DEBUG_LOG(m_logger) << "PhraseTable :" << m_lastDdsCodificationData.phraseTable();
|
||||
|
||||
DEBUG_LOG() << "Note: " << m_lastDdsCodificationData.note();
|
||||
DEBUG_LOG(m_logger) << "Note: " << m_lastDdsCodificationData.note();
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -400,7 +400,7 @@ void CodificationDataTableEditView::onPrint()
|
||||
|
||||
bool CodificationDataTableEditView::apply()
|
||||
{
|
||||
DEBUG_LOG() << "CodificationDataTableEditView::onOkayCodificationData()";
|
||||
DEBUG_LOG(m_logger) << "CodificationDataTableEditView::onOkayCodificationData()";
|
||||
|
||||
|
||||
|
||||
@@ -416,28 +416,28 @@ bool CodificationDataTableEditView::apply()
|
||||
modifiedCodificationData.numeralCodeTableColumnIndex(m_numCodeModel->getHorizontalHeaderCSVString().toStdString());
|
||||
modifiedCodificationData.numeralCodeTableRowIndex(m_numCodeModel->getVerticalHeaderCSVString().toStdString()) ;
|
||||
|
||||
DEBUG_LOG() << "onOkayCodificationData() HH: " << m_numCodeModel->getHorizontalHeaderCSVString();
|
||||
DEBUG_LOG() << "onOkayCodificationData() VH: " << m_numCodeModel->getVerticalHeaderCSVString();
|
||||
DEBUG_LOG(m_logger) << "onOkayCodificationData() HH: " << m_numCodeModel->getHorizontalHeaderCSVString();
|
||||
DEBUG_LOG(m_logger) << "onOkayCodificationData() VH: " << m_numCodeModel->getVerticalHeaderCSVString();
|
||||
|
||||
|
||||
modifiedCodificationData.authenticationTableMatirx(m_authenticationCodeModel->getMatrixDataCSVString().toStdString());
|
||||
DEBUG_LOG() << "onOkayCodificationData() authMatrix: " << m_authenticationCodeModel->getMatrixDataCSVString();
|
||||
DEBUG_LOG(m_logger) << "onOkayCodificationData() authMatrix: " << m_authenticationCodeModel->getMatrixDataCSVString();
|
||||
|
||||
|
||||
modifiedCodificationData.logisticalTermTableColumnIndex(m_logisticalTermsModel->getHorizontalHeaderCSVString().toStdString());
|
||||
modifiedCodificationData.logisticalTermTableRowIndex(m_logisticalTermsModel->getVerticalHeaderCSVString().toStdString());
|
||||
modifiedCodificationData.logisticalTermTableMatrix(m_logisticalTermsModel->getMatrixDataCSVString().toStdString());
|
||||
DEBUG_LOG() << "onOkayCodificationData() HH: " << m_logisticalTermsModel->getHorizontalHeaderCSVString();
|
||||
DEBUG_LOG() << "onOkayCodificationData() VH: " << m_logisticalTermsModel->getVerticalHeaderCSVString();
|
||||
DEBUG_LOG() << "onOkayCodificationData() logTermsMatrix: " << m_logisticalTermsModel->getMatrixDataCSVString();
|
||||
DEBUG_LOG(m_logger) << "onOkayCodificationData() HH: " << m_logisticalTermsModel->getHorizontalHeaderCSVString();
|
||||
DEBUG_LOG(m_logger) << "onOkayCodificationData() VH: " << m_logisticalTermsModel->getVerticalHeaderCSVString();
|
||||
DEBUG_LOG(m_logger) << "onOkayCodificationData() logTermsMatrix: " << m_logisticalTermsModel->getMatrixDataCSVString();
|
||||
|
||||
|
||||
modifiedCodificationData.phraseTable(m_phraseTableModel->getMatrixDataCSVString().toStdString());
|
||||
DEBUG_LOG() << "onOkayCodificationData() phraseTable: " << m_phraseTableModel->getMatrixDataCSVString();
|
||||
DEBUG_LOG(m_logger) << "onOkayCodificationData() phraseTable: " << m_phraseTableModel->getMatrixDataCSVString();
|
||||
|
||||
|
||||
modifiedCodificationData.note(m_ui->pteNote->toPlainText().toStdString());
|
||||
DEBUG_LOG() << "CodificationDataTableEditView::onOkayCodificationData()";
|
||||
DEBUG_LOG(m_logger) << "CodificationDataTableEditView::onOkayCodificationData()";
|
||||
|
||||
modifiedCodificationData.identifier(m_ui->leIdentifier->text().toStdString());
|
||||
modifiedCodificationData.validityTime(m_ui->dteValidityTime->msecsSinceEpoch());
|
||||
@@ -463,16 +463,16 @@ void CodificationDataTableEditView::onExportButtonClicked()
|
||||
|
||||
int fileId = m_flmGui->saveFileContent(this, FileManagement::FileType::Text, m_session->exerciseId(), byteArray);
|
||||
if (fileId > 0)
|
||||
DEBUG_LOG() << "Saved file with id = " << fileId;
|
||||
DEBUG_LOG(m_logger) << "Saved file with id = " << fileId;
|
||||
else
|
||||
ERROR_LOG() << "Could not save file in library ";
|
||||
ERROR_LOG(m_logger) << "Could not save file in library ";
|
||||
|
||||
}
|
||||
|
||||
|
||||
void CodificationDataTableEditView::onImportButtonClicked()
|
||||
{
|
||||
DEBUG_LOG() << " onImportButtonClicked() ";
|
||||
DEBUG_LOG(m_logger) << " onImportButtonClicked() ";
|
||||
QString note;
|
||||
CSVImport csvImport(m_numCodeModel, m_authenticationCodeModel, m_logisticalTermsModel,
|
||||
m_phraseTableModel, ¬e, this);
|
||||
@@ -485,7 +485,7 @@ void CodificationDataTableEditView::onImportButtonClicked()
|
||||
{
|
||||
|
||||
|
||||
INFO_LOG() << "--- onImportButtonClicked() ";
|
||||
INFO_LOG(m_logger) << "--- onImportButtonClicked() ";
|
||||
csvImport.loadCSVDataByteArray(content);
|
||||
m_ui->pteNote->setPlainText(note);
|
||||
}
|
||||
|
||||
+3
@@ -64,6 +64,9 @@ private slots:
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
void retranslate() override;
|
||||
void loadCodificationDataFromDatabase();
|
||||
|
||||
|
||||
+13
-13
@@ -56,7 +56,7 @@ bool CodificationDataTableView::init(const std::shared_ptr<CodificationManagemen
|
||||
int partyId,
|
||||
int codificationDataId)
|
||||
{
|
||||
DEBUG_LOG() << "CodificationDataTableView::init()";
|
||||
DEBUG_LOG(m_logger) << "CodificationDataTableView::init()";
|
||||
|
||||
m_dtc = dtc;
|
||||
m_ftc = ftc;
|
||||
@@ -66,14 +66,14 @@ bool CodificationDataTableView::init(const std::shared_ptr<CodificationManagemen
|
||||
|
||||
if (!m_dtc || !m_ftc || !m_session)
|
||||
{
|
||||
ERROR_LOG() << "CodificationDataTableView::init() Invalid shared_ptr!";
|
||||
ERROR_LOG(m_logger) << "CodificationDataTableView::init() Invalid shared_ptr!";
|
||||
return false;
|
||||
}
|
||||
|
||||
if (codificationDataId < 0)
|
||||
{
|
||||
LtsWidgets::LtsMessageDialog::showMessage(this, tr("Invalid codification Data Id. Probably the table is not assigned to any party."));
|
||||
ERROR_LOG() << "CodificationDataTableView::init() Invalid codificationDataId: " << codificationDataId;
|
||||
ERROR_LOG(m_logger) << "CodificationDataTableView::init() Invalid codificationDataId: " << codificationDataId;
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -112,22 +112,22 @@ bool CodificationDataTableView::init(const std::shared_ptr<CodificationManagemen
|
||||
|
||||
void CodificationDataTableView::loadCodificationDataFromDatabase()
|
||||
{
|
||||
DEBUG_LOG() << "CodificationDataTableView::loadCodificationDataFromDatabase()";
|
||||
DEBUG_LOG(m_logger) << "CodificationDataTableView::loadCodificationDataFromDatabase()";
|
||||
|
||||
m_lastDdsCodificationData = m_dtc->codificationData(m_codificationDataId);
|
||||
DEBUG_LOG() << "Load from database: ";
|
||||
DEBUG_LOG() << "NumCodeHorizontalHeader: " << m_lastDdsCodificationData.numeralCodeTableColumnIndex();
|
||||
DEBUG_LOG() << "NumCodeVerticalHeader: " << m_lastDdsCodificationData.numeralCodeTableRowIndex();
|
||||
DEBUG_LOG(m_logger) << "Load from database: ";
|
||||
DEBUG_LOG(m_logger) << "NumCodeHorizontalHeader: " << m_lastDdsCodificationData.numeralCodeTableColumnIndex();
|
||||
DEBUG_LOG(m_logger) << "NumCodeVerticalHeader: " << m_lastDdsCodificationData.numeralCodeTableRowIndex();
|
||||
|
||||
DEBUG_LOG() << "LogisticalTermsHorizontalHeader: " << m_lastDdsCodificationData.logisticalTermTableColumnIndex();
|
||||
DEBUG_LOG() << "LogisticalTermsVerticalHeader: " << m_lastDdsCodificationData.logisticalTermTableRowIndex();
|
||||
DEBUG_LOG() << "LogisticalTermsMatrix: " << m_lastDdsCodificationData.logisticalTermTableMatrix();
|
||||
DEBUG_LOG(m_logger) << "LogisticalTermsHorizontalHeader: " << m_lastDdsCodificationData.logisticalTermTableColumnIndex();
|
||||
DEBUG_LOG(m_logger) << "LogisticalTermsVerticalHeader: " << m_lastDdsCodificationData.logisticalTermTableRowIndex();
|
||||
DEBUG_LOG(m_logger) << "LogisticalTermsMatrix: " << m_lastDdsCodificationData.logisticalTermTableMatrix();
|
||||
|
||||
DEBUG_LOG() << "AuthenticationMatrix: " << m_lastDdsCodificationData.authenticationTableMatirx();
|
||||
DEBUG_LOG(m_logger) << "AuthenticationMatrix: " << m_lastDdsCodificationData.authenticationTableMatirx();
|
||||
|
||||
DEBUG_LOG() << "PhraseTable: " << m_lastDdsCodificationData.phraseTable();
|
||||
DEBUG_LOG(m_logger) << "PhraseTable: " << m_lastDdsCodificationData.phraseTable();
|
||||
|
||||
DEBUG_LOG() << "Note: " << m_lastDdsCodificationData.note();
|
||||
DEBUG_LOG(m_logger) << "Note: " << m_lastDdsCodificationData.note();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
+2
@@ -47,6 +47,8 @@ private Q_SLOTS:
|
||||
DataModification modType);
|
||||
|
||||
private:
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
void retranslate() override;
|
||||
void loadCodificationDataFromDatabase();
|
||||
void onPrint();
|
||||
|
||||
+4
-5
@@ -20,14 +20,13 @@ CSVExport::CSVExport(const NumeralCodeModel *numCodeModel,
|
||||
const LogisticalTermsModel *logisticalTermsModel,
|
||||
const PhraseTableModel *phraseTableModel,
|
||||
const QString ¬e,
|
||||
QWidget *parent)
|
||||
: QWidget(parent)
|
||||
QWidget *parent) : QWidget(parent)
|
||||
, m_numCodeModel(numCodeModel)
|
||||
, m_authenticationCodeModel(authenticationCodeModel)
|
||||
, m_logisticalTermsModel(logisticalTermsModel)
|
||||
, m_phraseTableModel(phraseTableModel)
|
||||
, m_note(note)
|
||||
{
|
||||
, m_note(note),
|
||||
m_logger(NGL::NGLLoggerBootstrap::getLogger()) {
|
||||
}
|
||||
|
||||
|
||||
@@ -74,7 +73,7 @@ QByteArray CSVExport::exportToByteArray() const
|
||||
|
||||
bool CSVExport::writeCSVData()
|
||||
{
|
||||
DEBUG_LOG() << "writeCSVData()";
|
||||
DEBUG_LOG(m_logger) << "writeCSVData()";
|
||||
|
||||
QFileDialog dialog;
|
||||
dialog.setNameFilter(tr("CSV File (*.csv)"));
|
||||
|
||||
+3
@@ -35,6 +35,9 @@ private Q_SLOTS:
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
const NumeralCodeModel *m_numCodeModel;
|
||||
const AuthenticationCodeModel *m_authenticationCodeModel;
|
||||
const LogisticalTermsModel *m_logisticalTermsModel;
|
||||
|
||||
+50
-51
@@ -22,14 +22,13 @@ CSVImport::CSVImport(NumeralCodeModel *numCodeModel,
|
||||
LogisticalTermsModel *logisticalTermsModel,
|
||||
PhraseTableModel *phraseTableModel,
|
||||
QString *note,
|
||||
QWidget *parent)
|
||||
: QWidget(parent)
|
||||
QWidget *parent) : QWidget(parent)
|
||||
, m_numCodeModel(numCodeModel)
|
||||
, m_authenticationCodeModel(authenticationCodeModel)
|
||||
, m_logisticalTermsModel(logisticalTermsModel)
|
||||
, m_phraseTableModel(phraseTableModel)
|
||||
, m_note(note)
|
||||
{
|
||||
, m_note(note),
|
||||
m_logger(NGL::NGLLoggerBootstrap::getLogger()) {
|
||||
}
|
||||
|
||||
|
||||
@@ -78,7 +77,7 @@ CSVImport::CSVImportResult CSVImport::loadCSVDataByteArray(QByteArray content)
|
||||
|
||||
if (qbaLine == "<Numeral Code Horizontal Header>\n")
|
||||
{
|
||||
DEBUG_LOG() << "found " << qbaLine;
|
||||
DEBUG_LOG(m_logger) << "found " << qbaLine;
|
||||
qba = &qbaNumCodeHorizontalHeader;
|
||||
desiredCvsSeperatorsPerLine = 12;
|
||||
++csvKeywordCount;
|
||||
@@ -87,7 +86,7 @@ CSVImport::CSVImportResult CSVImport::loadCSVDataByteArray(QByteArray content)
|
||||
|
||||
if (qbaLine == "<Numeral Code Vertical Header>\n")
|
||||
{
|
||||
DEBUG_LOG() << "found " << qbaLine;
|
||||
DEBUG_LOG(m_logger) << "found " << qbaLine;
|
||||
qba = &qbaNumCodeVerticalHeader;
|
||||
desiredCvsSeperatorsPerLine = 0;
|
||||
++csvKeywordCount;
|
||||
@@ -96,7 +95,7 @@ CSVImport::CSVImportResult CSVImport::loadCSVDataByteArray(QByteArray content)
|
||||
|
||||
if (qbaLine == "<Authentication Code Matrix>\n")
|
||||
{
|
||||
DEBUG_LOG() << "found " << qbaLine;
|
||||
DEBUG_LOG(m_logger) << "found " << qbaLine;
|
||||
qba = &qbaAuthenticationCodeMatrix;
|
||||
desiredCvsSeperatorsPerLine = 4;
|
||||
++csvKeywordCount;
|
||||
@@ -105,7 +104,7 @@ CSVImport::CSVImportResult CSVImport::loadCSVDataByteArray(QByteArray content)
|
||||
|
||||
if (qbaLine == "<Logistical Terms Table Horizontal Header>\n")
|
||||
{
|
||||
DEBUG_LOG() << "found " << qbaLine;
|
||||
DEBUG_LOG(m_logger) << "found " << qbaLine;
|
||||
qba = &qbaLogTermsTableHorizontalHeader;
|
||||
desiredCvsSeperatorsPerLine = 4;
|
||||
++csvKeywordCount;
|
||||
@@ -114,7 +113,7 @@ CSVImport::CSVImportResult CSVImport::loadCSVDataByteArray(QByteArray content)
|
||||
|
||||
if (qbaLine == "<Logistical Terms Table Vertical Header>\n")
|
||||
{
|
||||
DEBUG_LOG() << "found " << qbaLine;
|
||||
DEBUG_LOG(m_logger) << "found " << qbaLine;
|
||||
qba = &qbaLogTermsTableVerticalHeader;
|
||||
desiredCvsSeperatorsPerLine = 0;
|
||||
++csvKeywordCount;
|
||||
@@ -123,7 +122,7 @@ CSVImport::CSVImportResult CSVImport::loadCSVDataByteArray(QByteArray content)
|
||||
|
||||
if (qbaLine == "<Logistical Terms Table Matrix>\n")
|
||||
{
|
||||
DEBUG_LOG() << "found " << qbaLine;
|
||||
DEBUG_LOG(m_logger) << "found " << qbaLine;
|
||||
qba = &qbaLogTermsTableMatrix;
|
||||
desiredCvsSeperatorsPerLine = 4;
|
||||
++csvKeywordCount;
|
||||
@@ -132,7 +131,7 @@ CSVImport::CSVImportResult CSVImport::loadCSVDataByteArray(QByteArray content)
|
||||
|
||||
if (qbaLine == "<Phrase Table Matrix>\n")
|
||||
{
|
||||
DEBUG_LOG() << "found " << qbaLine;
|
||||
DEBUG_LOG(m_logger) << "found " << qbaLine;
|
||||
qba = &qbaPhraseTableMatrix;
|
||||
desiredCvsSeperatorsPerLine = 1;
|
||||
++csvKeywordCount;
|
||||
@@ -141,7 +140,7 @@ CSVImport::CSVImportResult CSVImport::loadCSVDataByteArray(QByteArray content)
|
||||
|
||||
if (qbaLine == "<Note>\n")
|
||||
{
|
||||
DEBUG_LOG() << "found " << qbaLine;
|
||||
DEBUG_LOG(m_logger) << "found " << qbaLine;
|
||||
qba = &qbaNote;
|
||||
desiredCvsSeperatorsPerLine = 0;
|
||||
++csvKeywordCount;
|
||||
@@ -230,23 +229,23 @@ CSVImport::CSVImportResult CSVImport::loadCSVDataByteArray(QByteArray content)
|
||||
|
||||
if (csvKeywordCount != 8)
|
||||
{
|
||||
ERROR_LOG() << "Load csv data failed! Invalid csvKeywordCount. Soll/Ist: 8/" << csvKeywordCount;
|
||||
ERROR_LOG(m_logger) << "Load csv data failed! Invalid csvKeywordCount. Soll/Ist: 8/" << csvKeywordCount;
|
||||
LtsWidgets::LtsMessageDialog::showMessage(this, tr("Load csv data failed! Invalid number of cvs keywords."), tr("CSV Load Error"));
|
||||
return CSVImportResult::LoadFailed;
|
||||
}
|
||||
|
||||
|
||||
DEBUG_LOG() << "Load csv ready... ";
|
||||
DEBUG_LOG() << "\n-----------start show load csv data blocks -------------------------\n";
|
||||
DEBUG_LOG() << "\n<Block ... <Numeral Code Horizontal Header>: \"" << qbaNumCodeHorizontalHeader << "\"\n";
|
||||
DEBUG_LOG() << "\n<Block ... <Numeral Code Vertical Header>: \"" << qbaNumCodeVerticalHeader << "\"\n";
|
||||
DEBUG_LOG() << "\n<Block ... <Authentication Code Matrix>: \"" << qbaAuthenticationCodeMatrix << "\"\n";
|
||||
DEBUG_LOG() << "\n<Block ... <Logistical Terms Table Horizontal Header>: \"" << qbaLogTermsTableHorizontalHeader << "\"\n";
|
||||
DEBUG_LOG() << "\n<Block ... <Logistical Terms Table Vertical Header>: \"" << qbaLogTermsTableVerticalHeader << "\"\n";
|
||||
DEBUG_LOG() << "\n<Block ... <Logistical Terms Table Matrix>: \"" << qbaLogTermsTableMatrix << "\"\n";
|
||||
DEBUG_LOG() << "\n<Block ... <Phrase Table Matrix>: \"" << qbaPhraseTableMatrix << "\"\n";
|
||||
DEBUG_LOG() << "\n<Block ... <Note>: \"" << qbaNote << "\"\n";
|
||||
DEBUG_LOG() << "\n-----------end of show load csv data blocks -------------------------\n";
|
||||
DEBUG_LOG(m_logger) << "Load csv ready... ";
|
||||
DEBUG_LOG(m_logger) << "\n-----------start show load csv data blocks -------------------------\n";
|
||||
DEBUG_LOG(m_logger) << "\n<Block ... <Numeral Code Horizontal Header>: \"" << qbaNumCodeHorizontalHeader << "\"\n";
|
||||
DEBUG_LOG(m_logger) << "\n<Block ... <Numeral Code Vertical Header>: \"" << qbaNumCodeVerticalHeader << "\"\n";
|
||||
DEBUG_LOG(m_logger) << "\n<Block ... <Authentication Code Matrix>: \"" << qbaAuthenticationCodeMatrix << "\"\n";
|
||||
DEBUG_LOG(m_logger) << "\n<Block ... <Logistical Terms Table Horizontal Header>: \"" << qbaLogTermsTableHorizontalHeader << "\"\n";
|
||||
DEBUG_LOG(m_logger) << "\n<Block ... <Logistical Terms Table Vertical Header>: \"" << qbaLogTermsTableVerticalHeader << "\"\n";
|
||||
DEBUG_LOG(m_logger) << "\n<Block ... <Logistical Terms Table Matrix>: \"" << qbaLogTermsTableMatrix << "\"\n";
|
||||
DEBUG_LOG(m_logger) << "\n<Block ... <Phrase Table Matrix>: \"" << qbaPhraseTableMatrix << "\"\n";
|
||||
DEBUG_LOG(m_logger) << "\n<Block ... <Note>: \"" << qbaNote << "\"\n";
|
||||
DEBUG_LOG(m_logger) << "\n-----------end of show load csv data blocks -------------------------\n";
|
||||
|
||||
|
||||
qbaNumCodeHorizontalHeader = qbaNumCodeHorizontalHeader.trimmed();
|
||||
@@ -305,7 +304,7 @@ CSVImport::CSVImportResult CSVImport::loadCSVDataByteArray(QByteArray content)
|
||||
|
||||
CSVImport::CSVImportResult CSVImport::loadCSVData()
|
||||
{
|
||||
DEBUG_LOG() << "loadCSVData()";
|
||||
DEBUG_LOG(m_logger) << "loadCSVData()";
|
||||
|
||||
QFileDialog dialog;
|
||||
dialog.setNameFilter(tr("CSV File (*.csv)"));
|
||||
@@ -340,12 +339,12 @@ CSVImport::CSVImportResult CSVImport::loadCSVData()
|
||||
bool CSVImport::checkNumCodeHorizontalHeader(const QByteArray &qbaNumCodeHorizontalHeader)
|
||||
{
|
||||
|
||||
DEBUG_LOG() << "Data: \"" << qbaNumCodeHorizontalHeader << "\"";
|
||||
DEBUG_LOG() << "Data.size: Soll/Ist: 13 + 12 = 25/" << qbaNumCodeHorizontalHeader.size();
|
||||
DEBUG_LOG(m_logger) << "Data: \"" << qbaNumCodeHorizontalHeader << "\"";
|
||||
DEBUG_LOG(m_logger) << "Data.size: Soll/Ist: 13 + 12 = 25/" << qbaNumCodeHorizontalHeader.size();
|
||||
|
||||
if (qbaNumCodeHorizontalHeader.size() == 25)
|
||||
return true;
|
||||
ERROR_LOG() << "Load csv data 'Numeral Code Horizontal Header' failed!";
|
||||
ERROR_LOG(m_logger) << "Load csv data 'Numeral Code Horizontal Header' failed!";
|
||||
LtsWidgets::LtsMessageDialog::showMessage(this, tr("Load csv data 'Numeral Code Horizontal Header' failed!"), tr("CSV Load Error"));
|
||||
return false;
|
||||
}
|
||||
@@ -354,12 +353,12 @@ bool CSVImport::checkNumCodeHorizontalHeader(const QByteArray &qbaNumCodeHorizon
|
||||
bool CSVImport::checkNumCodeVerticalHeader(const QByteArray &qbaNumCodeVerticalHeader)
|
||||
{
|
||||
|
||||
DEBUG_LOG() << "Data: \"" << qbaNumCodeVerticalHeader << "\"";
|
||||
DEBUG_LOG() << "Data.size: Soll/Ist: 13 + 12 = 25/" << qbaNumCodeVerticalHeader.size();
|
||||
DEBUG_LOG(m_logger) << "Data: \"" << qbaNumCodeVerticalHeader << "\"";
|
||||
DEBUG_LOG(m_logger) << "Data.size: Soll/Ist: 13 + 12 = 25/" << qbaNumCodeVerticalHeader.size();
|
||||
|
||||
if (qbaNumCodeVerticalHeader.size() == 25)
|
||||
return true;
|
||||
ERROR_LOG() << "Load csv data 'Numeral Code Vertical Header' failed!";
|
||||
ERROR_LOG(m_logger) << "Load csv data 'Numeral Code Vertical Header' failed!";
|
||||
LtsWidgets::LtsMessageDialog::showMessage(this, tr("Load csv data 'Numeral Code Vertical Header' failed!"), tr("CSV Load Error"));
|
||||
return false;
|
||||
}
|
||||
@@ -368,7 +367,7 @@ bool CSVImport::checkNumCodeVerticalHeader(const QByteArray &qbaNumCodeVerticalH
|
||||
bool CSVImport::checkAuthenticationCodeMatrix(QByteArray &qbaAuthenticationCodeMatrix)
|
||||
{
|
||||
|
||||
DEBUG_LOG() << "Data: \"" << qbaAuthenticationCodeMatrix << "\"";
|
||||
DEBUG_LOG(m_logger) << "Data: \"" << qbaAuthenticationCodeMatrix << "\"";
|
||||
|
||||
QByteArray qbaOutMatrix;
|
||||
|
||||
@@ -389,13 +388,13 @@ bool CSVImport::checkAuthenticationCodeMatrix(QByteArray &qbaAuthenticationCodeM
|
||||
|
||||
qbaAuthenticationCodeMatrix = qbaOutMatrix;
|
||||
|
||||
DEBUG_LOG() << "Data.size: Soll/Ist: 13 * (5*2 + 4 + 1) -1 = 194 /" << qbaAuthenticationCodeMatrix.size();
|
||||
DEBUG_LOG(m_logger) << "Data.size: Soll/Ist: 13 * (5*2 + 4 + 1) -1 = 194 /" << qbaAuthenticationCodeMatrix.size();
|
||||
|
||||
if (qbaAuthenticationCodeMatrix.size() == 194)
|
||||
return true;
|
||||
else
|
||||
{
|
||||
ERROR_LOG() << "Load csv data 'Authentication Code Matrix' failed!";
|
||||
ERROR_LOG(m_logger) << "Load csv data 'Authentication Code Matrix' failed!";
|
||||
LtsWidgets::LtsMessageDialog::showMessage(this, tr("Load csv data 'Authentication Code Matrix' failed!"), tr("CSV Load Error"));
|
||||
return false;
|
||||
}
|
||||
@@ -405,14 +404,14 @@ bool CSVImport::checkAuthenticationCodeMatrix(QByteArray &qbaAuthenticationCodeM
|
||||
bool CSVImport::checkLogTermsTableHorizontalHeader(const QByteArray &qbaLogTermsTableHorizontalHeader)
|
||||
{
|
||||
|
||||
DEBUG_LOG() << "Data: \"" << qbaLogTermsTableHorizontalHeader << "\"";
|
||||
DEBUG_LOG() << "Data.size: Soll/Ist: 5 + 4 = 9/" << qbaLogTermsTableHorizontalHeader.size();
|
||||
DEBUG_LOG(m_logger) << "Data: \"" << qbaLogTermsTableHorizontalHeader << "\"";
|
||||
DEBUG_LOG(m_logger) << "Data.size: Soll/Ist: 5 + 4 = 9/" << qbaLogTermsTableHorizontalHeader.size();
|
||||
|
||||
if (qbaLogTermsTableHorizontalHeader.size() == 9)
|
||||
return true;
|
||||
else
|
||||
{
|
||||
ERROR_LOG() << "Load csv data 'Logistical Terms Table Horizontal Header' failed!";
|
||||
ERROR_LOG(m_logger) << "Load csv data 'Logistical Terms Table Horizontal Header' failed!";
|
||||
LtsWidgets::LtsMessageDialog::showMessage(this, tr("Load csv data 'Logistical Terms Table Horizontal Header' failed!"), tr("CSV Load Error"));
|
||||
return false;
|
||||
}
|
||||
@@ -422,14 +421,14 @@ bool CSVImport::checkLogTermsTableHorizontalHeader(const QByteArray &qbaLogTerms
|
||||
bool CSVImport::checkLogTermsTableVerticalHeader(const QByteArray &qbaLogTermsTableVerticalHeader)
|
||||
{
|
||||
|
||||
DEBUG_LOG() << "Data: \"" << qbaLogTermsTableVerticalHeader << "\"";
|
||||
DEBUG_LOG() << "Data.size: Soll/Ist: 5 + 4 = 9/" << qbaLogTermsTableVerticalHeader.size();
|
||||
DEBUG_LOG(m_logger) << "Data: \"" << qbaLogTermsTableVerticalHeader << "\"";
|
||||
DEBUG_LOG(m_logger) << "Data.size: Soll/Ist: 5 + 4 = 9/" << qbaLogTermsTableVerticalHeader.size();
|
||||
|
||||
if (qbaLogTermsTableVerticalHeader.size() == 9)
|
||||
return true;
|
||||
else
|
||||
{
|
||||
ERROR_LOG() << "Load csv data 'Logistical Terms Table Vertical Header' failed!";
|
||||
ERROR_LOG(m_logger) << "Load csv data 'Logistical Terms Table Vertical Header' failed!";
|
||||
LtsWidgets::LtsMessageDialog::showMessage(this, tr("Load csv data 'Logistical Terms Table Vertical Header' failed!"), tr("CSV Load Error"));
|
||||
return false;
|
||||
}
|
||||
@@ -439,12 +438,12 @@ bool CSVImport::checkLogTermsTableVerticalHeader(const QByteArray &qbaLogTermsTa
|
||||
bool CSVImport::checkLogTermsTableMatrix(const QByteArray &qbaLogTermsTableMatrix)
|
||||
{
|
||||
|
||||
DEBUG_LOG() << "Data: \"" << qbaLogTermsTableMatrix << "\"";
|
||||
DEBUG_LOG(m_logger) << "Data: \"" << qbaLogTermsTableMatrix << "\"";
|
||||
|
||||
|
||||
QStringList qsl = m_logisticalTermsModel->splitQuotedStringToRows(QString::fromLatin1(qbaLogTermsTableMatrix));
|
||||
|
||||
DEBUG_LOG() << "Line entry size: Soll/Ist: 5/" << qsl.size();
|
||||
DEBUG_LOG(m_logger) << "Line entry size: Soll/Ist: 5/" << qsl.size();
|
||||
|
||||
|
||||
if (qsl.size() == 5)
|
||||
@@ -464,7 +463,7 @@ bool CSVImport::checkLogTermsTableMatrix(const QByteArray &qbaLogTermsTableMatri
|
||||
|
||||
if (qsEntry.size() > 10)
|
||||
{
|
||||
ERROR_LOG() << "Load csv data 'Logistical Terms Table Matrix' failed! Maximum number of 10 characters per entry line exceeded in cell " << i + 1;
|
||||
ERROR_LOG(m_logger) << "Load csv data 'Logistical Terms Table Matrix' failed! Maximum number of 10 characters per entry line exceeded in cell " << i + 1;
|
||||
LtsWidgets::LtsMessageDialog::showMessage(this, tr("Load csv data 'Logistical Terms Table Matrix' failed! Maximum number of 10 characters per entry line exceeded."), tr("CSV Load Error"));
|
||||
return false;
|
||||
}
|
||||
@@ -476,7 +475,7 @@ bool CSVImport::checkLogTermsTableMatrix(const QByteArray &qbaLogTermsTableMatri
|
||||
|
||||
if ((qsEntry.size() > 21) || (qsEntry.indexOf(QLatin1Char('\n')) > 10))
|
||||
{
|
||||
ERROR_LOG() << "Load csv data 'Logistical Terms Table Matrix' failed! Maximum number of 10 characters per entry line exceeded in cell " << i + 1;
|
||||
ERROR_LOG(m_logger) << "Load csv data 'Logistical Terms Table Matrix' failed! Maximum number of 10 characters per entry line exceeded in cell " << i + 1;
|
||||
LtsWidgets::LtsMessageDialog::showMessage(this, tr("Load csv data 'Logistical Terms Table Matrix' failed! Maximum number of 10 characters per entry line exceeded."), tr("CSV Load Error"));
|
||||
return false;
|
||||
}
|
||||
@@ -486,7 +485,7 @@ bool CSVImport::checkLogTermsTableMatrix(const QByteArray &qbaLogTermsTableMatri
|
||||
}
|
||||
else
|
||||
{
|
||||
ERROR_LOG() << "Load csv data 'Logistical Terms Table Matrix' failed!";
|
||||
ERROR_LOG(m_logger) << "Load csv data 'Logistical Terms Table Matrix' failed!";
|
||||
LtsWidgets::LtsMessageDialog::showMessage(this, tr("Load csv data 'Logistical Terms Table Matrix' failed!"), tr("CSV Load Error"));
|
||||
return false;
|
||||
}
|
||||
@@ -496,14 +495,14 @@ bool CSVImport::checkLogTermsTableMatrix(const QByteArray &qbaLogTermsTableMatri
|
||||
bool CSVImport::checkPhraseTableMatrix(const QByteArray &qbaPhraseTableMatrix)
|
||||
{
|
||||
|
||||
DEBUG_LOG() << "Data: \"" << qbaPhraseTableMatrix << "\"";
|
||||
DEBUG_LOG(m_logger) << "Data: \"" << qbaPhraseTableMatrix << "\"";
|
||||
|
||||
const QList<QByteArray> qbaLinesList = qbaPhraseTableMatrix.split('\n');
|
||||
|
||||
|
||||
if (qbaLinesList.size() != 13)
|
||||
{
|
||||
ERROR_LOG() << "Load csv data 'Phrase Table Matrix' failed! Invalid Line entry size: Soll/Ist: 13/" << qbaLinesList.size();
|
||||
ERROR_LOG(m_logger) << "Load csv data 'Phrase Table Matrix' failed! Invalid Line entry size: Soll/Ist: 13/" << qbaLinesList.size();
|
||||
LtsWidgets::LtsMessageDialog::showMessage(this, tr("Load csv data 'Phrase Table Matrix' failed! Invalid Line entry size."), tr("CSV Load Error"));
|
||||
return false;
|
||||
}
|
||||
@@ -516,7 +515,7 @@ bool CSVImport::checkPhraseTableMatrix(const QByteArray &qbaPhraseTableMatrix)
|
||||
{
|
||||
if (qbaLine.at(0).isEmpty() || qbaLine.at(1).isEmpty() || qbaLine.at(0).size() > 15 || qbaLine.at(1).size() > 15)
|
||||
{
|
||||
ERROR_LOG() << "Load csv data 'Phrase Table Matrix' failed! Invalid number of entrys or entry size is < 1 or >> 15. ";
|
||||
ERROR_LOG(m_logger) << "Load csv data 'Phrase Table Matrix' failed! Invalid number of entrys or entry size is < 1 or >> 15. ";
|
||||
LtsWidgets::LtsMessageDialog::showMessage(this, tr("Load csv data 'Phrase Table Matrix' failed! Invalid number of entrys or entry size is less than 1 or greater 15."), tr("CSV Load Error"));
|
||||
return false;
|
||||
}
|
||||
@@ -525,7 +524,7 @@ bool CSVImport::checkPhraseTableMatrix(const QByteArray &qbaPhraseTableMatrix)
|
||||
}
|
||||
else
|
||||
{
|
||||
ERROR_LOG() << "Load csv data 'Phrase Table Matrix' failed! Invalid number of entrys or empty entry per line. ";
|
||||
ERROR_LOG(m_logger) << "Load csv data 'Phrase Table Matrix' failed! Invalid number of entrys or empty entry per line. ";
|
||||
LtsWidgets::LtsMessageDialog::showMessage(this, tr("Load csv data 'Phrase Table Matrix' failed! Invalid number of entrys or empty entry per line."), tr("CSV Load Error"));
|
||||
return false;
|
||||
}
|
||||
@@ -558,7 +557,7 @@ bool CSVImport::removeRedundantCvsSeperators(QByteArray &qbaLine, int desiredVal
|
||||
|
||||
if (seperatorCnt < desiredValue)
|
||||
{
|
||||
ERROR_LOG() << "Seperator values less than desired values.";
|
||||
ERROR_LOG(m_logger) << "Seperator values less than desired values.";
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -567,7 +566,7 @@ bool CSVImport::removeRedundantCvsSeperators(QByteArray &qbaLine, int desiredVal
|
||||
qbaLine.remove(qbaLine.lastIndexOf(';'), 1);
|
||||
--seperatorCnt;
|
||||
}
|
||||
DEBUG_LOG() << "+++Data: \"" << qbaLine << "\"" << " Soll/Ist:: " << desiredValue << "/" << seperatorCnt;
|
||||
DEBUG_LOG(m_logger) << "+++Data: \"" << qbaLine << "\"" << " Soll/Ist:: " << desiredValue << "/" << seperatorCnt;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
+2
@@ -42,6 +42,8 @@ public:
|
||||
CSVImportResult loadCSVDataByteArray(QByteArray content);
|
||||
|
||||
private:
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
bool checkNumCodeHorizontalHeader(const QByteArray &qbaNumCodeHorizontalHeader);
|
||||
bool checkNumCodeVerticalHeader(const QByteArray &qbaNumCodeVerticalHeader);
|
||||
bool checkAuthenticationCodeMatrix(QByteArray &qbaAuthenticationCodeMatrix);
|
||||
|
||||
+16
-16
@@ -18,7 +18,7 @@ LogisticalTermsModel::LogisticalTermsModel(QWidget *parent)
|
||||
, m_codificationDataId(0)
|
||||
, m_isEditMode(false)
|
||||
{
|
||||
DEBUG_LOG() << "ctor LogisticalTermsModel";
|
||||
DEBUG_LOG(m_logger) << "ctor LogisticalTermsModel";
|
||||
m_matrix.resize(s_matrixCount);
|
||||
for (int i = 0; i < s_matrixCount; ++i)
|
||||
m_matrix[i].resize(s_matrixCount);
|
||||
@@ -30,11 +30,11 @@ bool LogisticalTermsModel::init(const std::shared_ptr<CodificationManagement::In
|
||||
int codificationDataId,
|
||||
bool isEditMode)
|
||||
{
|
||||
DEBUG_LOG() << "LogisticalTerms::init()";
|
||||
DEBUG_LOG(m_logger) << "LogisticalTerms::init()";
|
||||
if (!dtc)
|
||||
return false;
|
||||
|
||||
DEBUG_LOG() << "LogisticalTermsModel::init()...";
|
||||
DEBUG_LOG(m_logger) << "LogisticalTermsModel::init()...";
|
||||
|
||||
m_dtc = dtc;
|
||||
m_codificationDataId = codificationDataId;
|
||||
@@ -82,7 +82,7 @@ bool LogisticalTermsModel::setColumnSelectionValuesCSV(const QString &csvData)
|
||||
|
||||
if (slColumns.size() != m_ColumnSelectionValues.size())
|
||||
{
|
||||
ERROR_LOG() << "Invalid column data count." << " codificationDataId: " << m_codificationDataId
|
||||
ERROR_LOG(m_logger) << "Invalid column data count." << " codificationDataId: " << m_codificationDataId
|
||||
<< " Soll/Ist: " << m_ColumnSelectionValues.size() << "/" << slColumns.size();
|
||||
m_ColumnSelectionValues.fill(QLatin1Char(' '));
|
||||
return false;
|
||||
@@ -93,7 +93,7 @@ bool LogisticalTermsModel::setColumnSelectionValuesCSV(const QString &csvData)
|
||||
const QStringRef &qs = slColumns.at(i);
|
||||
if (qs.size() != 1)
|
||||
{
|
||||
ERROR_LOG() << "Invalid column data value at id: " << i
|
||||
ERROR_LOG(m_logger) << "Invalid column data value at id: " << i
|
||||
<< " codificationDataId: " << m_codificationDataId;
|
||||
return false;
|
||||
}
|
||||
@@ -113,7 +113,7 @@ bool LogisticalTermsModel::setRowSelectionValuesCSV(const QString &csvData)
|
||||
|
||||
if (slRows.size() != m_RowSelectionValues.size())
|
||||
{
|
||||
ERROR_LOG() << "Invalid row data count." << " codificationDataId: " << m_codificationDataId
|
||||
ERROR_LOG(m_logger) << "Invalid row data count." << " codificationDataId: " << m_codificationDataId
|
||||
<< " Soll/Ist: " << m_RowSelectionValues.size() << "/" << slRows.size()
|
||||
<< " Default values will be used. ";
|
||||
m_RowSelectionValues.fill(QLatin1Char(' '));
|
||||
@@ -125,7 +125,7 @@ bool LogisticalTermsModel::setRowSelectionValuesCSV(const QString &csvData)
|
||||
const QStringRef &qs = slRows.at(i);
|
||||
if (qs.size() != 1)
|
||||
{
|
||||
ERROR_LOG() << "Invalid row data value at id: " << i
|
||||
ERROR_LOG(m_logger) << "Invalid row data value at id: " << i
|
||||
<< " codificationDataId: " << m_codificationDataId;
|
||||
return false;
|
||||
}
|
||||
@@ -138,20 +138,20 @@ bool LogisticalTermsModel::setRowSelectionValuesCSV(const QString &csvData)
|
||||
|
||||
bool LogisticalTermsModel::setMatrixValuesCSV(const QString &csvData)
|
||||
{
|
||||
DEBUG_LOG() << "setMatrixValuesCSV: " << csvData;
|
||||
DEBUG_LOG(m_logger) << "setMatrixValuesCSV: " << csvData;
|
||||
|
||||
const QStringList slRows = splitQuotedStringToRows(csvData);
|
||||
|
||||
if (slRows.isEmpty())
|
||||
{
|
||||
ERROR_LOG() << "split quoted csv data failed! " << " codificationDataId: " << m_codificationDataId
|
||||
ERROR_LOG(m_logger) << "split quoted csv data failed! " << " codificationDataId: " << m_codificationDataId
|
||||
<< " csvData: " << csvData;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (slRows.size() != m_matrix.size())
|
||||
{
|
||||
ERROR_LOG() << "Invalid row data count." << " codificationDataId: " << m_codificationDataId
|
||||
ERROR_LOG(m_logger) << "Invalid row data count." << " codificationDataId: " << m_codificationDataId
|
||||
<< " Soll/Ist: " << m_matrix.size() << "/" << slRows.size();
|
||||
return false;
|
||||
}
|
||||
@@ -161,7 +161,7 @@ bool LogisticalTermsModel::setMatrixValuesCSV(const QString &csvData)
|
||||
const QVector<QStringRef> slColumns = slRows[row].splitRef(QLatin1Char(';'));
|
||||
if (slColumns.size() != m_matrix.size())
|
||||
{
|
||||
ERROR_LOG() << "Invalid column data count." << " codificationDataId: " << m_codificationDataId
|
||||
ERROR_LOG(m_logger) << "Invalid column data count." << " codificationDataId: " << m_codificationDataId
|
||||
<< " Soll/Ist: " << m_matrix.size() << "/" << slColumns.size();
|
||||
return false;
|
||||
}
|
||||
@@ -217,7 +217,7 @@ QString LogisticalTermsModel::getMatrixDataCSVString() const
|
||||
}
|
||||
|
||||
const QString qs(slRows.join(QLatin1Char('\n')));
|
||||
DEBUG_LOG() << "getMatrixDataCSVString() : " << qs;
|
||||
DEBUG_LOG(m_logger) << "getMatrixDataCSVString() : " << qs;
|
||||
return qs;
|
||||
}
|
||||
|
||||
@@ -336,7 +336,7 @@ QVariant LogisticalTermsModel::data(const QModelIndex &index, int role) const
|
||||
|
||||
bool LogisticalTermsModel::setData(const QModelIndex &index, const QVariant &value, int role)
|
||||
{
|
||||
DEBUG_LOG() << "setData() row/col: " << index.row() << "/" << index.column()
|
||||
DEBUG_LOG(m_logger) << "setData() row/col: " << index.row() << "/" << index.column()
|
||||
<< " value:" << value.toString();
|
||||
|
||||
const QString qs = value.toString();
|
||||
@@ -393,7 +393,7 @@ void LogisticalTermsModel::onCodificationDataChanged(const CodificationManagemen
|
||||
{
|
||||
const int id = data.id();
|
||||
|
||||
DEBUG_LOG() << "onCodificationDataChanged for CodificationData id: " << id
|
||||
DEBUG_LOG(m_logger) << "onCodificationDataChanged for CodificationData id: " << id
|
||||
<< " - NumCodeColumnIdx data: " << data.numeralCodeTableColumnIndex().c_str()
|
||||
<< " - NumCodeRowIdx data: " << data.numeralCodeTableRowIndex().c_str()
|
||||
<< " - modType: " << modType;
|
||||
@@ -403,7 +403,7 @@ void LogisticalTermsModel::onCodificationDataChanged(const CodificationManagemen
|
||||
|
||||
if (modType == DataModification::eRemoved)
|
||||
{
|
||||
WARNING_LOG() << "CodificationData was removed. id: " << id << " ToDo: 'ShowCodificationData' Tab loeschen !?";
|
||||
WARNING_LOG(m_logger) << "CodificationData was removed. id: " << id << " ToDo: 'ShowCodificationData' Tab loeschen !?";
|
||||
|
||||
resetMatrix();
|
||||
setColumnSelectionValuesCSV(QString());
|
||||
@@ -413,7 +413,7 @@ void LogisticalTermsModel::onCodificationDataChanged(const CodificationManagemen
|
||||
|
||||
if (modType == DataModification::eModified)
|
||||
{
|
||||
DEBUG_LOG() << "CodificationData was modifed. id: " << id << " - " << data.note();
|
||||
DEBUG_LOG(m_logger) << "CodificationData was modifed. id: " << id << " - " << data.note();
|
||||
|
||||
QString qs = QString::fromStdString(data.logisticalTermTableColumnIndex());
|
||||
setColumnSelectionValuesCSV(qs);
|
||||
|
||||
+11
@@ -110,6 +110,17 @@ private Q_SLOTS:
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
QVector<QVector<QString>> m_matrix;
|
||||
|
||||
QVector <QChar> m_RowSelectionValues;
|
||||
|
||||
+8
-8
@@ -69,7 +69,7 @@ bool NumeralCodeModel::setColumnSelectionValuesCSV(const QString &csvData)
|
||||
|
||||
if (slColumns.size() != columnCount() - 1)
|
||||
{
|
||||
ERROR_LOG() << "Invalid column data count." << " codificationDataId: " << m_codificationDataId
|
||||
ERROR_LOG(m_logger) << "Invalid column data count." << " codificationDataId: " << m_codificationDataId
|
||||
<< " Soll/Ist: " << columnCount() - 1 << "/" << slColumns.size();
|
||||
return false;
|
||||
}
|
||||
@@ -79,7 +79,7 @@ bool NumeralCodeModel::setColumnSelectionValuesCSV(const QString &csvData)
|
||||
const QStringRef &qs = slColumns.at(i);
|
||||
if (qs.size() != 1)
|
||||
{
|
||||
ERROR_LOG() << "Invalid column data value at id: " << i
|
||||
ERROR_LOG(m_logger) << "Invalid column data value at id: " << i
|
||||
<< " codificationDataId: " << m_codificationDataId;
|
||||
return false;
|
||||
}
|
||||
@@ -97,7 +97,7 @@ bool NumeralCodeModel::setRowSelectionValuesCSV(const QString &csvData)
|
||||
|
||||
if (slRows.size() != rowCount() - 1)
|
||||
{
|
||||
ERROR_LOG() << "Invalid row data count." << " codificationDataId: " << m_codificationDataId
|
||||
ERROR_LOG(m_logger) << "Invalid row data count." << " codificationDataId: " << m_codificationDataId
|
||||
<< " Soll/Ist: " << rowCount() - 1 << "/" << slRows.size()
|
||||
<< " Default values will be used. ";
|
||||
return false;
|
||||
@@ -108,7 +108,7 @@ bool NumeralCodeModel::setRowSelectionValuesCSV(const QString &csvData)
|
||||
const QStringRef &qs = slRows.at(i);
|
||||
if (qs.size() != 1)
|
||||
{
|
||||
ERROR_LOG() << "Invalid row data value at id: " << i
|
||||
ERROR_LOG(m_logger) << "Invalid row data value at id: " << i
|
||||
<< " codificationDataId: " << m_codificationDataId;
|
||||
return false;
|
||||
}
|
||||
@@ -278,7 +278,7 @@ QVariant NumeralCodeModel::data(const QModelIndex &index, int role) const
|
||||
|
||||
bool NumeralCodeModel::setData(const QModelIndex &index, const QVariant &value, int role)
|
||||
{
|
||||
DEBUG_LOG() << "setData() row/col: " << index.row() << "/" << index.column()
|
||||
DEBUG_LOG(m_logger) << "setData() row/col: " << index.row() << "/" << index.column()
|
||||
<< " char:" << value.toString();
|
||||
|
||||
if (value.toString().contains(QLatin1Char('\"')) || value.toString().contains(QLatin1Char(';')))
|
||||
@@ -400,7 +400,7 @@ void NumeralCodeModel::onCodificationDataChanged(const CodificationManagement::C
|
||||
{
|
||||
const int id = data.id();
|
||||
|
||||
DEBUG_LOG() << "onCodificationDataChanged for CodificationData id: " << id
|
||||
DEBUG_LOG(m_logger) << "onCodificationDataChanged for CodificationData id: " << id
|
||||
<< " - NumCodeColumnIdx data: " << data.numeralCodeTableColumnIndex().c_str()
|
||||
<< " - NumCodeRowIdx data: " << data.numeralCodeTableRowIndex().c_str()
|
||||
<< " - modType: " << (int)modType;
|
||||
@@ -410,7 +410,7 @@ void NumeralCodeModel::onCodificationDataChanged(const CodificationManagement::C
|
||||
|
||||
if (modType == DataModification::eRemoved)
|
||||
{
|
||||
WARNING_LOG() << "CodificationData was removed. id: " << id << " ToDo: 'ShowCodificationData' Tab loeschen !?";
|
||||
WARNING_LOG(m_logger) << "CodificationData was removed. id: " << id << " ToDo: 'ShowCodificationData' Tab loeschen !?";
|
||||
setColumnSelectionValuesCSV(QString());
|
||||
setRowSelectionValuesCSV(QString());
|
||||
return;
|
||||
@@ -418,7 +418,7 @@ void NumeralCodeModel::onCodificationDataChanged(const CodificationManagement::C
|
||||
|
||||
if (modType == DataModification::eModified)
|
||||
{
|
||||
DEBUG_LOG() << "CodificationData was modifed. id: " << id << " - " << data.note();
|
||||
DEBUG_LOG(m_logger) << "CodificationData was modifed. id: " << id << " - " << data.note();
|
||||
|
||||
QString qs = QString::fromStdString(data.numeralCodeTableColumnIndex());
|
||||
setColumnSelectionValuesCSV(qs);
|
||||
|
||||
+2
@@ -89,6 +89,8 @@ private:
|
||||
|
||||
|
||||
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
void initMatrix();
|
||||
|
||||
QVector <QChar> m_MatrixNumeralSet;
|
||||
|
||||
+9
-9
@@ -15,7 +15,7 @@ PhraseTableModel::PhraseTableModel(QWidget *parent)
|
||||
, m_codificationDataId(0)
|
||||
, m_isEditMode(false)
|
||||
{
|
||||
DEBUG_LOG() << "ctor PhraseTableModel";
|
||||
DEBUG_LOG(m_logger) << "ctor PhraseTableModel";
|
||||
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ bool PhraseTableModel::init(const std::shared_ptr<CodificationManagement::Interf
|
||||
int codificationDataId,
|
||||
bool isEditMode)
|
||||
{
|
||||
DEBUG_LOG() << "PhraseTableModel::init()";
|
||||
DEBUG_LOG(m_logger) << "PhraseTableModel::init()";
|
||||
if (!dtc)
|
||||
return false;
|
||||
|
||||
@@ -74,12 +74,12 @@ void PhraseTableModel::resetMatrix()
|
||||
|
||||
bool PhraseTableModel::setMatrixValuesCSV(const QString &csvData)
|
||||
{
|
||||
DEBUG_LOG() << "setMatrixValuesCSV() data: " << csvData;
|
||||
DEBUG_LOG(m_logger) << "setMatrixValuesCSV() data: " << csvData;
|
||||
|
||||
const QVector<QStringRef> slRows = csvData.splitRef(QLatin1Char('\n'));
|
||||
if (slRows.count() != rowCount())
|
||||
{
|
||||
ERROR_LOG() << "Invalid row data count." << " codificationDataId: " << m_codificationDataId
|
||||
ERROR_LOG(m_logger) << "Invalid row data count." << " codificationDataId: " << m_codificationDataId
|
||||
<< " Soll/Ist: " << rowCount() << "/" << slRows.size();
|
||||
return false;
|
||||
}
|
||||
@@ -89,7 +89,7 @@ bool PhraseTableModel::setMatrixValuesCSV(const QString &csvData)
|
||||
const QStringList slColumns = splitQuotedString(QLatin1Char(';'), slRows[row].toString());
|
||||
if (slColumns.count() != columnCount())
|
||||
{
|
||||
ERROR_LOG() << "Invalid column data count." << " codificationDataId: " << m_codificationDataId
|
||||
ERROR_LOG(m_logger) << "Invalid column data count." << " codificationDataId: " << m_codificationDataId
|
||||
<< " Soll/Ist: " << columnCount() << "/" << slColumns.size();
|
||||
return false;
|
||||
}
|
||||
@@ -196,7 +196,7 @@ QVariant PhraseTableModel::data(const QModelIndex &index, int role) const
|
||||
|
||||
bool PhraseTableModel::setData(const QModelIndex &index, const QVariant &value, int role)
|
||||
{
|
||||
DEBUG_LOG() << "setData() row/col: " << index.row() << "/" << index.column()
|
||||
DEBUG_LOG(m_logger) << "setData() row/col: " << index.row() << "/" << index.column()
|
||||
<< " value:" << value.toString();
|
||||
|
||||
|
||||
@@ -249,7 +249,7 @@ void PhraseTableModel::onCodificationDataChanged(const CodificationManagement::C
|
||||
{
|
||||
const int id = data.id();
|
||||
|
||||
DEBUG_LOG() << "onCodificationDataChanged for CodificationData id: " << id
|
||||
DEBUG_LOG(m_logger) << "onCodificationDataChanged for CodificationData id: " << id
|
||||
<< " - PhraseTableModel data: " << data.phraseTable().c_str()
|
||||
<< " - modType: " << (int)modType;
|
||||
|
||||
@@ -258,7 +258,7 @@ void PhraseTableModel::onCodificationDataChanged(const CodificationManagement::C
|
||||
|
||||
if (modType == DataModification::eRemoved)
|
||||
{
|
||||
WARNING_LOG() << "CodificationData was removed. id: " << id << " ToDo: 'ShowCodificationData' Tab loeschen !?";
|
||||
WARNING_LOG(m_logger) << "CodificationData was removed. id: " << id << " ToDo: 'ShowCodificationData' Tab loeschen !?";
|
||||
|
||||
resetMatrix();
|
||||
return;
|
||||
@@ -266,7 +266,7 @@ void PhraseTableModel::onCodificationDataChanged(const CodificationManagement::C
|
||||
|
||||
if (modType == DataModification::eModified)
|
||||
{
|
||||
DEBUG_LOG() << "CodificationData was modifed. id: " << id << " - " << data.note();
|
||||
DEBUG_LOG(m_logger) << "CodificationData was modifed. id: " << id << " - " << data.note();
|
||||
|
||||
QString qs = QString::fromStdString(data.phraseTable());
|
||||
setMatrixValuesCSV(qs);
|
||||
|
||||
+2
@@ -80,6 +80,8 @@ private Q_SLOTS:
|
||||
private:
|
||||
|
||||
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
QStringList splitQuotedString(const QChar &sep, const QString &inString);
|
||||
|
||||
private:
|
||||
|
||||
Reference in new issue
Block a user