Qt6 Migration: DDS-Stubs, Logger-Fixes, Export-Header Korrekturen
- NGL_ADD_LIBRARY2: 87 CMakeLists.txt konvertiert für Export-Header Generierung - 44 Export-Header Include-Pfade korrigiert (_export.h) - 81 DDS-Stub-Header generiert (*_dtc.h, *_fts.h, *_dts.h, *_ftc.h) - INGLLogger: Duplikat gelöscht, m_logger Member entfernt, variadische Makros - Q_FUNC_INFO Redefinition behoben (Qt6 definiert bereits) - FATAL_LOG Makro hinzugefügt - InfrastructureManagement DDS-Stubs (ism.hpp, ism_enums.hpp, ism_ftc.h) - FilterManagement DDS-Stubs (flt_ftc.h, flt_dts.h) - AreaEffectSimulation DDS-Stubs (aes.hpp, aes_enums.hpp) - SymbolAppearance Klasse vollständig definiert mit content() Methode - BuildingComponentFilter Klasse definiert mit Copy-Konstruktor - Ftc Factory: nullptr Return (abstract class) - AesFilter Klasse in aes.hpp hinzugefügt - Dtc Klasse in ppm.hpp mit participantChanged Signal - AesType Enum: alle 15 At* Werte definiert - AesEffectState_def: EsReceived hinzugefügt - DataModification Enum: eAdded/eModified/eRemoved - function_reply_object.h → core_types.h Include-Pfad (72 Dateien) - Enum-Class-Streaming Template-Operator in INGLLogger.h - ism_mounting_point.h: QImage → QtGui/QImage, QGuiApplication/QScreen - ism_data_plugin_interface.h: QSet Include, Include-Reihenfolge - QRegExp → QRegularExpression in tpm_js_parser.cpp - .underlying() Aufrufe zu direktem Enum-Vergleich korrigiert - Include-Pfade: aes.hpp in symbol_appearance_settings_impl.h und aes_display_filter_impl.h Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
2785 files changed
+18754
-18316
No files matched your search
+9
-10
@@ -18,7 +18,6 @@ AssignCodificationDataTable::AssignCodificationDataTable(QWidget *parent)
|
||||
, m_ppmDtc(nullptr)
|
||||
, m_ui(new Ui::AssignCodificationDataTable)
|
||||
, m_requestHelper(new LtsUtils::RequestHelper(this))
|
||||
, m_logger(getLogger("AssignCodificationDataTable"))
|
||||
{
|
||||
m_ui->setupUi(this);
|
||||
|
||||
@@ -45,11 +44,11 @@ bool AssignCodificationDataTable::init(const std::shared_ptr<CodificationManagem
|
||||
const std::shared_ptr<ParticipantManagement::Interface::Dtc> &ppmDtc,
|
||||
LtsSession::LtsSession *session)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "AssignCodificationDataTable::init()";
|
||||
DEBUG_LOG() << "AssignCodificationDataTable::init()";
|
||||
|
||||
if (!dtc || !ftc || !session || !ppmDtc)
|
||||
{
|
||||
ERROR_LOG(m_logger) << "AssignCodificationDataTable::init() Invalid shared_ptr!";
|
||||
ERROR_LOG() << "AssignCodificationDataTable::init() Invalid shared_ptr!";
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -65,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(m_logger) << "Number of parties visible to the user in the exercise: " << userVisibleParties.size();
|
||||
DEBUG_LOG() << "Number of parties visible to the user in the exercise: " << userVisibleParties.size();
|
||||
|
||||
for (const ParticipantManagement::Party &party : std::as_const(userVisibleParties))
|
||||
{
|
||||
@@ -93,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(m_logger) << "Init Combobox[" << row << "]: PartyId: " << party.id()
|
||||
DEBUG_LOG() << "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();
|
||||
}
|
||||
@@ -105,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(m_logger) << "Assignment[" << row << "]: assignedPartyId: " << assignedPartyId;
|
||||
DEBUG_LOG() << "Assignment[" << row << "]: assignedPartyId: " << assignedPartyId;
|
||||
|
||||
if (party.id() == assignedPartyId)
|
||||
{
|
||||
tableId = m_model->data(m_model->index(row, CodificationDataOverviewModel::Id), Qt::DisplayRole).toInt();
|
||||
DEBUG_LOG(m_logger) << "Assignment[" << row << "]: assignedPartyId: " << assignedPartyId
|
||||
DEBUG_LOG() << "Assignment[" << row << "]: assignedPartyId: " << assignedPartyId
|
||||
<< " tableId: " << tableId;
|
||||
break;
|
||||
}
|
||||
}
|
||||
DEBUG_LOG(m_logger) << "Assignment currentIndex: " << cb->findData(tableId);
|
||||
DEBUG_LOG() << "Assignment currentIndex: " << cb->findData(tableId);
|
||||
cb->setCurrentIndex(cb->findData(tableId));
|
||||
|
||||
m_ui->partyLayout->addWidget(cb, i, 1, 1, 1);
|
||||
@@ -129,7 +128,7 @@ bool AssignCodificationDataTable::init(const std::shared_ptr<CodificationManagem
|
||||
|
||||
bool AssignCodificationDataTable::apply()
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "AssignCodificationDataTable::apply()";
|
||||
DEBUG_LOG() << "AssignCodificationDataTable::apply()";
|
||||
|
||||
removeAllAssignments();
|
||||
|
||||
@@ -139,7 +138,7 @@ bool AssignCodificationDataTable::apply()
|
||||
int partyId = cb->property("partyId").toInt();
|
||||
int tableId = cb->currentData().toInt();
|
||||
|
||||
DEBUG_LOG(m_logger) << "Assignments: partyId: " << partyId
|
||||
DEBUG_LOG() << "Assignments: partyId: " << partyId
|
||||
<< " codTableId: " << tableId;
|
||||
|
||||
if (tableId < 1)
|
||||
|
||||
-3
@@ -64,9 +64,6 @@ private:
|
||||
|
||||
LtsUtils::RequestHelper *m_requestHelper{nullptr};
|
||||
QVector<LtsWidgets::LtsComboBox*> m_tableVec;
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
+11
-12
@@ -13,10 +13,9 @@ AuthenticationCodeModel::AuthenticationCodeModel(QObject *parent)
|
||||
, m_dtc(nullptr)
|
||||
, m_codificationDataId(0)
|
||||
, m_isEditMode(false)
|
||||
, m_logger(getLogger("AuthenticationCodeTableModel"))
|
||||
{
|
||||
memset(m_matrix, 0, sizeof m_matrix);
|
||||
DEBUG_LOG(m_logger) << "ctor AuthenticationCodeModel";
|
||||
DEBUG_LOG() << "ctor AuthenticationCodeModel";
|
||||
|
||||
}
|
||||
|
||||
@@ -25,11 +24,11 @@ bool AuthenticationCodeModel::init(const std::shared_ptr<CodificationManagement:
|
||||
int codificationDataId,
|
||||
bool isEditMode)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "AuthenticationCodeModel::init()";
|
||||
DEBUG_LOG() << "AuthenticationCodeModel::init()";
|
||||
if (!dtc)
|
||||
return false;
|
||||
|
||||
DEBUG_LOG(m_logger) << "AuthenticationCodeModel::init()...";
|
||||
DEBUG_LOG() << "AuthenticationCodeModel::init()...";
|
||||
|
||||
m_dtc = dtc;
|
||||
m_codificationDataId = codificationDataId;
|
||||
@@ -74,12 +73,12 @@ void AuthenticationCodeModel::resetMatrix()
|
||||
|
||||
bool AuthenticationCodeModel::setMatrixValuesCSV(const QString &csvData)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "setMatrixValuesCSV: " << csvData;
|
||||
DEBUG_LOG() << "setMatrixValuesCSV: " << csvData;
|
||||
|
||||
const QVector<QStringRef> slRows = csvData.splitRef(QLatin1Char('\n'));
|
||||
if (slRows.size() != rowCount())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Invalid row data count." << " codificationDataId: " << m_codificationDataId
|
||||
ERROR_LOG() << "Invalid row data count." << " codificationDataId: " << m_codificationDataId
|
||||
<< " Soll/Ist: " << rowCount() - 1 << "/" << slRows.size();
|
||||
return false;
|
||||
}
|
||||
@@ -89,7 +88,7 @@ bool AuthenticationCodeModel::setMatrixValuesCSV(const QString &csvData)
|
||||
const QVector<QStringRef> slColumns = slRows[row].split(QLatin1Char(';'));
|
||||
if (slColumns.size() != columnCount())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Invalid column data count." << " codificationDataId: " << m_codificationDataId
|
||||
ERROR_LOG() << "Invalid column data count." << " codificationDataId: " << m_codificationDataId
|
||||
<< " Soll/Ist: " << columnCount() - 1 << "/" << slColumns.size();
|
||||
return false;
|
||||
}
|
||||
@@ -195,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(m_logger) << "setData() row/col: " << index.row() << "/" << index.column()
|
||||
DEBUG_LOG() << "setData() row/col: " << index.row() << "/" << index.column()
|
||||
<< " char:" << value.toString() << " int:" << value.toInt();
|
||||
|
||||
bool bOk;
|
||||
@@ -203,7 +202,7 @@ bool AuthenticationCodeModel::setData(const QModelIndex &index, const QVariant &
|
||||
|
||||
if ((!bOk) || (val < 0) || (val > 99))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "setData() row/col: " << index.row() << "/" << index.column()
|
||||
ERROR_LOG() << "setData() row/col: " << index.row() << "/" << index.column()
|
||||
<< " Invalid Input! " << value.toString() << " Required input value in the range 0-99.";
|
||||
return false;
|
||||
}
|
||||
@@ -237,7 +236,7 @@ void AuthenticationCodeModel::onCodificationDataChanged(const CodificationManage
|
||||
{
|
||||
const int id = data.id();
|
||||
|
||||
DEBUG_LOG(m_logger) << "onCodificationDataChanged for CodificationData id: " << id
|
||||
DEBUG_LOG() << "onCodificationDataChanged for CodificationData id: " << id
|
||||
<< " - AuthenticationCodeMatrix data: " << data.authenticationTableMatirx().c_str()
|
||||
<< " - modType: " << (int)modType;
|
||||
|
||||
@@ -246,7 +245,7 @@ void AuthenticationCodeModel::onCodificationDataChanged(const CodificationManage
|
||||
|
||||
if (modType == DataModification::eRemoved)
|
||||
{
|
||||
WARNING_LOG(m_logger) << "CodificationData was removed. id: " << id << " ToDo: 'ShowCodificationData' Tab loeschen !?";
|
||||
WARNING_LOG() << "CodificationData was removed. id: " << id << " ToDo: 'ShowCodificationData' Tab loeschen !?";
|
||||
|
||||
resetMatrix();
|
||||
return;
|
||||
@@ -254,7 +253,7 @@ void AuthenticationCodeModel::onCodificationDataChanged(const CodificationManage
|
||||
|
||||
if (modType == DataModification::eModified)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "CodificationData was modifed. id: " << id << " - " << data.note();
|
||||
DEBUG_LOG() << "CodificationData was modifed. id: " << id << " - " << data.note();
|
||||
|
||||
QString qs = QString::fromStdString(data.authenticationTableMatirx());
|
||||
setMatrixValuesCSV(qs);
|
||||
|
||||
+1
-2
@@ -91,8 +91,7 @@ private:
|
||||
std::shared_ptr<CodificationManagement::Interface::Dtc> m_dtc;
|
||||
|
||||
int m_codificationDataId;
|
||||
bool m_isEditMode;
|
||||
NGL::INGLLogger &m_logger;
|
||||
bool m_isEditMode;
|
||||
};
|
||||
|
||||
}
|
||||
+4
-5
@@ -9,16 +9,15 @@ using namespace CodificationManagement;
|
||||
CodeTableEditDelegate::CodeTableEditDelegate(QWidget *parent, TableType tableType)
|
||||
: QItemDelegate(parent)
|
||||
, m_tableType(tableType)
|
||||
, m_logger(getLogger("CodeTableEditDelegate"))
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "CodeTableEditDelegate::ctor()";
|
||||
DEBUG_LOG() << "CodeTableEditDelegate::ctor()";
|
||||
}
|
||||
|
||||
|
||||
QWidget *CodeTableEditDelegate::createEditor(QWidget *parent, const QStyleOptionViewItem &option,
|
||||
const QModelIndex &index) const
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "CodeTableEditDelegate::createEditor() TableType: " << m_tableType
|
||||
DEBUG_LOG() << "CodeTableEditDelegate::createEditor() TableType: " << m_tableType
|
||||
<< " rox/column: " << index.row() << "/" << index.column() ;
|
||||
|
||||
Q_UNUSED(option)
|
||||
@@ -77,7 +76,7 @@ void CodeTableEditDelegate::setEditorData(QWidget *editor, const QModelIndex &in
|
||||
QVariant v = index.data(Qt::EditRole);
|
||||
le->setText(v.toString());
|
||||
|
||||
DEBUG_LOG(m_logger) << "CodeTableEditDelegate::setEditorData() TableType: " << m_tableType
|
||||
DEBUG_LOG() << "CodeTableEditDelegate::setEditorData() TableType: " << m_tableType
|
||||
<< " rox/column: " << index.row() << "/" << index.column()
|
||||
<< " Input: " << v.toString();
|
||||
|
||||
@@ -91,7 +90,7 @@ void CodeTableEditDelegate::setModelData(QWidget *editor, QAbstractItemModel *mo
|
||||
if (!le)
|
||||
return;
|
||||
|
||||
DEBUG_LOG(m_logger) << "CodeTableEditDelegate::setModelData() TableType: " << m_tableType
|
||||
DEBUG_LOG() << "CodeTableEditDelegate::setModelData() TableType: " << m_tableType
|
||||
<< " rox/column: " << index.row() << "/" << index.column()
|
||||
<< " Input: " << le->text();
|
||||
|
||||
|
||||
-1
@@ -44,7 +44,6 @@ public:
|
||||
|
||||
private:
|
||||
TableType m_tableType;
|
||||
NGL::INGLLogger &m_logger;
|
||||
};
|
||||
|
||||
}
|
||||
+1
-2
@@ -29,7 +29,6 @@ CodificationDataOverviewModel::CodificationDataOverviewModel(QObject *parent)
|
||||
tr("Note")},
|
||||
parent)
|
||||
, m_codDtc(nullptr)
|
||||
, m_logger(getLogger("CodificationDataOverviewModel"))
|
||||
{
|
||||
}
|
||||
|
||||
@@ -38,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(m_logger) << "CodificationDataModel::initModel()";
|
||||
DEBUG_LOG() << "CodificationDataModel::initModel()";
|
||||
|
||||
if (!codDtc || !ppmDtc)
|
||||
return false;
|
||||
|
||||
-1
@@ -53,7 +53,6 @@ public:
|
||||
private:
|
||||
std::shared_ptr<CodificationManagement::Interface::Dtc> m_codDtc;
|
||||
std::shared_ptr<ParticipantManagement::Interface::Dtc> m_ppmDtc;
|
||||
LOGGER_T m_logger;
|
||||
};
|
||||
|
||||
class CodificationDataOverviewProxyModel final : public LtsWidgets::LtsColumnFilterProxyModel
|
||||
|
||||
+3
-4
@@ -22,7 +22,6 @@ CodificationDataOverviewView::CodificationDataOverviewView(const QString &menuGr
|
||||
, m_ftc(nullptr)
|
||||
, m_requestHelper(new LtsUtils::RequestHelper(this))
|
||||
, m_ui(new Ui::CodificationDataOverviewView)
|
||||
, m_logger(getLogger("CodificationDataOverviewDialog"))
|
||||
{
|
||||
m_ui->setupUi(this);
|
||||
m_ui->widget->setSelectionMode(QAbstractItemView::SingleSelection);
|
||||
@@ -132,7 +131,7 @@ void CodificationDataOverviewView::onShowCodificationData()
|
||||
|
||||
CodificationManagement::CodificationData codificationData = m_model->getRowData(row);
|
||||
|
||||
DEBUG_LOG(m_logger) << "--- onShowCodificationData() "
|
||||
DEBUG_LOG() << "--- onShowCodificationData() "
|
||||
<< " id: " << codificationData.id();
|
||||
|
||||
CodificationDataTableView *dialog = new CodificationDataTableView;
|
||||
@@ -146,7 +145,7 @@ void CodificationDataOverviewView::onShowCodificationData()
|
||||
|
||||
void CodificationDataOverviewView::onAddCodificationData()
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "--- onAddCodificationData() ";
|
||||
DEBUG_LOG() << "--- onAddCodificationData() ";
|
||||
|
||||
CodificationDataTableEditView *dialog = new CodificationDataTableEditView(this);
|
||||
dialog->init(m_dtc, m_ftc, m_session, 0);
|
||||
@@ -166,7 +165,7 @@ void CodificationDataOverviewView::onEditCodificationData()
|
||||
|
||||
CodificationManagement::CodificationData codificationData = m_model->getRowData(row);
|
||||
|
||||
DEBUG_LOG(m_logger) << "--- onEditCodificationData() "
|
||||
DEBUG_LOG() << "--- onEditCodificationData() "
|
||||
<< " id: " << codificationData.id();
|
||||
|
||||
CodificationDataTableEditView *dialog = new CodificationDataTableEditView(this);
|
||||
|
||||
-3
@@ -61,9 +61,6 @@ private:
|
||||
LtsUtils::RequestHelper *m_requestHelper;
|
||||
|
||||
Ui::CodificationDataOverviewView *m_ui;
|
||||
|
||||
LOGGER_T m_logger;
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
+31
-32
@@ -27,7 +27,6 @@ CodificationDataTableEditView::CodificationDataTableEditView(QWidget *parent)
|
||||
, m_logisticalTermsModel(new LogisticalTermsModel(this))
|
||||
, m_phraseTableModel(new PhraseTableModel(this))
|
||||
, m_requestHelper(new LtsUtils::RequestHelper(this))
|
||||
, m_logger(getLogger("CodificationDataTableEditView"))
|
||||
{
|
||||
m_ui->setupUi(this);
|
||||
m_buttonBox->connectButton(LtsWidgets::DialogButton::Print, this, &CodificationDataTableEditView::onPrint);
|
||||
@@ -54,11 +53,11 @@ bool CodificationDataTableEditView::init(const std::shared_ptr<CodificationManag
|
||||
LtsSession::LtsSession *session,
|
||||
int codificationDataId)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "CodificationDataTableEditView::init() codificationDataId: " << codificationDataId;
|
||||
DEBUG_LOG() << "CodificationDataTableEditView::init() codificationDataId: " << codificationDataId;
|
||||
|
||||
if (!dtc || !ftc || !session)
|
||||
{
|
||||
ERROR_LOG(m_logger) << "CodificationDataTableEditView::init() Invalid shared_ptr!";
|
||||
ERROR_LOG() << "CodificationDataTableEditView::init() Invalid shared_ptr!";
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -126,7 +125,7 @@ bool CodificationDataTableEditView::init(const std::shared_ptr<CodificationManag
|
||||
|
||||
void CodificationDataTableEditView::onLoadCodificationData()
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "CodificationDataTableEditView::onLoadCodificationData()";
|
||||
DEBUG_LOG() << "CodificationDataTableEditView::onLoadCodificationData()";
|
||||
|
||||
QString note;
|
||||
CSVImport csvImport(m_numCodeModel, m_authenticationCodeModel, m_logisticalTermsModel,
|
||||
@@ -136,7 +135,7 @@ void CodificationDataTableEditView::onLoadCodificationData()
|
||||
|
||||
if (result == CSVImport::LoadOk)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Load CSV data ok!";
|
||||
DEBUG_LOG() << "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);
|
||||
|
||||
@@ -154,14 +153,14 @@ void CodificationDataTableEditView::onLoadCodificationData()
|
||||
m_phraseTableModel->resetMatrix();
|
||||
m_ui->pteNote->clear();
|
||||
|
||||
ERROR_LOG(m_logger) << "Load CSV data failed!";
|
||||
ERROR_LOG() << "Load CSV data failed!";
|
||||
LtsWidgets::LtsMessageDialog::showMessage(this, tr("Load CSV data failed!"), tr("CSV Import Info"));
|
||||
return;
|
||||
}
|
||||
|
||||
if (result == CSVImport::UserAbort)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Load CSV data abort by user";
|
||||
DEBUG_LOG() << "Load CSV data abort by user";
|
||||
LtsWidgets::LtsMessageDialog::showMessage(this, tr("Load CSV data abort by user"), tr("CSV Import Info"));
|
||||
}
|
||||
}
|
||||
@@ -169,34 +168,34 @@ void CodificationDataTableEditView::onLoadCodificationData()
|
||||
|
||||
void CodificationDataTableEditView::onSaveCodificationData()
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "CodificationDataTableEditView::onSaveCodificationData()";
|
||||
DEBUG_LOG() << "CodificationDataTableEditView::onSaveCodificationData()";
|
||||
|
||||
CSVExport csvExport(m_numCodeModel, m_authenticationCodeModel, m_logisticalTermsModel,
|
||||
m_phraseTableModel, m_ui->pteNote->toPlainText(), this);
|
||||
|
||||
if (!csvExport.writeCSVData())
|
||||
ERROR_LOG(m_logger) << "Write CSV data to file failed! id:" << m_codificationDataId;
|
||||
ERROR_LOG() << "Write CSV data to file failed! id:" << m_codificationDataId;
|
||||
else
|
||||
DEBUG_LOG(m_logger) << "Write CSV data to file ok! id:" << m_codificationDataId;
|
||||
DEBUG_LOG() << "Write CSV data to file ok! id:" << m_codificationDataId;
|
||||
}
|
||||
|
||||
|
||||
void CodificationDataTableEditView::loadCodificationDataFromDatabase()
|
||||
{
|
||||
m_lastDdsCodificationData = m_dtc->codificationData(m_codificationDataId);
|
||||
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() << "Load from database: ---";
|
||||
DEBUG_LOG() << "NumCodeHorizontalHeader: " << m_lastDdsCodificationData.numeralCodeTableColumnIndex();
|
||||
DEBUG_LOG() << "NumCodeVerticalHeader: " << m_lastDdsCodificationData.numeralCodeTableRowIndex();
|
||||
|
||||
DEBUG_LOG(m_logger) << "AuthenticationMatrix: " << m_lastDdsCodificationData.authenticationTableMatirx();
|
||||
DEBUG_LOG() << "AuthenticationMatrix: " << m_lastDdsCodificationData.authenticationTableMatirx();
|
||||
|
||||
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() << "LogisticalTermsHorizontalHeader: " << m_lastDdsCodificationData.logisticalTermTableColumnIndex();
|
||||
DEBUG_LOG() << "LogisticalTermsVerticalHeader: " << m_lastDdsCodificationData.logisticalTermTableRowIndex();
|
||||
DEBUG_LOG() << "LogisticalTermsMatrix :" << m_lastDdsCodificationData.logisticalTermTableMatrix();
|
||||
|
||||
DEBUG_LOG(m_logger) << "PhraseTable :" << m_lastDdsCodificationData.phraseTable();
|
||||
DEBUG_LOG() << "PhraseTable :" << m_lastDdsCodificationData.phraseTable();
|
||||
|
||||
DEBUG_LOG(m_logger) << "Note: " << m_lastDdsCodificationData.note();
|
||||
DEBUG_LOG() << "Note: " << m_lastDdsCodificationData.note();
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -401,7 +400,7 @@ void CodificationDataTableEditView::onPrint()
|
||||
|
||||
bool CodificationDataTableEditView::apply()
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "CodificationDataTableEditView::onOkayCodificationData()";
|
||||
DEBUG_LOG() << "CodificationDataTableEditView::onOkayCodificationData()";
|
||||
|
||||
|
||||
|
||||
@@ -417,28 +416,28 @@ bool CodificationDataTableEditView::apply()
|
||||
modifiedCodificationData.numeralCodeTableColumnIndex(m_numCodeModel->getHorizontalHeaderCSVString().toStdString());
|
||||
modifiedCodificationData.numeralCodeTableRowIndex(m_numCodeModel->getVerticalHeaderCSVString().toStdString()) ;
|
||||
|
||||
DEBUG_LOG(m_logger) << "onOkayCodificationData() HH: " << m_numCodeModel->getHorizontalHeaderCSVString();
|
||||
DEBUG_LOG(m_logger) << "onOkayCodificationData() VH: " << m_numCodeModel->getVerticalHeaderCSVString();
|
||||
DEBUG_LOG() << "onOkayCodificationData() HH: " << m_numCodeModel->getHorizontalHeaderCSVString();
|
||||
DEBUG_LOG() << "onOkayCodificationData() VH: " << m_numCodeModel->getVerticalHeaderCSVString();
|
||||
|
||||
|
||||
modifiedCodificationData.authenticationTableMatirx(m_authenticationCodeModel->getMatrixDataCSVString().toStdString());
|
||||
DEBUG_LOG(m_logger) << "onOkayCodificationData() authMatrix: " << m_authenticationCodeModel->getMatrixDataCSVString();
|
||||
DEBUG_LOG() << "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(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();
|
||||
DEBUG_LOG() << "onOkayCodificationData() HH: " << m_logisticalTermsModel->getHorizontalHeaderCSVString();
|
||||
DEBUG_LOG() << "onOkayCodificationData() VH: " << m_logisticalTermsModel->getVerticalHeaderCSVString();
|
||||
DEBUG_LOG() << "onOkayCodificationData() logTermsMatrix: " << m_logisticalTermsModel->getMatrixDataCSVString();
|
||||
|
||||
|
||||
modifiedCodificationData.phraseTable(m_phraseTableModel->getMatrixDataCSVString().toStdString());
|
||||
DEBUG_LOG(m_logger) << "onOkayCodificationData() phraseTable: " << m_phraseTableModel->getMatrixDataCSVString();
|
||||
DEBUG_LOG() << "onOkayCodificationData() phraseTable: " << m_phraseTableModel->getMatrixDataCSVString();
|
||||
|
||||
|
||||
modifiedCodificationData.note(m_ui->pteNote->toPlainText().toStdString());
|
||||
DEBUG_LOG(m_logger) << "CodificationDataTableEditView::onOkayCodificationData()";
|
||||
DEBUG_LOG() << "CodificationDataTableEditView::onOkayCodificationData()";
|
||||
|
||||
modifiedCodificationData.identifier(m_ui->leIdentifier->text().toStdString());
|
||||
modifiedCodificationData.validityTime(m_ui->dteValidityTime->msecsSinceEpoch());
|
||||
@@ -464,16 +463,16 @@ void CodificationDataTableEditView::onExportButtonClicked()
|
||||
|
||||
int fileId = m_flmGui->saveFileContent(this, FileManagement::FileType::Text, m_session->exerciseId(), byteArray);
|
||||
if (fileId > 0)
|
||||
DEBUG_LOG(m_logger) << "Saved file with id = " << fileId;
|
||||
DEBUG_LOG() << "Saved file with id = " << fileId;
|
||||
else
|
||||
ERROR_LOG(m_logger) << "Could not save file in library ";
|
||||
ERROR_LOG() << "Could not save file in library ";
|
||||
|
||||
}
|
||||
|
||||
|
||||
void CodificationDataTableEditView::onImportButtonClicked()
|
||||
{
|
||||
DEBUG_LOG(m_logger) << " onImportButtonClicked() ";
|
||||
DEBUG_LOG() << " onImportButtonClicked() ";
|
||||
QString note;
|
||||
CSVImport csvImport(m_numCodeModel, m_authenticationCodeModel, m_logisticalTermsModel,
|
||||
m_phraseTableModel, ¬e, this);
|
||||
@@ -486,7 +485,7 @@ void CodificationDataTableEditView::onImportButtonClicked()
|
||||
{
|
||||
|
||||
|
||||
INFO_LOG(m_logger) << "--- onImportButtonClicked() ";
|
||||
INFO_LOG() << "--- onImportButtonClicked() ";
|
||||
csvImport.loadCSVDataByteArray(content);
|
||||
m_ui->pteNote->setPlainText(note);
|
||||
}
|
||||
|
||||
-3
@@ -96,9 +96,6 @@ private:
|
||||
LogisticalTermsModel *m_logisticalTermsModel{nullptr};
|
||||
PhraseTableModel *m_phraseTableModel{nullptr};
|
||||
LtsUtils::RequestHelper *m_requestHelper{nullptr};
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
|
||||
CodificationManagement::CodificationData m_lastDdsCodificationData;
|
||||
};
|
||||
|
||||
|
||||
+13
-14
@@ -21,7 +21,6 @@ CodificationDataTableView::CodificationDataTableView(QWidget *parent)
|
||||
, m_authenticationCodeModel(new AuthenticationCodeModel(this))
|
||||
, m_logisticalTermsModel(new LogisticalTermsModel(this))
|
||||
, m_phraseTableModel(new PhraseTableModel(this))
|
||||
, m_logger(getLogger("CodificationDataTableView"))
|
||||
{
|
||||
m_ui->setupUi(this);
|
||||
m_buttonBox->connectButton(LtsWidgets::DialogButton::Print, this, &CodificationDataTableView::onPrint);
|
||||
@@ -57,7 +56,7 @@ bool CodificationDataTableView::init(const std::shared_ptr<CodificationManagemen
|
||||
int partyId,
|
||||
int codificationDataId)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "CodificationDataTableView::init()";
|
||||
DEBUG_LOG() << "CodificationDataTableView::init()";
|
||||
|
||||
m_dtc = dtc;
|
||||
m_ftc = ftc;
|
||||
@@ -67,14 +66,14 @@ bool CodificationDataTableView::init(const std::shared_ptr<CodificationManagemen
|
||||
|
||||
if (!m_dtc || !m_ftc || !m_session)
|
||||
{
|
||||
ERROR_LOG(m_logger) << "CodificationDataTableView::init() Invalid shared_ptr!";
|
||||
ERROR_LOG() << "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(m_logger) << "CodificationDataTableView::init() Invalid codificationDataId: " << codificationDataId;
|
||||
ERROR_LOG() << "CodificationDataTableView::init() Invalid codificationDataId: " << codificationDataId;
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -113,22 +112,22 @@ bool CodificationDataTableView::init(const std::shared_ptr<CodificationManagemen
|
||||
|
||||
void CodificationDataTableView::loadCodificationDataFromDatabase()
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "CodificationDataTableView::loadCodificationDataFromDatabase()";
|
||||
DEBUG_LOG() << "CodificationDataTableView::loadCodificationDataFromDatabase()";
|
||||
|
||||
m_lastDdsCodificationData = m_dtc->codificationData(m_codificationDataId);
|
||||
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() << "Load from database: ";
|
||||
DEBUG_LOG() << "NumCodeHorizontalHeader: " << m_lastDdsCodificationData.numeralCodeTableColumnIndex();
|
||||
DEBUG_LOG() << "NumCodeVerticalHeader: " << m_lastDdsCodificationData.numeralCodeTableRowIndex();
|
||||
|
||||
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() << "LogisticalTermsHorizontalHeader: " << m_lastDdsCodificationData.logisticalTermTableColumnIndex();
|
||||
DEBUG_LOG() << "LogisticalTermsVerticalHeader: " << m_lastDdsCodificationData.logisticalTermTableRowIndex();
|
||||
DEBUG_LOG() << "LogisticalTermsMatrix: " << m_lastDdsCodificationData.logisticalTermTableMatrix();
|
||||
|
||||
DEBUG_LOG(m_logger) << "AuthenticationMatrix: " << m_lastDdsCodificationData.authenticationTableMatirx();
|
||||
DEBUG_LOG() << "AuthenticationMatrix: " << m_lastDdsCodificationData.authenticationTableMatirx();
|
||||
|
||||
DEBUG_LOG(m_logger) << "PhraseTable: " << m_lastDdsCodificationData.phraseTable();
|
||||
DEBUG_LOG() << "PhraseTable: " << m_lastDdsCodificationData.phraseTable();
|
||||
|
||||
DEBUG_LOG(m_logger) << "Note: " << m_lastDdsCodificationData.note();
|
||||
DEBUG_LOG() << "Note: " << m_lastDdsCodificationData.note();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
-3
@@ -78,9 +78,6 @@ private:
|
||||
AuthenticationCodeModel *m_authenticationCodeModel{nullptr};
|
||||
LogisticalTermsModel *m_logisticalTermsModel{nullptr};
|
||||
PhraseTableModel *m_phraseTableModel{nullptr};
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
|
||||
CodificationManagement::CodificationData m_lastDdsCodificationData;
|
||||
};
|
||||
|
||||
|
||||
+1
-2
@@ -27,7 +27,6 @@ CSVExport::CSVExport(const NumeralCodeModel *numCodeModel,
|
||||
, m_logisticalTermsModel(logisticalTermsModel)
|
||||
, m_phraseTableModel(phraseTableModel)
|
||||
, m_note(note)
|
||||
, m_logger(getLogger("CodificationCSVExport"))
|
||||
{
|
||||
}
|
||||
|
||||
@@ -75,7 +74,7 @@ QByteArray CSVExport::exportToByteArray() const
|
||||
|
||||
bool CSVExport::writeCSVData()
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "writeCSVData()";
|
||||
DEBUG_LOG() << "writeCSVData()";
|
||||
|
||||
QFileDialog dialog;
|
||||
dialog.setNameFilter(tr("CSV File (*.csv)"));
|
||||
|
||||
-2
@@ -40,8 +40,6 @@ private:
|
||||
const LogisticalTermsModel *m_logisticalTermsModel;
|
||||
const PhraseTableModel *m_phraseTableModel;
|
||||
QString m_note;
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
+47
-48
@@ -29,7 +29,6 @@ CSVImport::CSVImport(NumeralCodeModel *numCodeModel,
|
||||
, m_logisticalTermsModel(logisticalTermsModel)
|
||||
, m_phraseTableModel(phraseTableModel)
|
||||
, m_note(note)
|
||||
, m_logger(getLogger("CodificationCSVImport"))
|
||||
{
|
||||
}
|
||||
|
||||
@@ -79,7 +78,7 @@ CSVImport::CSVImportResult CSVImport::loadCSVDataByteArray(QByteArray content)
|
||||
|
||||
if (qbaLine == "<Numeral Code Horizontal Header>\n")
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "found " << qbaLine;
|
||||
DEBUG_LOG() << "found " << qbaLine;
|
||||
qba = &qbaNumCodeHorizontalHeader;
|
||||
desiredCvsSeperatorsPerLine = 12;
|
||||
++csvKeywordCount;
|
||||
@@ -88,7 +87,7 @@ CSVImport::CSVImportResult CSVImport::loadCSVDataByteArray(QByteArray content)
|
||||
|
||||
if (qbaLine == "<Numeral Code Vertical Header>\n")
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "found " << qbaLine;
|
||||
DEBUG_LOG() << "found " << qbaLine;
|
||||
qba = &qbaNumCodeVerticalHeader;
|
||||
desiredCvsSeperatorsPerLine = 0;
|
||||
++csvKeywordCount;
|
||||
@@ -97,7 +96,7 @@ CSVImport::CSVImportResult CSVImport::loadCSVDataByteArray(QByteArray content)
|
||||
|
||||
if (qbaLine == "<Authentication Code Matrix>\n")
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "found " << qbaLine;
|
||||
DEBUG_LOG() << "found " << qbaLine;
|
||||
qba = &qbaAuthenticationCodeMatrix;
|
||||
desiredCvsSeperatorsPerLine = 4;
|
||||
++csvKeywordCount;
|
||||
@@ -106,7 +105,7 @@ CSVImport::CSVImportResult CSVImport::loadCSVDataByteArray(QByteArray content)
|
||||
|
||||
if (qbaLine == "<Logistical Terms Table Horizontal Header>\n")
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "found " << qbaLine;
|
||||
DEBUG_LOG() << "found " << qbaLine;
|
||||
qba = &qbaLogTermsTableHorizontalHeader;
|
||||
desiredCvsSeperatorsPerLine = 4;
|
||||
++csvKeywordCount;
|
||||
@@ -115,7 +114,7 @@ CSVImport::CSVImportResult CSVImport::loadCSVDataByteArray(QByteArray content)
|
||||
|
||||
if (qbaLine == "<Logistical Terms Table Vertical Header>\n")
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "found " << qbaLine;
|
||||
DEBUG_LOG() << "found " << qbaLine;
|
||||
qba = &qbaLogTermsTableVerticalHeader;
|
||||
desiredCvsSeperatorsPerLine = 0;
|
||||
++csvKeywordCount;
|
||||
@@ -124,7 +123,7 @@ CSVImport::CSVImportResult CSVImport::loadCSVDataByteArray(QByteArray content)
|
||||
|
||||
if (qbaLine == "<Logistical Terms Table Matrix>\n")
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "found " << qbaLine;
|
||||
DEBUG_LOG() << "found " << qbaLine;
|
||||
qba = &qbaLogTermsTableMatrix;
|
||||
desiredCvsSeperatorsPerLine = 4;
|
||||
++csvKeywordCount;
|
||||
@@ -133,7 +132,7 @@ CSVImport::CSVImportResult CSVImport::loadCSVDataByteArray(QByteArray content)
|
||||
|
||||
if (qbaLine == "<Phrase Table Matrix>\n")
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "found " << qbaLine;
|
||||
DEBUG_LOG() << "found " << qbaLine;
|
||||
qba = &qbaPhraseTableMatrix;
|
||||
desiredCvsSeperatorsPerLine = 1;
|
||||
++csvKeywordCount;
|
||||
@@ -142,7 +141,7 @@ CSVImport::CSVImportResult CSVImport::loadCSVDataByteArray(QByteArray content)
|
||||
|
||||
if (qbaLine == "<Note>\n")
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "found " << qbaLine;
|
||||
DEBUG_LOG() << "found " << qbaLine;
|
||||
qba = &qbaNote;
|
||||
desiredCvsSeperatorsPerLine = 0;
|
||||
++csvKeywordCount;
|
||||
@@ -231,23 +230,23 @@ CSVImport::CSVImportResult CSVImport::loadCSVDataByteArray(QByteArray content)
|
||||
|
||||
if (csvKeywordCount != 8)
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Load csv data failed! Invalid csvKeywordCount. Soll/Ist: 8/" << csvKeywordCount;
|
||||
ERROR_LOG() << "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(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";
|
||||
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";
|
||||
|
||||
|
||||
qbaNumCodeHorizontalHeader = qbaNumCodeHorizontalHeader.trimmed();
|
||||
@@ -306,7 +305,7 @@ CSVImport::CSVImportResult CSVImport::loadCSVDataByteArray(QByteArray content)
|
||||
|
||||
CSVImport::CSVImportResult CSVImport::loadCSVData()
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "loadCSVData()";
|
||||
DEBUG_LOG() << "loadCSVData()";
|
||||
|
||||
QFileDialog dialog;
|
||||
dialog.setNameFilter(tr("CSV File (*.csv)"));
|
||||
@@ -341,12 +340,12 @@ CSVImport::CSVImportResult CSVImport::loadCSVData()
|
||||
bool CSVImport::checkNumCodeHorizontalHeader(const QByteArray &qbaNumCodeHorizontalHeader)
|
||||
{
|
||||
|
||||
DEBUG_LOG(m_logger) << "Data: \"" << qbaNumCodeHorizontalHeader << "\"";
|
||||
DEBUG_LOG(m_logger) << "Data.size: Soll/Ist: 13 + 12 = 25/" << qbaNumCodeHorizontalHeader.size();
|
||||
DEBUG_LOG() << "Data: \"" << qbaNumCodeHorizontalHeader << "\"";
|
||||
DEBUG_LOG() << "Data.size: Soll/Ist: 13 + 12 = 25/" << qbaNumCodeHorizontalHeader.size();
|
||||
|
||||
if (qbaNumCodeHorizontalHeader.size() == 25)
|
||||
return true;
|
||||
ERROR_LOG(m_logger) << "Load csv data 'Numeral Code Horizontal Header' failed!";
|
||||
ERROR_LOG() << "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;
|
||||
}
|
||||
@@ -355,12 +354,12 @@ bool CSVImport::checkNumCodeHorizontalHeader(const QByteArray &qbaNumCodeHorizon
|
||||
bool CSVImport::checkNumCodeVerticalHeader(const QByteArray &qbaNumCodeVerticalHeader)
|
||||
{
|
||||
|
||||
DEBUG_LOG(m_logger) << "Data: \"" << qbaNumCodeVerticalHeader << "\"";
|
||||
DEBUG_LOG(m_logger) << "Data.size: Soll/Ist: 13 + 12 = 25/" << qbaNumCodeVerticalHeader.size();
|
||||
DEBUG_LOG() << "Data: \"" << qbaNumCodeVerticalHeader << "\"";
|
||||
DEBUG_LOG() << "Data.size: Soll/Ist: 13 + 12 = 25/" << qbaNumCodeVerticalHeader.size();
|
||||
|
||||
if (qbaNumCodeVerticalHeader.size() == 25)
|
||||
return true;
|
||||
ERROR_LOG(m_logger) << "Load csv data 'Numeral Code Vertical Header' failed!";
|
||||
ERROR_LOG() << "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;
|
||||
}
|
||||
@@ -369,7 +368,7 @@ bool CSVImport::checkNumCodeVerticalHeader(const QByteArray &qbaNumCodeVerticalH
|
||||
bool CSVImport::checkAuthenticationCodeMatrix(QByteArray &qbaAuthenticationCodeMatrix)
|
||||
{
|
||||
|
||||
DEBUG_LOG(m_logger) << "Data: \"" << qbaAuthenticationCodeMatrix << "\"";
|
||||
DEBUG_LOG() << "Data: \"" << qbaAuthenticationCodeMatrix << "\"";
|
||||
|
||||
QByteArray qbaOutMatrix;
|
||||
|
||||
@@ -390,13 +389,13 @@ bool CSVImport::checkAuthenticationCodeMatrix(QByteArray &qbaAuthenticationCodeM
|
||||
|
||||
qbaAuthenticationCodeMatrix = qbaOutMatrix;
|
||||
|
||||
DEBUG_LOG(m_logger) << "Data.size: Soll/Ist: 13 * (5*2 + 4 + 1) -1 = 194 /" << qbaAuthenticationCodeMatrix.size();
|
||||
DEBUG_LOG() << "Data.size: Soll/Ist: 13 * (5*2 + 4 + 1) -1 = 194 /" << qbaAuthenticationCodeMatrix.size();
|
||||
|
||||
if (qbaAuthenticationCodeMatrix.size() == 194)
|
||||
return true;
|
||||
else
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Load csv data 'Authentication Code Matrix' failed!";
|
||||
ERROR_LOG() << "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;
|
||||
}
|
||||
@@ -406,14 +405,14 @@ bool CSVImport::checkAuthenticationCodeMatrix(QByteArray &qbaAuthenticationCodeM
|
||||
bool CSVImport::checkLogTermsTableHorizontalHeader(const QByteArray &qbaLogTermsTableHorizontalHeader)
|
||||
{
|
||||
|
||||
DEBUG_LOG(m_logger) << "Data: \"" << qbaLogTermsTableHorizontalHeader << "\"";
|
||||
DEBUG_LOG(m_logger) << "Data.size: Soll/Ist: 5 + 4 = 9/" << qbaLogTermsTableHorizontalHeader.size();
|
||||
DEBUG_LOG() << "Data: \"" << qbaLogTermsTableHorizontalHeader << "\"";
|
||||
DEBUG_LOG() << "Data.size: Soll/Ist: 5 + 4 = 9/" << qbaLogTermsTableHorizontalHeader.size();
|
||||
|
||||
if (qbaLogTermsTableHorizontalHeader.size() == 9)
|
||||
return true;
|
||||
else
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Load csv data 'Logistical Terms Table Horizontal Header' failed!";
|
||||
ERROR_LOG() << "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;
|
||||
}
|
||||
@@ -423,14 +422,14 @@ bool CSVImport::checkLogTermsTableHorizontalHeader(const QByteArray &qbaLogTerms
|
||||
bool CSVImport::checkLogTermsTableVerticalHeader(const QByteArray &qbaLogTermsTableVerticalHeader)
|
||||
{
|
||||
|
||||
DEBUG_LOG(m_logger) << "Data: \"" << qbaLogTermsTableVerticalHeader << "\"";
|
||||
DEBUG_LOG(m_logger) << "Data.size: Soll/Ist: 5 + 4 = 9/" << qbaLogTermsTableVerticalHeader.size();
|
||||
DEBUG_LOG() << "Data: \"" << qbaLogTermsTableVerticalHeader << "\"";
|
||||
DEBUG_LOG() << "Data.size: Soll/Ist: 5 + 4 = 9/" << qbaLogTermsTableVerticalHeader.size();
|
||||
|
||||
if (qbaLogTermsTableVerticalHeader.size() == 9)
|
||||
return true;
|
||||
else
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Load csv data 'Logistical Terms Table Vertical Header' failed!";
|
||||
ERROR_LOG() << "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;
|
||||
}
|
||||
@@ -440,12 +439,12 @@ bool CSVImport::checkLogTermsTableVerticalHeader(const QByteArray &qbaLogTermsTa
|
||||
bool CSVImport::checkLogTermsTableMatrix(const QByteArray &qbaLogTermsTableMatrix)
|
||||
{
|
||||
|
||||
DEBUG_LOG(m_logger) << "Data: \"" << qbaLogTermsTableMatrix << "\"";
|
||||
DEBUG_LOG() << "Data: \"" << qbaLogTermsTableMatrix << "\"";
|
||||
|
||||
|
||||
QStringList qsl = m_logisticalTermsModel->splitQuotedStringToRows(QString::fromLatin1(qbaLogTermsTableMatrix));
|
||||
|
||||
DEBUG_LOG(m_logger) << "Line entry size: Soll/Ist: 5/" << qsl.size();
|
||||
DEBUG_LOG() << "Line entry size: Soll/Ist: 5/" << qsl.size();
|
||||
|
||||
|
||||
if (qsl.size() == 5)
|
||||
@@ -465,7 +464,7 @@ bool CSVImport::checkLogTermsTableMatrix(const QByteArray &qbaLogTermsTableMatri
|
||||
|
||||
if (qsEntry.size() > 10)
|
||||
{
|
||||
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;
|
||||
ERROR_LOG() << "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;
|
||||
}
|
||||
@@ -477,7 +476,7 @@ bool CSVImport::checkLogTermsTableMatrix(const QByteArray &qbaLogTermsTableMatri
|
||||
|
||||
if ((qsEntry.size() > 21) || (qsEntry.indexOf(QLatin1Char('\n')) > 10))
|
||||
{
|
||||
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;
|
||||
ERROR_LOG() << "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;
|
||||
}
|
||||
@@ -487,7 +486,7 @@ bool CSVImport::checkLogTermsTableMatrix(const QByteArray &qbaLogTermsTableMatri
|
||||
}
|
||||
else
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Load csv data 'Logistical Terms Table Matrix' failed!";
|
||||
ERROR_LOG() << "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;
|
||||
}
|
||||
@@ -497,14 +496,14 @@ bool CSVImport::checkLogTermsTableMatrix(const QByteArray &qbaLogTermsTableMatri
|
||||
bool CSVImport::checkPhraseTableMatrix(const QByteArray &qbaPhraseTableMatrix)
|
||||
{
|
||||
|
||||
DEBUG_LOG(m_logger) << "Data: \"" << qbaPhraseTableMatrix << "\"";
|
||||
DEBUG_LOG() << "Data: \"" << qbaPhraseTableMatrix << "\"";
|
||||
|
||||
const QList<QByteArray> qbaLinesList = qbaPhraseTableMatrix.split('\n');
|
||||
|
||||
|
||||
if (qbaLinesList.size() != 13)
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Load csv data 'Phrase Table Matrix' failed! Invalid Line entry size: Soll/Ist: 13/" << qbaLinesList.size();
|
||||
ERROR_LOG() << "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;
|
||||
}
|
||||
@@ -517,7 +516,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(m_logger) << "Load csv data 'Phrase Table Matrix' failed! Invalid number of entrys or entry size is < 1 or >> 15. ";
|
||||
ERROR_LOG() << "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;
|
||||
}
|
||||
@@ -526,7 +525,7 @@ bool CSVImport::checkPhraseTableMatrix(const QByteArray &qbaPhraseTableMatrix)
|
||||
}
|
||||
else
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Load csv data 'Phrase Table Matrix' failed! Invalid number of entrys or empty entry per line. ";
|
||||
ERROR_LOG() << "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;
|
||||
}
|
||||
@@ -559,7 +558,7 @@ bool CSVImport::removeRedundantCvsSeperators(QByteArray &qbaLine, int desiredVal
|
||||
|
||||
if (seperatorCnt < desiredValue)
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Seperator values less than desired values.";
|
||||
ERROR_LOG() << "Seperator values less than desired values.";
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -568,7 +567,7 @@ bool CSVImport::removeRedundantCvsSeperators(QByteArray &qbaLine, int desiredVal
|
||||
qbaLine.remove(qbaLine.lastIndexOf(';'), 1);
|
||||
--seperatorCnt;
|
||||
}
|
||||
DEBUG_LOG(m_logger) << "+++Data: \"" << qbaLine << "\"" << " Soll/Ist:: " << desiredValue << "/" << seperatorCnt;
|
||||
DEBUG_LOG() << "+++Data: \"" << qbaLine << "\"" << " Soll/Ist:: " << desiredValue << "/" << seperatorCnt;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
-2
@@ -59,8 +59,6 @@ private:
|
||||
LogisticalTermsModel *m_logisticalTermsModel;
|
||||
PhraseTableModel *m_phraseTableModel;
|
||||
QString *m_note;
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
};
|
||||
|
||||
}
|
||||
+16
-17
@@ -17,9 +17,8 @@ LogisticalTermsModel::LogisticalTermsModel(QWidget *parent)
|
||||
, m_dtc(nullptr)
|
||||
, m_codificationDataId(0)
|
||||
, m_isEditMode(false)
|
||||
, m_logger(getLogger("LogisticalTermsModel"))
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "ctor LogisticalTermsModel";
|
||||
DEBUG_LOG() << "ctor LogisticalTermsModel";
|
||||
m_matrix.resize(s_matrixCount);
|
||||
for (int i = 0; i < s_matrixCount; ++i)
|
||||
m_matrix[i].resize(s_matrixCount);
|
||||
@@ -31,11 +30,11 @@ bool LogisticalTermsModel::init(const std::shared_ptr<CodificationManagement::In
|
||||
int codificationDataId,
|
||||
bool isEditMode)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "LogisticalTerms::init()";
|
||||
DEBUG_LOG() << "LogisticalTerms::init()";
|
||||
if (!dtc)
|
||||
return false;
|
||||
|
||||
DEBUG_LOG(m_logger) << "LogisticalTermsModel::init()...";
|
||||
DEBUG_LOG() << "LogisticalTermsModel::init()...";
|
||||
|
||||
m_dtc = dtc;
|
||||
m_codificationDataId = codificationDataId;
|
||||
@@ -83,7 +82,7 @@ bool LogisticalTermsModel::setColumnSelectionValuesCSV(const QString &csvData)
|
||||
|
||||
if (slColumns.size() != m_ColumnSelectionValues.size())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Invalid column data count." << " codificationDataId: " << m_codificationDataId
|
||||
ERROR_LOG() << "Invalid column data count." << " codificationDataId: " << m_codificationDataId
|
||||
<< " Soll/Ist: " << m_ColumnSelectionValues.size() << "/" << slColumns.size();
|
||||
m_ColumnSelectionValues.fill(QLatin1Char(' '));
|
||||
return false;
|
||||
@@ -94,7 +93,7 @@ bool LogisticalTermsModel::setColumnSelectionValuesCSV(const QString &csvData)
|
||||
const QStringRef &qs = slColumns.at(i);
|
||||
if (qs.size() != 1)
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Invalid column data value at id: " << i
|
||||
ERROR_LOG() << "Invalid column data value at id: " << i
|
||||
<< " codificationDataId: " << m_codificationDataId;
|
||||
return false;
|
||||
}
|
||||
@@ -114,7 +113,7 @@ bool LogisticalTermsModel::setRowSelectionValuesCSV(const QString &csvData)
|
||||
|
||||
if (slRows.size() != m_RowSelectionValues.size())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Invalid row data count." << " codificationDataId: " << m_codificationDataId
|
||||
ERROR_LOG() << "Invalid row data count." << " codificationDataId: " << m_codificationDataId
|
||||
<< " Soll/Ist: " << m_RowSelectionValues.size() << "/" << slRows.size()
|
||||
<< " Default values will be used. ";
|
||||
m_RowSelectionValues.fill(QLatin1Char(' '));
|
||||
@@ -126,7 +125,7 @@ bool LogisticalTermsModel::setRowSelectionValuesCSV(const QString &csvData)
|
||||
const QStringRef &qs = slRows.at(i);
|
||||
if (qs.size() != 1)
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Invalid row data value at id: " << i
|
||||
ERROR_LOG() << "Invalid row data value at id: " << i
|
||||
<< " codificationDataId: " << m_codificationDataId;
|
||||
return false;
|
||||
}
|
||||
@@ -139,20 +138,20 @@ bool LogisticalTermsModel::setRowSelectionValuesCSV(const QString &csvData)
|
||||
|
||||
bool LogisticalTermsModel::setMatrixValuesCSV(const QString &csvData)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "setMatrixValuesCSV: " << csvData;
|
||||
DEBUG_LOG() << "setMatrixValuesCSV: " << csvData;
|
||||
|
||||
const QStringList slRows = splitQuotedStringToRows(csvData);
|
||||
|
||||
if (slRows.isEmpty())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "split quoted csv data failed! " << " codificationDataId: " << m_codificationDataId
|
||||
ERROR_LOG() << "split quoted csv data failed! " << " codificationDataId: " << m_codificationDataId
|
||||
<< " csvData: " << csvData;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (slRows.size() != m_matrix.size())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Invalid row data count." << " codificationDataId: " << m_codificationDataId
|
||||
ERROR_LOG() << "Invalid row data count." << " codificationDataId: " << m_codificationDataId
|
||||
<< " Soll/Ist: " << m_matrix.size() << "/" << slRows.size();
|
||||
return false;
|
||||
}
|
||||
@@ -162,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(m_logger) << "Invalid column data count." << " codificationDataId: " << m_codificationDataId
|
||||
ERROR_LOG() << "Invalid column data count." << " codificationDataId: " << m_codificationDataId
|
||||
<< " Soll/Ist: " << m_matrix.size() << "/" << slColumns.size();
|
||||
return false;
|
||||
}
|
||||
@@ -218,7 +217,7 @@ QString LogisticalTermsModel::getMatrixDataCSVString() const
|
||||
}
|
||||
|
||||
const QString qs(slRows.join(QLatin1Char('\n')));
|
||||
DEBUG_LOG(m_logger) << "getMatrixDataCSVString() : " << qs;
|
||||
DEBUG_LOG() << "getMatrixDataCSVString() : " << qs;
|
||||
return qs;
|
||||
}
|
||||
|
||||
@@ -337,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(m_logger) << "setData() row/col: " << index.row() << "/" << index.column()
|
||||
DEBUG_LOG() << "setData() row/col: " << index.row() << "/" << index.column()
|
||||
<< " value:" << value.toString();
|
||||
|
||||
const QString qs = value.toString();
|
||||
@@ -394,7 +393,7 @@ void LogisticalTermsModel::onCodificationDataChanged(const CodificationManagemen
|
||||
{
|
||||
const int id = data.id();
|
||||
|
||||
DEBUG_LOG(m_logger) << "onCodificationDataChanged for CodificationData id: " << id
|
||||
DEBUG_LOG() << "onCodificationDataChanged for CodificationData id: " << id
|
||||
<< " - NumCodeColumnIdx data: " << data.numeralCodeTableColumnIndex().c_str()
|
||||
<< " - NumCodeRowIdx data: " << data.numeralCodeTableRowIndex().c_str()
|
||||
<< " - modType: " << modType;
|
||||
@@ -404,7 +403,7 @@ void LogisticalTermsModel::onCodificationDataChanged(const CodificationManagemen
|
||||
|
||||
if (modType == DataModification::eRemoved)
|
||||
{
|
||||
WARNING_LOG(m_logger) << "CodificationData was removed. id: " << id << " ToDo: 'ShowCodificationData' Tab loeschen !?";
|
||||
WARNING_LOG() << "CodificationData was removed. id: " << id << " ToDo: 'ShowCodificationData' Tab loeschen !?";
|
||||
|
||||
resetMatrix();
|
||||
setColumnSelectionValuesCSV(QString());
|
||||
@@ -414,7 +413,7 @@ void LogisticalTermsModel::onCodificationDataChanged(const CodificationManagemen
|
||||
|
||||
if (modType == DataModification::eModified)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "CodificationData was modifed. id: " << id << " - " << data.note();
|
||||
DEBUG_LOG() << "CodificationData was modifed. id: " << id << " - " << data.note();
|
||||
|
||||
QString qs = QString::fromStdString(data.logisticalTermTableColumnIndex());
|
||||
setColumnSelectionValuesCSV(qs);
|
||||
|
||||
+1
-2
@@ -118,8 +118,7 @@ private:
|
||||
std::shared_ptr<CodificationManagement::Interface::Dtc> m_dtc;
|
||||
|
||||
int m_codificationDataId;
|
||||
bool m_isEditMode;
|
||||
NGL::INGLLogger &m_logger;
|
||||
bool m_isEditMode;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
+8
-9
@@ -14,7 +14,6 @@ NumeralCodeModel::NumeralCodeModel(QWidget *parent)
|
||||
, m_dtc(nullptr)
|
||||
, m_codificationDataId(0)
|
||||
, m_isEditMode(false)
|
||||
, m_logger(getLogger("NumeralCodeTableModel"))
|
||||
{
|
||||
}
|
||||
|
||||
@@ -70,7 +69,7 @@ bool NumeralCodeModel::setColumnSelectionValuesCSV(const QString &csvData)
|
||||
|
||||
if (slColumns.size() != columnCount() - 1)
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Invalid column data count." << " codificationDataId: " << m_codificationDataId
|
||||
ERROR_LOG() << "Invalid column data count." << " codificationDataId: " << m_codificationDataId
|
||||
<< " Soll/Ist: " << columnCount() - 1 << "/" << slColumns.size();
|
||||
return false;
|
||||
}
|
||||
@@ -80,7 +79,7 @@ bool NumeralCodeModel::setColumnSelectionValuesCSV(const QString &csvData)
|
||||
const QStringRef &qs = slColumns.at(i);
|
||||
if (qs.size() != 1)
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Invalid column data value at id: " << i
|
||||
ERROR_LOG() << "Invalid column data value at id: " << i
|
||||
<< " codificationDataId: " << m_codificationDataId;
|
||||
return false;
|
||||
}
|
||||
@@ -98,7 +97,7 @@ bool NumeralCodeModel::setRowSelectionValuesCSV(const QString &csvData)
|
||||
|
||||
if (slRows.size() != rowCount() - 1)
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Invalid row data count." << " codificationDataId: " << m_codificationDataId
|
||||
ERROR_LOG() << "Invalid row data count." << " codificationDataId: " << m_codificationDataId
|
||||
<< " Soll/Ist: " << rowCount() - 1 << "/" << slRows.size()
|
||||
<< " Default values will be used. ";
|
||||
return false;
|
||||
@@ -109,7 +108,7 @@ bool NumeralCodeModel::setRowSelectionValuesCSV(const QString &csvData)
|
||||
const QStringRef &qs = slRows.at(i);
|
||||
if (qs.size() != 1)
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Invalid row data value at id: " << i
|
||||
ERROR_LOG() << "Invalid row data value at id: " << i
|
||||
<< " codificationDataId: " << m_codificationDataId;
|
||||
return false;
|
||||
}
|
||||
@@ -279,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(m_logger) << "setData() row/col: " << index.row() << "/" << index.column()
|
||||
DEBUG_LOG() << "setData() row/col: " << index.row() << "/" << index.column()
|
||||
<< " char:" << value.toString();
|
||||
|
||||
if (value.toString().contains(QLatin1Char('\"')) || value.toString().contains(QLatin1Char(';')))
|
||||
@@ -401,7 +400,7 @@ void NumeralCodeModel::onCodificationDataChanged(const CodificationManagement::C
|
||||
{
|
||||
const int id = data.id();
|
||||
|
||||
DEBUG_LOG(m_logger) << "onCodificationDataChanged for CodificationData id: " << id
|
||||
DEBUG_LOG() << "onCodificationDataChanged for CodificationData id: " << id
|
||||
<< " - NumCodeColumnIdx data: " << data.numeralCodeTableColumnIndex().c_str()
|
||||
<< " - NumCodeRowIdx data: " << data.numeralCodeTableRowIndex().c_str()
|
||||
<< " - modType: " << (int)modType;
|
||||
@@ -411,7 +410,7 @@ void NumeralCodeModel::onCodificationDataChanged(const CodificationManagement::C
|
||||
|
||||
if (modType == DataModification::eRemoved)
|
||||
{
|
||||
WARNING_LOG(m_logger) << "CodificationData was removed. id: " << id << " ToDo: 'ShowCodificationData' Tab loeschen !?";
|
||||
WARNING_LOG() << "CodificationData was removed. id: " << id << " ToDo: 'ShowCodificationData' Tab loeschen !?";
|
||||
setColumnSelectionValuesCSV(QString());
|
||||
setRowSelectionValuesCSV(QString());
|
||||
return;
|
||||
@@ -419,7 +418,7 @@ void NumeralCodeModel::onCodificationDataChanged(const CodificationManagement::C
|
||||
|
||||
if (modType == DataModification::eModified)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "CodificationData was modifed. id: " << id << " - " << data.note();
|
||||
DEBUG_LOG() << "CodificationData was modifed. id: " << id << " - " << data.note();
|
||||
|
||||
QString qs = QString::fromStdString(data.numeralCodeTableColumnIndex());
|
||||
setColumnSelectionValuesCSV(qs);
|
||||
|
||||
+1
-2
@@ -103,8 +103,7 @@ private:
|
||||
std::shared_ptr<CodificationManagement::Interface::Dtc> m_dtc;
|
||||
|
||||
int m_codificationDataId;
|
||||
bool m_isEditMode;
|
||||
NGL::INGLLogger &m_logger;
|
||||
bool m_isEditMode;
|
||||
};
|
||||
|
||||
}
|
||||
+9
-10
@@ -14,9 +14,8 @@ PhraseTableModel::PhraseTableModel(QWidget *parent)
|
||||
, m_dtc(nullptr)
|
||||
, m_codificationDataId(0)
|
||||
, m_isEditMode(false)
|
||||
, m_logger(getLogger("PhraseTableModel"))
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "ctor PhraseTableModel";
|
||||
DEBUG_LOG() << "ctor PhraseTableModel";
|
||||
|
||||
}
|
||||
|
||||
@@ -25,7 +24,7 @@ bool PhraseTableModel::init(const std::shared_ptr<CodificationManagement::Interf
|
||||
int codificationDataId,
|
||||
bool isEditMode)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "PhraseTableModel::init()";
|
||||
DEBUG_LOG() << "PhraseTableModel::init()";
|
||||
if (!dtc)
|
||||
return false;
|
||||
|
||||
@@ -75,12 +74,12 @@ void PhraseTableModel::resetMatrix()
|
||||
|
||||
bool PhraseTableModel::setMatrixValuesCSV(const QString &csvData)
|
||||
{
|
||||
DEBUG_LOG (m_logger) << "setMatrixValuesCSV() data: " << csvData;
|
||||
DEBUG_LOG() << "setMatrixValuesCSV() data: " << csvData;
|
||||
|
||||
const QVector<QStringRef> slRows = csvData.splitRef(QLatin1Char('\n'));
|
||||
if (slRows.count() != rowCount())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Invalid row data count." << " codificationDataId: " << m_codificationDataId
|
||||
ERROR_LOG() << "Invalid row data count." << " codificationDataId: " << m_codificationDataId
|
||||
<< " Soll/Ist: " << rowCount() << "/" << slRows.size();
|
||||
return false;
|
||||
}
|
||||
@@ -90,7 +89,7 @@ bool PhraseTableModel::setMatrixValuesCSV(const QString &csvData)
|
||||
const QStringList slColumns = splitQuotedString(QLatin1Char(';'), slRows[row].toString());
|
||||
if (slColumns.count() != columnCount())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Invalid column data count." << " codificationDataId: " << m_codificationDataId
|
||||
ERROR_LOG() << "Invalid column data count." << " codificationDataId: " << m_codificationDataId
|
||||
<< " Soll/Ist: " << columnCount() << "/" << slColumns.size();
|
||||
return false;
|
||||
}
|
||||
@@ -197,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(m_logger) << "setData() row/col: " << index.row() << "/" << index.column()
|
||||
DEBUG_LOG() << "setData() row/col: " << index.row() << "/" << index.column()
|
||||
<< " value:" << value.toString();
|
||||
|
||||
|
||||
@@ -250,7 +249,7 @@ void PhraseTableModel::onCodificationDataChanged(const CodificationManagement::C
|
||||
{
|
||||
const int id = data.id();
|
||||
|
||||
DEBUG_LOG(m_logger) << "onCodificationDataChanged for CodificationData id: " << id
|
||||
DEBUG_LOG() << "onCodificationDataChanged for CodificationData id: " << id
|
||||
<< " - PhraseTableModel data: " << data.phraseTable().c_str()
|
||||
<< " - modType: " << (int)modType;
|
||||
|
||||
@@ -259,7 +258,7 @@ void PhraseTableModel::onCodificationDataChanged(const CodificationManagement::C
|
||||
|
||||
if (modType == DataModification::eRemoved)
|
||||
{
|
||||
WARNING_LOG(m_logger) << "CodificationData was removed. id: " << id << " ToDo: 'ShowCodificationData' Tab loeschen !?";
|
||||
WARNING_LOG() << "CodificationData was removed. id: " << id << " ToDo: 'ShowCodificationData' Tab loeschen !?";
|
||||
|
||||
resetMatrix();
|
||||
return;
|
||||
@@ -267,7 +266,7 @@ void PhraseTableModel::onCodificationDataChanged(const CodificationManagement::C
|
||||
|
||||
if (modType == DataModification::eModified)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "CodificationData was modifed. id: " << id << " - " << data.note();
|
||||
DEBUG_LOG() << "CodificationData was modifed. id: " << id << " - " << data.note();
|
||||
|
||||
QString qs = QString::fromStdString(data.phraseTable());
|
||||
setMatrixValuesCSV(qs);
|
||||
|
||||
+1
-2
@@ -94,8 +94,7 @@ private:
|
||||
std::shared_ptr<CodificationManagement::Interface::Dtc> m_dtc;
|
||||
|
||||
int m_codificationDataId;
|
||||
bool m_isEditMode;
|
||||
NGL::INGLLogger &m_logger;
|
||||
bool m_isEditMode;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user