Compare commits

..

No commits in common. "dd06dfa30a085a76e5e8a9a390d16a22bad33983" and "37a77d7228fc49d282bfbca06bcf40df977211ff" have entirely different histories.

4 changed files with 63 additions and 43 deletions

View File

@ -222,7 +222,7 @@ include_directories(${Boost_INCLUDE_DIRS})
target_link_libraries(checks-parser PUBLIC ${Boost_LIBRARIES}) target_link_libraries(checks-parser PUBLIC ${Boost_LIBRARIES})
if (BUILD_OFD_LOCAL_QR_SCAN OR BUILD_OFD_BINARYEYE_SCAN) if (BUILD_OFD_LOCAL_QR_SCAN OR BUILD_OFD_BINARYEYE_SCAN)
find_package(OpenCV REQUIRED COMPONENTS core imgproc imgcodecs opencv_objdetect videoio) find_package(OpenCV REQUIRED COMPONENTS core imgproc imgcodecs opencv_objdetect videoio highgui)
target_link_libraries(checks-parser PRIVATE ${OpenCV_LIBS}) target_link_libraries(checks-parser PRIVATE ${OpenCV_LIBS})
target_include_directories(checks-parser PUBLIC ${OpenCV_INCLUDE_DIRS}) target_include_directories(checks-parser PUBLIC ${OpenCV_INCLUDE_DIRS})
include_directories( ${OpenCV_INCLUDE_DIRS} ) include_directories( ${OpenCV_INCLUDE_DIRS} )

View File

@ -135,9 +135,14 @@ void MainWindow::httpNewMessageHandler(QString message) {
#ifdef BUILD_OFD_LOCAL_QR_SCAN #ifdef BUILD_OFD_LOCAL_QR_SCAN
void MainWindow::on_choose_image_button_clicked() { void MainWindow::on_choose_image_button_clicked() {
QString filename = QFileDialog::getOpenFileName(this, QString(), QString(), tr("Images (*.jpg *.jpeg *.png)")); QString filename = QFileDialog::getOpenFileName();
if (filename == "") { if (filename == "") {
QMessageBox infoDialog;
infoDialog.setText(tr("Please, select a picture where QR code that contains info about check is present"));
infoDialog.setIcon(QMessageBox::Critical);
infoDialog.setWindowTitle(tr("Picture was not selected"));
infoDialog.exec();
return; return;
} }
@ -156,9 +161,14 @@ void MainWindow::onDataDecode(std::map<std::string, std::string> data) {
#ifdef BUILD_EMAIL_MODE #ifdef BUILD_EMAIL_MODE
void MainWindow::on_parse_email_button_clicked() { void MainWindow::on_parse_email_button_clicked() {
QString filename = QFileDialog::getOpenFileName(this, QString(), QString(), tr("E-Mail files (*.eml)")); QString filename = QFileDialog::getOpenFileName();
if (filename == "") { if (filename == "") {
QMessageBox infoDialog;
infoDialog.setText(tr("Please, select an e-mail which contains QR code"));
infoDialog.setIcon(QMessageBox::Critical);
infoDialog.setWindowTitle(tr("E-Mail was not selected"));
infoDialog.exec();
return; return;
} }
@ -175,6 +185,12 @@ void MainWindow::on_parse_email_button_clicked() {
} }
set_check_params(paramsMap); set_check_params(paramsMap);
// QMessageBox infoDialog;
// infoDialog.setText(tr("This feature is under development. Wait it to appear in next updates."));
// infoDialog.setIcon(QMessageBox::Warning);
// infoDialog.setWindowTitle(tr("Under development"));
// infoDialog.exec();
// return;
} }
#endif // ifdef BUILD_EMAIL_MODE #endif // ifdef BUILD_EMAIL_MODE

View File

@ -273,12 +273,7 @@
<translation>Could not start http server.</translation> <translation>Could not start http server.</translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.cpp" line="138"/> <location filename="../mainwindow.cpp" line="149"/>
<source>Images (*.jpg *.jpeg *.png)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="144"/>
<source>Selected image: </source> <source>Selected image: </source>
<translation>Selected image: </translation> <translation>Selected image: </translation>
</message> </message>
@ -291,57 +286,62 @@
<translation type="vanished">Under development</translation> <translation type="vanished">Under development</translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.cpp" line="159"/> <location filename="../mainwindow.cpp" line="168"/>
<source>E-Mail files (*.eml)</source> <source>Please, select an e-mail which contains QR code</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.cpp" line="170"/> <location filename="../mainwindow.cpp" line="170"/>
<source>E-Mail was not selected</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="180"/>
<source>QR code in this E-Mail was not found. If you are sure that the e-mail you supplied has qr code, please, contact the developer and send him the .eml file.</source> <source>QR code in this E-Mail was not found. If you are sure that the e-mail you supplied has qr code, please, contact the developer and send him the .eml file.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.cpp" line="172"/> <location filename="../mainwindow.cpp" line="182"/>
<source>QR code was not found in E-Mail</source> <source>QR code was not found in E-Mail</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.cpp" line="186"/> <location filename="../mainwindow.cpp" line="202"/>
<source>Please, add check(s) to parse</source> <source>Please, add check(s) to parse</source>
<translation>Please, add check(s) to parse</translation> <translation>Please, add check(s) to parse</translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.cpp" line="188"/> <location filename="../mainwindow.cpp" line="204"/>
<source>No checks to parse</source> <source>No checks to parse</source>
<translation>No checks to parse</translation> <translation>No checks to parse</translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.cpp" line="255"/> <location filename="../mainwindow.cpp" line="271"/>
<source>Captcha was not solved correctly!</source> <source>Captcha was not solved correctly!</source>
<translation>Captcha was not solved correctly!</translation> <translation>Captcha was not solved correctly!</translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.cpp" line="257"/> <location filename="../mainwindow.cpp" line="273"/>
<source>Captcha is incorrect</source> <source>Captcha is incorrect</source>
<translation>Captcha is incorrect</translation> <translation>Captcha is incorrect</translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.cpp" line="261"/> <location filename="../mainwindow.cpp" line="277"/>
<source>Internal server error. Please, try again later.</source> <source>Internal server error. Please, try again later.</source>
<translation>Internal server error. Please, try again later.</translation> <translation>Internal server error. Please, try again later.</translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.cpp" line="263"/> <location filename="../mainwindow.cpp" line="279"/>
<source>Internal server error</source> <source>Internal server error</source>
<translation>Internal server error</translation> <translation>Internal server error</translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.cpp" line="267"/> <location filename="../mainwindow.cpp" line="283"/>
<source>Check not found. Please, ensure correctness of entered data.</source> <source>Check not found. Please, ensure correctness of entered data.</source>
<translation>Check not found. Please, ensure correctness of entered data.</translation> <translation>Check not found. Please, ensure correctness of entered data.</translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.cpp" line="269"/> <location filename="../mainwindow.cpp" line="285"/>
<source>Check was not found</source> <source>Check was not found</source>
<translation>Check was not found</translation> <translation>Check was not found</translation>
</message> </message>
@ -354,12 +354,14 @@
<translation type="vanished">Error in parsing</translation> <translation type="vanished">Error in parsing</translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.cpp" line="142"/>
<source>Please, select a picture where QR code that contains info about check is present</source> <source>Please, select a picture where QR code that contains info about check is present</source>
<translation type="vanished">Please, select a picture where QR code that contains info about check is present</translation> <translation>Please, select a picture where QR code that contains info about check is present</translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.cpp" line="144"/>
<source>Picture was not selected</source> <source>Picture was not selected</source>
<translation type="vanished">Picture was not selected</translation> <translation>Picture was not selected</translation>
</message> </message>
<message> <message>
<source>Please, select a picture to scan</source> <source>Please, select a picture to scan</source>
@ -669,7 +671,7 @@
<context> <context>
<name>QObject</name> <name>QObject</name>
<message> <message>
<location filename="../main.cpp" line="55"/> <location filename="../main.cpp" line="59"/>
<source>Using locale: </source> <source>Using locale: </source>
<translation>Using locale: </translation> <translation>Using locale: </translation>
</message> </message>

View File

@ -261,67 +261,67 @@
<translation>Не получилось запустить HTTP сервер.</translation> <translation>Не получилось запустить HTTP сервер.</translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.cpp" line="138"/> <location filename="../mainwindow.cpp" line="149"/>
<source>Images (*.jpg *.jpeg *.png)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="144"/>
<source>Selected image: </source> <source>Selected image: </source>
<translation>Выбранное изображение: </translation> <translation>Выбранное изображение: </translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.cpp" line="159"/> <location filename="../mainwindow.cpp" line="168"/>
<source>E-Mail files (*.eml)</source> <source>Please, select an e-mail which contains QR code</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.cpp" line="170"/> <location filename="../mainwindow.cpp" line="170"/>
<source>E-Mail was not selected</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="180"/>
<source>QR code in this E-Mail was not found. If you are sure that the e-mail you supplied has qr code, please, contact the developer and send him the .eml file.</source> <source>QR code in this E-Mail was not found. If you are sure that the e-mail you supplied has qr code, please, contact the developer and send him the .eml file.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.cpp" line="172"/> <location filename="../mainwindow.cpp" line="182"/>
<source>QR code was not found in E-Mail</source> <source>QR code was not found in E-Mail</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.cpp" line="186"/> <location filename="../mainwindow.cpp" line="202"/>
<source>Please, add check(s) to parse</source> <source>Please, add check(s) to parse</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.cpp" line="188"/> <location filename="../mainwindow.cpp" line="204"/>
<source>No checks to parse</source> <source>No checks to parse</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.cpp" line="255"/> <location filename="../mainwindow.cpp" line="271"/>
<source>Captcha was not solved correctly!</source> <source>Captcha was not solved correctly!</source>
<translation>Капча была решена неверно!</translation> <translation>Капча была решена неверно!</translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.cpp" line="257"/> <location filename="../mainwindow.cpp" line="273"/>
<source>Captcha is incorrect</source> <source>Captcha is incorrect</source>
<translation>Капча введена неверно</translation> <translation>Капча введена неверно</translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.cpp" line="261"/> <location filename="../mainwindow.cpp" line="277"/>
<source>Internal server error. Please, try again later.</source> <source>Internal server error. Please, try again later.</source>
<translation>Внутренняя ошибка сервера. Пожалуйста, попробуйте снова позже.</translation> <translation>Внутренняя ошибка сервера. Пожалуйста, попробуйте снова позже.</translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.cpp" line="263"/> <location filename="../mainwindow.cpp" line="279"/>
<source>Internal server error</source> <source>Internal server error</source>
<translation>Внутренняя ошибка сервера</translation> <translation>Внутренняя ошибка сервера</translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.cpp" line="267"/> <location filename="../mainwindow.cpp" line="283"/>
<source>Check not found. Please, ensure correctness of entered data.</source> <source>Check not found. Please, ensure correctness of entered data.</source>
<translation>Чек не найден. Пожалуйста, убедитесь в правильности введённых данных.</translation> <translation>Чек не найден. Пожалуйста, убедитесь в правильности введённых данных.</translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.cpp" line="269"/> <location filename="../mainwindow.cpp" line="285"/>
<source>Check was not found</source> <source>Check was not found</source>
<translation>Чек не найден</translation> <translation>Чек не найден</translation>
</message> </message>
@ -334,12 +334,14 @@
<translation type="vanished">Ошибка в парсинге</translation> <translation type="vanished">Ошибка в парсинге</translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.cpp" line="142"/>
<source>Please, select a picture where QR code that contains info about check is present</source> <source>Please, select a picture where QR code that contains info about check is present</source>
<translation type="vanished">Пожалуйста, выберете изображение, содержащее QR код с информацией о чеке</translation> <translation>Пожалуйста, выберете изображение, содержащее QR код с информацией о чеке</translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.cpp" line="144"/>
<source>Picture was not selected</source> <source>Picture was not selected</source>
<translation type="vanished">Изображение не было выбрано</translation> <translation>Изображение не было выбрано</translation>
</message> </message>
<message> <message>
<source>Please, select a picture to scan</source> <source>Please, select a picture to scan</source>
@ -645,7 +647,7 @@
<context> <context>
<name>QObject</name> <name>QObject</name>
<message> <message>
<location filename="../main.cpp" line="55"/> <location filename="../main.cpp" line="59"/>
<source>Using locale: </source> <source>Using locale: </source>
<translation>Использую локаль: </translation> <translation>Использую локаль: </translation>
</message> </message>