Initial commit

This commit is contained in:
torsten committed 2026-08-13 18:33:10 +02:00
commit b7d90b9afe
16245 files changed
+3396666

No files matched your search

@@ -0,0 +1,72 @@
/**
* @RDE_HEADER@
* CodificationDataManagement - Import codification table csv data
* $Id$
* $HeadURL$
* $Author$
* Created by hjl, SLSE, 2017-03-02
*/
#pragma once
#include <QWidget>
#include <CodificationManagement/logger.h>
namespace CodificationManagement
{
class NumeralCodeModel;
class AuthenticationCodeModel;
class LogisticalTermsModel;
class PhraseTableModel;
class CSVImport : public QWidget
{
public:
enum CSVImportResult
{
UserAbort,
LoadOk,
LoadFailed
};
Q_OBJECT
public:
explicit CSVImport(NumeralCodeModel *numCodeModel,
AuthenticationCodeModel *authenticationCodeModel,
LogisticalTermsModel *logisticalTermsModel,
PhraseTableModel *phraseTableModel,
QString *note,
QWidget *parent = nullptr);
CSVImportResult loadCSVData();
CSVImportResult loadCSVDataByteArray(QByteArray content);
private:
bool checkNumCodeHorizontalHeader(const QByteArray &qbaNumCodeHorizontalHeader);
bool checkNumCodeVerticalHeader(const QByteArray &qbaNumCodeVerticalHeader);
bool checkAuthenticationCodeMatrix(QByteArray &qbaAuthenticationCodeMatrix);
bool checkLogTermsTableHorizontalHeader(const QByteArray &qbaLogTermsTableHorizontalHeader);
bool checkLogTermsTableVerticalHeader(const QByteArray &qbaLogTermsTableVerticalHeader);
bool checkLogTermsTableMatrix(const QByteArray &qbaLogTermsTableMatrix);
bool checkPhraseTableMatrix(const QByteArray &qbaPhraseTableMatrix);
static void removeQuotedCharInNote(QByteArray &qbaNote);
bool removeRedundantCvsSeperators(QByteArray &qbaLine, int desiredValue) const;
private:
NumeralCodeModel *m_numCodeModel;
AuthenticationCodeModel *m_authenticationCodeModel;
LogisticalTermsModel *m_logisticalTermsModel;
PhraseTableModel *m_phraseTableModel;
QString *m_note;
NGL::INGLLogger &m_logger; ///< Interface to the Logging-Facility
};
} //namespace CodificationManagement