diff --git a/datei.h b/datei.h index 9462db5..fbcde39 100755 --- a/datei.h +++ b/datei.h @@ -28,13 +28,13 @@ // all generated files located in sudirectory "dynamic machine data - dmd" #define FILENAME_COMPORT "../comport.csv" -#define FILENAME_CONFIG "/own/work2023/PSA1256ptu5/smd/DC2C_conf.json" -#define FILENAME_DEVICE "/own/work2023/PSA1256ptu5/smd/DC2C_device.json" -#define FILENAME_CASH "/own/work2023/PSA1256ptu5/smd/DC2C_cash.json" -#define FILENAME_PRINT "/own/work2023/PSA1256ptu5/smd/DC2C_print32.json" -#define FILENAME_APSERVCONF "../APserviceConfig.csv" - +#define FILENAME_APSERVCONF "../APserviceConfig.csv" +const QString config_path = QStringLiteral("/etc/psa_config/"); +const QString filename_config = QStringLiteral("DC2C_conf.json"); +const QString filename_device = QStringLiteral("DC2C_device.json"); +const QString filename_cash = QStringLiteral("DC2C_cash.json"); +const QString filename_print = QStringLiteral("DC2C_print32.json"); // ------------------------------------------------------------------------------------------------- // ------------------------------------------------------ create csv file ------------------------------- diff --git a/win13_json.cpp b/win13_json.cpp index 21bede9..79d0f7b 100755 --- a/win13_json.cpp +++ b/win13_json.cpp @@ -109,6 +109,13 @@ T_win13::T_win13(hwinf *HWaccess, QWidget *parent) : QWidget(parent) myTO->setSingleShot(true); myTO->start(2000); + + this->config_filename = QString(config_path) + QString(filename_config); + this->device_filename = QString(config_path) + QString(filename_device); + this->cash_filename = QString(config_path) + QString(filename_cash); + this->print_filename = QString(config_path) + QString(filename_print); + + } T_win13::~T_win13() @@ -132,9 +139,9 @@ void T_win13::Nav_next(void) void T_win13::slot_pb1(void) { showFile->clear(); - if (QFileInfo::exists(FILENAME_CONFIG)) + if (QFileInfo::exists(this->config_filename)) { - loadedFile=datei_readFromFile(FILENAME_CONFIG); + loadedFile=datei_readFromFile(this->config_filename); showFile->append(loadedFile); } else { @@ -145,9 +152,9 @@ void T_win13::slot_pb1(void) void T_win13::slot_pb2(void) { showFile->clear(); - if (QFileInfo::exists(FILENAME_DEVICE)) + if (QFileInfo::exists(this->device_filename)) { - loadedFile=datei_readFromFile(FILENAME_DEVICE); + loadedFile=datei_readFromFile(this->device_filename); showFile->append(loadedFile); } else { @@ -158,9 +165,9 @@ void T_win13::slot_pb2(void) void T_win13::slot_pb3(void) { showFile->clear(); - if (QFileInfo::exists(FILENAME_CASH)) + if (QFileInfo::exists(this->cash_filename)) { - loadedFile=datei_readFromFile(FILENAME_CASH); + loadedFile=datei_readFromFile(this->cash_filename); showFile->append(loadedFile); } else { @@ -171,9 +178,9 @@ void T_win13::slot_pb3(void) void T_win13::slot_pb4(void) { showFile->clear(); - if (QFileInfo::exists(FILENAME_PRINT)) + if (QFileInfo::exists(this->print_filename)) { - loadedFile=datei_readFromFile(FILENAME_PRINT); + loadedFile=datei_readFromFile(this->print_filename); showFile->append(loadedFile); } else { diff --git a/win13_json.h b/win13_json.h index 021d9f8..0ccf859 100755 --- a/win13_json.h +++ b/win13_json.h @@ -71,6 +71,12 @@ public slots: void slot_pb7(void); void slot_pb8(void); +private: + QString config_filename; + QString device_filename; + QString cash_filename; + QString print_filename; + }; #endif