diff --git a/.qt/QtDeploySupport.cmake b/.qt/QtDeploySupport.cmake new file mode 100644 index 0000000..e9bc3a9 --- /dev/null +++ b/.qt/QtDeploySupport.cmake @@ -0,0 +1,69 @@ +cmake_minimum_required(VERSION 3.16...3.21) + +# These are part of the public API. Projects should use them to provide a +# consistent set of prefix-relative destinations. +if(NOT QT_DEPLOY_BIN_DIR) + set(QT_DEPLOY_BIN_DIR "bin") +endif() +if(NOT QT_DEPLOY_LIBEXEC_DIR) + set(QT_DEPLOY_LIBEXEC_DIR "libexec") +endif() +if(NOT QT_DEPLOY_LIB_DIR) + set(QT_DEPLOY_LIB_DIR "lib") +endif() +if(NOT QT_DEPLOY_PLUGINS_DIR) + set(QT_DEPLOY_PLUGINS_DIR "plugins") +endif() +if(NOT QT_DEPLOY_QML_DIR) + set(QT_DEPLOY_QML_DIR "qml") +endif() +if(NOT QT_DEPLOY_TRANSLATIONS_DIR) + set(QT_DEPLOY_TRANSLATIONS_DIR "translations") +endif() +if(NOT QT_DEPLOY_PREFIX) + set(QT_DEPLOY_PREFIX "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}") +endif() +if(QT_DEPLOY_PREFIX STREQUAL "") + set(QT_DEPLOY_PREFIX .) +endif() +if(NOT QT_DEPLOY_IGNORED_LIB_DIRS) + set(QT_DEPLOY_IGNORED_LIB_DIRS "/lib") +endif() + +# These are internal implementation details. They may be removed at any time. +set(__QT_DEPLOY_SYSTEM_NAME "Linux") +set(__QT_DEPLOY_IS_SHARED_LIBS_BUILD "ON") +set(__QT_DEPLOY_TOOL "GRD") +set(__QT_DEPLOY_IMPL_DIR "/home/leca/checks-parser/.qt") +set(__QT_DEPLOY_VERBOSE "") +set(__QT_CMAKE_EXPORT_NAMESPACE "Qt6") +set(__QT_DEPLOY_GENERATOR_IS_MULTI_CONFIG "0") +set(__QT_DEPLOY_ACTIVE_CONFIG "Debug") +set(__QT_NO_CREATE_VERSIONLESS_FUNCTIONS "") +set(__QT_DEFAULT_MAJOR_VERSION "6") +set(__QT_DEPLOY_QT_ADDITIONAL_PACKAGES_PREFIX_PATH "") +set(__QT_DEPLOY_QT_INSTALL_PREFIX "/usr") +set(__QT_DEPLOY_QT_INSTALL_BINS "lib/qt6/bin") +set(__QT_DEPLOY_QT_INSTALL_DATA "share/qt6") +set(__QT_DEPLOY_QT_INSTALL_LIBEXECS "lib/qt6") +set(__QT_DEPLOY_QT_INSTALL_PLUGINS "lib/qt6/plugins") +set(__QT_DEPLOY_QT_INSTALL_TRANSLATIONS "share/qt6/translations") +set(__QT_DEPLOY_TARGET_QT_PATHS_PATH "/usr/lib/qt6/bin/qtpaths6") +set(__QT_DEPLOY_PLUGINS "") +set(__QT_DEPLOY_MUST_ADJUST_PLUGINS_RPATH "") +set(__QT_DEPLOY_USE_PATCHELF "") +set(__QT_DEPLOY_PATCHELF_EXECUTABLE "") +set(__QT_DEPLOY_QT_IS_MULTI_CONFIG_BUILD_WITH_DEBUG "FALSE") +set(__QT_DEPLOY_QT_DEBUG_POSTFIX "") + +# Define the CMake commands to be made available during deployment. +set(__qt_deploy_support_files + "/home/leca/checks-parser/.qt/QtDeployTargets.cmake" + "/usr/lib/cmake/Qt6Core/Qt6CoreDeploySupport.cmake" +) +foreach(__qt_deploy_support_file IN LISTS __qt_deploy_support_files) + include("${__qt_deploy_support_file}") +endforeach() + +unset(__qt_deploy_support_file) +unset(__qt_deploy_support_files) diff --git a/.qt/QtDeployTargets.cmake b/.qt/QtDeployTargets.cmake new file mode 100644 index 0000000..e59820d --- /dev/null +++ b/.qt/QtDeployTargets.cmake @@ -0,0 +1,2 @@ +set(__QT_DEPLOY_TARGET_checks-parser_FILE /home/leca/checks-parser/checks-parser) +set(__QT_DEPLOY_TARGET_checks-parser_TYPE EXECUTABLE) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3a15cf8..66361be 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -222,7 +222,7 @@ include_directories(${Boost_INCLUDE_DIRS}) target_link_libraries(checks-parser PUBLIC ${Boost_LIBRARIES}) if (BUILD_OFD_LOCAL_QR_SCAN OR BUILD_OFD_BINARYEYE_SCAN) - find_package(OpenCV REQUIRED COMPONENTS core imgproc imgcodecs opencv_objdetect videoio highgui) + find_package(OpenCV REQUIRED COMPONENTS core imgproc imgcodecs opencv_objdetect videoio) target_link_libraries(checks-parser PRIVATE ${OpenCV_LIBS}) target_include_directories(checks-parser PUBLIC ${OpenCV_INCLUDE_DIRS}) include_directories( ${OpenCV_INCLUDE_DIRS} ) diff --git a/mainwindow.cpp b/mainwindow.cpp index ddabcee..5261df1 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -135,14 +135,9 @@ void MainWindow::httpNewMessageHandler(QString message) { #ifdef BUILD_OFD_LOCAL_QR_SCAN void MainWindow::on_choose_image_button_clicked() { - QString filename = QFileDialog::getOpenFileName(); + QString filename = QFileDialog::getOpenFileName(this, QString(), QString(), tr("Images (*.jpg *.jpeg *.png)")); 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; } @@ -161,14 +156,9 @@ void MainWindow::onDataDecode(std::map data) { #ifdef BUILD_EMAIL_MODE void MainWindow::on_parse_email_button_clicked() { - QString filename = QFileDialog::getOpenFileName(); + QString filename = QFileDialog::getOpenFileName(this, QString(), QString(), tr("E-Mail files (*.eml)")); 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; } @@ -185,12 +175,6 @@ void MainWindow::on_parse_email_button_clicked() { } 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 diff --git a/translations/en_US.ts b/translations/en_US.ts index eb63ddf..ea8af57 100644 --- a/translations/en_US.ts +++ b/translations/en_US.ts @@ -273,7 +273,12 @@ Could not start http server. - + + Images (*.jpg *.jpeg *.png) + + + + Selected image: Selected image: @@ -286,62 +291,57 @@ Under development - - Please, select an e-mail which contains QR code + + E-Mail files (*.eml) - E-Mail was not selected - - - - 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. - + QR code was not found in E-Mail - + Please, add check(s) to parse Please, add check(s) to parse - + No checks to parse No checks to parse - + Captcha was not solved correctly! Captcha was not solved correctly! - + Captcha is incorrect Captcha is incorrect - + Internal server error. Please, try again later. Internal server error. Please, try again later. - + Internal server error Internal server error - + Check not found. Please, ensure correctness of entered data. Check not found. Please, ensure correctness of entered data. - + Check was not found Check was not found @@ -354,14 +354,12 @@ Error in parsing - Please, select a picture where QR code that contains info about check is present - Please, select a picture where QR code that contains info about check is present + Please, select a picture where QR code that contains info about check is present - Picture was not selected - Picture was not selected + Picture was not selected Please, select a picture to scan @@ -671,7 +669,7 @@ QObject - + Using locale: Using locale: diff --git a/translations/ru_RU.ts b/translations/ru_RU.ts index ad91bae..cdb6b82 100644 --- a/translations/ru_RU.ts +++ b/translations/ru_RU.ts @@ -261,67 +261,67 @@ Не получилось запустить HTTP сервер. - + + Images (*.jpg *.jpeg *.png) + + + + Selected image: Выбранное изображение: - - Please, select an e-mail which contains QR code + + E-Mail files (*.eml) - E-Mail was not selected - - - - 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. - + QR code was not found in E-Mail - + Please, add check(s) to parse - + No checks to parse - + Captcha was not solved correctly! Капча была решена неверно! - + Captcha is incorrect Капча введена неверно - + Internal server error. Please, try again later. Внутренняя ошибка сервера. Пожалуйста, попробуйте снова позже. - + Internal server error Внутренняя ошибка сервера - + Check not found. Please, ensure correctness of entered data. Чек не найден. Пожалуйста, убедитесь в правильности введённых данных. - + Check was not found Чек не найден @@ -334,14 +334,12 @@ Ошибка в парсинге - Please, select a picture where QR code that contains info about check is present - Пожалуйста, выберете изображение, содержащее QR код с информацией о чеке + Пожалуйста, выберете изображение, содержащее QR код с информацией о чеке - Picture was not selected - Изображение не было выбрано + Изображение не было выбрано Please, select a picture to scan @@ -647,7 +645,7 @@ QObject - + Using locale: Использую локаль: