remove unneeded code.
This commit is contained in:
		@@ -3,12 +3,11 @@ cmake_minimum_required(VERSION 3.10)
 | 
				
			|||||||
project(checks-parser VERSION 0.0.4 LANGUAGES CXX)
 | 
					project(checks-parser VERSION 0.0.4 LANGUAGES CXX)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
option(BUILD_TRANSLATIONS "Build translations?" ON)
 | 
					option(BUILD_TRANSLATIONS "Build translations?" ON)
 | 
				
			||||||
option(BUILD_EMAIL_TO_TEXT_MODE "Build email-to-text mode?" ON)
 | 
					option(BUILD_EMAIL_MODE "Build email mode?" ON)
 | 
				
			||||||
option(BUILD_OCR_MODE "Build OCR mode?" ON)
 | 
					 | 
				
			||||||
option(BUILD_OFD_LOCAL_QR_SCAN "Build OFDs' local qr scanner?" ON)
 | 
					option(BUILD_OFD_LOCAL_QR_SCAN "Build OFDs' local qr scanner?" ON)
 | 
				
			||||||
option(BUILD_OFD_BINARYEYE_SCAN "Build OFDs' binaryeye scanner?" ON)
 | 
					option(BUILD_OFD_BINARYEYE_SCAN "Build OFDs' binaryeye scanner?" ON)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if (NOT (BUILD_EMAIL_TO_TEXT_MODE OR BUILD_OCR_MODE OR BUILD_OFD_LOCAL_QR_SCAN OR BUILD_OFD_BINARYEYE_SCAN))
 | 
					if (NOT (BUILD_EMAIL_MODE OR BUILD_OFD_LOCAL_QR_SCAN OR BUILD_OFD_BINARYEYE_SCAN))
 | 
				
			||||||
    message(FATAL_ERROR "You must specify at least one of the modes of data input!")
 | 
					    message(FATAL_ERROR "You must specify at least one of the modes of data input!")
 | 
				
			||||||
    return()
 | 
					    return()
 | 
				
			||||||
endif()
 | 
					endif()
 | 
				
			||||||
@@ -29,18 +28,11 @@ if (BUILD_OFD_LOCAL_QR_SCAN OR BUILD_OFD_BINARYEYE_SCAN)
 | 
				
			|||||||
    endif()
 | 
					    endif()
 | 
				
			||||||
endif()
 | 
					endif()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if (BUILD_EMAIL_TO_TEXT_MODE)
 | 
					if (BUILD_EMAIL_MODE)
 | 
				
			||||||
    if(CMAKE_VERSION VERSION_LESS 3.12)
 | 
					    if(CMAKE_VERSION VERSION_LESS 3.12)
 | 
				
			||||||
        add_definitions(-DBUILD_EMAIL_TO_TEXT_MODE)
 | 
					        add_definitions(-DBUILD_EMAIL_MODE)
 | 
				
			||||||
    else()
 | 
					    else()
 | 
				
			||||||
        add_compile_definitions(BUILD_EMAIL_TO_TEXT_MODE)
 | 
					        add_compile_definitions(BUILD_EMAIL_MODE)
 | 
				
			||||||
    endif()
 | 
					 | 
				
			||||||
endif()
 | 
					 | 
				
			||||||
if (BUILD_OCR_MODE)
 | 
					 | 
				
			||||||
    if(CMAKE_VERSION VERSION_LESS 3.12)
 | 
					 | 
				
			||||||
        add_definitions(-DBUILD_OCR_MODE)
 | 
					 | 
				
			||||||
    else()
 | 
					 | 
				
			||||||
        add_compile_definitions(BUILD_OCR_MODE)
 | 
					 | 
				
			||||||
    endif()
 | 
					    endif()
 | 
				
			||||||
endif()
 | 
					endif()
 | 
				
			||||||
if (BUILD_OFD_LOCAL_QR_SCAN)
 | 
					if (BUILD_OFD_LOCAL_QR_SCAN)
 | 
				
			||||||
@@ -85,26 +77,17 @@ set(TRANSLATION_SOURCES
 | 
				
			|||||||
    settingsdialog.h settingsdialog.cpp scenes/settingsdialog.ui
 | 
					    settingsdialog.h settingsdialog.cpp scenes/settingsdialog.ui
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if (BUILD_EMAIL_TO_TEXT_MODE)
 | 
					 | 
				
			||||||
    list(APPEND TRANSLATION_SOURCES emailtextscene.cpp emailtextscene.h scenes/emailtextscene.ui)
 | 
					 | 
				
			||||||
endif()
 | 
					 | 
				
			||||||
if (BUILD_OCR_MODE)
 | 
					 | 
				
			||||||
    list(APPEND TRANSLATION_SOURCES ocrscene.cpp ocrscene.h scenes/ocrscene.ui)
 | 
					 | 
				
			||||||
endif()
 | 
					 | 
				
			||||||
if (BUILD_OFD_LOCAL_QR_SCAN)
 | 
					if (BUILD_OFD_LOCAL_QR_SCAN)
 | 
				
			||||||
    list(APPEND TRANSLATION_SOURCES adjustpicturedialog.h adjustpicturedialog.cpp scenes/adjustpicturedialog.ui)
 | 
					    list(APPEND TRANSLATION_SOURCES adjustpicturedialog.h adjustpicturedialog.cpp scenes/adjustpicturedialog.ui)
 | 
				
			||||||
endif()
 | 
					endif()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if (BUILD_OFD_LOCAL_QR_SCAN OR BUILD_OFD_BINARYEYE_SCAN)
 | 
					if (BUILD_OFD_LOCAL_QR_SCAN OR BUILD_OFD_BINARYEYE_SCAN)
 | 
				
			||||||
    list(APPEND TRANSLATION_SOURCES solvecaptchadialog.h solvecaptchadialog.cpp scenes/solvecaptchadialog.ui)
 | 
					    list(APPEND TRANSLATION_SOURCES solvecaptchadialog.h solvecaptchadialog.cpp scenes/solvecaptchadialog.ui)
 | 
				
			||||||
    list(APPEND TRANSLATION_SOURCES ofdscene.cpp ofdscene.h scenes/ofdscene.ui)
 | 
					 | 
				
			||||||
endif()
 | 
					endif()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
set(PROJECT_SOURCES
 | 
					set(PROJECT_SOURCES
 | 
				
			||||||
    goods/goods.h goods/goods.cpp
 | 
					    goods/goods.h goods/goods.cpp
 | 
				
			||||||
    check/check.h check/check.cpp
 | 
					    check/check.h check/check.cpp
 | 
				
			||||||
    parser/parser.h parser/parser.cpp
 | 
					 | 
				
			||||||
    parser/module.h parser/module.cpp
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    output/output_options.h output/output_options.cpp
 | 
					    output/output_options.h output/output_options.cpp
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -116,10 +99,6 @@ set(PROJECT_SOURCES
 | 
				
			|||||||
    ${TRANSLATION_SOURCES}
 | 
					    ${TRANSLATION_SOURCES}
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if (BUILD_OCR_MODE)
 | 
					 | 
				
			||||||
    list(APPEND PROJECT_SOURCES image/checkimage.h image/checkimage.cpp)
 | 
					 | 
				
			||||||
endif()
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
if (BUILD_OFD_LOCAL_QR_SCAN)
 | 
					if (BUILD_OFD_LOCAL_QR_SCAN)
 | 
				
			||||||
    list(APPEND PROJECT_SOURCES image_redactor/imageredactor.h image_redactor/imageredactor.cpp)
 | 
					    list(APPEND PROJECT_SOURCES image_redactor/imageredactor.h image_redactor/imageredactor.cpp)
 | 
				
			||||||
endif()
 | 
					endif()
 | 
				
			||||||
@@ -219,10 +198,6 @@ if (BUILD_OFD_LOCAL_QR_SCAN)
 | 
				
			|||||||
    target_link_libraries(checks-parser PRIVATE -lzbar)
 | 
					    target_link_libraries(checks-parser PRIVATE -lzbar)
 | 
				
			||||||
endif()
 | 
					endif()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if (BUILD_OCR_MODE)
 | 
					 | 
				
			||||||
    target_link_libraries(checks-parser PRIVATE -ltesseract)
 | 
					 | 
				
			||||||
endif()
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
target_link_libraries(checks-parser PRIVATE -lcurl)
 | 
					target_link_libraries(checks-parser PRIVATE -lcurl)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if (CMAKE_VERSION VERSION_LESS 3.30)
 | 
					if (CMAKE_VERSION VERSION_LESS 3.30)
 | 
				
			||||||
@@ -233,7 +208,7 @@ endif()
 | 
				
			|||||||
include_directories(${Boost_INCLUDE_DIRS})
 | 
					include_directories(${Boost_INCLUDE_DIRS})
 | 
				
			||||||
target_link_libraries(checks-parser PUBLIC ${Boost_LIBRARIES})
 | 
					target_link_libraries(checks-parser PUBLIC ${Boost_LIBRARIES})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if (BUILD_OCR_MODE OR 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)
 | 
					    find_package(OpenCV REQUIRED COMPONENTS core imgproc imgcodecs)
 | 
				
			||||||
    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})
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,57 +0,0 @@
 | 
				
			|||||||
#include "emailtextscene.h"
 | 
					 | 
				
			||||||
#include "ui_emailtextscene.h"
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#include <QMessageBox>
 | 
					 | 
				
			||||||
#include <iostream>
 | 
					 | 
				
			||||||
#include <outputdialog.h>
 | 
					 | 
				
			||||||
#include <check/check.h>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
EmailTextScene::EmailTextScene(QWidget *parent)
 | 
					 | 
				
			||||||
    : QWidget(parent)
 | 
					 | 
				
			||||||
    , ui(new Ui::EmailTextScene) {
 | 
					 | 
				
			||||||
    ui->setupUi(this);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    modules = parser.get_modules_names();
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    for (auto &module : modules) {
 | 
					 | 
				
			||||||
        ui->store_combo_box->addItem(QString::fromStdString(module));
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
EmailTextScene::~EmailTextScene() {
 | 
					 | 
				
			||||||
    delete ui;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
void EmailTextScene::on_parse_button_clicked() {
 | 
					 | 
				
			||||||
    std::wstring checkContent = ui->check_content->toPlainText().toStdWString();
 | 
					 | 
				
			||||||
    parser.set_module(parser.search_modules()[ui->store_combo_box->currentIndex()]);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    std::vector<Goods> goods = parser.parse(checkContent);
 | 
					 | 
				
			||||||
    if (goods.size() == 0) {
 | 
					 | 
				
			||||||
        QMessageBox infoDialog;
 | 
					 | 
				
			||||||
        infoDialog.setText(tr("An error has occured. Check was matched incorrectly. Vector sizes are different. Please, contact the developer."));
 | 
					 | 
				
			||||||
        infoDialog.setIcon(QMessageBox::Critical);
 | 
					 | 
				
			||||||
        infoDialog.setWindowTitle(tr("Error in parsing"));
 | 
					 | 
				
			||||||
        infoDialog.exec();
 | 
					 | 
				
			||||||
        return;
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    Check check;
 | 
					 | 
				
			||||||
    check.add_goods(goods);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    OutputDialog d(this, check);
 | 
					 | 
				
			||||||
    d.show();
 | 
					 | 
				
			||||||
    d.exec();
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
void EmailTextScene::on_check_content_textChanged() {
 | 
					 | 
				
			||||||
    std::string store = parser.try_autodetect_store(ui->check_content->toPlainText().toStdString());
 | 
					 | 
				
			||||||
    if (store == "") {
 | 
					 | 
				
			||||||
        std::cerr << tr("Could not autodetect store. If you beleive that this is an error, please, report to the developer.").toStdString() << std::endl;
 | 
					 | 
				
			||||||
        return;
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
    unsigned int index = ui->store_combo_box->findText(QString::fromStdString(store));
 | 
					 | 
				
			||||||
    ui->store_combo_box->setCurrentIndex(index);
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
@@ -1,30 +0,0 @@
 | 
				
			|||||||
#ifndef EMAILTEXTSCENE_H
 | 
					 | 
				
			||||||
#define EMAILTEXTSCENE_H
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#include "parser/parser.h"
 | 
					 | 
				
			||||||
#include <QWidget>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
namespace Ui {
 | 
					 | 
				
			||||||
class EmailTextScene;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
class EmailTextScene : public QWidget
 | 
					 | 
				
			||||||
{
 | 
					 | 
				
			||||||
    Q_OBJECT
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
public:
 | 
					 | 
				
			||||||
    explicit EmailTextScene(QWidget *parent = nullptr);
 | 
					 | 
				
			||||||
    ~EmailTextScene();
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
private slots:
 | 
					 | 
				
			||||||
    void on_parse_button_clicked();
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    void on_check_content_textChanged();
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
private:
 | 
					 | 
				
			||||||
    Ui::EmailTextScene *ui;
 | 
					 | 
				
			||||||
    Parser parser;
 | 
					 | 
				
			||||||
    std::vector<std::string> modules;
 | 
					 | 
				
			||||||
};
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#endif // EMAILTEXTSCENE_H
 | 
					 | 
				
			||||||
@@ -1,9 +1,10 @@
 | 
				
			|||||||
#include "http_server.h"
 | 
					#include "http_server.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <qobjectdefs.h>
 | 
					#include <qobjectdefs.h>
 | 
				
			||||||
#include <unistd.h>
 | 
					#include <unistd.h>
 | 
				
			||||||
#include <utils/utils.h>
 | 
					#include <utils/utils.h>
 | 
				
			||||||
#include <iostream>
 | 
					#include <iostream>
 | 
				
			||||||
#include <ofdscene.h>
 | 
					#include <mainwindow.h>
 | 
				
			||||||
#include <thread>
 | 
					#include <thread>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void HttpServer::generateRandomPort() {
 | 
					void HttpServer::generateRandomPort() {
 | 
				
			||||||
@@ -88,7 +89,7 @@ void HttpServer::handleClient(int clientSocket) {
 | 
				
			|||||||
        std::cerr << response.length() << std::endl;
 | 
					        std::cerr << response.length() << std::endl;
 | 
				
			||||||
        std::cerr << QObject::tr("Could not send message").toStdString() << std::endl;
 | 
					        std::cerr << QObject::tr("Could not send message").toStdString() << std::endl;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    emit ((OFDScene *)caller)->httpNewMessage(QString::fromStdString(std::string(buffer)));
 | 
					    emit ((MainWindow *)caller)->httpNewMessage(QString::fromStdString(std::string(buffer)));
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void HttpServer::acceptClients() {
 | 
					void HttpServer::acceptClients() {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,22 +0,0 @@
 | 
				
			|||||||
#include <opencv2/imgcodecs.hpp>
 | 
					 | 
				
			||||||
#include <string>
 | 
					 | 
				
			||||||
#include <tesseract/baseapi.h>
 | 
					 | 
				
			||||||
#include "checkimage.h"
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
CheckImage::CheckImage(std::string path) {
 | 
					 | 
				
			||||||
    this->path = path;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
std::string CheckImage::parse_text() {
 | 
					 | 
				
			||||||
    std::string result;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    tesseract::TessBaseAPI *ocr = new tesseract::TessBaseAPI();
 | 
					 | 
				
			||||||
    ocr->Init(NULL, "rus", tesseract::OEM_LSTM_ONLY);
 | 
					 | 
				
			||||||
    ocr->SetPageSegMode(tesseract::PSM_AUTO);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    cv::Mat im = cv::imread(this->path, cv::IMREAD_COLOR);
 | 
					 | 
				
			||||||
    ocr->SetImage(im.data, im.cols, im.rows, 3, im.step);
 | 
					 | 
				
			||||||
    result = std::string(ocr->GetUTF8Text());
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    return result;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
@@ -1,15 +0,0 @@
 | 
				
			|||||||
#ifndef CHECKIMAGE_H
 | 
					 | 
				
			||||||
#define CHECKIMAGE_H
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#include <string>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
class CheckImage {
 | 
					 | 
				
			||||||
    std::string path;
 | 
					 | 
				
			||||||
public:
 | 
					 | 
				
			||||||
    CheckImage(std::string path);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    std::string parse_text();
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
};
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#endif // CHECKIMAGE_H
 | 
					 | 
				
			||||||
							
								
								
									
										118
									
								
								main.cpp
									
									
									
									
									
								
							
							
						
						
									
										118
									
								
								main.cpp
									
									
									
									
									
								
							@@ -1,11 +1,10 @@
 | 
				
			|||||||
#include "mainwindow.h"
 | 
					#include <mainwindow.h>
 | 
				
			||||||
#include "net/net.h"
 | 
					#include <net/net.h>
 | 
				
			||||||
#include "settings/settings.h"
 | 
					#include <settings/settings.h>
 | 
				
			||||||
#include "utils/utils.h"
 | 
					#include <utils/utils.h>
 | 
				
			||||||
#include <QApplication>
 | 
					#include <QApplication>
 | 
				
			||||||
#ifdef BUILD_OFD_MODE
 | 
					#ifdef BUILD_OFD_MODE
 | 
				
			||||||
#   include <curl/curl.h>
 | 
					#   include <curl/curl.h>
 | 
				
			||||||
#   include <ofdscene.h>
 | 
					 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
#include <iostream>
 | 
					#include <iostream>
 | 
				
			||||||
#if __GNUC__ < 8 && __clang_major__ < 17
 | 
					#if __GNUC__ < 8 && __clang_major__ < 17
 | 
				
			||||||
@@ -19,26 +18,14 @@
 | 
				
			|||||||
#include <QFile>
 | 
					#include <QFile>
 | 
				
			||||||
#include <QStackedLayout>
 | 
					#include <QStackedLayout>
 | 
				
			||||||
#include <QTextStream>
 | 
					#include <QTextStream>
 | 
				
			||||||
#include <QTranslator>
 | 
					#ifdef BUILD_TRANSLATIONS
 | 
				
			||||||
 | 
					#   include <QTranslator>
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
#include <settingsdialog.h>
 | 
					#include <settingsdialog.h>
 | 
				
			||||||
#ifdef BUILD_EMAIL_TO_TEXT_MODE
 | 
					#ifdef BUILD_EMAIL_MODE
 | 
				
			||||||
#   include <emailtextscene.h>
 | 
					    //placeholder
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
#ifdef BUILD_OCR_MODE
 | 
					#include <QPushButton>
 | 
				
			||||||
#   include <ocrscene.h>
 | 
					 | 
				
			||||||
#endif
 | 
					 | 
				
			||||||
#include <qpushbutton.h>
 | 
					 | 
				
			||||||
#include <parser/parser.h>
 | 
					 | 
				
			||||||
#include <QtUiTools/quiloader.h>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
static QWidget *loadUI(QWidget *parent, std::string filename) {
 | 
					 | 
				
			||||||
    QUiLoader loader;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    QFile file(QString::fromStdString(filename));
 | 
					 | 
				
			||||||
    file.open(QIODevice::ReadOnly);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    return loader.load(&file, parent);
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
int main(int argc, char *argv[]) {
 | 
					int main(int argc, char *argv[]) {
 | 
				
			||||||
    curl_global_init(CURL_GLOBAL_ALL);
 | 
					    curl_global_init(CURL_GLOBAL_ALL);
 | 
				
			||||||
@@ -47,7 +34,6 @@ int main(int argc, char *argv[]) {
 | 
				
			|||||||
    create_directories(program_data_path);
 | 
					    create_directories(program_data_path);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    srand(time(0));
 | 
					    srand(time(0));
 | 
				
			||||||
    fetch_and_download_modules();
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    QApplication app(argc, argv);
 | 
					    QApplication app(argc, argv);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -56,9 +42,10 @@ int main(int argc, char *argv[]) {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    Settings s(settings_file_path);
 | 
					    Settings s(settings_file_path);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#ifdef BUILD_TRANSLATIONS
 | 
				
			||||||
    QTranslator translator;
 | 
					    QTranslator translator;
 | 
				
			||||||
    QString lang = "en_US";
 | 
					    QString lang = "en_US";
 | 
				
			||||||
#ifdef BUILD_TRANSLATIONS
 | 
					
 | 
				
			||||||
    bool languageSettingPresent = false;
 | 
					    bool languageSettingPresent = false;
 | 
				
			||||||
    languageSettingPresent = s.get_all_settings().find("language") != s.get_all_settings().end();
 | 
					    languageSettingPresent = s.get_all_settings().find("language") != s.get_all_settings().end();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -75,81 +62,18 @@ int main(int argc, char *argv[]) {
 | 
				
			|||||||
    translator.load(":/translation/" + lang + ".qm");
 | 
					    translator.load(":/translation/" + lang + ".qm");
 | 
				
			||||||
    app.installTranslator(&translator);
 | 
					    app.installTranslator(&translator);
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					    MainWindow w;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    QWidget *window = new QWidget();
 | 
					    w.show();
 | 
				
			||||||
    QStackedLayout *sceneLayout = new QStackedLayout;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    // Main Window setup
 | 
					 | 
				
			||||||
    QWidget *mainwindowscene = loadUI(window, ":/scenes/scenes/mainwindow.ui");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    sceneLayout->addWidget(mainwindowscene);
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    // TODO: move to the window
 | 
				
			||||||
    //Settings button setup
 | 
					    //Settings button setup
 | 
				
			||||||
    QPushButton *settingsButton = ((MainWindow *)mainwindowscene)->findChild<QPushButton *>("settings_button");
 | 
					    // QPushButton *settingsButton = w.findChild<QPushButton *>("settings_button");
 | 
				
			||||||
    QObject::connect(settingsButton, &QPushButton::clicked, [&]() {
 | 
					    // QObject::connect(settingsButton, &QPushButton::clicked, [&]() {
 | 
				
			||||||
        SettingsDialog d;
 | 
					    //     SettingsDialog d;
 | 
				
			||||||
        d.show();
 | 
					    //     d.show();
 | 
				
			||||||
        d.exec();
 | 
					    //     d.exec();
 | 
				
			||||||
    });
 | 
					    // });
 | 
				
			||||||
 | 
					 | 
				
			||||||
    for (auto &btn : ((MainWindow *)mainwindowscene)->findChildren<QPushButton *>()) {
 | 
					 | 
				
			||||||
        if (btn->objectName() == "settings_button") continue;
 | 
					 | 
				
			||||||
        btn->hide();
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    // Main Window buttons setup
 | 
					 | 
				
			||||||
#ifdef BUILD_EMAIL_TO_TEXT_MODE
 | 
					 | 
				
			||||||
    QPushButton *text_from_email_button = ((MainWindow *)mainwindowscene)->findChild<QPushButton *>("text_from_email_button");
 | 
					 | 
				
			||||||
    text_from_email_button->show();
 | 
					 | 
				
			||||||
    EmailTextScene *emailTextScene = new EmailTextScene();
 | 
					 | 
				
			||||||
    sceneLayout->addWidget(emailTextScene);
 | 
					 | 
				
			||||||
    QObject::connect(text_from_email_button, &QPushButton::clicked, [&]() {
 | 
					 | 
				
			||||||
        // Text from email scene
 | 
					 | 
				
			||||||
        int index = sceneLayout->indexOf(emailTextScene);
 | 
					 | 
				
			||||||
        sceneLayout->setCurrentIndex(index);
 | 
					 | 
				
			||||||
        sceneLayout->widget(index)->show();
 | 
					 | 
				
			||||||
    });
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#endif
 | 
					 | 
				
			||||||
#ifdef BUILD_OCR_MODE
 | 
					 | 
				
			||||||
    QPushButton *ocr_button = ((MainWindow *)mainwindowscene)->findChild<QPushButton *>("ocr_button");
 | 
					 | 
				
			||||||
    ocr_button->show();
 | 
					 | 
				
			||||||
    OCRScene *ocrscene = new OCRScene();
 | 
					 | 
				
			||||||
    sceneLayout->addWidget(ocrscene);
 | 
					 | 
				
			||||||
    QObject::connect(ocr_button, &QPushButton::clicked, [&]() {
 | 
					 | 
				
			||||||
        // OCR scene
 | 
					 | 
				
			||||||
        int index = sceneLayout->indexOf(ocrscene);
 | 
					 | 
				
			||||||
        sceneLayout->setCurrentIndex(index);
 | 
					 | 
				
			||||||
        sceneLayout->widget(index)->show();
 | 
					 | 
				
			||||||
    });
 | 
					 | 
				
			||||||
#endif
 | 
					 | 
				
			||||||
#ifdef BUILD_OFD_MODE
 | 
					 | 
				
			||||||
    QPushButton *ofd_button = ((MainWindow *)mainwindowscene)->findChild<QPushButton *>("ofd_button");
 | 
					 | 
				
			||||||
    ofd_button->show();
 | 
					 | 
				
			||||||
    OFDScene *ofdscene = new OFDScene();
 | 
					 | 
				
			||||||
    sceneLayout->addWidget(ofdscene);
 | 
					 | 
				
			||||||
    QObject::connect(ofd_button, &QPushButton::clicked, [&]() {
 | 
					 | 
				
			||||||
        // OFD scene
 | 
					 | 
				
			||||||
        int index = sceneLayout->indexOf(ofdscene);
 | 
					 | 
				
			||||||
        sceneLayout->setCurrentIndex(index);
 | 
					 | 
				
			||||||
        sceneLayout->widget(index)->show();
 | 
					 | 
				
			||||||
    });
 | 
					 | 
				
			||||||
#endif
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    //Setting all back buttons
 | 
					 | 
				
			||||||
    for (uint32_t sceneIndex = 0; sceneIndex < sceneLayout->count(); sceneIndex ++) {
 | 
					 | 
				
			||||||
        auto scene = sceneLayout->widget(sceneIndex);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        QPushButton *back_button = scene->findChild<QPushButton *>("back_button");
 | 
					 | 
				
			||||||
        if (back_button == nullptr) continue;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        QObject::connect(back_button, &QPushButton::clicked, [&]() {
 | 
					 | 
				
			||||||
            sceneLayout->setCurrentIndex(0);
 | 
					 | 
				
			||||||
        });
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    window->setLayout(sceneLayout);
 | 
					 | 
				
			||||||
    window->show();
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    return app.exec();
 | 
					    return app.exec();
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										222
									
								
								mainwindow.cpp
									
									
									
									
									
								
							
							
						
						
									
										222
									
								
								mainwindow.cpp
									
									
									
									
									
								
							@@ -1,13 +1,231 @@
 | 
				
			|||||||
#include "mainwindow.h"
 | 
					#include <mainwindow.h>
 | 
				
			||||||
#include "ui_mainwindow.h"
 | 
					#include "ui_mainwindow.h"
 | 
				
			||||||
#include <iostream>
 | 
					
 | 
				
			||||||
 | 
					#include <QFileDialog>
 | 
				
			||||||
 | 
					#include <QMessageBox>
 | 
				
			||||||
 | 
					#include <QPixmap>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#ifdef BUILD_OFD_LOCAL_QR_SCAN
 | 
				
			||||||
 | 
					#   include <adjustpicturedialog.h>
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#include <outputdialog.h>
 | 
				
			||||||
 | 
					#include <solvecaptchadialog.h>
 | 
				
			||||||
 | 
					#include <net/net.h>
 | 
				
			||||||
 | 
					#include <utils/utils.h>
 | 
				
			||||||
 | 
					#include <exceptions/ofdrequestexception.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#ifdef BUILD_OFD_BINARYEYE_SCAN
 | 
				
			||||||
 | 
					#   include <qrencode.h>
 | 
				
			||||||
 | 
					#   include <stdlib.h>
 | 
				
			||||||
 | 
					#   include <unistd.h>
 | 
				
			||||||
 | 
					#   include <sys/types.h>
 | 
				
			||||||
 | 
					#   include <sys/socket.h>
 | 
				
			||||||
 | 
					#   include <netinet/in.h>
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
MainWindow::MainWindow(QWidget *parent)
 | 
					MainWindow::MainWindow(QWidget *parent)
 | 
				
			||||||
    : QWidget(parent)
 | 
					    : QWidget(parent)
 | 
				
			||||||
    , ui(new Ui::MainWindow) {
 | 
					    , ui(new Ui::MainWindow) {
 | 
				
			||||||
    ui->setupUi(this);
 | 
					    ui->setupUi(this);
 | 
				
			||||||
 | 
					    ui->stop_server_button->hide();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#ifdef BUILD_OFD_BINARYEYE_SCAN
 | 
				
			||||||
 | 
					    QObject::connect(this, &MainWindow::httpErrorOccured, this, &MainWindow::notifyHttpServerFailure);
 | 
				
			||||||
 | 
					    connect(this, SIGNAL(httpNewMessage(QString)), this, SLOT(httpNewMessageHandler(QString)));
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#ifndef BUILD_EMAIL_MODE
 | 
				
			||||||
 | 
					    ui->parse_email_button->hide();
 | 
				
			||||||
 | 
					    ui->or_label_2->hide();
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#ifndef BUILD_OFD_BINARYEYE_SCAN
 | 
				
			||||||
 | 
					    ui->or_label_2->hide();
 | 
				
			||||||
 | 
					    ui->binary_eye_button->hide();
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					#ifndef BUILD_OFD_LOCAL_QR_SCAN
 | 
				
			||||||
 | 
					    ui->or_label_1->hide();
 | 
				
			||||||
 | 
					    ui->choose_image_button->hide();
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#ifdef BUILD_OFD_BINARYEYE_SCAN
 | 
				
			||||||
 | 
					void MainWindow::startHttpServer() {
 | 
				
			||||||
 | 
					    server = new HttpServer(this);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    if (server->start() < 0) {
 | 
				
			||||||
 | 
					        emit httpErrorOccured();
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void MainWindow::on_binary_eye_button_clicked() {
 | 
				
			||||||
 | 
					    httpServerThread = new std::thread(&MainWindow::startHttpServer, this);
 | 
				
			||||||
 | 
					    ui->binary_eye_button->setEnabled(false);
 | 
				
			||||||
 | 
					    ui->stop_server_button->show();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    while (!server->isStarted()) {}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    std::string localIp;
 | 
				
			||||||
 | 
					    try {
 | 
				
			||||||
 | 
					        localIp = get_local_ip_address();
 | 
				
			||||||
 | 
					    } catch(std::exception e) {
 | 
				
			||||||
 | 
					        std::cerr << e.what() << std::endl;
 | 
				
			||||||
 | 
					        return;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    std::string connectionString = "binaryeye://scan?ret=http://" + localIp + ":" + std::to_string(server->getPort()) + "/?result={RESULT}";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    generate_qr_code(connectionString);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    QMessageBox infoDialog = QMessageBox();
 | 
				
			||||||
 | 
					    infoDialog.setText(QString::fromStdString(connectionString));
 | 
				
			||||||
 | 
					    infoDialog.setIconPixmap(QPixmap(QString::fromStdString(get_path_relative_to_home(".local/share/checks_parser/binaryeye_connection.png"))).scaled(400, 400, Qt::KeepAspectRatio));
 | 
				
			||||||
 | 
					    infoDialog.setWindowTitle(tr("QR code for binaryeye to connect"));
 | 
				
			||||||
 | 
					    infoDialog.setButtonText(1, tr("I've scanned"));
 | 
				
			||||||
 | 
					    infoDialog.exec();
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void MainWindow::notifyHttpServerFailure() {
 | 
				
			||||||
 | 
					    QMessageBox infoDialog = QMessageBox();
 | 
				
			||||||
 | 
					    infoDialog.setText(tr("Could not start http server. 10 times in a row random port was occupied. Either you should run for a lottery ticket, or the problem is in the program. If the lottery ticket wasn't lucky, please, contact the developer."));
 | 
				
			||||||
 | 
					    infoDialog.setIcon(QMessageBox::Warning);
 | 
				
			||||||
 | 
					    infoDialog.setWindowTitle(tr("Could not start http server."));
 | 
				
			||||||
 | 
					    infoDialog.exec();
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void MainWindow::on_stop_server_button_clicked() {
 | 
				
			||||||
 | 
					    delete server;
 | 
				
			||||||
 | 
					    ui->stop_server_button->hide();
 | 
				
			||||||
 | 
					    ui->binary_eye_button->setEnabled(true);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void MainWindow::httpNewMessageHandler(QString message) {
 | 
				
			||||||
 | 
					    std::string parametersString = split(message.toStdString(), " ")[1];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    //erase /?result= from the string
 | 
				
			||||||
 | 
					    parametersString.erase(0, parametersString.find("=") + 1);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    std::vector<std::string> parameters = split(parametersString, "&");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    std::map<std::string, std::string> paramsMap;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    for (auto ¶meter : parameters) {
 | 
				
			||||||
 | 
					        std::vector<std::string> values = split(parameter, "=");
 | 
				
			||||||
 | 
					        paramsMap.insert(std::pair<std::string, std::string> (values[0], values[1]));
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    emit onDataDecode(paramsMap);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#endif //ifdef BUILD_OFD_BINARYEYE_SCAN
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#ifdef BUILD_OFD_LOCAL_QR_SCAN
 | 
				
			||||||
 | 
					void MainWindow::on_choose_image_button_clicked() {
 | 
				
			||||||
 | 
					    QString filename = QFileDialog::getOpenFileName();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    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;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    ui->info_label->setText(tr("Selected image: ") + filename);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    AdjustPictureDialog dialog = AdjustPictureDialog(this, filename.toStdString());
 | 
				
			||||||
 | 
					    connect(&dialog, &AdjustPictureDialog::decodedData, this, &MainWindow::onDataDecode);
 | 
				
			||||||
 | 
					    dialog.exec();
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					#endif //ifdef BUILD_OFD_LOCAL_QR_SCAN
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void MainWindow::onDataDecode(std::map<std::string, std::string> data) {
 | 
				
			||||||
 | 
					    ui->fn_line_edit->setText(QString::fromStdString(data["fn"]));
 | 
				
			||||||
 | 
					    ui->fd_line_edit->setText(QString::fromStdString(data["i"]));
 | 
				
			||||||
 | 
					    ui->fi_line_edit->setText(QString::fromStdString(data["fp"]));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    QString extractedDateTime = QString::fromStdString(data["t"]);
 | 
				
			||||||
 | 
					    //TODO: some QRs contain datetime in format yyyyMMddThhmmss. Perhaps there is more different formats, should write function to detect them.
 | 
				
			||||||
 | 
					    QDateTime datetime = QDateTime::fromString(extractedDateTime, "yyyyMMddThhmm");
 | 
				
			||||||
 | 
					    if (datetime == QDateTime::fromString(extractedDateTime, "20000101T1200")) {
 | 
				
			||||||
 | 
					        datetime = QDateTime::fromString(extractedDateTime, "yyyyMMddThhmmss");
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    ui->purchase_datetime_edit->setDateTime(datetime);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    int type = std::stoi(data["n"]);
 | 
				
			||||||
 | 
					    ui->operation_type_combo_box->setCurrentIndex(type - 1);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    std::string total = data["s"];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    ui->total_spin_box->setValue(std::stod(total));
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void MainWindow::on_parse_button_clicked() {
 | 
				
			||||||
 | 
					    Net net;
 | 
				
			||||||
 | 
					    net.get_captcha_from_ofdru();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    std::string solved_captcha = "";
 | 
				
			||||||
 | 
					    bool success = true;
 | 
				
			||||||
 | 
					    bool is_captcha_solved = true;
 | 
				
			||||||
 | 
					    Check check;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    do {
 | 
				
			||||||
 | 
					        SolveCaptchaDialog dialog = SolveCaptchaDialog(this, &solved_captcha);
 | 
				
			||||||
 | 
					        dialog.exec();
 | 
				
			||||||
 | 
					        is_captcha_solved = true;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        try {
 | 
				
			||||||
 | 
					            std::string check_content = net.fetch_check_data_from_ofdru(
 | 
				
			||||||
 | 
					                ui->fn_line_edit->text().toStdString(),
 | 
				
			||||||
 | 
					                ui->fd_line_edit->text().toStdString(),
 | 
				
			||||||
 | 
					                ui->fi_line_edit->text().toStdString(),
 | 
				
			||||||
 | 
					                ui->purchase_datetime_edit->dateTime().toString(Qt::ISODate).toStdString(),
 | 
				
			||||||
 | 
					                ui->operation_type_combo_box->currentIndex() + 1,
 | 
				
			||||||
 | 
					                // In the request to ofd.ru, total is in a format with 2 last digits represent decimal part of a number.
 | 
				
			||||||
 | 
					                ui->total_spin_box->text().toDouble() * 100,
 | 
				
			||||||
 | 
					                solved_captcha);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            check = parseOfdRuAnswer(check_content);
 | 
				
			||||||
 | 
					        } catch(OfdRequestException e) {
 | 
				
			||||||
 | 
					            success = false;
 | 
				
			||||||
 | 
					            if (!strcmp(e.what(), "Incorrect captcha")) {
 | 
				
			||||||
 | 
					                is_captcha_solved = false;
 | 
				
			||||||
 | 
					                QMessageBox infoDialog;
 | 
				
			||||||
 | 
					                infoDialog.setText(tr("Captcha was not solved correctly!"));
 | 
				
			||||||
 | 
					                infoDialog.setIcon(QMessageBox::Critical);
 | 
				
			||||||
 | 
					                infoDialog.setWindowTitle(tr("Captcha is incorrect"));
 | 
				
			||||||
 | 
					                infoDialog.exec();
 | 
				
			||||||
 | 
					                break;
 | 
				
			||||||
 | 
					            } else if (!strcmp(e.what(), "Internal server error")) {
 | 
				
			||||||
 | 
					                QMessageBox infoDialog;
 | 
				
			||||||
 | 
					                infoDialog.setText(tr("Internal server error. Please, try again later."));
 | 
				
			||||||
 | 
					                infoDialog.setIcon(QMessageBox::Critical);
 | 
				
			||||||
 | 
					                infoDialog.setWindowTitle(tr("Internal server error"));
 | 
				
			||||||
 | 
					                infoDialog.exec();
 | 
				
			||||||
 | 
					                return;
 | 
				
			||||||
 | 
					            } else if (!strcmp(e.what(), "Does not exist")) {
 | 
				
			||||||
 | 
					                QMessageBox infoDialog;
 | 
				
			||||||
 | 
					                infoDialog.setText(tr("Check not found. Please, ensure correctness of entered data."));
 | 
				
			||||||
 | 
					                infoDialog.setIcon(QMessageBox::Critical);
 | 
				
			||||||
 | 
					                infoDialog.setWindowTitle(tr("Check was not found"));
 | 
				
			||||||
 | 
					                infoDialog.exec();
 | 
				
			||||||
 | 
					                return;
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    } while (!is_captcha_solved);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    if (success) {
 | 
				
			||||||
 | 
					        OutputDialog *d = new OutputDialog(this, check);
 | 
				
			||||||
 | 
					        d->exec();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        delete d;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
MainWindow::~MainWindow() {
 | 
					MainWindow::~MainWindow() {
 | 
				
			||||||
    delete ui;
 | 
					    delete ui;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										37
									
								
								mainwindow.h
									
									
									
									
									
								
							
							
						
						
									
										37
									
								
								mainwindow.h
									
									
									
									
									
								
							@@ -2,7 +2,10 @@
 | 
				
			|||||||
#define MAINWINDOW_H
 | 
					#define MAINWINDOW_H
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <QWidget>
 | 
					#include <QWidget>
 | 
				
			||||||
#include <qevent.h>
 | 
					#include <QEvent>
 | 
				
			||||||
 | 
					#include <thread>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#include <http_server/http_server.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
namespace Ui {
 | 
					namespace Ui {
 | 
				
			||||||
class MainWindow;
 | 
					class MainWindow;
 | 
				
			||||||
@@ -15,10 +18,36 @@ class MainWindow : public QWidget
 | 
				
			|||||||
public:
 | 
					public:
 | 
				
			||||||
    explicit MainWindow(QWidget *parent = nullptr);
 | 
					    explicit MainWindow(QWidget *parent = nullptr);
 | 
				
			||||||
    ~MainWindow();
 | 
					    ~MainWindow();
 | 
				
			||||||
    Ui::MainWindow *ui;
 | 
					#ifdef BUILD_OFD_BINARYEYE_SCAN
 | 
				
			||||||
private slots:
 | 
					    void startHttpServer();
 | 
				
			||||||
private:
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					signals:
 | 
				
			||||||
 | 
					    void httpNewMessage(QString message);
 | 
				
			||||||
 | 
					    void httpErrorOccured();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					private slots:
 | 
				
			||||||
 | 
					#ifdef BUILD_OFD_LOCAL_QR_SCAN
 | 
				
			||||||
 | 
					    void on_choose_image_button_clicked();
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    void onDataDecode(std::map<std::string, std::string>);
 | 
				
			||||||
 | 
					    void on_parse_button_clicked();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#ifdef BUILD_OFD_BINARYEYE_SCAN
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    void on_binary_eye_button_clicked();
 | 
				
			||||||
 | 
					    void notifyHttpServerFailure();
 | 
				
			||||||
 | 
					    void on_stop_server_button_clicked();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    void httpNewMessageHandler(QString message);
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					private:
 | 
				
			||||||
 | 
					    Ui::MainWindow *ui;
 | 
				
			||||||
 | 
					#ifdef BUILD_OFD_BINARYEYE_SCAN
 | 
				
			||||||
 | 
					    std::thread *httpServerThread;
 | 
				
			||||||
 | 
					    HttpServer *server = NULL;
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#endif // MAINWINDOW_H
 | 
					#endif // MAINWINDOW_H
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,9 +0,0 @@
 | 
				
			|||||||
{
 | 
					 | 
				
			||||||
	"name":"Магнит",
 | 
					 | 
				
			||||||
	"autodetect_regex":"",
 | 
					 | 
				
			||||||
	"goods_name_regex": "([\\(\\)\\%\\*a-zA-Z0-9\u0401\u0451\u0410-\u044f \\.\\-\/]{17,100})",
 | 
					 | 
				
			||||||
	"goods_price_regex": "[0-9]{0,4}[^%]\\.[0-9]{2} ",
 | 
					 | 
				
			||||||
	"goods_quantity_regex": "([0-9]{0,4}[^%]\\.[0-9]{3} )|(\t\\d )",
 | 
					 | 
				
			||||||
	"check_start_regex": "",
 | 
					 | 
				
			||||||
	"check_end_regex":""
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
@@ -1,9 +0,0 @@
 | 
				
			|||||||
{
 | 
					 | 
				
			||||||
	"name":"Пятёрочка",
 | 
					 | 
				
			||||||
	"autodetect_regex":"ООО\s*\"Агроторг\"",
 | 
					 | 
				
			||||||
	"goods_name_regex": "([\\(\\)\\%\\*a-zA-Z0-9\u0401\u0451\u0410-\u044f \\.\\-\/]{17,100})",
 | 
					 | 
				
			||||||
	"goods_price_regex": "[0-9]{0,4}[^%]\\.[0-9]{2} ",
 | 
					 | 
				
			||||||
	"goods_quantity_regex": "([0-9]{0,4}[^%]\\.[0-9]{3} )|(\t\\d )",
 | 
					 | 
				
			||||||
	"check_start_regex": "КАССОВЫЙ ЧЕК\nприход",
 | 
					 | 
				
			||||||
	"check_end_regex": "Итог\\:.{0,3}[0-9]{0,6}\\.[0-9]{2}"
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
							
								
								
									
										53
									
								
								net/net.cpp
									
									
									
									
									
								
							
							
						
						
									
										53
									
								
								net/net.cpp
									
									
									
									
									
								
							@@ -1,12 +1,15 @@
 | 
				
			|||||||
#include "net.h"
 | 
					#include <net/net.h>
 | 
				
			||||||
#include <curl/curl.h>
 | 
					#include <curl/curl.h>
 | 
				
			||||||
#include "../utils/utils.h"
 | 
					#include <utils/utils.h>
 | 
				
			||||||
#include <iostream>
 | 
					#include <iostream>
 | 
				
			||||||
#include <vector>
 | 
					 | 
				
			||||||
#include <regex>
 | 
					 | 
				
			||||||
#include <boost/regex.hpp>
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
struct data {};
 | 
					Net::Net() {}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					size_t writeCallback(void* contents, size_t size, size_t nmemb, void* userp) {
 | 
				
			||||||
 | 
					    size_t totalSize = size * nmemb;
 | 
				
			||||||
 | 
					    ((std::string*)userp)->append(std::string((char*)contents));
 | 
				
			||||||
 | 
					    return totalSize;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
size_t write_data(void *buffer, size_t size, size_t nmemb, void *filename) {
 | 
					size_t write_data(void *buffer, size_t size, size_t nmemb, void *filename) {
 | 
				
			||||||
    FILE *f = fopen(((std::string *)filename)->c_str(), "w");
 | 
					    FILE *f = fopen(((std::string *)filename)->c_str(), "w");
 | 
				
			||||||
@@ -17,44 +20,6 @@ size_t write_data(void *buffer, size_t size, size_t nmemb, void *filename) {
 | 
				
			|||||||
    return written;
 | 
					    return written;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Net::Net() {}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
void write_modules(void *buffer, size_t size, size_t nmemb, void *modules) {
 | 
					 | 
				
			||||||
    std::vector<std::string> *modules_vector =
 | 
					 | 
				
			||||||
        (std::vector<std::string> *)modules;
 | 
					 | 
				
			||||||
    std::string to_parse = std::string((char*)buffer);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    boost::regex r("(?!\\\")\\w+\\.json(?!\\\")", boost::regex::collate);
 | 
					 | 
				
			||||||
    boost::smatch res;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    std::string::const_iterator search(to_parse.cbegin());
 | 
					 | 
				
			||||||
    while (boost::regex_search(search, to_parse.cend(), res, r)) {
 | 
					 | 
				
			||||||
        modules_vector->push_back(res[0]);
 | 
					 | 
				
			||||||
        search = res.suffix().first;
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
size_t writeCallback(void* contents, size_t size, size_t nmemb, void* userp) {
 | 
					 | 
				
			||||||
    size_t totalSize = size * nmemb;
 | 
					 | 
				
			||||||
    ((std::string*)userp)->append(std::string((char*)contents));
 | 
					 | 
				
			||||||
    return totalSize;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
std::vector<std::string> Net::get_all_modules(std::string url) {
 | 
					 | 
				
			||||||
    CURL *handle = curl_easy_init();
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    curl_easy_setopt(handle, CURLOPT_URL, url.c_str());
 | 
					 | 
				
			||||||
    curl_easy_setopt(handle, CURLOPT_WRITEFUNCTION, write_modules);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    std::vector<std::string> modules {};
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    curl_easy_setopt(handle, CURLOPT_WRITEDATA, &modules);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    curl_easy_perform(handle);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    return modules;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
void Net::get_file(std::string url, std::string filename) {
 | 
					void Net::get_file(std::string url, std::string filename) {
 | 
				
			||||||
    CURL *handle = curl_easy_init();
 | 
					    CURL *handle = curl_easy_init();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -5,12 +5,12 @@
 | 
				
			|||||||
#include <vector>
 | 
					#include <vector>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
size_t write_data(void *buffer, size_t size, size_t nmemb, void *userp);
 | 
					size_t write_data(void *buffer, size_t size, size_t nmemb, void *userp);
 | 
				
			||||||
 | 
					size_t writeCallback(void* contents, size_t size, size_t nmemb, void* userp);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class Net
 | 
					class Net
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
public:
 | 
					public:
 | 
				
			||||||
    Net();
 | 
					    Net();
 | 
				
			||||||
    std::vector<std::string> get_all_modules(std::string url);
 | 
					 | 
				
			||||||
    void get_file(std::string url, std::string filename);
 | 
					    void get_file(std::string url, std::string filename);
 | 
				
			||||||
    std::string fetch_check_data_from_ofdru(std::string fn, std::string fd, std::string fi, std::string datetime, int operation, int total, std::string captcha);
 | 
					    std::string fetch_check_data_from_ofdru(std::string fn, std::string fd, std::string fi, std::string datetime, int operation, int total, std::string captcha);
 | 
				
			||||||
    void get_captcha_from_ofdru();
 | 
					    void get_captcha_from_ofdru();
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										82
									
								
								ocrscene.cpp
									
									
									
									
									
								
							
							
						
						
									
										82
									
								
								ocrscene.cpp
									
									
									
									
									
								
							@@ -1,82 +0,0 @@
 | 
				
			|||||||
#include "ocrscene.h"
 | 
					 | 
				
			||||||
#include "ui_ocrscene.h"
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#include <QFileDialog>
 | 
					 | 
				
			||||||
#include <QMessageBox>
 | 
					 | 
				
			||||||
#include <outputdialog.h>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#include <image/checkimage.h>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#include <check/check.h>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
OCRScene::OCRScene(QWidget *parent)
 | 
					 | 
				
			||||||
    : QWidget(parent)
 | 
					 | 
				
			||||||
    , ui(new Ui::OCRScene) {
 | 
					 | 
				
			||||||
    ui->setupUi(this);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    auto modules = parser.get_modules_names();
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    for (auto &module : modules) {
 | 
					 | 
				
			||||||
        ui->store_combo_box->addItem(QString::fromStdString(module));
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
OCRScene::~OCRScene() {
 | 
					 | 
				
			||||||
    delete ui;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
void OCRScene::on_parse_button_clicked() {
 | 
					 | 
				
			||||||
    std::wstring checkContent = ui->check_text_edit->toPlainText().toStdWString();
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    parser.set_module(parser.search_modules()[ui->store_combo_box->currentIndex()]);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    std::vector<Goods> goods = parser.parse(checkContent);
 | 
					 | 
				
			||||||
    if (goods.size() == 0) {
 | 
					 | 
				
			||||||
        QMessageBox infoDialog;
 | 
					 | 
				
			||||||
        infoDialog.setText(tr("An error has occured. Check was matched incorrectly. Vector sizes are different. Please, contact the developer."));
 | 
					 | 
				
			||||||
        infoDialog.setIcon(QMessageBox::Critical);
 | 
					 | 
				
			||||||
        infoDialog.setWindowTitle(tr("Error in parsing"));
 | 
					 | 
				
			||||||
        infoDialog.exec();
 | 
					 | 
				
			||||||
        return;
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    Check check;
 | 
					 | 
				
			||||||
    check.add_goods(goods);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    OutputDialog d(this, check);
 | 
					 | 
				
			||||||
    d.show();
 | 
					 | 
				
			||||||
    d.exec();
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
void OCRScene::on_choose_image_button_clicked() {
 | 
					 | 
				
			||||||
    QString filename = QFileDialog::getOpenFileName();
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    if (filename == "") {
 | 
					 | 
				
			||||||
        QMessageBox infoDialog;
 | 
					 | 
				
			||||||
        infoDialog.setText(tr("Please, select a picture to scan"));
 | 
					 | 
				
			||||||
        infoDialog.setIcon(QMessageBox::Critical);
 | 
					 | 
				
			||||||
        infoDialog.setWindowTitle(tr("Picture was not selected"));
 | 
					 | 
				
			||||||
        infoDialog.exec();
 | 
					 | 
				
			||||||
        return;
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    std::string new_text = "Selected: " + filename.toStdString();
 | 
					 | 
				
			||||||
    ui->path_to_image_label->setText(tr("Path to image: ")+ filename);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    CheckImage i(filename.toStdString());
 | 
					 | 
				
			||||||
    std::string parsed = i.parse_text();
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    ui->check_text_edit->setPlainText(QString::fromStdString(parsed));
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
void OCRScene::on_check_text_edit_textChanged() {
 | 
					 | 
				
			||||||
    std::string store = parser.try_autodetect_store(ui->check_text_edit->toPlainText().toStdString());
 | 
					 | 
				
			||||||
    if (store == "") {
 | 
					 | 
				
			||||||
        std::cerr << tr("Could not autodetect store. If you beleive that this is an error, please, report to the developer.").toStdString() << std::endl;
 | 
					 | 
				
			||||||
        return;
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
    unsigned int index = ui->store_combo_box->findText(QString::fromStdString(store));
 | 
					 | 
				
			||||||
    ui->store_combo_box->setCurrentIndex(index);
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
							
								
								
									
										31
									
								
								ocrscene.h
									
									
									
									
									
								
							
							
						
						
									
										31
									
								
								ocrscene.h
									
									
									
									
									
								
							@@ -1,31 +0,0 @@
 | 
				
			|||||||
#ifndef OCRSCENE_H
 | 
					 | 
				
			||||||
#define OCRSCENE_H
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#include "parser/parser.h"
 | 
					 | 
				
			||||||
#include <QWidget>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
namespace Ui {
 | 
					 | 
				
			||||||
class OCRScene;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
class OCRScene : public QWidget
 | 
					 | 
				
			||||||
{
 | 
					 | 
				
			||||||
    Q_OBJECT
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
public:
 | 
					 | 
				
			||||||
    explicit OCRScene(QWidget *parent = nullptr);
 | 
					 | 
				
			||||||
    ~OCRScene();
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
private slots:
 | 
					 | 
				
			||||||
    void on_parse_button_clicked();
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    void on_choose_image_button_clicked();
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    void on_check_text_edit_textChanged();
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
private:
 | 
					 | 
				
			||||||
    Ui::OCRScene *ui;
 | 
					 | 
				
			||||||
    Parser parser;
 | 
					 | 
				
			||||||
};
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#endif // OCRSCENE_H
 | 
					 | 
				
			||||||
							
								
								
									
										222
									
								
								ofdscene.cpp
									
									
									
									
									
								
							
							
						
						
									
										222
									
								
								ofdscene.cpp
									
									
									
									
									
								
							@@ -1,222 +0,0 @@
 | 
				
			|||||||
#include "ofdscene.h"
 | 
					 | 
				
			||||||
#include "scenes/ui_ofdscene.h"
 | 
					 | 
				
			||||||
#include "ui_ofdscene.h"
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#include <QFileDialog>
 | 
					 | 
				
			||||||
#include <QMessageBox>
 | 
					 | 
				
			||||||
#include <QPixmap>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#ifdef BUILD_OFD_LOCAL_QR_SCAN
 | 
					 | 
				
			||||||
#   include <adjustpicturedialog.h>
 | 
					 | 
				
			||||||
#endif
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#include <outputdialog.h>
 | 
					 | 
				
			||||||
#include <solvecaptchadialog.h>
 | 
					 | 
				
			||||||
#include <net/net.h>
 | 
					 | 
				
			||||||
#include <utils/utils.h>
 | 
					 | 
				
			||||||
#include <exceptions/ofdrequestexception.h>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#ifdef BUILD_OFD_BINARYEYE_SCAN
 | 
					 | 
				
			||||||
#   include <qrencode.h>
 | 
					 | 
				
			||||||
#   include <stdlib.h>
 | 
					 | 
				
			||||||
#   include <string.h>
 | 
					 | 
				
			||||||
#   include <unistd.h>
 | 
					 | 
				
			||||||
#   include <sys/types.h>
 | 
					 | 
				
			||||||
#   include <sys/socket.h>
 | 
					 | 
				
			||||||
#   include <netinet/in.h>
 | 
					 | 
				
			||||||
#endif
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
OFDScene::OFDScene(QWidget *parent)
 | 
					 | 
				
			||||||
    : QWidget(parent)
 | 
					 | 
				
			||||||
    , ui(new Ui::OFDScene) {
 | 
					 | 
				
			||||||
    ui->setupUi(this);
 | 
					 | 
				
			||||||
    ui->stop_server_button->hide();
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#ifdef BUILD_OFD_BINARYEYE_SCAN
 | 
					 | 
				
			||||||
    QObject::connect(this, &OFDScene::httpErrorOccured, this, &OFDScene::notifyHttpServerFailure);
 | 
					 | 
				
			||||||
    connect(this, SIGNAL(httpNewMessage(QString)), this, SLOT(httpNewMessageHandler(QString)));
 | 
					 | 
				
			||||||
#endif
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
Ui::OFDScene *OFDScene::getUI() {
 | 
					 | 
				
			||||||
    return ui;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
OFDScene::~OFDScene() {
 | 
					 | 
				
			||||||
    delete ui;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#ifdef BUILD_OFD_BINARYEYE_SCAN
 | 
					 | 
				
			||||||
void OFDScene::startHttpServer() {
 | 
					 | 
				
			||||||
    server = new HttpServer(this);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    if (server->start() < 0) {
 | 
					 | 
				
			||||||
        emit httpErrorOccured();
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
void OFDScene::on_binary_eye_button_clicked() {
 | 
					 | 
				
			||||||
    httpServerThread = new std::thread(&OFDScene::startHttpServer, this);
 | 
					 | 
				
			||||||
    ui->binary_eye_button->setEnabled(false);
 | 
					 | 
				
			||||||
    ui->stop_server_button->show();
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    while (!server->isStarted()) {}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    std::string localIp;
 | 
					 | 
				
			||||||
    try {
 | 
					 | 
				
			||||||
        localIp = get_local_ip_address();
 | 
					 | 
				
			||||||
    } catch(std::exception e) {
 | 
					 | 
				
			||||||
        std::cerr << e.what() << std::endl;
 | 
					 | 
				
			||||||
        return;
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    std::string connectionString = "binaryeye://scan?ret=http://" + localIp + ":" + std::to_string(server->getPort()) + "/?result={RESULT}";
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    generate_qr_code(connectionString);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    QMessageBox infoDialog = QMessageBox();
 | 
					 | 
				
			||||||
    infoDialog.setText(QString::fromStdString(connectionString));
 | 
					 | 
				
			||||||
    infoDialog.setIconPixmap(QPixmap(QString::fromStdString(get_path_relative_to_home(".local/share/checks_parser/binaryeye_connection.png"))).scaled(400, 400, Qt::KeepAspectRatio));
 | 
					 | 
				
			||||||
    infoDialog.setWindowTitle(tr("QR code for binaryeye to connect"));
 | 
					 | 
				
			||||||
    infoDialog.setButtonText(1, tr("I've scanned"));
 | 
					 | 
				
			||||||
    infoDialog.exec();
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
void OFDScene::notifyHttpServerFailure() {
 | 
					 | 
				
			||||||
    QMessageBox infoDialog = QMessageBox();
 | 
					 | 
				
			||||||
    infoDialog.setText(tr("Could not start http server. 10 times in a row random port was occupied. Either you should run for a lottery ticket, or the problem is in the program. If the lottery ticket wasn't lucky, please, contact the developer."));
 | 
					 | 
				
			||||||
    infoDialog.setIcon(QMessageBox::Warning);
 | 
					 | 
				
			||||||
    infoDialog.setWindowTitle(tr("Could not start http server."));
 | 
					 | 
				
			||||||
    infoDialog.exec();
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
void OFDScene::on_stop_server_button_clicked() {
 | 
					 | 
				
			||||||
    delete server;
 | 
					 | 
				
			||||||
    ui->stop_server_button->hide();
 | 
					 | 
				
			||||||
    ui->binary_eye_button->setEnabled(true);
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
void OFDScene::httpNewMessageHandler(QString message) {
 | 
					 | 
				
			||||||
    std::string parametersString = split(message.toStdString(), " ")[1];
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    //erase /?result= from the string
 | 
					 | 
				
			||||||
    parametersString.erase(0, parametersString.find("=") + 1);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    std::vector<std::string> parameters = split(parametersString, "&");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    std::map<std::string, std::string> paramsMap;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    for (auto ¶meter : parameters) {
 | 
					 | 
				
			||||||
        std::vector<std::string> values = split(parameter, "=");
 | 
					 | 
				
			||||||
        paramsMap.insert(std::pair<std::string, std::string> (values[0], values[1]));
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    emit onDataDecode(paramsMap);
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#endif //ifdef BUILD_OFD_BINARYEYE_SCAN
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#ifdef BUILD_OFD_LOCAL_QR_SCAN
 | 
					 | 
				
			||||||
void OFDScene::on_choose_image_button_clicked() {
 | 
					 | 
				
			||||||
    QString filename = QFileDialog::getOpenFileName();
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    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;
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    ui->info_label->setText(tr("Selected image: ") + filename);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    AdjustPictureDialog dialog = AdjustPictureDialog(this, filename.toStdString());
 | 
					 | 
				
			||||||
    connect(&dialog, &AdjustPictureDialog::decodedData, this, &OFDScene::onDataDecode);
 | 
					 | 
				
			||||||
    dialog.exec();
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
#endif //ifdef BUILD_OFD_LOCAL_QR_SCAN
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
void OFDScene::onDataDecode(std::map<std::string, std::string> data) {
 | 
					 | 
				
			||||||
    ui->fn_line_edit->setText(QString::fromStdString(data["fn"]));
 | 
					 | 
				
			||||||
    ui->fd_line_edit->setText(QString::fromStdString(data["i"]));
 | 
					 | 
				
			||||||
    ui->fi_line_edit->setText(QString::fromStdString(data["fp"]));
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    QString extractedDateTime = QString::fromStdString(data["t"]);
 | 
					 | 
				
			||||||
    //TODO: some QRs contain datetime in format yyyyMMddThhmmss. Perhaps there is more different formats, should write function to detect them.
 | 
					 | 
				
			||||||
    QDateTime datetime = QDateTime::fromString(extractedDateTime, "yyyyMMddThhmm");
 | 
					 | 
				
			||||||
    if (datetime == QDateTime::fromString(extractedDateTime, "20000101T1200")) {
 | 
					 | 
				
			||||||
        datetime = QDateTime::fromString(extractedDateTime, "yyyyMMddThhmmss");
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
    ui->purchase_datetime_edit->setDateTime(datetime);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    int type = std::stoi(data["n"]);
 | 
					 | 
				
			||||||
    ui->operation_type_combo_box->setCurrentIndex(type - 1);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    std::string total = data["s"];
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    ui->total_spin_box->setValue(std::stod(total));
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
void OFDScene::on_parse_button_clicked() {
 | 
					 | 
				
			||||||
    Net net;
 | 
					 | 
				
			||||||
    net.get_captcha_from_ofdru();
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    std::string solved_captcha = "";
 | 
					 | 
				
			||||||
    bool success = true;
 | 
					 | 
				
			||||||
    bool is_captcha_solved = true;
 | 
					 | 
				
			||||||
    Check check;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    do {
 | 
					 | 
				
			||||||
        SolveCaptchaDialog dialog = SolveCaptchaDialog(this, &solved_captcha);
 | 
					 | 
				
			||||||
        dialog.exec();
 | 
					 | 
				
			||||||
        is_captcha_solved = true;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        try {
 | 
					 | 
				
			||||||
            std::string check_content = net.fetch_check_data_from_ofdru(
 | 
					 | 
				
			||||||
                ui->fn_line_edit->text().toStdString(),
 | 
					 | 
				
			||||||
                ui->fd_line_edit->text().toStdString(),
 | 
					 | 
				
			||||||
                ui->fi_line_edit->text().toStdString(),
 | 
					 | 
				
			||||||
                ui->purchase_datetime_edit->dateTime().toString(Qt::ISODate).toStdString(),
 | 
					 | 
				
			||||||
                ui->operation_type_combo_box->currentIndex() + 1,
 | 
					 | 
				
			||||||
                // In the request to ofd.ru, total is in a format with 2 last digits represent decimal part of a number.
 | 
					 | 
				
			||||||
                ui->total_spin_box->text().toDouble() * 100,
 | 
					 | 
				
			||||||
                solved_captcha);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
            check = parseOfdRuAnswer(check_content);
 | 
					 | 
				
			||||||
        } catch(OfdRequestException e) {
 | 
					 | 
				
			||||||
            success = false;
 | 
					 | 
				
			||||||
            if (!strcmp(e.what(), "Incorrect captcha")) {
 | 
					 | 
				
			||||||
                is_captcha_solved = false;
 | 
					 | 
				
			||||||
                QMessageBox infoDialog;
 | 
					 | 
				
			||||||
                infoDialog.setText(tr("Captcha was not solved correctly!"));
 | 
					 | 
				
			||||||
                infoDialog.setIcon(QMessageBox::Critical);
 | 
					 | 
				
			||||||
                infoDialog.setWindowTitle(tr("Captcha is incorrect"));
 | 
					 | 
				
			||||||
                infoDialog.exec();
 | 
					 | 
				
			||||||
                break;
 | 
					 | 
				
			||||||
            } else if (!strcmp(e.what(), "Internal server error")) {
 | 
					 | 
				
			||||||
                QMessageBox infoDialog;
 | 
					 | 
				
			||||||
                infoDialog.setText(tr("Internal server error. Please, try again later."));
 | 
					 | 
				
			||||||
                infoDialog.setIcon(QMessageBox::Critical);
 | 
					 | 
				
			||||||
                infoDialog.setWindowTitle(tr("Internal server error"));
 | 
					 | 
				
			||||||
                infoDialog.exec();
 | 
					 | 
				
			||||||
                return;
 | 
					 | 
				
			||||||
            } else if (!strcmp(e.what(), "Does not exist")) {
 | 
					 | 
				
			||||||
                QMessageBox infoDialog;
 | 
					 | 
				
			||||||
                infoDialog.setText(tr("Check not found. Please, ensure correctness of entered data."));
 | 
					 | 
				
			||||||
                infoDialog.setIcon(QMessageBox::Critical);
 | 
					 | 
				
			||||||
                infoDialog.setWindowTitle(tr("Check was not found"));
 | 
					 | 
				
			||||||
                infoDialog.exec();
 | 
					 | 
				
			||||||
                return;
 | 
					 | 
				
			||||||
            }
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
    } while (!is_captcha_solved);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    if (success) {
 | 
					 | 
				
			||||||
        OutputDialog *d = new OutputDialog(this, check);
 | 
					 | 
				
			||||||
        d->exec();
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        delete d;
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
							
								
								
									
										57
									
								
								ofdscene.h
									
									
									
									
									
								
							
							
						
						
									
										57
									
								
								ofdscene.h
									
									
									
									
									
								
							@@ -1,57 +0,0 @@
 | 
				
			|||||||
#ifndef OFDSCENE_H
 | 
					 | 
				
			||||||
#define OFDSCENE_H
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#include <QWidget>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#ifdef BUILD_OFD_BINARYEYE_SCAN
 | 
					 | 
				
			||||||
#   include <thread>
 | 
					 | 
				
			||||||
#   include <netinet/in.h>
 | 
					 | 
				
			||||||
#   include <http_server/http_server.h>
 | 
					 | 
				
			||||||
#endif
 | 
					 | 
				
			||||||
namespace Ui {
 | 
					 | 
				
			||||||
class OFDScene;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
class OFDScene : public QWidget
 | 
					 | 
				
			||||||
{
 | 
					 | 
				
			||||||
    Q_OBJECT
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
public:
 | 
					 | 
				
			||||||
    explicit OFDScene(QWidget *parent = nullptr);
 | 
					 | 
				
			||||||
    Ui::OFDScene *getUI();
 | 
					 | 
				
			||||||
    ~OFDScene();
 | 
					 | 
				
			||||||
#ifdef BUILD_OFD_BINARYEYE_SCAN
 | 
					 | 
				
			||||||
    void startHttpServer();
 | 
					 | 
				
			||||||
#endif
 | 
					 | 
				
			||||||
private slots:
 | 
					 | 
				
			||||||
#ifdef BUILD_OFD_LOCAL_QR_SCAN
 | 
					 | 
				
			||||||
    void on_choose_image_button_clicked();
 | 
					 | 
				
			||||||
#endif
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    void onDataDecode(std::map<std::string, std::string>);
 | 
					 | 
				
			||||||
    void on_parse_button_clicked();
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#ifdef BUILD_OFD_BINARYEYE_SCAN
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    void on_binary_eye_button_clicked();
 | 
					 | 
				
			||||||
    void notifyHttpServerFailure();
 | 
					 | 
				
			||||||
    void on_stop_server_button_clicked();
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
// public slots:
 | 
					 | 
				
			||||||
    void httpNewMessageHandler(QString message);
 | 
					 | 
				
			||||||
signals:
 | 
					 | 
				
			||||||
    void httpNewMessage(QString message);
 | 
					 | 
				
			||||||
    void httpErrorOccured();
 | 
					 | 
				
			||||||
#endif
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
private:
 | 
					 | 
				
			||||||
    Ui::OFDScene *ui;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#ifdef BUILD_OFD_BINARYEYE_SCAN
 | 
					 | 
				
			||||||
    std::thread *httpServerThread;
 | 
					 | 
				
			||||||
    HttpServer *server = NULL;
 | 
					 | 
				
			||||||
#endif
 | 
					 | 
				
			||||||
};
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#endif // OFDSCENE_H
 | 
					 | 
				
			||||||
@@ -1,97 +0,0 @@
 | 
				
			|||||||
#include "module.h"
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#include <fstream>
 | 
					 | 
				
			||||||
#include <nlohmann/json.hpp>
 | 
					 | 
				
			||||||
#include <string>
 | 
					 | 
				
			||||||
#include <utils/utils.h>
 | 
					 | 
				
			||||||
#include <boost/regex.hpp>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#include <iostream>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
StoreModule::StoreModule() {}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
std::vector<std::string> StoreModule::parse(std::wstring str, std::wstring regexp, boost::regex_constants::flag_type_ flag) {
 | 
					 | 
				
			||||||
    std::vector<std::string> result;
 | 
					 | 
				
			||||||
    boost::wregex r(regexp, flag);
 | 
					 | 
				
			||||||
    std::cout << "Handling: " << to_utf8(str) << std::endl;
 | 
					 | 
				
			||||||
    for (boost::wsregex_iterator it{str.begin(), str.end(), r}, end{}; it != end;
 | 
					 | 
				
			||||||
         it++) {
 | 
					 | 
				
			||||||
        std::cout << "Parsed: " << to_utf8(it->str()) << std::endl;
 | 
					 | 
				
			||||||
        result.push_back(to_utf8(it->str()));
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    return result;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
StoreModule::StoreModule(std::string path) {
 | 
					 | 
				
			||||||
    std::ifstream settings_file(path);
 | 
					 | 
				
			||||||
    nlohmann::json settings = nlohmann::json::parse(settings_file);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    this->name = from_utf8(settings["name"]);
 | 
					 | 
				
			||||||
    this->autodetect_regex = from_utf8(settings["autodetect_regex"]);
 | 
					 | 
				
			||||||
    this->goods_name_regex = from_utf8(settings["goods_name_regex"]);
 | 
					 | 
				
			||||||
    this->goods_price_regex = from_utf8(settings["goods_price_regex"]);
 | 
					 | 
				
			||||||
    this->goods_net_weight_regex = from_utf8(settings["goods_net_weight_regex"]);
 | 
					 | 
				
			||||||
    this->goods_quantity_regex = from_utf8(settings["goods_quantity_regex"]);
 | 
					 | 
				
			||||||
    this->check_start_regex = from_utf8(settings["check_start_regex"]);
 | 
					 | 
				
			||||||
    this->check_end_regex = from_utf8(settings["check_end_regex"]);
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
std::vector<std::string> StoreModule::parse_name(std::wstring str) {
 | 
					 | 
				
			||||||
    return parse(str, this->goods_name_regex, boost::regex_constants::perl);
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
std::vector<std::string> StoreModule::parse_price(std::wstring str) {
 | 
					 | 
				
			||||||
    return parse(str, this->goods_price_regex, boost::regex_constants::collate);
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
std::vector<std::string> StoreModule::parse_net_weight(std::vector<std::string> &names) {
 | 
					 | 
				
			||||||
    std::vector<std::string> result;
 | 
					 | 
				
			||||||
    for (std::string &name : names) {
 | 
					 | 
				
			||||||
        std::vector<std::string> parsed = parse(from_utf8(name), this->goods_net_weight_regex, boost::regex_constants::collate);
 | 
					 | 
				
			||||||
        if (parsed.size() == 0) {
 | 
					 | 
				
			||||||
            result.push_back("?");
 | 
					 | 
				
			||||||
        } else {
 | 
					 | 
				
			||||||
            result.push_back(parsed[0]);
 | 
					 | 
				
			||||||
            name.erase(name.find(parsed[0]), name.find(parsed[0]) + parsed[0].length());
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
    return result;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
std::vector<std::string> StoreModule::parse_quantity(std::wstring str) {
 | 
					 | 
				
			||||||
    return parse(str, this->goods_quantity_regex, boost::regex_constants::collate);
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
std::wstring StoreModule::trim_check(std::wstring& check) {
 | 
					 | 
				
			||||||
    unsigned int start_pos;
 | 
					 | 
				
			||||||
    unsigned int end_pos;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    boost::wregex start_regex(this->check_start_regex, boost::regex::collate);
 | 
					 | 
				
			||||||
    boost::wregex end_regex(this->check_end_regex, boost::regex::collate);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    for (boost::wsregex_iterator it{check.begin(), check.end(), start_regex}, end{};
 | 
					 | 
				
			||||||
         it != end; it++) {
 | 
					 | 
				
			||||||
        start_pos = it->position() + it->str().size();
 | 
					 | 
				
			||||||
        break;
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    check = check.substr(start_pos, check.size());
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    for (boost::wsregex_iterator it{check.begin(), check.end(), end_regex}, end{};
 | 
					 | 
				
			||||||
         it != end; it++) {
 | 
					 | 
				
			||||||
        end_pos = it->position() - 1;
 | 
					 | 
				
			||||||
        break;
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    check = check.substr(0, end_pos);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    return check;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
std::wstring StoreModule::get_name() { return this->name; }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
bool StoreModule::search_autodetect_regex(std::wstring str) {
 | 
					 | 
				
			||||||
    std::vector<std::string> parsed = parse(str, this->autodetect_regex, boost::regex_constants::collate);
 | 
					 | 
				
			||||||
    return parsed.size() > 0;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
@@ -1,36 +0,0 @@
 | 
				
			|||||||
#ifndef STORE_MODULE_H
 | 
					 | 
				
			||||||
#define STORE_MODULE_H
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#include <string>
 | 
					 | 
				
			||||||
#include <vector>
 | 
					 | 
				
			||||||
#include <boost/regex.hpp>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
class StoreModule {
 | 
					 | 
				
			||||||
    std::string path;
 | 
					 | 
				
			||||||
    std::wstring name;
 | 
					 | 
				
			||||||
    std::wstring autodetect_regex;
 | 
					 | 
				
			||||||
    std::wstring goods_name_regex;
 | 
					 | 
				
			||||||
    std::wstring goods_price_regex;
 | 
					 | 
				
			||||||
    std::wstring goods_net_weight_regex;
 | 
					 | 
				
			||||||
    std::wstring goods_quantity_regex;
 | 
					 | 
				
			||||||
    std::wstring check_start_regex;
 | 
					 | 
				
			||||||
    std::wstring check_end_regex;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    std::vector<std::string> parse(std::wstring str, std::wstring regexp, boost::regex_constants::flag_type_ flag);
 | 
					 | 
				
			||||||
public:
 | 
					 | 
				
			||||||
    StoreModule(std::string path);
 | 
					 | 
				
			||||||
    StoreModule();
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    std::vector<std::string> parse_name(std::wstring);
 | 
					 | 
				
			||||||
    std::vector<std::string> parse_price(std::wstring);
 | 
					 | 
				
			||||||
    std::vector<std::string> parse_net_weight(std::vector<std::string> &names);
 | 
					 | 
				
			||||||
    std::vector<std::string> parse_quantity(std::wstring);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    std::wstring trim_check(std::wstring&);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    std::wstring get_name();
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    bool search_autodetect_regex(std::wstring str);
 | 
					 | 
				
			||||||
};
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#endif // STORE_MODULE_H
 | 
					 | 
				
			||||||
@@ -1,121 +0,0 @@
 | 
				
			|||||||
#include "parser.h"
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#include <goods/goods.h>
 | 
					 | 
				
			||||||
#include <net/net.h>
 | 
					 | 
				
			||||||
#include <settings/settings.h>
 | 
					 | 
				
			||||||
#include <utils/utils.h>
 | 
					 | 
				
			||||||
#include <iostream>
 | 
					 | 
				
			||||||
#include <fstream>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#if __GNUC__ <= 8 && __clang_major__ < 17
 | 
					 | 
				
			||||||
#       include <experimental/filesystem>
 | 
					 | 
				
			||||||
    using namespace std::experimental;
 | 
					 | 
				
			||||||
    using namespace std::experimental::filesystem;
 | 
					 | 
				
			||||||
#else
 | 
					 | 
				
			||||||
#include <QObject>
 | 
					 | 
				
			||||||
#       include <filesystem>
 | 
					 | 
				
			||||||
    using namespace std::filesystem;
 | 
					 | 
				
			||||||
#endif
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
Parser::Parser() {}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
std::vector<std::string> Parser::search_modules() {
 | 
					 | 
				
			||||||
    Settings s(get_path_relative_to_home(".local/share/checks_parser/settings.json"));
 | 
					 | 
				
			||||||
    std::string path = get_path_relative_to_home(s.get_setting("stores_modules_dir"));//std::string(std::getenv("HOME")) + "/" + STORES_MODULES_DIR;
 | 
					 | 
				
			||||||
    directory_entry modules_dir(path);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    if (!exists(modules_dir)) {
 | 
					 | 
				
			||||||
        create_directories(path);
 | 
					 | 
				
			||||||
        std::cout << QObject::tr("No modules directory found. Created one at ").toStdString() << path
 | 
					 | 
				
			||||||
                  << std::endl;
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    std::vector<std::string> modules_files;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    for (auto &file : directory_iterator(path)) {
 | 
					 | 
				
			||||||
        modules_files.push_back(file.path());
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    return modules_files;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
std::vector<std::string> Parser::get_modules_names() {
 | 
					 | 
				
			||||||
    std::vector<std::string> modules = this->search_modules();
 | 
					 | 
				
			||||||
    std::vector<std::string> names = {};
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    for (std::string &modulePath : modules) {
 | 
					 | 
				
			||||||
        std::ifstream inputFile(modulePath);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        nlohmann::json module = nlohmann::json::parse(inputFile);
 | 
					 | 
				
			||||||
        std::string name = module["name"];
 | 
					 | 
				
			||||||
        names.push_back(name);
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    return names;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
void Parser::set_module(std::string path) { module = StoreModule(path); }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
std::vector<Goods> Parser::parse(std::wstring check_plaintext) {
 | 
					 | 
				
			||||||
    std::vector<Goods> result;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    module.trim_check(check_plaintext);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    std::vector<std::string> goods_names = module.parse_name(check_plaintext);
 | 
					 | 
				
			||||||
    std::vector<std::string> goods_prices = module.parse_price(check_plaintext);
 | 
					 | 
				
			||||||
    std::vector<std::string> goods_net_weights = module.parse_net_weight(goods_names);
 | 
					 | 
				
			||||||
    std::vector<std::string> goods_quantities = module.parse_quantity(check_plaintext);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    if (!areAllSizesEqual(goods_names, goods_prices, goods_net_weights, goods_quantities)) {
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        // dumpVectorsToStderr(goods_names, goods_prices, goods_net_weights, goods_quantities);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        //Error. Amount of names, prices, net weights or quantities are not equal. That means, that some regex(es) has mismatched.
 | 
					 | 
				
			||||||
        return {};
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
    short goods_amount = goods_names.size();
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    for (short i = 0; i < goods_amount; i++) {
 | 
					 | 
				
			||||||
        Goods goods(goods_names[i], std::stod(goods_prices[i]), goods_net_weights[i], std::stod(goods_quantities[i]));
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        result.push_back(goods);
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    return result;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
std::string Parser::try_autodetect_store(std::string str) {
 | 
					 | 
				
			||||||
    std::vector<std::string> stored_modules_paths = search_modules();
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    for (auto &module_path : stored_modules_paths) {
 | 
					 | 
				
			||||||
        StoreModule module(module_path);
 | 
					 | 
				
			||||||
        if (module.search_autodetect_regex(from_utf8(str))) return to_utf8(module.get_name());
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    return "";
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
std::vector<std::string> Parser::check_updates() {
 | 
					 | 
				
			||||||
    std::cout << QObject::tr("Checking updates for stores modules").toStdString() << std::endl;
 | 
					 | 
				
			||||||
    Settings s(get_path_relative_to_home(".local/share/checks_parser/settings.json"));
 | 
					 | 
				
			||||||
    std::string path = get_path_relative_to_home(s.get_setting("stores_modules_dir"));
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    std::vector<std::string> to_download;
 | 
					 | 
				
			||||||
    std::vector<std::string> stored_modules = search_modules();
 | 
					 | 
				
			||||||
    Net n;
 | 
					 | 
				
			||||||
    std::cerr << QObject::tr("Downloading modules list from: ").toStdString() << s.get_setting("stores_modules_url") << std::endl;
 | 
					 | 
				
			||||||
    std::vector<std::string> remote_modules = n.get_all_modules(s.get_setting("stores_modules_url"));
 | 
					 | 
				
			||||||
    if (stored_modules.empty()) {
 | 
					 | 
				
			||||||
        to_download = remote_modules;
 | 
					 | 
				
			||||||
    } else {
 | 
					 | 
				
			||||||
        for (const std::string& module : remote_modules) {
 | 
					 | 
				
			||||||
            if (!vector_contains_element(stored_modules, module)) {
 | 
					 | 
				
			||||||
                std::cout << QObject::tr("Queueing download of ").toStdString() << module << std::endl;
 | 
					 | 
				
			||||||
                to_download.push_back(module);
 | 
					 | 
				
			||||||
            }
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    return to_download;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
@@ -1,30 +0,0 @@
 | 
				
			|||||||
#ifndef PARSER_H
 | 
					 | 
				
			||||||
#define PARSER_H
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#include "../goods/goods.h"
 | 
					 | 
				
			||||||
#include "module.h"
 | 
					 | 
				
			||||||
#include <string>
 | 
					 | 
				
			||||||
#include <vector>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
class Parser {
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    StoreModule module;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
public:
 | 
					 | 
				
			||||||
    Parser();
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    std::vector<std::string> search_modules();
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    std::vector<std::string> get_modules_names();
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    std::vector<std::string> check_updates();
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    void set_module(std::string);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    std::vector<Goods> parse(std::wstring);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    std::string try_autodetect_store(std::string);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
};
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#endif // PARSER_H
 | 
					 | 
				
			||||||
@@ -1,10 +1,7 @@
 | 
				
			|||||||
<RCC>
 | 
					<RCC>
 | 
				
			||||||
    <qresource prefix="/scenes">
 | 
					    <qresource prefix="/scenes">
 | 
				
			||||||
	<file>scenes/outputdialog.ui</file>
 | 
						<file>scenes/outputdialog.ui</file>
 | 
				
			||||||
        <file>scenes/emailtextscene.ui</file>
 | 
					 | 
				
			||||||
        <file>scenes/ocrscene.ui</file>
 | 
					 | 
				
			||||||
        <file>scenes/mainwindow.ui</file>
 | 
					        <file>scenes/mainwindow.ui</file>
 | 
				
			||||||
        <file>scenes/ofdscene.ui</file>
 | 
					 | 
				
			||||||
        <file>scenes/settingsdialog.ui</file>
 | 
					        <file>scenes/settingsdialog.ui</file>
 | 
				
			||||||
	<file>scenes/solvecaptchadialog.ui</file>
 | 
						<file>scenes/solvecaptchadialog.ui</file>
 | 
				
			||||||
    </qresource>
 | 
					    </qresource>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,84 +0,0 @@
 | 
				
			|||||||
<?xml version="1.0" encoding="UTF-8"?>
 | 
					 | 
				
			||||||
<ui version="4.0">
 | 
					 | 
				
			||||||
 <class>EmailTextScene</class>
 | 
					 | 
				
			||||||
 <widget class="QWidget" name="EmailTextScene">
 | 
					 | 
				
			||||||
  <property name="geometry">
 | 
					 | 
				
			||||||
   <rect>
 | 
					 | 
				
			||||||
    <x>0</x>
 | 
					 | 
				
			||||||
    <y>0</y>
 | 
					 | 
				
			||||||
    <width>1077</width>
 | 
					 | 
				
			||||||
    <height>608</height>
 | 
					 | 
				
			||||||
   </rect>
 | 
					 | 
				
			||||||
  </property>
 | 
					 | 
				
			||||||
  <property name="windowTitle">
 | 
					 | 
				
			||||||
   <string>Form</string>
 | 
					 | 
				
			||||||
  </property>
 | 
					 | 
				
			||||||
  <layout class="QGridLayout" name="gridLayout">
 | 
					 | 
				
			||||||
   <item row="2" column="0" colspan="3">
 | 
					 | 
				
			||||||
    <widget class="QLabel" name="check_content_label">
 | 
					 | 
				
			||||||
     <property name="sizePolicy">
 | 
					 | 
				
			||||||
      <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
 | 
					 | 
				
			||||||
       <horstretch>0</horstretch>
 | 
					 | 
				
			||||||
       <verstretch>0</verstretch>
 | 
					 | 
				
			||||||
      </sizepolicy>
 | 
					 | 
				
			||||||
     </property>
 | 
					 | 
				
			||||||
     <property name="text">
 | 
					 | 
				
			||||||
      <string>Check content</string>
 | 
					 | 
				
			||||||
     </property>
 | 
					 | 
				
			||||||
    </widget>
 | 
					 | 
				
			||||||
   </item>
 | 
					 | 
				
			||||||
   <item row="4" column="0" colspan="3">
 | 
					 | 
				
			||||||
    <widget class="QPushButton" name="parse_button">
 | 
					 | 
				
			||||||
     <property name="text">
 | 
					 | 
				
			||||||
      <string>Parse</string>
 | 
					 | 
				
			||||||
     </property>
 | 
					 | 
				
			||||||
    </widget>
 | 
					 | 
				
			||||||
   </item>
 | 
					 | 
				
			||||||
   <item row="1" column="0">
 | 
					 | 
				
			||||||
    <widget class="QLabel" name="store_label">
 | 
					 | 
				
			||||||
     <property name="sizePolicy">
 | 
					 | 
				
			||||||
      <sizepolicy hsizetype="Maximum" vsizetype="Preferred">
 | 
					 | 
				
			||||||
       <horstretch>0</horstretch>
 | 
					 | 
				
			||||||
       <verstretch>0</verstretch>
 | 
					 | 
				
			||||||
      </sizepolicy>
 | 
					 | 
				
			||||||
     </property>
 | 
					 | 
				
			||||||
     <property name="text">
 | 
					 | 
				
			||||||
      <string>Store:</string>
 | 
					 | 
				
			||||||
     </property>
 | 
					 | 
				
			||||||
    </widget>
 | 
					 | 
				
			||||||
   </item>
 | 
					 | 
				
			||||||
   <item row="3" column="0" colspan="3">
 | 
					 | 
				
			||||||
    <widget class="QTextEdit" name="check_content">
 | 
					 | 
				
			||||||
     <property name="acceptRichText">
 | 
					 | 
				
			||||||
      <bool>false</bool>
 | 
					 | 
				
			||||||
     </property>
 | 
					 | 
				
			||||||
    </widget>
 | 
					 | 
				
			||||||
   </item>
 | 
					 | 
				
			||||||
   <item row="0" column="0">
 | 
					 | 
				
			||||||
    <widget class="QPushButton" name="back_button">
 | 
					 | 
				
			||||||
     <property name="sizePolicy">
 | 
					 | 
				
			||||||
      <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
 | 
					 | 
				
			||||||
       <horstretch>0</horstretch>
 | 
					 | 
				
			||||||
       <verstretch>0</verstretch>
 | 
					 | 
				
			||||||
      </sizepolicy>
 | 
					 | 
				
			||||||
     </property>
 | 
					 | 
				
			||||||
     <property name="text">
 | 
					 | 
				
			||||||
      <string>Back</string>
 | 
					 | 
				
			||||||
     </property>
 | 
					 | 
				
			||||||
    </widget>
 | 
					 | 
				
			||||||
   </item>
 | 
					 | 
				
			||||||
   <item row="1" column="1">
 | 
					 | 
				
			||||||
    <widget class="QComboBox" name="store_combo_box">
 | 
					 | 
				
			||||||
     <property name="sizePolicy">
 | 
					 | 
				
			||||||
      <sizepolicy hsizetype="Maximum" vsizetype="Fixed">
 | 
					 | 
				
			||||||
       <horstretch>0</horstretch>
 | 
					 | 
				
			||||||
       <verstretch>0</verstretch>
 | 
					 | 
				
			||||||
      </sizepolicy>
 | 
					 | 
				
			||||||
     </property>
 | 
					 | 
				
			||||||
    </widget>
 | 
					 | 
				
			||||||
   </item>
 | 
					 | 
				
			||||||
  </layout>
 | 
					 | 
				
			||||||
 </widget>
 | 
					 | 
				
			||||||
 <resources/>
 | 
					 | 
				
			||||||
 <connections/>
 | 
					 | 
				
			||||||
</ui>
 | 
					 | 
				
			||||||
@@ -7,7 +7,7 @@
 | 
				
			|||||||
    <x>0</x>
 | 
					    <x>0</x>
 | 
				
			||||||
    <y>0</y>
 | 
					    <y>0</y>
 | 
				
			||||||
    <width>1039</width>
 | 
					    <width>1039</width>
 | 
				
			||||||
    <height>693</height>
 | 
					    <height>426</height>
 | 
				
			||||||
   </rect>
 | 
					   </rect>
 | 
				
			||||||
  </property>
 | 
					  </property>
 | 
				
			||||||
  <property name="sizePolicy">
 | 
					  <property name="sizePolicy">
 | 
				
			||||||
@@ -26,134 +26,216 @@
 | 
				
			|||||||
   <string>Form</string>
 | 
					   <string>Form</string>
 | 
				
			||||||
  </property>
 | 
					  </property>
 | 
				
			||||||
  <layout class="QGridLayout" name="gridLayout">
 | 
					  <layout class="QGridLayout" name="gridLayout">
 | 
				
			||||||
   <item row="2" column="0">
 | 
					   <item row="1" column="3">
 | 
				
			||||||
    <layout class="QGridLayout" name="root_layout">
 | 
					    <widget class="QLabel" name="or_label_2">
 | 
				
			||||||
     <property name="verticalSpacing">
 | 
					     <property name="sizePolicy">
 | 
				
			||||||
      <number>6</number>
 | 
					      <sizepolicy hsizetype="Minimum" vsizetype="Preferred">
 | 
				
			||||||
 | 
					       <horstretch>0</horstretch>
 | 
				
			||||||
 | 
					       <verstretch>0</verstretch>
 | 
				
			||||||
 | 
					      </sizepolicy>
 | 
				
			||||||
     </property>
 | 
					     </property>
 | 
				
			||||||
     <item row="0" column="0">
 | 
					     <property name="text">
 | 
				
			||||||
      <widget class="QPushButton" name="text_from_email_button">
 | 
					      <string>or</string>
 | 
				
			||||||
       <property name="sizePolicy">
 | 
					     </property>
 | 
				
			||||||
        <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
 | 
					    </widget>
 | 
				
			||||||
         <horstretch>0</horstretch>
 | 
					   </item>
 | 
				
			||||||
         <verstretch>0</verstretch>
 | 
					   <item row="9" column="0" colspan="5">
 | 
				
			||||||
        </sizepolicy>
 | 
					    <widget class="QPushButton" name="parse_button">
 | 
				
			||||||
       </property>
 | 
					     <property name="sizePolicy">
 | 
				
			||||||
       <property name="toolTip">
 | 
					      <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
 | 
				
			||||||
        <string>Text from E-Mail</string>
 | 
					       <horstretch>0</horstretch>
 | 
				
			||||||
       </property>
 | 
					       <verstretch>0</verstretch>
 | 
				
			||||||
       <property name="autoFillBackground">
 | 
					      </sizepolicy>
 | 
				
			||||||
        <bool>false</bool>
 | 
					     </property>
 | 
				
			||||||
       </property>
 | 
					     <property name="text">
 | 
				
			||||||
       <property name="text">
 | 
					      <string>Parse</string>
 | 
				
			||||||
        <string/>
 | 
					     </property>
 | 
				
			||||||
       </property>
 | 
					    </widget>
 | 
				
			||||||
       <property name="icon">
 | 
					   </item>
 | 
				
			||||||
        <iconset resource="../build/Desktop-Debug/media.qrc">
 | 
					   <item row="4" column="0">
 | 
				
			||||||
         <normaloff>:/icons/assets/icons/email-text.svg</normaloff>:/icons/assets/icons/email-text.svg</iconset>
 | 
					    <widget class="QLabel" name="fd_label">
 | 
				
			||||||
       </property>
 | 
					     <property name="sizePolicy">
 | 
				
			||||||
       <property name="iconSize">
 | 
					      <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
 | 
				
			||||||
        <size>
 | 
					       <horstretch>0</horstretch>
 | 
				
			||||||
         <width>128</width>
 | 
					       <verstretch>0</verstretch>
 | 
				
			||||||
         <height>128</height>
 | 
					      </sizepolicy>
 | 
				
			||||||
        </size>
 | 
					     </property>
 | 
				
			||||||
       </property>
 | 
					     <property name="text">
 | 
				
			||||||
       <property name="autoRepeat">
 | 
					      <string>FD (Fiscal Document)</string>
 | 
				
			||||||
        <bool>false</bool>
 | 
					     </property>
 | 
				
			||||||
       </property>
 | 
					    </widget>
 | 
				
			||||||
       <property name="autoExclusive">
 | 
					   </item>
 | 
				
			||||||
        <bool>false</bool>
 | 
					   <item row="3" column="0">
 | 
				
			||||||
       </property>
 | 
					    <widget class="QLabel" name="fn_label">
 | 
				
			||||||
       <property name="autoDefault">
 | 
					     <property name="sizePolicy">
 | 
				
			||||||
        <bool>false</bool>
 | 
					      <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
 | 
				
			||||||
       </property>
 | 
					       <horstretch>0</horstretch>
 | 
				
			||||||
       <property name="default">
 | 
					       <verstretch>0</verstretch>
 | 
				
			||||||
        <bool>false</bool>
 | 
					      </sizepolicy>
 | 
				
			||||||
       </property>
 | 
					     </property>
 | 
				
			||||||
       <property name="flat">
 | 
					     <property name="text">
 | 
				
			||||||
        <bool>false</bool>
 | 
					      <string>FN (Fiscal Number)</string>
 | 
				
			||||||
       </property>
 | 
					     </property>
 | 
				
			||||||
      </widget>
 | 
					    </widget>
 | 
				
			||||||
 | 
					   </item>
 | 
				
			||||||
 | 
					   <item row="7" column="0">
 | 
				
			||||||
 | 
					    <widget class="QLabel" name="operation_type_label">
 | 
				
			||||||
 | 
					     <property name="text">
 | 
				
			||||||
 | 
					      <string>Operation type</string>
 | 
				
			||||||
 | 
					     </property>
 | 
				
			||||||
 | 
					    </widget>
 | 
				
			||||||
 | 
					   </item>
 | 
				
			||||||
 | 
					   <item row="1" column="4">
 | 
				
			||||||
 | 
					    <widget class="QPushButton" name="binary_eye_button">
 | 
				
			||||||
 | 
					     <property name="sizePolicy">
 | 
				
			||||||
 | 
					      <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
 | 
				
			||||||
 | 
					       <horstretch>0</horstretch>
 | 
				
			||||||
 | 
					       <verstretch>0</verstretch>
 | 
				
			||||||
 | 
					      </sizepolicy>
 | 
				
			||||||
 | 
					     </property>
 | 
				
			||||||
 | 
					     <property name="text">
 | 
				
			||||||
 | 
					      <string>Use your phone as a QR code scanner</string>
 | 
				
			||||||
 | 
					     </property>
 | 
				
			||||||
 | 
					    </widget>
 | 
				
			||||||
 | 
					   </item>
 | 
				
			||||||
 | 
					   <item row="2" column="0" colspan="5">
 | 
				
			||||||
 | 
					    <widget class="QLabel" name="info_label">
 | 
				
			||||||
 | 
					     <property name="sizePolicy">
 | 
				
			||||||
 | 
					      <sizepolicy hsizetype="Minimum" vsizetype="Maximum">
 | 
				
			||||||
 | 
					       <horstretch>0</horstretch>
 | 
				
			||||||
 | 
					       <verstretch>0</verstretch>
 | 
				
			||||||
 | 
					      </sizepolicy>
 | 
				
			||||||
 | 
					     </property>
 | 
				
			||||||
 | 
					     <property name="text">
 | 
				
			||||||
 | 
					      <string/>
 | 
				
			||||||
 | 
					     </property>
 | 
				
			||||||
 | 
					    </widget>
 | 
				
			||||||
 | 
					   </item>
 | 
				
			||||||
 | 
					   <item row="6" column="0">
 | 
				
			||||||
 | 
					    <widget class="QLabel" name="datetime_label">
 | 
				
			||||||
 | 
					     <property name="text">
 | 
				
			||||||
 | 
					      <string>Date and time of purchase</string>
 | 
				
			||||||
 | 
					     </property>
 | 
				
			||||||
 | 
					    </widget>
 | 
				
			||||||
 | 
					   </item>
 | 
				
			||||||
 | 
					   <item row="0" column="4">
 | 
				
			||||||
 | 
					    <widget class="QPushButton" name="stop_server_button">
 | 
				
			||||||
 | 
					     <property name="sizePolicy">
 | 
				
			||||||
 | 
					      <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
 | 
				
			||||||
 | 
					       <horstretch>0</horstretch>
 | 
				
			||||||
 | 
					       <verstretch>0</verstretch>
 | 
				
			||||||
 | 
					      </sizepolicy>
 | 
				
			||||||
 | 
					     </property>
 | 
				
			||||||
 | 
					     <property name="text">
 | 
				
			||||||
 | 
					      <string>Stop server</string>
 | 
				
			||||||
 | 
					     </property>
 | 
				
			||||||
 | 
					    </widget>
 | 
				
			||||||
 | 
					   </item>
 | 
				
			||||||
 | 
					   <item row="1" column="0">
 | 
				
			||||||
 | 
					    <widget class="QPushButton" name="choose_image_button">
 | 
				
			||||||
 | 
					     <property name="sizePolicy">
 | 
				
			||||||
 | 
					      <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
 | 
				
			||||||
 | 
					       <horstretch>0</horstretch>
 | 
				
			||||||
 | 
					       <verstretch>0</verstretch>
 | 
				
			||||||
 | 
					      </sizepolicy>
 | 
				
			||||||
 | 
					     </property>
 | 
				
			||||||
 | 
					     <property name="text">
 | 
				
			||||||
 | 
					      <string>Choose image on your PC</string>
 | 
				
			||||||
 | 
					     </property>
 | 
				
			||||||
 | 
					    </widget>
 | 
				
			||||||
 | 
					   </item>
 | 
				
			||||||
 | 
					   <item row="8" column="0">
 | 
				
			||||||
 | 
					    <widget class="QLabel" name="total_label">
 | 
				
			||||||
 | 
					     <property name="text">
 | 
				
			||||||
 | 
					      <string>Total</string>
 | 
				
			||||||
 | 
					     </property>
 | 
				
			||||||
 | 
					    </widget>
 | 
				
			||||||
 | 
					   </item>
 | 
				
			||||||
 | 
					   <item row="5" column="0">
 | 
				
			||||||
 | 
					    <widget class="QLabel" name="fi_label">
 | 
				
			||||||
 | 
					     <property name="text">
 | 
				
			||||||
 | 
					      <string>FI (Fiscal Identifier)</string>
 | 
				
			||||||
 | 
					     </property>
 | 
				
			||||||
 | 
					    </widget>
 | 
				
			||||||
 | 
					   </item>
 | 
				
			||||||
 | 
					   <item row="1" column="2">
 | 
				
			||||||
 | 
					    <widget class="QPushButton" name="parse_email_button">
 | 
				
			||||||
 | 
					     <property name="sizePolicy">
 | 
				
			||||||
 | 
					      <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
 | 
				
			||||||
 | 
					       <horstretch>0</horstretch>
 | 
				
			||||||
 | 
					       <verstretch>0</verstretch>
 | 
				
			||||||
 | 
					      </sizepolicy>
 | 
				
			||||||
 | 
					     </property>
 | 
				
			||||||
 | 
					     <property name="text">
 | 
				
			||||||
 | 
					      <string>Parse an E-Mail</string>
 | 
				
			||||||
 | 
					     </property>
 | 
				
			||||||
 | 
					    </widget>
 | 
				
			||||||
 | 
					   </item>
 | 
				
			||||||
 | 
					   <item row="1" column="1">
 | 
				
			||||||
 | 
					    <widget class="QLabel" name="or_label_1">
 | 
				
			||||||
 | 
					     <property name="sizePolicy">
 | 
				
			||||||
 | 
					      <sizepolicy hsizetype="Maximum" vsizetype="Preferred">
 | 
				
			||||||
 | 
					       <horstretch>0</horstretch>
 | 
				
			||||||
 | 
					       <verstretch>0</verstretch>
 | 
				
			||||||
 | 
					      </sizepolicy>
 | 
				
			||||||
 | 
					     </property>
 | 
				
			||||||
 | 
					     <property name="text">
 | 
				
			||||||
 | 
					      <string>or</string>
 | 
				
			||||||
 | 
					     </property>
 | 
				
			||||||
 | 
					    </widget>
 | 
				
			||||||
 | 
					   </item>
 | 
				
			||||||
 | 
					   <item row="3" column="2" colspan="3">
 | 
				
			||||||
 | 
					    <widget class="QLineEdit" name="fn_line_edit">
 | 
				
			||||||
 | 
					     <property name="sizePolicy">
 | 
				
			||||||
 | 
					      <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
 | 
				
			||||||
 | 
					       <horstretch>0</horstretch>
 | 
				
			||||||
 | 
					       <verstretch>0</verstretch>
 | 
				
			||||||
 | 
					      </sizepolicy>
 | 
				
			||||||
 | 
					     </property>
 | 
				
			||||||
 | 
					    </widget>
 | 
				
			||||||
 | 
					   </item>
 | 
				
			||||||
 | 
					   <item row="4" column="2" colspan="3">
 | 
				
			||||||
 | 
					    <widget class="QLineEdit" name="fd_line_edit"/>
 | 
				
			||||||
 | 
					   </item>
 | 
				
			||||||
 | 
					   <item row="5" column="2" colspan="3">
 | 
				
			||||||
 | 
					    <widget class="QLineEdit" name="fi_line_edit"/>
 | 
				
			||||||
 | 
					   </item>
 | 
				
			||||||
 | 
					   <item row="6" column="2" colspan="3">
 | 
				
			||||||
 | 
					    <widget class="QDateTimeEdit" name="purchase_datetime_edit"/>
 | 
				
			||||||
 | 
					   </item>
 | 
				
			||||||
 | 
					   <item row="7" column="2" colspan="3">
 | 
				
			||||||
 | 
					    <widget class="QComboBox" name="operation_type_combo_box">
 | 
				
			||||||
 | 
					     <item>
 | 
				
			||||||
 | 
					      <property name="text">
 | 
				
			||||||
 | 
					       <string>Funds income</string>
 | 
				
			||||||
 | 
					      </property>
 | 
				
			||||||
     </item>
 | 
					     </item>
 | 
				
			||||||
     <item row="0" column="1">
 | 
					     <item>
 | 
				
			||||||
      <widget class="QPushButton" name="ocr_button">
 | 
					      <property name="text">
 | 
				
			||||||
       <property name="sizePolicy">
 | 
					       <string>Funds return</string>
 | 
				
			||||||
        <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
 | 
					      </property>
 | 
				
			||||||
         <horstretch>0</horstretch>
 | 
					 | 
				
			||||||
         <verstretch>0</verstretch>
 | 
					 | 
				
			||||||
        </sizepolicy>
 | 
					 | 
				
			||||||
       </property>
 | 
					 | 
				
			||||||
       <property name="toolTip">
 | 
					 | 
				
			||||||
        <string>Optical Character Recognition</string>
 | 
					 | 
				
			||||||
       </property>
 | 
					 | 
				
			||||||
       <property name="text">
 | 
					 | 
				
			||||||
        <string/>
 | 
					 | 
				
			||||||
       </property>
 | 
					 | 
				
			||||||
       <property name="icon">
 | 
					 | 
				
			||||||
        <iconset resource="../build/Desktop-Debug/media.qrc">
 | 
					 | 
				
			||||||
         <normaloff>:/icons/assets/icons/OCR.svg</normaloff>:/icons/assets/icons/OCR.svg</iconset>
 | 
					 | 
				
			||||||
       </property>
 | 
					 | 
				
			||||||
       <property name="iconSize">
 | 
					 | 
				
			||||||
        <size>
 | 
					 | 
				
			||||||
         <width>128</width>
 | 
					 | 
				
			||||||
         <height>128</height>
 | 
					 | 
				
			||||||
        </size>
 | 
					 | 
				
			||||||
       </property>
 | 
					 | 
				
			||||||
      </widget>
 | 
					 | 
				
			||||||
     </item>
 | 
					     </item>
 | 
				
			||||||
     <item row="1" column="0">
 | 
					     <item>
 | 
				
			||||||
      <widget class="QPushButton" name="ofd_button">
 | 
					      <property name="text">
 | 
				
			||||||
       <property name="sizePolicy">
 | 
					       <string>Funds spend</string>
 | 
				
			||||||
        <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
 | 
					      </property>
 | 
				
			||||||
         <horstretch>0</horstretch>
 | 
					 | 
				
			||||||
         <verstretch>0</verstretch>
 | 
					 | 
				
			||||||
        </sizepolicy>
 | 
					 | 
				
			||||||
       </property>
 | 
					 | 
				
			||||||
       <property name="text">
 | 
					 | 
				
			||||||
        <string/>
 | 
					 | 
				
			||||||
       </property>
 | 
					 | 
				
			||||||
       <property name="icon">
 | 
					 | 
				
			||||||
        <iconset resource="../build/Desktop-Debug/media.qrc">
 | 
					 | 
				
			||||||
         <normaloff>:/icons/assets/icons/OFD.svg</normaloff>:/icons/assets/icons/OFD.svg</iconset>
 | 
					 | 
				
			||||||
       </property>
 | 
					 | 
				
			||||||
       <property name="iconSize">
 | 
					 | 
				
			||||||
        <size>
 | 
					 | 
				
			||||||
         <width>128</width>
 | 
					 | 
				
			||||||
         <height>128</height>
 | 
					 | 
				
			||||||
        </size>
 | 
					 | 
				
			||||||
       </property>
 | 
					 | 
				
			||||||
      </widget>
 | 
					 | 
				
			||||||
     </item>
 | 
					     </item>
 | 
				
			||||||
     <item row="1" column="1">
 | 
					     <item>
 | 
				
			||||||
      <widget class="QPushButton" name="settings_button">
 | 
					      <property name="text">
 | 
				
			||||||
       <property name="sizePolicy">
 | 
					       <string>Spends return</string>
 | 
				
			||||||
        <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
 | 
					      </property>
 | 
				
			||||||
         <horstretch>0</horstretch>
 | 
					 | 
				
			||||||
         <verstretch>0</verstretch>
 | 
					 | 
				
			||||||
        </sizepolicy>
 | 
					 | 
				
			||||||
       </property>
 | 
					 | 
				
			||||||
       <property name="text">
 | 
					 | 
				
			||||||
        <string/>
 | 
					 | 
				
			||||||
       </property>
 | 
					 | 
				
			||||||
       <property name="icon">
 | 
					 | 
				
			||||||
        <iconset resource="../build/Desktop-Debug/media.qrc">
 | 
					 | 
				
			||||||
         <normaloff>:/icons/assets/icons/settings.svg</normaloff>:/icons/assets/icons/settings.svg</iconset>
 | 
					 | 
				
			||||||
       </property>
 | 
					 | 
				
			||||||
       <property name="iconSize">
 | 
					 | 
				
			||||||
        <size>
 | 
					 | 
				
			||||||
         <width>128</width>
 | 
					 | 
				
			||||||
         <height>128</height>
 | 
					 | 
				
			||||||
        </size>
 | 
					 | 
				
			||||||
       </property>
 | 
					 | 
				
			||||||
      </widget>
 | 
					 | 
				
			||||||
     </item>
 | 
					     </item>
 | 
				
			||||||
    </layout>
 | 
					    </widget>
 | 
				
			||||||
 | 
					   </item>
 | 
				
			||||||
 | 
					   <item row="8" column="2" colspan="3">
 | 
				
			||||||
 | 
					    <widget class="QDoubleSpinBox" name="total_spin_box">
 | 
				
			||||||
 | 
					     <property name="maximum">
 | 
				
			||||||
 | 
					      <double>4294967296.000000000000000</double>
 | 
				
			||||||
 | 
					     </property>
 | 
				
			||||||
 | 
					    </widget>
 | 
				
			||||||
   </item>
 | 
					   </item>
 | 
				
			||||||
  </layout>
 | 
					  </layout>
 | 
				
			||||||
 </widget>
 | 
					 </widget>
 | 
				
			||||||
 <resources>
 | 
					 <resources/>
 | 
				
			||||||
  <include location="../build/Desktop-Debug/media.qrc"/>
 | 
					 | 
				
			||||||
  <include location="../build/Desktop-Debug/media.qrc"/>
 | 
					 | 
				
			||||||
 </resources>
 | 
					 | 
				
			||||||
 <connections/>
 | 
					 <connections/>
 | 
				
			||||||
</ui>
 | 
					</ui>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,127 +0,0 @@
 | 
				
			|||||||
<?xml version="1.0" encoding="UTF-8"?>
 | 
					 | 
				
			||||||
<ui version="4.0">
 | 
					 | 
				
			||||||
 <class>OCRScene</class>
 | 
					 | 
				
			||||||
 <widget class="QWidget" name="OCRScene">
 | 
					 | 
				
			||||||
  <property name="geometry">
 | 
					 | 
				
			||||||
   <rect>
 | 
					 | 
				
			||||||
    <x>0</x>
 | 
					 | 
				
			||||||
    <y>0</y>
 | 
					 | 
				
			||||||
    <width>992</width>
 | 
					 | 
				
			||||||
    <height>634</height>
 | 
					 | 
				
			||||||
   </rect>
 | 
					 | 
				
			||||||
  </property>
 | 
					 | 
				
			||||||
  <property name="sizePolicy">
 | 
					 | 
				
			||||||
   <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
 | 
					 | 
				
			||||||
    <horstretch>0</horstretch>
 | 
					 | 
				
			||||||
    <verstretch>0</verstretch>
 | 
					 | 
				
			||||||
   </sizepolicy>
 | 
					 | 
				
			||||||
  </property>
 | 
					 | 
				
			||||||
  <property name="windowTitle">
 | 
					 | 
				
			||||||
   <string>Form</string>
 | 
					 | 
				
			||||||
  </property>
 | 
					 | 
				
			||||||
  <layout class="QGridLayout" name="gridLayout">
 | 
					 | 
				
			||||||
   <property name="topMargin">
 | 
					 | 
				
			||||||
    <number>8</number>
 | 
					 | 
				
			||||||
   </property>
 | 
					 | 
				
			||||||
   <item row="1" column="2">
 | 
					 | 
				
			||||||
    <widget class="QComboBox" name="store_combo_box">
 | 
					 | 
				
			||||||
     <property name="sizePolicy">
 | 
					 | 
				
			||||||
      <sizepolicy hsizetype="Maximum" vsizetype="Fixed">
 | 
					 | 
				
			||||||
       <horstretch>0</horstretch>
 | 
					 | 
				
			||||||
       <verstretch>0</verstretch>
 | 
					 | 
				
			||||||
      </sizepolicy>
 | 
					 | 
				
			||||||
     </property>
 | 
					 | 
				
			||||||
    </widget>
 | 
					 | 
				
			||||||
   </item>
 | 
					 | 
				
			||||||
   <item row="5" column="0" colspan="3">
 | 
					 | 
				
			||||||
    <widget class="QPushButton" name="parse_button">
 | 
					 | 
				
			||||||
     <property name="sizePolicy">
 | 
					 | 
				
			||||||
      <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
 | 
					 | 
				
			||||||
       <horstretch>0</horstretch>
 | 
					 | 
				
			||||||
       <verstretch>0</verstretch>
 | 
					 | 
				
			||||||
      </sizepolicy>
 | 
					 | 
				
			||||||
     </property>
 | 
					 | 
				
			||||||
     <property name="text">
 | 
					 | 
				
			||||||
      <string>Parse</string>
 | 
					 | 
				
			||||||
     </property>
 | 
					 | 
				
			||||||
    </widget>
 | 
					 | 
				
			||||||
   </item>
 | 
					 | 
				
			||||||
   <item row="2" column="0" colspan="2">
 | 
					 | 
				
			||||||
    <widget class="QPushButton" name="choose_image_button">
 | 
					 | 
				
			||||||
     <property name="sizePolicy">
 | 
					 | 
				
			||||||
      <sizepolicy hsizetype="Maximum" vsizetype="Fixed">
 | 
					 | 
				
			||||||
       <horstretch>0</horstretch>
 | 
					 | 
				
			||||||
       <verstretch>0</verstretch>
 | 
					 | 
				
			||||||
      </sizepolicy>
 | 
					 | 
				
			||||||
     </property>
 | 
					 | 
				
			||||||
     <property name="baseSize">
 | 
					 | 
				
			||||||
      <size>
 | 
					 | 
				
			||||||
       <width>0</width>
 | 
					 | 
				
			||||||
       <height>0</height>
 | 
					 | 
				
			||||||
      </size>
 | 
					 | 
				
			||||||
     </property>
 | 
					 | 
				
			||||||
     <property name="text">
 | 
					 | 
				
			||||||
      <string>Choose</string>
 | 
					 | 
				
			||||||
     </property>
 | 
					 | 
				
			||||||
    </widget>
 | 
					 | 
				
			||||||
   </item>
 | 
					 | 
				
			||||||
   <item row="0" column="0" colspan="3">
 | 
					 | 
				
			||||||
    <widget class="QPushButton" name="back_button">
 | 
					 | 
				
			||||||
     <property name="sizePolicy">
 | 
					 | 
				
			||||||
      <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
 | 
					 | 
				
			||||||
       <horstretch>0</horstretch>
 | 
					 | 
				
			||||||
       <verstretch>0</verstretch>
 | 
					 | 
				
			||||||
      </sizepolicy>
 | 
					 | 
				
			||||||
     </property>
 | 
					 | 
				
			||||||
     <property name="text">
 | 
					 | 
				
			||||||
      <string>Back</string>
 | 
					 | 
				
			||||||
     </property>
 | 
					 | 
				
			||||||
    </widget>
 | 
					 | 
				
			||||||
   </item>
 | 
					 | 
				
			||||||
   <item row="3" column="0" colspan="3">
 | 
					 | 
				
			||||||
    <widget class="QLabel" name="instructions_label">
 | 
					 | 
				
			||||||
     <property name="sizePolicy">
 | 
					 | 
				
			||||||
      <sizepolicy hsizetype="MinimumExpanding" vsizetype="Minimum">
 | 
					 | 
				
			||||||
       <horstretch>0</horstretch>
 | 
					 | 
				
			||||||
       <verstretch>0</verstretch>
 | 
					 | 
				
			||||||
      </sizepolicy>
 | 
					 | 
				
			||||||
     </property>
 | 
					 | 
				
			||||||
     <property name="text">
 | 
					 | 
				
			||||||
      <string>Recognized text will be shown below as soon as image will be processed. Please, edit it</string>
 | 
					 | 
				
			||||||
     </property>
 | 
					 | 
				
			||||||
    </widget>
 | 
					 | 
				
			||||||
   </item>
 | 
					 | 
				
			||||||
   <item row="2" column="2">
 | 
					 | 
				
			||||||
    <widget class="QLabel" name="path_to_image_label">
 | 
					 | 
				
			||||||
     <property name="sizePolicy">
 | 
					 | 
				
			||||||
      <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
 | 
					 | 
				
			||||||
       <horstretch>0</horstretch>
 | 
					 | 
				
			||||||
       <verstretch>0</verstretch>
 | 
					 | 
				
			||||||
      </sizepolicy>
 | 
					 | 
				
			||||||
     </property>
 | 
					 | 
				
			||||||
     <property name="text">
 | 
					 | 
				
			||||||
      <string>Path to image:</string>
 | 
					 | 
				
			||||||
     </property>
 | 
					 | 
				
			||||||
    </widget>
 | 
					 | 
				
			||||||
   </item>
 | 
					 | 
				
			||||||
   <item row="4" column="0" colspan="3">
 | 
					 | 
				
			||||||
    <widget class="QTextEdit" name="check_text_edit"/>
 | 
					 | 
				
			||||||
   </item>
 | 
					 | 
				
			||||||
   <item row="1" column="0" colspan="2">
 | 
					 | 
				
			||||||
    <widget class="QLabel" name="store_label">
 | 
					 | 
				
			||||||
     <property name="sizePolicy">
 | 
					 | 
				
			||||||
      <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
 | 
					 | 
				
			||||||
       <horstretch>0</horstretch>
 | 
					 | 
				
			||||||
       <verstretch>0</verstretch>
 | 
					 | 
				
			||||||
      </sizepolicy>
 | 
					 | 
				
			||||||
     </property>
 | 
					 | 
				
			||||||
     <property name="text">
 | 
					 | 
				
			||||||
      <string>Store:</string>
 | 
					 | 
				
			||||||
     </property>
 | 
					 | 
				
			||||||
    </widget>
 | 
					 | 
				
			||||||
   </item>
 | 
					 | 
				
			||||||
  </layout>
 | 
					 | 
				
			||||||
 </widget>
 | 
					 | 
				
			||||||
 <resources/>
 | 
					 | 
				
			||||||
 <connections/>
 | 
					 | 
				
			||||||
</ui>
 | 
					 | 
				
			||||||
@@ -1,207 +0,0 @@
 | 
				
			|||||||
<?xml version="1.0" encoding="UTF-8"?>
 | 
					 | 
				
			||||||
<ui version="4.0">
 | 
					 | 
				
			||||||
 <class>OFDScene</class>
 | 
					 | 
				
			||||||
 <widget class="QWidget" name="OFDScene">
 | 
					 | 
				
			||||||
  <property name="geometry">
 | 
					 | 
				
			||||||
   <rect>
 | 
					 | 
				
			||||||
    <x>0</x>
 | 
					 | 
				
			||||||
    <y>0</y>
 | 
					 | 
				
			||||||
    <width>894</width>
 | 
					 | 
				
			||||||
    <height>625</height>
 | 
					 | 
				
			||||||
   </rect>
 | 
					 | 
				
			||||||
  </property>
 | 
					 | 
				
			||||||
  <property name="windowTitle">
 | 
					 | 
				
			||||||
   <string>Form</string>
 | 
					 | 
				
			||||||
  </property>
 | 
					 | 
				
			||||||
  <layout class="QGridLayout" name="gridLayout">
 | 
					 | 
				
			||||||
   <property name="sizeConstraint">
 | 
					 | 
				
			||||||
    <enum>QLayout::SizeConstraint::SetDefaultConstraint</enum>
 | 
					 | 
				
			||||||
   </property>
 | 
					 | 
				
			||||||
   <item row="5" column="0">
 | 
					 | 
				
			||||||
    <widget class="QLabel" name="fi_label">
 | 
					 | 
				
			||||||
     <property name="text">
 | 
					 | 
				
			||||||
      <string>FI (Fiscal Identifier)</string>
 | 
					 | 
				
			||||||
     </property>
 | 
					 | 
				
			||||||
    </widget>
 | 
					 | 
				
			||||||
   </item>
 | 
					 | 
				
			||||||
   <item row="0" column="0">
 | 
					 | 
				
			||||||
    <widget class="QPushButton" name="back_button">
 | 
					 | 
				
			||||||
     <property name="sizePolicy">
 | 
					 | 
				
			||||||
      <sizepolicy hsizetype="Fixed" vsizetype="Maximum">
 | 
					 | 
				
			||||||
       <horstretch>0</horstretch>
 | 
					 | 
				
			||||||
       <verstretch>0</verstretch>
 | 
					 | 
				
			||||||
      </sizepolicy>
 | 
					 | 
				
			||||||
     </property>
 | 
					 | 
				
			||||||
     <property name="text">
 | 
					 | 
				
			||||||
      <string>Back</string>
 | 
					 | 
				
			||||||
     </property>
 | 
					 | 
				
			||||||
    </widget>
 | 
					 | 
				
			||||||
   </item>
 | 
					 | 
				
			||||||
   <item row="6" column="0">
 | 
					 | 
				
			||||||
    <widget class="QLabel" name="datetime_label">
 | 
					 | 
				
			||||||
     <property name="text">
 | 
					 | 
				
			||||||
      <string>Date and time of purchase</string>
 | 
					 | 
				
			||||||
     </property>
 | 
					 | 
				
			||||||
    </widget>
 | 
					 | 
				
			||||||
   </item>
 | 
					 | 
				
			||||||
   <item row="1" column="2">
 | 
					 | 
				
			||||||
    <widget class="QPushButton" name="binary_eye_button">
 | 
					 | 
				
			||||||
     <property name="text">
 | 
					 | 
				
			||||||
      <string>Use your phone as a QR code scanner</string>
 | 
					 | 
				
			||||||
     </property>
 | 
					 | 
				
			||||||
    </widget>
 | 
					 | 
				
			||||||
   </item>
 | 
					 | 
				
			||||||
   <item row="1" column="1">
 | 
					 | 
				
			||||||
    <widget class="QLabel" name="or_label">
 | 
					 | 
				
			||||||
     <property name="sizePolicy">
 | 
					 | 
				
			||||||
      <sizepolicy hsizetype="Maximum" vsizetype="Preferred">
 | 
					 | 
				
			||||||
       <horstretch>0</horstretch>
 | 
					 | 
				
			||||||
       <verstretch>0</verstretch>
 | 
					 | 
				
			||||||
      </sizepolicy>
 | 
					 | 
				
			||||||
     </property>
 | 
					 | 
				
			||||||
     <property name="text">
 | 
					 | 
				
			||||||
      <string>or</string>
 | 
					 | 
				
			||||||
     </property>
 | 
					 | 
				
			||||||
    </widget>
 | 
					 | 
				
			||||||
   </item>
 | 
					 | 
				
			||||||
   <item row="4" column="2">
 | 
					 | 
				
			||||||
    <widget class="QLineEdit" name="fd_line_edit"/>
 | 
					 | 
				
			||||||
   </item>
 | 
					 | 
				
			||||||
   <item row="4" column="0">
 | 
					 | 
				
			||||||
    <widget class="QLabel" name="fd_label">
 | 
					 | 
				
			||||||
     <property name="sizePolicy">
 | 
					 | 
				
			||||||
      <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
 | 
					 | 
				
			||||||
       <horstretch>0</horstretch>
 | 
					 | 
				
			||||||
       <verstretch>0</verstretch>
 | 
					 | 
				
			||||||
      </sizepolicy>
 | 
					 | 
				
			||||||
     </property>
 | 
					 | 
				
			||||||
     <property name="text">
 | 
					 | 
				
			||||||
      <string>FD (Fiscal Document)</string>
 | 
					 | 
				
			||||||
     </property>
 | 
					 | 
				
			||||||
    </widget>
 | 
					 | 
				
			||||||
   </item>
 | 
					 | 
				
			||||||
   <item row="9" column="0" colspan="3">
 | 
					 | 
				
			||||||
    <widget class="QPushButton" name="parse_button">
 | 
					 | 
				
			||||||
     <property name="sizePolicy">
 | 
					 | 
				
			||||||
      <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
 | 
					 | 
				
			||||||
       <horstretch>0</horstretch>
 | 
					 | 
				
			||||||
       <verstretch>0</verstretch>
 | 
					 | 
				
			||||||
      </sizepolicy>
 | 
					 | 
				
			||||||
     </property>
 | 
					 | 
				
			||||||
     <property name="text">
 | 
					 | 
				
			||||||
      <string>Parse</string>
 | 
					 | 
				
			||||||
     </property>
 | 
					 | 
				
			||||||
    </widget>
 | 
					 | 
				
			||||||
   </item>
 | 
					 | 
				
			||||||
   <item row="7" column="0">
 | 
					 | 
				
			||||||
    <widget class="QLabel" name="operation_type_label">
 | 
					 | 
				
			||||||
     <property name="text">
 | 
					 | 
				
			||||||
      <string>Operation type</string>
 | 
					 | 
				
			||||||
     </property>
 | 
					 | 
				
			||||||
    </widget>
 | 
					 | 
				
			||||||
   </item>
 | 
					 | 
				
			||||||
   <item row="7" column="2">
 | 
					 | 
				
			||||||
    <widget class="QComboBox" name="operation_type_combo_box">
 | 
					 | 
				
			||||||
     <item>
 | 
					 | 
				
			||||||
      <property name="text">
 | 
					 | 
				
			||||||
       <string>Funds income</string>
 | 
					 | 
				
			||||||
      </property>
 | 
					 | 
				
			||||||
     </item>
 | 
					 | 
				
			||||||
     <item>
 | 
					 | 
				
			||||||
      <property name="text">
 | 
					 | 
				
			||||||
       <string>Funds return</string>
 | 
					 | 
				
			||||||
      </property>
 | 
					 | 
				
			||||||
     </item>
 | 
					 | 
				
			||||||
     <item>
 | 
					 | 
				
			||||||
      <property name="text">
 | 
					 | 
				
			||||||
       <string>Funds spend</string>
 | 
					 | 
				
			||||||
      </property>
 | 
					 | 
				
			||||||
     </item>
 | 
					 | 
				
			||||||
     <item>
 | 
					 | 
				
			||||||
      <property name="text">
 | 
					 | 
				
			||||||
       <string>Spends return</string>
 | 
					 | 
				
			||||||
      </property>
 | 
					 | 
				
			||||||
     </item>
 | 
					 | 
				
			||||||
    </widget>
 | 
					 | 
				
			||||||
   </item>
 | 
					 | 
				
			||||||
   <item row="3" column="2">
 | 
					 | 
				
			||||||
    <widget class="QLineEdit" name="fn_line_edit">
 | 
					 | 
				
			||||||
     <property name="sizePolicy">
 | 
					 | 
				
			||||||
      <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
 | 
					 | 
				
			||||||
       <horstretch>0</horstretch>
 | 
					 | 
				
			||||||
       <verstretch>0</verstretch>
 | 
					 | 
				
			||||||
      </sizepolicy>
 | 
					 | 
				
			||||||
     </property>
 | 
					 | 
				
			||||||
    </widget>
 | 
					 | 
				
			||||||
   </item>
 | 
					 | 
				
			||||||
   <item row="5" column="2">
 | 
					 | 
				
			||||||
    <widget class="QLineEdit" name="fi_line_edit"/>
 | 
					 | 
				
			||||||
   </item>
 | 
					 | 
				
			||||||
   <item row="3" column="0">
 | 
					 | 
				
			||||||
    <widget class="QLabel" name="fn_label">
 | 
					 | 
				
			||||||
     <property name="sizePolicy">
 | 
					 | 
				
			||||||
      <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
 | 
					 | 
				
			||||||
       <horstretch>0</horstretch>
 | 
					 | 
				
			||||||
       <verstretch>0</verstretch>
 | 
					 | 
				
			||||||
      </sizepolicy>
 | 
					 | 
				
			||||||
     </property>
 | 
					 | 
				
			||||||
     <property name="text">
 | 
					 | 
				
			||||||
      <string>FN (Fiscal Number)</string>
 | 
					 | 
				
			||||||
     </property>
 | 
					 | 
				
			||||||
    </widget>
 | 
					 | 
				
			||||||
   </item>
 | 
					 | 
				
			||||||
   <item row="8" column="0">
 | 
					 | 
				
			||||||
    <widget class="QLabel" name="total_label">
 | 
					 | 
				
			||||||
     <property name="text">
 | 
					 | 
				
			||||||
      <string>Total</string>
 | 
					 | 
				
			||||||
     </property>
 | 
					 | 
				
			||||||
    </widget>
 | 
					 | 
				
			||||||
   </item>
 | 
					 | 
				
			||||||
   <item row="6" column="2">
 | 
					 | 
				
			||||||
    <widget class="QDateTimeEdit" name="purchase_datetime_edit"/>
 | 
					 | 
				
			||||||
   </item>
 | 
					 | 
				
			||||||
   <item row="2" column="0" colspan="3">
 | 
					 | 
				
			||||||
    <widget class="QLabel" name="info_label">
 | 
					 | 
				
			||||||
     <property name="sizePolicy">
 | 
					 | 
				
			||||||
      <sizepolicy hsizetype="Minimum" vsizetype="Maximum">
 | 
					 | 
				
			||||||
       <horstretch>0</horstretch>
 | 
					 | 
				
			||||||
       <verstretch>0</verstretch>
 | 
					 | 
				
			||||||
      </sizepolicy>
 | 
					 | 
				
			||||||
     </property>
 | 
					 | 
				
			||||||
     <property name="text">
 | 
					 | 
				
			||||||
      <string/>
 | 
					 | 
				
			||||||
     </property>
 | 
					 | 
				
			||||||
    </widget>
 | 
					 | 
				
			||||||
   </item>
 | 
					 | 
				
			||||||
   <item row="1" column="0">
 | 
					 | 
				
			||||||
    <widget class="QPushButton" name="choose_image_button">
 | 
					 | 
				
			||||||
     <property name="text">
 | 
					 | 
				
			||||||
      <string>Choose image on your PC</string>
 | 
					 | 
				
			||||||
     </property>
 | 
					 | 
				
			||||||
    </widget>
 | 
					 | 
				
			||||||
   </item>
 | 
					 | 
				
			||||||
   <item row="8" column="2">
 | 
					 | 
				
			||||||
    <widget class="QDoubleSpinBox" name="total_spin_box">
 | 
					 | 
				
			||||||
     <property name="maximum">
 | 
					 | 
				
			||||||
      <double>4294967296.000000000000000</double>
 | 
					 | 
				
			||||||
     </property>
 | 
					 | 
				
			||||||
    </widget>
 | 
					 | 
				
			||||||
   </item>
 | 
					 | 
				
			||||||
   <item row="0" column="2" alignment="Qt::AlignmentFlag::AlignRight">
 | 
					 | 
				
			||||||
    <widget class="QPushButton" name="stop_server_button">
 | 
					 | 
				
			||||||
     <property name="sizePolicy">
 | 
					 | 
				
			||||||
      <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
 | 
					 | 
				
			||||||
       <horstretch>0</horstretch>
 | 
					 | 
				
			||||||
       <verstretch>0</verstretch>
 | 
					 | 
				
			||||||
      </sizepolicy>
 | 
					 | 
				
			||||||
     </property>
 | 
					 | 
				
			||||||
     <property name="text">
 | 
					 | 
				
			||||||
      <string>Stop server</string>
 | 
					 | 
				
			||||||
     </property>
 | 
					 | 
				
			||||||
    </widget>
 | 
					 | 
				
			||||||
   </item>
 | 
					 | 
				
			||||||
  </layout>
 | 
					 | 
				
			||||||
 </widget>
 | 
					 | 
				
			||||||
 <resources/>
 | 
					 | 
				
			||||||
 <connections/>
 | 
					 | 
				
			||||||
</ui>
 | 
					 | 
				
			||||||
@@ -27,48 +27,36 @@
 | 
				
			|||||||
<context>
 | 
					<context>
 | 
				
			||||||
    <name>EmailTextScene</name>
 | 
					    <name>EmailTextScene</name>
 | 
				
			||||||
    <message>
 | 
					    <message>
 | 
				
			||||||
        <location filename="../scenes/emailtextscene.ui" line="14"/>
 | 
					 | 
				
			||||||
        <source>Form</source>
 | 
					        <source>Form</source>
 | 
				
			||||||
        <translation>Form</translation>
 | 
					        <translation type="vanished">Form</translation>
 | 
				
			||||||
    </message>
 | 
					    </message>
 | 
				
			||||||
    <message>
 | 
					    <message>
 | 
				
			||||||
        <source>Store type</source>
 | 
					        <source>Store type</source>
 | 
				
			||||||
        <translation type="obsolete">Store type</translation>
 | 
					        <translation type="obsolete">Store type</translation>
 | 
				
			||||||
    </message>
 | 
					    </message>
 | 
				
			||||||
    <message>
 | 
					    <message>
 | 
				
			||||||
        <location filename="../scenes/emailtextscene.ui" line="26"/>
 | 
					 | 
				
			||||||
        <source>Check content</source>
 | 
					        <source>Check content</source>
 | 
				
			||||||
        <translation>Check content</translation>
 | 
					        <translation type="vanished">Check content</translation>
 | 
				
			||||||
    </message>
 | 
					    </message>
 | 
				
			||||||
    <message>
 | 
					    <message>
 | 
				
			||||||
        <location filename="../scenes/emailtextscene.ui" line="33"/>
 | 
					 | 
				
			||||||
        <source>Parse</source>
 | 
					        <source>Parse</source>
 | 
				
			||||||
        <translation>Parse</translation>
 | 
					        <translation type="vanished">Parse</translation>
 | 
				
			||||||
    </message>
 | 
					    </message>
 | 
				
			||||||
    <message>
 | 
					    <message>
 | 
				
			||||||
        <location filename="../scenes/emailtextscene.ui" line="46"/>
 | 
					 | 
				
			||||||
        <source>Store:</source>
 | 
					        <source>Store:</source>
 | 
				
			||||||
        <translation>Store:</translation>
 | 
					        <translation type="vanished">Store:</translation>
 | 
				
			||||||
    </message>
 | 
					    </message>
 | 
				
			||||||
    <message>
 | 
					    <message>
 | 
				
			||||||
        <location filename="../scenes/emailtextscene.ui" line="66"/>
 | 
					 | 
				
			||||||
        <source>Back</source>
 | 
					        <source>Back</source>
 | 
				
			||||||
        <translation>Back</translation>
 | 
					        <translation type="vanished">Back</translation>
 | 
				
			||||||
    </message>
 | 
					    </message>
 | 
				
			||||||
    <message>
 | 
					    <message>
 | 
				
			||||||
        <location filename="../emailtextscene.cpp" line="32"/>
 | 
					 | 
				
			||||||
        <source>An error has occured. Check was matched incorrectly. Vector sizes are different. Please, contact the developer.</source>
 | 
					        <source>An error has occured. Check was matched incorrectly. Vector sizes are different. Please, contact the developer.</source>
 | 
				
			||||||
        <translation>An error has occured. Check was matched incorrectly. Vector sizes are different. Please, contact the developer.</translation>
 | 
					        <translation type="vanished">An error has occured. Check was matched incorrectly. Vector sizes are different. Please, contact the developer.</translation>
 | 
				
			||||||
    </message>
 | 
					    </message>
 | 
				
			||||||
    <message>
 | 
					    <message>
 | 
				
			||||||
        <location filename="../emailtextscene.cpp" line="34"/>
 | 
					 | 
				
			||||||
        <source>Error in parsing</source>
 | 
					        <source>Error in parsing</source>
 | 
				
			||||||
        <translation>Error in parsing</translation>
 | 
					        <translation type="vanished">Error in parsing</translation>
 | 
				
			||||||
    </message>
 | 
					 | 
				
			||||||
    <message>
 | 
					 | 
				
			||||||
        <location filename="../emailtextscene.cpp" line="51"/>
 | 
					 | 
				
			||||||
        <source>Could not autodetect store. If you beleive that this is an error, please, report to the developer.</source>
 | 
					 | 
				
			||||||
        <translation type="unfinished"></translation>
 | 
					 | 
				
			||||||
    </message>
 | 
					    </message>
 | 
				
			||||||
</context>
 | 
					</context>
 | 
				
			||||||
<context>
 | 
					<context>
 | 
				
			||||||
@@ -82,8 +70,9 @@
 | 
				
			|||||||
        <translation type="vanished">Store type</translation>
 | 
					        <translation type="vanished">Store type</translation>
 | 
				
			||||||
    </message>
 | 
					    </message>
 | 
				
			||||||
    <message>
 | 
					    <message>
 | 
				
			||||||
 | 
					        <location filename="../scenes/mainwindow.ui" line="51"/>
 | 
				
			||||||
        <source>Parse</source>
 | 
					        <source>Parse</source>
 | 
				
			||||||
        <translation type="vanished">Parse</translation>
 | 
					        <translation>Parse</translation>
 | 
				
			||||||
    </message>
 | 
					    </message>
 | 
				
			||||||
    <message>
 | 
					    <message>
 | 
				
			||||||
        <source>Preferences</source>
 | 
					        <source>Preferences</source>
 | 
				
			||||||
@@ -124,51 +113,331 @@
 | 
				
			|||||||
        <translation type="vanished">0000000000000000</translation>
 | 
					        <translation type="vanished">0000000000000000</translation>
 | 
				
			||||||
    </message>
 | 
					    </message>
 | 
				
			||||||
    <message>
 | 
					    <message>
 | 
				
			||||||
 | 
					        <location filename="../scenes/mainwindow.ui" line="77"/>
 | 
				
			||||||
        <source>FN (Fiscal Number)</source>
 | 
					        <source>FN (Fiscal Number)</source>
 | 
				
			||||||
        <translatorcomment>FN = Фискальный Номер</translatorcomment>
 | 
					        <translatorcomment>FN = Фискальный Номер</translatorcomment>
 | 
				
			||||||
        <translation type="vanished">FN (Fiscal Number)</translation>
 | 
					        <translation>FN (Fiscal Number)</translation>
 | 
				
			||||||
    </message>
 | 
					    </message>
 | 
				
			||||||
    <message>
 | 
					    <message>
 | 
				
			||||||
 | 
					        <location filename="../scenes/mainwindow.ui" line="64"/>
 | 
				
			||||||
        <source>FD (Fiscal Document)</source>
 | 
					        <source>FD (Fiscal Document)</source>
 | 
				
			||||||
        <translatorcomment>FD = Фискальный Документ</translatorcomment>
 | 
					        <translatorcomment>FD = Фискальный Документ</translatorcomment>
 | 
				
			||||||
        <translation type="vanished">FD (Fiscal Document)</translation>
 | 
					        <translation>FD (Fiscal Document)</translation>
 | 
				
			||||||
    </message>
 | 
					    </message>
 | 
				
			||||||
    <message>
 | 
					    <message>
 | 
				
			||||||
        <source>0000000000</source>
 | 
					        <source>0000000000</source>
 | 
				
			||||||
        <translation type="vanished">000000000</translation>
 | 
					        <translation type="vanished">000000000</translation>
 | 
				
			||||||
    </message>
 | 
					    </message>
 | 
				
			||||||
    <message>
 | 
					    <message>
 | 
				
			||||||
 | 
					        <source>Back</source>
 | 
				
			||||||
 | 
					        <translation type="obsolete">Back</translation>
 | 
				
			||||||
 | 
					    </message>
 | 
				
			||||||
 | 
					    <message>
 | 
				
			||||||
 | 
					        <location filename="../scenes/mainwindow.ui" line="130"/>
 | 
				
			||||||
 | 
					        <source>Stop server</source>
 | 
				
			||||||
 | 
					        <translation type="unfinished">Stop server</translation>
 | 
				
			||||||
 | 
					    </message>
 | 
				
			||||||
 | 
					    <message>
 | 
				
			||||||
 | 
					        <location filename="../scenes/mainwindow.ui" line="143"/>
 | 
				
			||||||
 | 
					        <source>Choose image on your PC</source>
 | 
				
			||||||
 | 
					        <translation type="unfinished">Choose image on your PC</translation>
 | 
				
			||||||
 | 
					    </message>
 | 
				
			||||||
 | 
					    <message>
 | 
				
			||||||
 | 
					        <location filename="../scenes/mainwindow.ui" line="38"/>
 | 
				
			||||||
 | 
					        <location filename="../scenes/mainwindow.ui" line="183"/>
 | 
				
			||||||
 | 
					        <source>or</source>
 | 
				
			||||||
 | 
					        <translation type="unfinished">or</translation>
 | 
				
			||||||
 | 
					    </message>
 | 
				
			||||||
 | 
					    <message>
 | 
				
			||||||
 | 
					        <location filename="../scenes/mainwindow.ui" line="97"/>
 | 
				
			||||||
 | 
					        <source>Use your phone as a QR code scanner</source>
 | 
				
			||||||
 | 
					        <translation type="unfinished">Use your phone as a QR code scanner</translation>
 | 
				
			||||||
 | 
					    </message>
 | 
				
			||||||
 | 
					    <message>
 | 
				
			||||||
 | 
					        <location filename="../scenes/mainwindow.ui" line="157"/>
 | 
				
			||||||
        <source>FI (Fiscal Identifier)</source>
 | 
					        <source>FI (Fiscal Identifier)</source>
 | 
				
			||||||
        <translatorcomment>FI = Фискальный Признак</translatorcomment>
 | 
					        <translatorcomment>FI = Фискальный Признак</translatorcomment>
 | 
				
			||||||
        <translation type="vanished">FI (Fiscal Identifier)</translation>
 | 
					        <translation>FI (Fiscal Identifier)</translation>
 | 
				
			||||||
    </message>
 | 
					    </message>
 | 
				
			||||||
    <message>
 | 
					    <message>
 | 
				
			||||||
 | 
					        <location filename="../scenes/mainwindow.ui" line="117"/>
 | 
				
			||||||
 | 
					        <source>Date and time of purchase</source>
 | 
				
			||||||
 | 
					        <translation type="unfinished">Date and time of purchase</translation>
 | 
				
			||||||
 | 
					    </message>
 | 
				
			||||||
 | 
					    <message>
 | 
				
			||||||
 | 
					        <location filename="../scenes/mainwindow.ui" line="84"/>
 | 
				
			||||||
 | 
					        <source>Operation type</source>
 | 
				
			||||||
 | 
					        <translation type="unfinished">Operation type</translation>
 | 
				
			||||||
 | 
					    </message>
 | 
				
			||||||
 | 
					    <message>
 | 
				
			||||||
 | 
					        <location filename="../scenes/mainwindow.ui" line="170"/>
 | 
				
			||||||
 | 
					        <source>Parse an E-Mail</source>
 | 
				
			||||||
 | 
					        <translation type="unfinished"></translation>
 | 
				
			||||||
 | 
					    </message>
 | 
				
			||||||
 | 
					    <message>
 | 
				
			||||||
 | 
					        <location filename="../scenes/mainwindow.ui" line="210"/>
 | 
				
			||||||
        <source>Funds income</source>
 | 
					        <source>Funds income</source>
 | 
				
			||||||
        <translatorcomment>Приход средств</translatorcomment>
 | 
					        <translatorcomment>Приход средств</translatorcomment>
 | 
				
			||||||
        <translation type="vanished">Funds income</translation>
 | 
					        <translation>Funds income</translation>
 | 
				
			||||||
    </message>
 | 
					    </message>
 | 
				
			||||||
    <message>
 | 
					    <message>
 | 
				
			||||||
 | 
					        <location filename="../scenes/mainwindow.ui" line="215"/>
 | 
				
			||||||
        <source>Funds return</source>
 | 
					        <source>Funds return</source>
 | 
				
			||||||
        <translatorcomment>Возврат средств</translatorcomment>
 | 
					        <translatorcomment>Возврат средств</translatorcomment>
 | 
				
			||||||
        <translation type="vanished">Funds return</translation>
 | 
					        <translation>Funds return</translation>
 | 
				
			||||||
    </message>
 | 
					    </message>
 | 
				
			||||||
    <message>
 | 
					    <message>
 | 
				
			||||||
 | 
					        <location filename="../scenes/mainwindow.ui" line="220"/>
 | 
				
			||||||
        <source>Funds spend</source>
 | 
					        <source>Funds spend</source>
 | 
				
			||||||
        <translatorcomment>Расход средств</translatorcomment>
 | 
					        <translatorcomment>Расход средств</translatorcomment>
 | 
				
			||||||
        <translation type="vanished">Funds spend</translation>
 | 
					        <translation>Funds spend</translation>
 | 
				
			||||||
    </message>
 | 
					    </message>
 | 
				
			||||||
    <message>
 | 
					    <message>
 | 
				
			||||||
 | 
					        <location filename="../scenes/mainwindow.ui" line="225"/>
 | 
				
			||||||
        <source>Spends return</source>
 | 
					        <source>Spends return</source>
 | 
				
			||||||
        <translatorcomment>Возврат расхода</translatorcomment>
 | 
					        <translatorcomment>Возврат расхода</translatorcomment>
 | 
				
			||||||
        <translation type="vanished">Spends return</translation>
 | 
					        <translation>Spends return</translation>
 | 
				
			||||||
 | 
					    </message>
 | 
				
			||||||
 | 
					    <message>
 | 
				
			||||||
 | 
					        <location filename="../scenes/mainwindow.ui" line="150"/>
 | 
				
			||||||
 | 
					        <source>Total</source>
 | 
				
			||||||
 | 
					        <translation>Total</translation>
 | 
				
			||||||
 | 
					    </message>
 | 
				
			||||||
 | 
					    <message>
 | 
				
			||||||
 | 
					        <source>checks parser</source>
 | 
				
			||||||
 | 
					        <translation type="vanished">checks parser</translation>
 | 
				
			||||||
 | 
					    </message>
 | 
				
			||||||
 | 
					    <message>
 | 
				
			||||||
 | 
					        <location filename="../mainwindow.cpp" line="84"/>
 | 
				
			||||||
 | 
					        <source>QR code for binaryeye to connect</source>
 | 
				
			||||||
 | 
					        <translation type="unfinished">QR code for binaryeye to connect</translation>
 | 
				
			||||||
 | 
					    </message>
 | 
				
			||||||
 | 
					    <message>
 | 
				
			||||||
 | 
					        <location filename="../mainwindow.cpp" line="85"/>
 | 
				
			||||||
 | 
					        <source>I've scanned</source>
 | 
				
			||||||
 | 
					        <translation type="unfinished">I've scanned</translation>
 | 
				
			||||||
 | 
					    </message>
 | 
				
			||||||
 | 
					    <message>
 | 
				
			||||||
 | 
					        <location filename="../mainwindow.cpp" line="91"/>
 | 
				
			||||||
 | 
					        <source>Could not start http server. 10 times in a row random port was occupied. Either you should run for a lottery ticket, or the problem is in the program. If the lottery ticket wasn't lucky, please, contact the developer.</source>
 | 
				
			||||||
 | 
					        <translation type="unfinished">Could not start http server. 10 times in a row random port was occupied. Either you should run for a lottery ticket, or the problem is in the program. If the lottery ticket wasn't lucky, please, contact the developer.</translation>
 | 
				
			||||||
 | 
					    </message>
 | 
				
			||||||
 | 
					    <message>
 | 
				
			||||||
 | 
					        <location filename="../mainwindow.cpp" line="93"/>
 | 
				
			||||||
 | 
					        <source>Could not start http server.</source>
 | 
				
			||||||
 | 
					        <translation type="unfinished">Could not start http server.</translation>
 | 
				
			||||||
 | 
					    </message>
 | 
				
			||||||
 | 
					    <message>
 | 
				
			||||||
 | 
					        <location filename="../mainwindow.cpp" line="137"/>
 | 
				
			||||||
 | 
					        <source>Selected image: </source>
 | 
				
			||||||
 | 
					        <translation type="unfinished">Selected image: </translation>
 | 
				
			||||||
 | 
					    </message>
 | 
				
			||||||
 | 
					    <message>
 | 
				
			||||||
 | 
					        <location filename="../mainwindow.cpp" line="197"/>
 | 
				
			||||||
 | 
					        <source>Captcha was not solved correctly!</source>
 | 
				
			||||||
 | 
					        <translation>Captcha was not solved correctly!</translation>
 | 
				
			||||||
 | 
					    </message>
 | 
				
			||||||
 | 
					    <message>
 | 
				
			||||||
 | 
					        <location filename="../mainwindow.cpp" line="199"/>
 | 
				
			||||||
 | 
					        <source>Captcha is incorrect</source>
 | 
				
			||||||
 | 
					        <translation>Captcha is incorrect</translation>
 | 
				
			||||||
 | 
					    </message>
 | 
				
			||||||
 | 
					    <message>
 | 
				
			||||||
 | 
					        <location filename="../mainwindow.cpp" line="204"/>
 | 
				
			||||||
 | 
					        <source>Internal server error. Please, try again later.</source>
 | 
				
			||||||
 | 
					        <translation>Internal server error. Please, try again later.</translation>
 | 
				
			||||||
 | 
					    </message>
 | 
				
			||||||
 | 
					    <message>
 | 
				
			||||||
 | 
					        <location filename="../mainwindow.cpp" line="206"/>
 | 
				
			||||||
 | 
					        <source>Internal server error</source>
 | 
				
			||||||
 | 
					        <translation>Internal server error</translation>
 | 
				
			||||||
 | 
					    </message>
 | 
				
			||||||
 | 
					    <message>
 | 
				
			||||||
 | 
					        <location filename="../mainwindow.cpp" line="211"/>
 | 
				
			||||||
 | 
					        <source>Check not found. Please, ensure correctness of entered data.</source>
 | 
				
			||||||
 | 
					        <translation>Check not found. Please, ensure correctness of entered data.</translation>
 | 
				
			||||||
 | 
					    </message>
 | 
				
			||||||
 | 
					    <message>
 | 
				
			||||||
 | 
					        <location filename="../mainwindow.cpp" line="213"/>
 | 
				
			||||||
 | 
					        <source>Check was not found</source>
 | 
				
			||||||
 | 
					        <translation type="unfinished">Check was not found</translation>
 | 
				
			||||||
 | 
					    </message>
 | 
				
			||||||
 | 
					    <message>
 | 
				
			||||||
 | 
					        <source>An error has occured. Check was matched incorrectly. Vector sizes are different. Please, contact the developer.</source>
 | 
				
			||||||
 | 
					        <translation type="vanished">An error has occured. Check was matched incorrectly. Vector sizes are different. Please, contact the developer.</translation>
 | 
				
			||||||
 | 
					    </message>
 | 
				
			||||||
 | 
					    <message>
 | 
				
			||||||
 | 
					        <source>Error in parsing</source>
 | 
				
			||||||
 | 
					        <translation type="vanished">Error in parsing</translation>
 | 
				
			||||||
 | 
					    </message>
 | 
				
			||||||
 | 
					    <message>
 | 
				
			||||||
 | 
					        <location filename="../mainwindow.cpp" line="130"/>
 | 
				
			||||||
 | 
					        <source>Please, select a picture where QR code that contains info about check is present</source>
 | 
				
			||||||
 | 
					        <translation>Please, select a picture where QR code that contains info about check is present</translation>
 | 
				
			||||||
 | 
					    </message>
 | 
				
			||||||
 | 
					    <message>
 | 
				
			||||||
 | 
					        <location filename="../mainwindow.cpp" line="132"/>
 | 
				
			||||||
 | 
					        <source>Picture was not selected</source>
 | 
				
			||||||
 | 
					        <translation>Picture was not selected</translation>
 | 
				
			||||||
 | 
					    </message>
 | 
				
			||||||
 | 
					    <message>
 | 
				
			||||||
 | 
					        <source>Please, select a picture to scan</source>
 | 
				
			||||||
 | 
					        <translation type="vanished">Please, select a picture to scan</translation>
 | 
				
			||||||
 | 
					    </message>
 | 
				
			||||||
 | 
					    <message>
 | 
				
			||||||
 | 
					        <location filename="../scenes/mainwindow.ui" line="26"/>
 | 
				
			||||||
 | 
					        <source>Form</source>
 | 
				
			||||||
 | 
					        <translation>Form</translation>
 | 
				
			||||||
 | 
					    </message>
 | 
				
			||||||
 | 
					    <message>
 | 
				
			||||||
 | 
					        <source>Optical Character Recognition</source>
 | 
				
			||||||
 | 
					        <translation type="vanished">Optical Character Recognition</translation>
 | 
				
			||||||
 | 
					    </message>
 | 
				
			||||||
 | 
					    <message>
 | 
				
			||||||
 | 
					        <source>Text from E-Mail</source>
 | 
				
			||||||
 | 
					        <translation type="vanished">Text from E-Mail</translation>
 | 
				
			||||||
 | 
					    </message>
 | 
				
			||||||
 | 
					</context>
 | 
				
			||||||
 | 
					<context>
 | 
				
			||||||
 | 
					    <name>OCRScene</name>
 | 
				
			||||||
 | 
					    <message>
 | 
				
			||||||
 | 
					        <source>Form</source>
 | 
				
			||||||
 | 
					        <translation type="vanished">Form</translation>
 | 
				
			||||||
 | 
					    </message>
 | 
				
			||||||
 | 
					    <message>
 | 
				
			||||||
 | 
					        <source>Choose</source>
 | 
				
			||||||
 | 
					        <translation type="vanished">Choose</translation>
 | 
				
			||||||
 | 
					    </message>
 | 
				
			||||||
 | 
					    <message>
 | 
				
			||||||
 | 
					        <source>Path to image:</source>
 | 
				
			||||||
 | 
					        <translation type="vanished">Path to image:</translation>
 | 
				
			||||||
 | 
					    </message>
 | 
				
			||||||
 | 
					    <message>
 | 
				
			||||||
 | 
					        <source>Store:</source>
 | 
				
			||||||
 | 
					        <translation type="vanished">Store:</translation>
 | 
				
			||||||
 | 
					    </message>
 | 
				
			||||||
 | 
					    <message>
 | 
				
			||||||
 | 
					        <source>Recognized text will be shown below as soon as image will be processed. Please, edit it</source>
 | 
				
			||||||
 | 
					        <translation type="vanished">Recognized text will be shown below as soon as image will be processed. Please, edit it</translation>
 | 
				
			||||||
 | 
					    </message>
 | 
				
			||||||
 | 
					    <message>
 | 
				
			||||||
 | 
					        <source>Back</source>
 | 
				
			||||||
 | 
					        <translation type="vanished">Back</translation>
 | 
				
			||||||
 | 
					    </message>
 | 
				
			||||||
 | 
					    <message>
 | 
				
			||||||
 | 
					        <source>Parse</source>
 | 
				
			||||||
 | 
					        <translation type="vanished">Parse</translation>
 | 
				
			||||||
 | 
					    </message>
 | 
				
			||||||
 | 
					    <message>
 | 
				
			||||||
 | 
					        <source>An error has occured. Check was matched incorrectly. Vector sizes are different. Please, contact the developer.</source>
 | 
				
			||||||
 | 
					        <translation type="vanished">An error has occured. Check was matched incorrectly. Vector sizes are different. Please, contact the developer.</translation>
 | 
				
			||||||
 | 
					    </message>
 | 
				
			||||||
 | 
					    <message>
 | 
				
			||||||
 | 
					        <source>Error in parsing</source>
 | 
				
			||||||
 | 
					        <translation type="vanished">Error in parsing</translation>
 | 
				
			||||||
 | 
					    </message>
 | 
				
			||||||
 | 
					    <message>
 | 
				
			||||||
 | 
					        <source>Please, select a picture to scan</source>
 | 
				
			||||||
 | 
					        <translation type="vanished">Please, select a picture to scan</translation>
 | 
				
			||||||
 | 
					    </message>
 | 
				
			||||||
 | 
					    <message>
 | 
				
			||||||
 | 
					        <source>Picture was not selected</source>
 | 
				
			||||||
 | 
					        <translation type="vanished">Picture was not selected</translation>
 | 
				
			||||||
 | 
					    </message>
 | 
				
			||||||
 | 
					    <message>
 | 
				
			||||||
 | 
					        <source>Path to image: </source>
 | 
				
			||||||
 | 
					        <translation type="vanished">Path to image: </translation>
 | 
				
			||||||
 | 
					    </message>
 | 
				
			||||||
 | 
					</context>
 | 
				
			||||||
 | 
					<context>
 | 
				
			||||||
 | 
					    <name>OFDScene</name>
 | 
				
			||||||
 | 
					    <message>
 | 
				
			||||||
 | 
					        <source>Form</source>
 | 
				
			||||||
 | 
					        <translation type="vanished">Form</translation>
 | 
				
			||||||
    </message>
 | 
					    </message>
 | 
				
			||||||
    <message>
 | 
					    <message>
 | 
				
			||||||
        <source>Total</source>
 | 
					        <source>Total</source>
 | 
				
			||||||
        <translation type="vanished">Total</translation>
 | 
					        <translation type="vanished">Total</translation>
 | 
				
			||||||
    </message>
 | 
					    </message>
 | 
				
			||||||
    <message>
 | 
					    <message>
 | 
				
			||||||
        <source>checks parser</source>
 | 
					        <source>Back</source>
 | 
				
			||||||
        <translation type="vanished">checks parser</translation>
 | 
					        <translation type="vanished">Back</translation>
 | 
				
			||||||
 | 
					    </message>
 | 
				
			||||||
 | 
					    <message>
 | 
				
			||||||
 | 
					        <source>or</source>
 | 
				
			||||||
 | 
					        <translation type="vanished">or</translation>
 | 
				
			||||||
 | 
					    </message>
 | 
				
			||||||
 | 
					    <message>
 | 
				
			||||||
 | 
					        <source>FD (Fiscal Document)</source>
 | 
				
			||||||
 | 
					        <translation type="vanished">FD (Fiscal Document)</translation>
 | 
				
			||||||
 | 
					    </message>
 | 
				
			||||||
 | 
					    <message>
 | 
				
			||||||
 | 
					        <source>Date and time of purchase</source>
 | 
				
			||||||
 | 
					        <translation type="vanished">Date and time of purchase</translation>
 | 
				
			||||||
 | 
					    </message>
 | 
				
			||||||
 | 
					    <message>
 | 
				
			||||||
 | 
					        <source>Stop server</source>
 | 
				
			||||||
 | 
					        <translation type="vanished">Stop server</translation>
 | 
				
			||||||
 | 
					    </message>
 | 
				
			||||||
 | 
					    <message>
 | 
				
			||||||
 | 
					        <source>Funds income</source>
 | 
				
			||||||
 | 
					        <translation type="vanished">Funds income</translation>
 | 
				
			||||||
 | 
					    </message>
 | 
				
			||||||
 | 
					    <message>
 | 
				
			||||||
 | 
					        <source>Funds return</source>
 | 
				
			||||||
 | 
					        <translation type="vanished">Funds return</translation>
 | 
				
			||||||
 | 
					    </message>
 | 
				
			||||||
 | 
					    <message>
 | 
				
			||||||
 | 
					        <source>Funds spend</source>
 | 
				
			||||||
 | 
					        <translation type="vanished">Funds spend</translation>
 | 
				
			||||||
 | 
					    </message>
 | 
				
			||||||
 | 
					    <message>
 | 
				
			||||||
 | 
					        <source>Spends return</source>
 | 
				
			||||||
 | 
					        <translation type="vanished">Spends return</translation>
 | 
				
			||||||
 | 
					    </message>
 | 
				
			||||||
 | 
					    <message>
 | 
				
			||||||
 | 
					        <source>Use your phone as a QR code scanner</source>
 | 
				
			||||||
 | 
					        <translation type="vanished">Use your phone as a QR code scanner</translation>
 | 
				
			||||||
 | 
					    </message>
 | 
				
			||||||
 | 
					    <message>
 | 
				
			||||||
 | 
					        <source>FN (Fiscal Number)</source>
 | 
				
			||||||
 | 
					        <translation type="vanished">FN (Fiscal Number)</translation>
 | 
				
			||||||
 | 
					    </message>
 | 
				
			||||||
 | 
					    <message>
 | 
				
			||||||
 | 
					        <source>FI (Fiscal Identifier)</source>
 | 
				
			||||||
 | 
					        <translation type="vanished">FI (Fiscal Identifier)</translation>
 | 
				
			||||||
 | 
					    </message>
 | 
				
			||||||
 | 
					    <message>
 | 
				
			||||||
 | 
					        <source>Choose image on your PC</source>
 | 
				
			||||||
 | 
					        <translation type="vanished">Choose image on your PC</translation>
 | 
				
			||||||
 | 
					    </message>
 | 
				
			||||||
 | 
					    <message>
 | 
				
			||||||
 | 
					        <source>Operation type</source>
 | 
				
			||||||
 | 
					        <translation type="vanished">Operation type</translation>
 | 
				
			||||||
 | 
					    </message>
 | 
				
			||||||
 | 
					    <message>
 | 
				
			||||||
 | 
					        <source>Parse</source>
 | 
				
			||||||
 | 
					        <translation type="vanished">Parse</translation>
 | 
				
			||||||
 | 
					    </message>
 | 
				
			||||||
 | 
					    <message>
 | 
				
			||||||
 | 
					        <source>Could not start http server. 10 times in a row random port was occupied. Either you should run for a lottery ticket, or the problem is in the program. If the lottery ticket wasn't lucky, please, contact the developer.</source>
 | 
				
			||||||
 | 
					        <translation type="vanished">Could not start http server. 10 times in a row random port was occupied. Either you should run for a lottery ticket, or the problem is in the program. If the lottery ticket wasn't lucky, please, contact the developer.</translation>
 | 
				
			||||||
 | 
					    </message>
 | 
				
			||||||
 | 
					    <message>
 | 
				
			||||||
 | 
					        <source>Could not start http server.</source>
 | 
				
			||||||
 | 
					        <translation type="vanished">Could not start http server.</translation>
 | 
				
			||||||
 | 
					    </message>
 | 
				
			||||||
 | 
					    <message>
 | 
				
			||||||
 | 
					        <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>
 | 
				
			||||||
 | 
					    </message>
 | 
				
			||||||
 | 
					    <message>
 | 
				
			||||||
 | 
					        <source>Picture was not selected</source>
 | 
				
			||||||
 | 
					        <translation type="vanished">Picture was not selected</translation>
 | 
				
			||||||
 | 
					    </message>
 | 
				
			||||||
 | 
					    <message>
 | 
				
			||||||
 | 
					        <source>Selected image: </source>
 | 
				
			||||||
 | 
					        <translation type="vanished">Selected image: </translation>
 | 
				
			||||||
    </message>
 | 
					    </message>
 | 
				
			||||||
    <message>
 | 
					    <message>
 | 
				
			||||||
        <source>Captcha was not solved correctly!</source>
 | 
					        <source>Captcha was not solved correctly!</source>
 | 
				
			||||||
@@ -191,260 +460,16 @@
 | 
				
			|||||||
        <translation type="vanished">Check not found. Please, ensure correctness of entered data.</translation>
 | 
					        <translation type="vanished">Check not found. Please, ensure correctness of entered data.</translation>
 | 
				
			||||||
    </message>
 | 
					    </message>
 | 
				
			||||||
    <message>
 | 
					    <message>
 | 
				
			||||||
        <source>An error has occured. Check was matched incorrectly. Vector sizes are different. Please, contact the developer.</source>
 | 
					 | 
				
			||||||
        <translation type="vanished">An error has occured. Check was matched incorrectly. Vector sizes are different. Please, contact the developer.</translation>
 | 
					 | 
				
			||||||
    </message>
 | 
					 | 
				
			||||||
    <message>
 | 
					 | 
				
			||||||
        <source>Error in parsing</source>
 | 
					 | 
				
			||||||
        <translation type="vanished">Error in parsing</translation>
 | 
					 | 
				
			||||||
    </message>
 | 
					 | 
				
			||||||
    <message>
 | 
					 | 
				
			||||||
        <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>
 | 
					 | 
				
			||||||
    </message>
 | 
					 | 
				
			||||||
    <message>
 | 
					 | 
				
			||||||
        <source>Picture was not selected</source>
 | 
					 | 
				
			||||||
        <translation type="vanished">Picture was not selected</translation>
 | 
					 | 
				
			||||||
    </message>
 | 
					 | 
				
			||||||
    <message>
 | 
					 | 
				
			||||||
        <source>Please, select a picture to scan</source>
 | 
					 | 
				
			||||||
        <translation type="vanished">Please, select a picture to scan</translation>
 | 
					 | 
				
			||||||
    </message>
 | 
					 | 
				
			||||||
    <message>
 | 
					 | 
				
			||||||
        <location filename="../scenes/mainwindow.ui" line="26"/>
 | 
					 | 
				
			||||||
        <source>Form</source>
 | 
					 | 
				
			||||||
        <translation>Form</translation>
 | 
					 | 
				
			||||||
    </message>
 | 
					 | 
				
			||||||
    <message>
 | 
					 | 
				
			||||||
        <location filename="../scenes/mainwindow.ui" line="87"/>
 | 
					 | 
				
			||||||
        <source>Optical Character Recognition</source>
 | 
					 | 
				
			||||||
        <translation>Optical Character Recognition</translation>
 | 
					 | 
				
			||||||
    </message>
 | 
					 | 
				
			||||||
    <message>
 | 
					 | 
				
			||||||
        <location filename="../scenes/mainwindow.ui" line="43"/>
 | 
					 | 
				
			||||||
        <source>Text from E-Mail</source>
 | 
					 | 
				
			||||||
        <translation>Text from E-Mail</translation>
 | 
					 | 
				
			||||||
    </message>
 | 
					 | 
				
			||||||
</context>
 | 
					 | 
				
			||||||
<context>
 | 
					 | 
				
			||||||
    <name>OCRScene</name>
 | 
					 | 
				
			||||||
    <message>
 | 
					 | 
				
			||||||
        <location filename="../scenes/ocrscene.ui" line="20"/>
 | 
					 | 
				
			||||||
        <source>Form</source>
 | 
					 | 
				
			||||||
        <translation>Form</translation>
 | 
					 | 
				
			||||||
    </message>
 | 
					 | 
				
			||||||
    <message>
 | 
					 | 
				
			||||||
        <location filename="../scenes/ocrscene.ui" line="64"/>
 | 
					 | 
				
			||||||
        <source>Choose</source>
 | 
					 | 
				
			||||||
        <translation>Choose</translation>
 | 
					 | 
				
			||||||
    </message>
 | 
					 | 
				
			||||||
    <message>
 | 
					 | 
				
			||||||
        <location filename="../scenes/ocrscene.ui" line="103"/>
 | 
					 | 
				
			||||||
        <source>Path to image:</source>
 | 
					 | 
				
			||||||
        <translation>Path to image:</translation>
 | 
					 | 
				
			||||||
    </message>
 | 
					 | 
				
			||||||
    <message>
 | 
					 | 
				
			||||||
        <location filename="../scenes/ocrscene.ui" line="119"/>
 | 
					 | 
				
			||||||
        <source>Store:</source>
 | 
					 | 
				
			||||||
        <translation>Store:</translation>
 | 
					 | 
				
			||||||
    </message>
 | 
					 | 
				
			||||||
    <message>
 | 
					 | 
				
			||||||
        <location filename="../scenes/ocrscene.ui" line="90"/>
 | 
					 | 
				
			||||||
        <source>Recognized text will be shown below as soon as image will be processed. Please, edit it</source>
 | 
					 | 
				
			||||||
        <translation>Recognized text will be shown below as soon as image will be processed. Please, edit it</translation>
 | 
					 | 
				
			||||||
    </message>
 | 
					 | 
				
			||||||
    <message>
 | 
					 | 
				
			||||||
        <location filename="../scenes/ocrscene.ui" line="77"/>
 | 
					 | 
				
			||||||
        <source>Back</source>
 | 
					 | 
				
			||||||
        <translation>Back</translation>
 | 
					 | 
				
			||||||
    </message>
 | 
					 | 
				
			||||||
    <message>
 | 
					 | 
				
			||||||
        <location filename="../scenes/ocrscene.ui" line="45"/>
 | 
					 | 
				
			||||||
        <source>Parse</source>
 | 
					 | 
				
			||||||
        <translation>Parse</translation>
 | 
					 | 
				
			||||||
    </message>
 | 
					 | 
				
			||||||
    <message>
 | 
					 | 
				
			||||||
        <location filename="../ocrscene.cpp" line="36"/>
 | 
					 | 
				
			||||||
        <source>An error has occured. Check was matched incorrectly. Vector sizes are different. Please, contact the developer.</source>
 | 
					 | 
				
			||||||
        <translation>An error has occured. Check was matched incorrectly. Vector sizes are different. Please, contact the developer.</translation>
 | 
					 | 
				
			||||||
    </message>
 | 
					 | 
				
			||||||
    <message>
 | 
					 | 
				
			||||||
        <location filename="../ocrscene.cpp" line="38"/>
 | 
					 | 
				
			||||||
        <source>Error in parsing</source>
 | 
					 | 
				
			||||||
        <translation>Error in parsing</translation>
 | 
					 | 
				
			||||||
    </message>
 | 
					 | 
				
			||||||
    <message>
 | 
					 | 
				
			||||||
        <location filename="../ocrscene.cpp" line="56"/>
 | 
					 | 
				
			||||||
        <source>Please, select a picture to scan</source>
 | 
					 | 
				
			||||||
        <translation>Please, select a picture to scan</translation>
 | 
					 | 
				
			||||||
    </message>
 | 
					 | 
				
			||||||
    <message>
 | 
					 | 
				
			||||||
        <location filename="../ocrscene.cpp" line="58"/>
 | 
					 | 
				
			||||||
        <source>Picture was not selected</source>
 | 
					 | 
				
			||||||
        <translation>Picture was not selected</translation>
 | 
					 | 
				
			||||||
    </message>
 | 
					 | 
				
			||||||
    <message>
 | 
					 | 
				
			||||||
        <location filename="../ocrscene.cpp" line="64"/>
 | 
					 | 
				
			||||||
        <source>Path to image: </source>
 | 
					 | 
				
			||||||
        <translation>Path to image: </translation>
 | 
					 | 
				
			||||||
    </message>
 | 
					 | 
				
			||||||
    <message>
 | 
					 | 
				
			||||||
        <location filename="../ocrscene.cpp" line="76"/>
 | 
					 | 
				
			||||||
        <source>Could not autodetect store. If you beleive that this is an error, please, report to the developer.</source>
 | 
					 | 
				
			||||||
        <translation type="unfinished"></translation>
 | 
					 | 
				
			||||||
    </message>
 | 
					 | 
				
			||||||
</context>
 | 
					 | 
				
			||||||
<context>
 | 
					 | 
				
			||||||
    <name>OFDScene</name>
 | 
					 | 
				
			||||||
    <message>
 | 
					 | 
				
			||||||
        <location filename="../scenes/ofdscene.ui" line="14"/>
 | 
					 | 
				
			||||||
        <source>Form</source>
 | 
					 | 
				
			||||||
        <translation>Form</translation>
 | 
					 | 
				
			||||||
    </message>
 | 
					 | 
				
			||||||
    <message>
 | 
					 | 
				
			||||||
        <location filename="../scenes/ofdscene.ui" line="156"/>
 | 
					 | 
				
			||||||
        <source>Total</source>
 | 
					 | 
				
			||||||
        <translation>Total</translation>
 | 
					 | 
				
			||||||
    </message>
 | 
					 | 
				
			||||||
    <message>
 | 
					 | 
				
			||||||
        <location filename="../scenes/ofdscene.ui" line="36"/>
 | 
					 | 
				
			||||||
        <source>Back</source>
 | 
					 | 
				
			||||||
        <translation>Back</translation>
 | 
					 | 
				
			||||||
    </message>
 | 
					 | 
				
			||||||
    <message>
 | 
					 | 
				
			||||||
        <location filename="../scenes/ofdscene.ui" line="63"/>
 | 
					 | 
				
			||||||
        <source>or</source>
 | 
					 | 
				
			||||||
        <translation>or</translation>
 | 
					 | 
				
			||||||
    </message>
 | 
					 | 
				
			||||||
    <message>
 | 
					 | 
				
			||||||
        <location filename="../scenes/ofdscene.ui" line="79"/>
 | 
					 | 
				
			||||||
        <source>FD (Fiscal Document)</source>
 | 
					 | 
				
			||||||
        <translation>FD (Fiscal Document)</translation>
 | 
					 | 
				
			||||||
    </message>
 | 
					 | 
				
			||||||
    <message>
 | 
					 | 
				
			||||||
        <location filename="../scenes/ofdscene.ui" line="43"/>
 | 
					 | 
				
			||||||
        <source>Date and time of purchase</source>
 | 
					 | 
				
			||||||
        <translation>Date and time of purchase</translation>
 | 
					 | 
				
			||||||
    </message>
 | 
					 | 
				
			||||||
    <message>
 | 
					 | 
				
			||||||
        <location filename="../scenes/ofdscene.ui" line="199"/>
 | 
					 | 
				
			||||||
        <source>Stop server</source>
 | 
					 | 
				
			||||||
        <translation>Stop server</translation>
 | 
					 | 
				
			||||||
    </message>
 | 
					 | 
				
			||||||
    <message>
 | 
					 | 
				
			||||||
        <location filename="../scenes/ofdscene.ui" line="107"/>
 | 
					 | 
				
			||||||
        <source>Funds income</source>
 | 
					 | 
				
			||||||
        <translation>Funds income</translation>
 | 
					 | 
				
			||||||
    </message>
 | 
					 | 
				
			||||||
    <message>
 | 
					 | 
				
			||||||
        <location filename="../scenes/ofdscene.ui" line="112"/>
 | 
					 | 
				
			||||||
        <source>Funds return</source>
 | 
					 | 
				
			||||||
        <translation>Funds return</translation>
 | 
					 | 
				
			||||||
    </message>
 | 
					 | 
				
			||||||
    <message>
 | 
					 | 
				
			||||||
        <location filename="../scenes/ofdscene.ui" line="117"/>
 | 
					 | 
				
			||||||
        <source>Funds spend</source>
 | 
					 | 
				
			||||||
        <translation>Funds spend</translation>
 | 
					 | 
				
			||||||
    </message>
 | 
					 | 
				
			||||||
    <message>
 | 
					 | 
				
			||||||
        <location filename="../scenes/ofdscene.ui" line="122"/>
 | 
					 | 
				
			||||||
        <source>Spends return</source>
 | 
					 | 
				
			||||||
        <translation>Spends return</translation>
 | 
					 | 
				
			||||||
    </message>
 | 
					 | 
				
			||||||
    <message>
 | 
					 | 
				
			||||||
        <location filename="../scenes/ofdscene.ui" line="50"/>
 | 
					 | 
				
			||||||
        <source>Use your phone as a QR code scanner</source>
 | 
					 | 
				
			||||||
        <translation>Use your phone as a QR code scanner</translation>
 | 
					 | 
				
			||||||
    </message>
 | 
					 | 
				
			||||||
    <message>
 | 
					 | 
				
			||||||
        <location filename="../scenes/ofdscene.ui" line="149"/>
 | 
					 | 
				
			||||||
        <source>FN (Fiscal Number)</source>
 | 
					 | 
				
			||||||
        <translation>FN (Fiscal Number)</translation>
 | 
					 | 
				
			||||||
    </message>
 | 
					 | 
				
			||||||
    <message>
 | 
					 | 
				
			||||||
        <location filename="../scenes/ofdscene.ui" line="23"/>
 | 
					 | 
				
			||||||
        <source>FI (Fiscal Identifier)</source>
 | 
					 | 
				
			||||||
        <translation>FI (Fiscal Identifier)</translation>
 | 
					 | 
				
			||||||
    </message>
 | 
					 | 
				
			||||||
    <message>
 | 
					 | 
				
			||||||
        <location filename="../scenes/ofdscene.ui" line="179"/>
 | 
					 | 
				
			||||||
        <source>Choose image on your PC</source>
 | 
					 | 
				
			||||||
        <translation>Choose image on your PC</translation>
 | 
					 | 
				
			||||||
    </message>
 | 
					 | 
				
			||||||
    <message>
 | 
					 | 
				
			||||||
        <location filename="../scenes/ofdscene.ui" line="99"/>
 | 
					 | 
				
			||||||
        <source>Operation type</source>
 | 
					 | 
				
			||||||
        <translation>Operation type</translation>
 | 
					 | 
				
			||||||
    </message>
 | 
					 | 
				
			||||||
    <message>
 | 
					 | 
				
			||||||
        <location filename="../scenes/ofdscene.ui" line="92"/>
 | 
					 | 
				
			||||||
        <source>Parse</source>
 | 
					 | 
				
			||||||
        <translation>Parse</translation>
 | 
					 | 
				
			||||||
    </message>
 | 
					 | 
				
			||||||
    <message>
 | 
					 | 
				
			||||||
        <location filename="../ofdscene.cpp" line="87"/>
 | 
					 | 
				
			||||||
        <source>Could not start http server. 10 times in a row random port was occupied. Either you should run for a lottery ticket, or the problem is in the program. If the lottery ticket wasn't lucky, please, contact the developer.</source>
 | 
					 | 
				
			||||||
        <translation>Could not start http server. 10 times in a row random port was occupied. Either you should run for a lottery ticket, or the problem is in the program. If the lottery ticket wasn't lucky, please, contact the developer.</translation>
 | 
					 | 
				
			||||||
    </message>
 | 
					 | 
				
			||||||
    <message>
 | 
					 | 
				
			||||||
        <location filename="../ofdscene.cpp" line="89"/>
 | 
					 | 
				
			||||||
        <source>Could not start http server.</source>
 | 
					 | 
				
			||||||
        <translation>Could not start http server.</translation>
 | 
					 | 
				
			||||||
    </message>
 | 
					 | 
				
			||||||
    <message>
 | 
					 | 
				
			||||||
        <location filename="../ofdscene.cpp" line="126"/>
 | 
					 | 
				
			||||||
        <source>Please, select a picture where QR code that contains info about check is present</source>
 | 
					 | 
				
			||||||
        <translation>Please, select a picture where QR code that contains info about check is present</translation>
 | 
					 | 
				
			||||||
    </message>
 | 
					 | 
				
			||||||
    <message>
 | 
					 | 
				
			||||||
        <location filename="../ofdscene.cpp" line="128"/>
 | 
					 | 
				
			||||||
        <source>Picture was not selected</source>
 | 
					 | 
				
			||||||
        <translation>Picture was not selected</translation>
 | 
					 | 
				
			||||||
    </message>
 | 
					 | 
				
			||||||
    <message>
 | 
					 | 
				
			||||||
        <location filename="../ofdscene.cpp" line="133"/>
 | 
					 | 
				
			||||||
        <source>Selected image: </source>
 | 
					 | 
				
			||||||
        <translation>Selected image: </translation>
 | 
					 | 
				
			||||||
    </message>
 | 
					 | 
				
			||||||
    <message>
 | 
					 | 
				
			||||||
        <location filename="../ofdscene.cpp" line="193"/>
 | 
					 | 
				
			||||||
        <source>Captcha was not solved correctly!</source>
 | 
					 | 
				
			||||||
        <translation>Captcha was not solved correctly!</translation>
 | 
					 | 
				
			||||||
    </message>
 | 
					 | 
				
			||||||
    <message>
 | 
					 | 
				
			||||||
        <location filename="../ofdscene.cpp" line="195"/>
 | 
					 | 
				
			||||||
        <source>Captcha is incorrect</source>
 | 
					 | 
				
			||||||
        <translation>Captcha is incorrect</translation>
 | 
					 | 
				
			||||||
    </message>
 | 
					 | 
				
			||||||
    <message>
 | 
					 | 
				
			||||||
        <location filename="../ofdscene.cpp" line="200"/>
 | 
					 | 
				
			||||||
        <source>Internal server error. Please, try again later.</source>
 | 
					 | 
				
			||||||
        <translation>Internal server error. Please, try again later.</translation>
 | 
					 | 
				
			||||||
    </message>
 | 
					 | 
				
			||||||
    <message>
 | 
					 | 
				
			||||||
        <location filename="../ofdscene.cpp" line="202"/>
 | 
					 | 
				
			||||||
        <source>Internal server error</source>
 | 
					 | 
				
			||||||
        <translation>Internal server error</translation>
 | 
					 | 
				
			||||||
    </message>
 | 
					 | 
				
			||||||
    <message>
 | 
					 | 
				
			||||||
        <location filename="../ofdscene.cpp" line="207"/>
 | 
					 | 
				
			||||||
        <source>Check not found. Please, ensure correctness of entered data.</source>
 | 
					 | 
				
			||||||
        <translation>Check not found. Please, ensure correctness of entered data.</translation>
 | 
					 | 
				
			||||||
    </message>
 | 
					 | 
				
			||||||
    <message>
 | 
					 | 
				
			||||||
        <location filename="../ofdscene.cpp" line="209"/>
 | 
					 | 
				
			||||||
        <source>Check was not found</source>
 | 
					        <source>Check was not found</source>
 | 
				
			||||||
        <translation>Check was not found</translation>
 | 
					        <translation type="vanished">Check was not found</translation>
 | 
				
			||||||
    </message>
 | 
					    </message>
 | 
				
			||||||
    <message>
 | 
					    <message>
 | 
				
			||||||
        <location filename="../ofdscene.cpp" line="80"/>
 | 
					 | 
				
			||||||
        <source>QR code for binaryeye to connect</source>
 | 
					        <source>QR code for binaryeye to connect</source>
 | 
				
			||||||
        <translation>QR code for binaryeye to connect</translation>
 | 
					        <translation type="vanished">QR code for binaryeye to connect</translation>
 | 
				
			||||||
    </message>
 | 
					    </message>
 | 
				
			||||||
    <message>
 | 
					    <message>
 | 
				
			||||||
        <location filename="../ofdscene.cpp" line="81"/>
 | 
					 | 
				
			||||||
        <source>I've scanned</source>
 | 
					        <source>I've scanned</source>
 | 
				
			||||||
        <translation>I've scanned</translation>
 | 
					        <translation type="vanished">I've scanned</translation>
 | 
				
			||||||
    </message>
 | 
					    </message>
 | 
				
			||||||
    <message>
 | 
					    <message>
 | 
				
			||||||
        <source>123 123</source>
 | 
					        <source>123 123</source>
 | 
				
			||||||
@@ -564,15 +589,23 @@
 | 
				
			|||||||
        <translation>Print total</translation>
 | 
					        <translation>Print total</translation>
 | 
				
			||||||
    </message>
 | 
					    </message>
 | 
				
			||||||
</context>
 | 
					</context>
 | 
				
			||||||
 | 
					<context>
 | 
				
			||||||
 | 
					    <name>QObject</name>
 | 
				
			||||||
 | 
					    <message>
 | 
				
			||||||
 | 
					        <location filename="../main.cpp" line="60"/>
 | 
				
			||||||
 | 
					        <source>Using locale: </source>
 | 
				
			||||||
 | 
					        <translation type="unfinished"></translation>
 | 
				
			||||||
 | 
					    </message>
 | 
				
			||||||
 | 
					</context>
 | 
				
			||||||
<context>
 | 
					<context>
 | 
				
			||||||
    <name>SettingsDialog</name>
 | 
					    <name>SettingsDialog</name>
 | 
				
			||||||
    <message>
 | 
					    <message>
 | 
				
			||||||
        <location filename="../settingsdialog.cpp" line="161"/>
 | 
					        <location filename="../settingsdialog.cpp" line="160"/>
 | 
				
			||||||
        <source>You need to restart program to apply language changes</source>
 | 
					        <source>You need to restart program to apply language changes</source>
 | 
				
			||||||
        <translation>You need to restart program to apply language changes</translation>
 | 
					        <translation>You need to restart program to apply language changes</translation>
 | 
				
			||||||
    </message>
 | 
					    </message>
 | 
				
			||||||
    <message>
 | 
					    <message>
 | 
				
			||||||
        <location filename="../settingsdialog.cpp" line="163"/>
 | 
					        <location filename="../settingsdialog.cpp" line="162"/>
 | 
				
			||||||
        <source>Restart required</source>
 | 
					        <source>Restart required</source>
 | 
				
			||||||
        <translation>Restart required</translation>
 | 
					        <translation>Restart required</translation>
 | 
				
			||||||
    </message>
 | 
					    </message>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -27,48 +27,36 @@
 | 
				
			|||||||
<context>
 | 
					<context>
 | 
				
			||||||
    <name>EmailTextScene</name>
 | 
					    <name>EmailTextScene</name>
 | 
				
			||||||
    <message>
 | 
					    <message>
 | 
				
			||||||
        <location filename="../scenes/emailtextscene.ui" line="14"/>
 | 
					 | 
				
			||||||
        <source>Form</source>
 | 
					        <source>Form</source>
 | 
				
			||||||
        <translation>Форма</translation>
 | 
					        <translation type="vanished">Форма</translation>
 | 
				
			||||||
    </message>
 | 
					    </message>
 | 
				
			||||||
    <message>
 | 
					    <message>
 | 
				
			||||||
        <source>Store type</source>
 | 
					        <source>Store type</source>
 | 
				
			||||||
        <translation type="obsolete">Магазин</translation>
 | 
					        <translation type="obsolete">Магазин</translation>
 | 
				
			||||||
    </message>
 | 
					    </message>
 | 
				
			||||||
    <message>
 | 
					    <message>
 | 
				
			||||||
        <location filename="../scenes/emailtextscene.ui" line="26"/>
 | 
					 | 
				
			||||||
        <source>Check content</source>
 | 
					        <source>Check content</source>
 | 
				
			||||||
        <translation>Контент чека</translation>
 | 
					        <translation type="vanished">Контент чека</translation>
 | 
				
			||||||
    </message>
 | 
					    </message>
 | 
				
			||||||
    <message>
 | 
					    <message>
 | 
				
			||||||
        <location filename="../scenes/emailtextscene.ui" line="33"/>
 | 
					 | 
				
			||||||
        <source>Parse</source>
 | 
					        <source>Parse</source>
 | 
				
			||||||
        <translation>Парсить</translation>
 | 
					        <translation type="vanished">Парсить</translation>
 | 
				
			||||||
    </message>
 | 
					    </message>
 | 
				
			||||||
    <message>
 | 
					    <message>
 | 
				
			||||||
        <location filename="../scenes/emailtextscene.ui" line="46"/>
 | 
					 | 
				
			||||||
        <source>Store:</source>
 | 
					        <source>Store:</source>
 | 
				
			||||||
        <translation>Магазин:</translation>
 | 
					        <translation type="vanished">Магазин:</translation>
 | 
				
			||||||
    </message>
 | 
					    </message>
 | 
				
			||||||
    <message>
 | 
					    <message>
 | 
				
			||||||
        <location filename="../scenes/emailtextscene.ui" line="66"/>
 | 
					 | 
				
			||||||
        <source>Back</source>
 | 
					        <source>Back</source>
 | 
				
			||||||
        <translation>Назад</translation>
 | 
					        <translation type="vanished">Назад</translation>
 | 
				
			||||||
    </message>
 | 
					    </message>
 | 
				
			||||||
    <message>
 | 
					    <message>
 | 
				
			||||||
        <location filename="../emailtextscene.cpp" line="32"/>
 | 
					 | 
				
			||||||
        <source>An error has occured. Check was matched incorrectly. Vector sizes are different. Please, contact the developer.</source>
 | 
					        <source>An error has occured. Check was matched incorrectly. Vector sizes are different. Please, contact the developer.</source>
 | 
				
			||||||
        <translation>Произошла ошибка. Чек был прочитан неверно. Размеры векторов различаются. Пожалуйста, сообщите об этом разработчику.</translation>
 | 
					        <translation type="vanished">Произошла ошибка. Чек был прочитан неверно. Размеры векторов различаются. Пожалуйста, сообщите об этом разработчику.</translation>
 | 
				
			||||||
    </message>
 | 
					    </message>
 | 
				
			||||||
    <message>
 | 
					    <message>
 | 
				
			||||||
        <location filename="../emailtextscene.cpp" line="34"/>
 | 
					 | 
				
			||||||
        <source>Error in parsing</source>
 | 
					        <source>Error in parsing</source>
 | 
				
			||||||
        <translation>Ошибка в парсинге</translation>
 | 
					        <translation type="vanished">Ошибка в парсинге</translation>
 | 
				
			||||||
    </message>
 | 
					 | 
				
			||||||
    <message>
 | 
					 | 
				
			||||||
        <location filename="../emailtextscene.cpp" line="51"/>
 | 
					 | 
				
			||||||
        <source>Could not autodetect store. If you beleive that this is an error, please, report to the developer.</source>
 | 
					 | 
				
			||||||
        <translation type="unfinished"></translation>
 | 
					 | 
				
			||||||
    </message>
 | 
					    </message>
 | 
				
			||||||
</context>
 | 
					</context>
 | 
				
			||||||
<context>
 | 
					<context>
 | 
				
			||||||
@@ -82,8 +70,9 @@
 | 
				
			|||||||
        <translation type="vanished">Магазин</translation>
 | 
					        <translation type="vanished">Магазин</translation>
 | 
				
			||||||
    </message>
 | 
					    </message>
 | 
				
			||||||
    <message>
 | 
					    <message>
 | 
				
			||||||
 | 
					        <location filename="../scenes/mainwindow.ui" line="51"/>
 | 
				
			||||||
        <source>Parse</source>
 | 
					        <source>Parse</source>
 | 
				
			||||||
        <translation type="vanished">Парсить</translation>
 | 
					        <translation>Парсить</translation>
 | 
				
			||||||
    </message>
 | 
					    </message>
 | 
				
			||||||
    <message>
 | 
					    <message>
 | 
				
			||||||
        <source>Preferences</source>
 | 
					        <source>Preferences</source>
 | 
				
			||||||
@@ -124,23 +113,267 @@
 | 
				
			|||||||
        <translation type="vanished">0000000000000000</translation>
 | 
					        <translation type="vanished">0000000000000000</translation>
 | 
				
			||||||
    </message>
 | 
					    </message>
 | 
				
			||||||
    <message>
 | 
					    <message>
 | 
				
			||||||
 | 
					        <location filename="../scenes/mainwindow.ui" line="77"/>
 | 
				
			||||||
        <source>FN (Fiscal Number)</source>
 | 
					        <source>FN (Fiscal Number)</source>
 | 
				
			||||||
        <translatorcomment>Фискальный Норма</translatorcomment>
 | 
					        <translatorcomment>Фискальный Норма</translatorcomment>
 | 
				
			||||||
        <translation type="vanished">ФН</translation>
 | 
					        <translation>ФН</translation>
 | 
				
			||||||
    </message>
 | 
					    </message>
 | 
				
			||||||
    <message>
 | 
					    <message>
 | 
				
			||||||
 | 
					        <location filename="../scenes/mainwindow.ui" line="64"/>
 | 
				
			||||||
        <source>FD (Fiscal Document)</source>
 | 
					        <source>FD (Fiscal Document)</source>
 | 
				
			||||||
        <translatorcomment>Фискальный Документ</translatorcomment>
 | 
					        <translatorcomment>Фискальный Документ</translatorcomment>
 | 
				
			||||||
        <translation type="vanished">ФД</translation>
 | 
					        <translation>ФД</translation>
 | 
				
			||||||
    </message>
 | 
					    </message>
 | 
				
			||||||
    <message>
 | 
					    <message>
 | 
				
			||||||
        <source>0000000000</source>
 | 
					        <source>0000000000</source>
 | 
				
			||||||
        <translation type="vanished">000000000</translation>
 | 
					        <translation type="vanished">000000000</translation>
 | 
				
			||||||
    </message>
 | 
					    </message>
 | 
				
			||||||
    <message>
 | 
					    <message>
 | 
				
			||||||
 | 
					        <source>Back</source>
 | 
				
			||||||
 | 
					        <translation type="obsolete">Назад</translation>
 | 
				
			||||||
 | 
					    </message>
 | 
				
			||||||
 | 
					    <message>
 | 
				
			||||||
 | 
					        <location filename="../scenes/mainwindow.ui" line="130"/>
 | 
				
			||||||
 | 
					        <source>Stop server</source>
 | 
				
			||||||
 | 
					        <translation type="unfinished">Остановить сервер</translation>
 | 
				
			||||||
 | 
					    </message>
 | 
				
			||||||
 | 
					    <message>
 | 
				
			||||||
 | 
					        <location filename="../scenes/mainwindow.ui" line="143"/>
 | 
				
			||||||
 | 
					        <source>Choose image on your PC</source>
 | 
				
			||||||
 | 
					        <translation type="unfinished">Выбрать изображение на компьютере</translation>
 | 
				
			||||||
 | 
					    </message>
 | 
				
			||||||
 | 
					    <message>
 | 
				
			||||||
 | 
					        <location filename="../scenes/mainwindow.ui" line="38"/>
 | 
				
			||||||
 | 
					        <location filename="../scenes/mainwindow.ui" line="183"/>
 | 
				
			||||||
 | 
					        <source>or</source>
 | 
				
			||||||
 | 
					        <translation type="unfinished">или</translation>
 | 
				
			||||||
 | 
					    </message>
 | 
				
			||||||
 | 
					    <message>
 | 
				
			||||||
 | 
					        <location filename="../scenes/mainwindow.ui" line="97"/>
 | 
				
			||||||
 | 
					        <source>Use your phone as a QR code scanner</source>
 | 
				
			||||||
 | 
					        <translation type="unfinished">Использовать телефон как сканнер QR</translation>
 | 
				
			||||||
 | 
					    </message>
 | 
				
			||||||
 | 
					    <message>
 | 
				
			||||||
 | 
					        <location filename="../scenes/mainwindow.ui" line="157"/>
 | 
				
			||||||
        <source>FI (Fiscal Identifier)</source>
 | 
					        <source>FI (Fiscal Identifier)</source>
 | 
				
			||||||
        <translatorcomment>Фискальный Признак</translatorcomment>
 | 
					        <translatorcomment>Фискальный Признак</translatorcomment>
 | 
				
			||||||
        <translation type="vanished">ФП</translation>
 | 
					        <translation>ФП</translation>
 | 
				
			||||||
 | 
					    </message>
 | 
				
			||||||
 | 
					    <message>
 | 
				
			||||||
 | 
					        <location filename="../scenes/mainwindow.ui" line="117"/>
 | 
				
			||||||
 | 
					        <source>Date and time of purchase</source>
 | 
				
			||||||
 | 
					        <translation type="unfinished">Дата и время покупки</translation>
 | 
				
			||||||
 | 
					    </message>
 | 
				
			||||||
 | 
					    <message>
 | 
				
			||||||
 | 
					        <location filename="../scenes/mainwindow.ui" line="84"/>
 | 
				
			||||||
 | 
					        <source>Operation type</source>
 | 
				
			||||||
 | 
					        <translation type="unfinished">Тип операции</translation>
 | 
				
			||||||
 | 
					    </message>
 | 
				
			||||||
 | 
					    <message>
 | 
				
			||||||
 | 
					        <location filename="../scenes/mainwindow.ui" line="170"/>
 | 
				
			||||||
 | 
					        <source>Parse an E-Mail</source>
 | 
				
			||||||
 | 
					        <translation type="unfinished"></translation>
 | 
				
			||||||
 | 
					    </message>
 | 
				
			||||||
 | 
					    <message>
 | 
				
			||||||
 | 
					        <location filename="../scenes/mainwindow.ui" line="210"/>
 | 
				
			||||||
 | 
					        <source>Funds income</source>
 | 
				
			||||||
 | 
					        <translation>Приход средств</translation>
 | 
				
			||||||
 | 
					    </message>
 | 
				
			||||||
 | 
					    <message>
 | 
				
			||||||
 | 
					        <location filename="../scenes/mainwindow.ui" line="215"/>
 | 
				
			||||||
 | 
					        <source>Funds return</source>
 | 
				
			||||||
 | 
					        <translation>Возврат средств</translation>
 | 
				
			||||||
 | 
					    </message>
 | 
				
			||||||
 | 
					    <message>
 | 
				
			||||||
 | 
					        <location filename="../scenes/mainwindow.ui" line="220"/>
 | 
				
			||||||
 | 
					        <source>Funds spend</source>
 | 
				
			||||||
 | 
					        <translation>Расход средств</translation>
 | 
				
			||||||
 | 
					    </message>
 | 
				
			||||||
 | 
					    <message>
 | 
				
			||||||
 | 
					        <location filename="../scenes/mainwindow.ui" line="225"/>
 | 
				
			||||||
 | 
					        <source>Spends return</source>
 | 
				
			||||||
 | 
					        <translation>Возврат расхода</translation>
 | 
				
			||||||
 | 
					    </message>
 | 
				
			||||||
 | 
					    <message>
 | 
				
			||||||
 | 
					        <location filename="../scenes/mainwindow.ui" line="150"/>
 | 
				
			||||||
 | 
					        <source>Total</source>
 | 
				
			||||||
 | 
					        <translation>Итого</translation>
 | 
				
			||||||
 | 
					    </message>
 | 
				
			||||||
 | 
					    <message>
 | 
				
			||||||
 | 
					        <source>checks parser</source>
 | 
				
			||||||
 | 
					        <translation type="vanished">Парсер чеков</translation>
 | 
				
			||||||
 | 
					    </message>
 | 
				
			||||||
 | 
					    <message>
 | 
				
			||||||
 | 
					        <location filename="../mainwindow.cpp" line="84"/>
 | 
				
			||||||
 | 
					        <source>QR code for binaryeye to connect</source>
 | 
				
			||||||
 | 
					        <translation type="unfinished">QR код для подключения BinaryEye</translation>
 | 
				
			||||||
 | 
					    </message>
 | 
				
			||||||
 | 
					    <message>
 | 
				
			||||||
 | 
					        <location filename="../mainwindow.cpp" line="85"/>
 | 
				
			||||||
 | 
					        <source>I've scanned</source>
 | 
				
			||||||
 | 
					        <translation type="unfinished">Просканировал</translation>
 | 
				
			||||||
 | 
					    </message>
 | 
				
			||||||
 | 
					    <message>
 | 
				
			||||||
 | 
					        <location filename="../mainwindow.cpp" line="91"/>
 | 
				
			||||||
 | 
					        <source>Could not start http server. 10 times in a row random port was occupied. Either you should run for a lottery ticket, or the problem is in the program. If the lottery ticket wasn't lucky, please, contact the developer.</source>
 | 
				
			||||||
 | 
					        <translation type="unfinished">Не смог поднять HTTP сервер. 10 раз подряд случайно выбранный порт был занят. Либо Вам следует бежать за лоттерейным билетом, или в программе баг. Если лотерейный билет не был выигрышным, пожалуйста, сообщите разработчику.</translation>
 | 
				
			||||||
 | 
					    </message>
 | 
				
			||||||
 | 
					    <message>
 | 
				
			||||||
 | 
					        <location filename="../mainwindow.cpp" line="93"/>
 | 
				
			||||||
 | 
					        <source>Could not start http server.</source>
 | 
				
			||||||
 | 
					        <translation type="unfinished">Не получилось запустить HTTP сервер.</translation>
 | 
				
			||||||
 | 
					    </message>
 | 
				
			||||||
 | 
					    <message>
 | 
				
			||||||
 | 
					        <location filename="../mainwindow.cpp" line="137"/>
 | 
				
			||||||
 | 
					        <source>Selected image: </source>
 | 
				
			||||||
 | 
					        <translation type="unfinished">Выбранное изображение: </translation>
 | 
				
			||||||
 | 
					    </message>
 | 
				
			||||||
 | 
					    <message>
 | 
				
			||||||
 | 
					        <location filename="../mainwindow.cpp" line="197"/>
 | 
				
			||||||
 | 
					        <source>Captcha was not solved correctly!</source>
 | 
				
			||||||
 | 
					        <translation>Капча была решена неверно!</translation>
 | 
				
			||||||
 | 
					    </message>
 | 
				
			||||||
 | 
					    <message>
 | 
				
			||||||
 | 
					        <location filename="../mainwindow.cpp" line="199"/>
 | 
				
			||||||
 | 
					        <source>Captcha is incorrect</source>
 | 
				
			||||||
 | 
					        <translation>Капча введена неверно</translation>
 | 
				
			||||||
 | 
					    </message>
 | 
				
			||||||
 | 
					    <message>
 | 
				
			||||||
 | 
					        <location filename="../mainwindow.cpp" line="204"/>
 | 
				
			||||||
 | 
					        <source>Internal server error. Please, try again later.</source>
 | 
				
			||||||
 | 
					        <translation>Внутренняя ошибка сервера. Пожалуйста, попробуйте снова позже.</translation>
 | 
				
			||||||
 | 
					    </message>
 | 
				
			||||||
 | 
					    <message>
 | 
				
			||||||
 | 
					        <location filename="../mainwindow.cpp" line="206"/>
 | 
				
			||||||
 | 
					        <source>Internal server error</source>
 | 
				
			||||||
 | 
					        <translation>Внутренняя ошибка сервера</translation>
 | 
				
			||||||
 | 
					    </message>
 | 
				
			||||||
 | 
					    <message>
 | 
				
			||||||
 | 
					        <location filename="../mainwindow.cpp" line="211"/>
 | 
				
			||||||
 | 
					        <source>Check not found. Please, ensure correctness of entered data.</source>
 | 
				
			||||||
 | 
					        <translation>Чек не найден. Пожалуйста, убедитесь в правильности введённых данных.</translation>
 | 
				
			||||||
 | 
					    </message>
 | 
				
			||||||
 | 
					    <message>
 | 
				
			||||||
 | 
					        <location filename="../mainwindow.cpp" line="213"/>
 | 
				
			||||||
 | 
					        <source>Check was not found</source>
 | 
				
			||||||
 | 
					        <translation>Чек не найден</translation>
 | 
				
			||||||
 | 
					    </message>
 | 
				
			||||||
 | 
					    <message>
 | 
				
			||||||
 | 
					        <source>An error has occured. Check was matched incorrectly. Vector sizes are different. Please, contact the developer.</source>
 | 
				
			||||||
 | 
					        <translation type="vanished">Произошла ошибка. Чек был прочитан неверно. Размеры векторов различаются. Пожалуйста, сообщите об этом разработчику.</translation>
 | 
				
			||||||
 | 
					    </message>
 | 
				
			||||||
 | 
					    <message>
 | 
				
			||||||
 | 
					        <source>Error in parsing</source>
 | 
				
			||||||
 | 
					        <translation type="vanished">Ошибка в парсинге</translation>
 | 
				
			||||||
 | 
					    </message>
 | 
				
			||||||
 | 
					    <message>
 | 
				
			||||||
 | 
					        <location filename="../mainwindow.cpp" line="130"/>
 | 
				
			||||||
 | 
					        <source>Please, select a picture where QR code that contains info about check is present</source>
 | 
				
			||||||
 | 
					        <translation>Пожалуйста, выберете изображение, содержащее QR код с информацией о чеке</translation>
 | 
				
			||||||
 | 
					    </message>
 | 
				
			||||||
 | 
					    <message>
 | 
				
			||||||
 | 
					        <location filename="../mainwindow.cpp" line="132"/>
 | 
				
			||||||
 | 
					        <source>Picture was not selected</source>
 | 
				
			||||||
 | 
					        <translation>Изображение не было выбрано</translation>
 | 
				
			||||||
 | 
					    </message>
 | 
				
			||||||
 | 
					    <message>
 | 
				
			||||||
 | 
					        <source>Please, select a picture to scan</source>
 | 
				
			||||||
 | 
					        <translation type="vanished">Пожалуйста, выберете изображение для сканирования</translation>
 | 
				
			||||||
 | 
					    </message>
 | 
				
			||||||
 | 
					    <message>
 | 
				
			||||||
 | 
					        <location filename="../scenes/mainwindow.ui" line="26"/>
 | 
				
			||||||
 | 
					        <source>Form</source>
 | 
				
			||||||
 | 
					        <translation>Форма</translation>
 | 
				
			||||||
 | 
					    </message>
 | 
				
			||||||
 | 
					    <message>
 | 
				
			||||||
 | 
					        <source>Optical Character Recognition</source>
 | 
				
			||||||
 | 
					        <translation type="vanished">Оптическое распознавание символов</translation>
 | 
				
			||||||
 | 
					    </message>
 | 
				
			||||||
 | 
					    <message>
 | 
				
			||||||
 | 
					        <source>Text from E-Mail</source>
 | 
				
			||||||
 | 
					        <translation type="vanished">Текст из электронного письма</translation>
 | 
				
			||||||
 | 
					    </message>
 | 
				
			||||||
 | 
					</context>
 | 
				
			||||||
 | 
					<context>
 | 
				
			||||||
 | 
					    <name>OCRScene</name>
 | 
				
			||||||
 | 
					    <message>
 | 
				
			||||||
 | 
					        <source>Form</source>
 | 
				
			||||||
 | 
					        <translation type="vanished">Форма</translation>
 | 
				
			||||||
 | 
					    </message>
 | 
				
			||||||
 | 
					    <message>
 | 
				
			||||||
 | 
					        <source>Choose</source>
 | 
				
			||||||
 | 
					        <translation type="vanished">Выбрать</translation>
 | 
				
			||||||
 | 
					    </message>
 | 
				
			||||||
 | 
					    <message>
 | 
				
			||||||
 | 
					        <source>Path to image:</source>
 | 
				
			||||||
 | 
					        <translation type="vanished">Путь к изображению:</translation>
 | 
				
			||||||
 | 
					    </message>
 | 
				
			||||||
 | 
					    <message>
 | 
				
			||||||
 | 
					        <source>Store:</source>
 | 
				
			||||||
 | 
					        <translation type="vanished">Магазин:</translation>
 | 
				
			||||||
 | 
					    </message>
 | 
				
			||||||
 | 
					    <message>
 | 
				
			||||||
 | 
					        <source>Recognized text will be shown below as soon as image will be processed. Please, edit it</source>
 | 
				
			||||||
 | 
					        <translation type="vanished">Распознанный текст будет показан ниже как только изображение обработается. Пожалуйста, отредактируйте</translation>
 | 
				
			||||||
 | 
					    </message>
 | 
				
			||||||
 | 
					    <message>
 | 
				
			||||||
 | 
					        <source>Back</source>
 | 
				
			||||||
 | 
					        <translation type="vanished">Назад</translation>
 | 
				
			||||||
 | 
					    </message>
 | 
				
			||||||
 | 
					    <message>
 | 
				
			||||||
 | 
					        <source>Parse</source>
 | 
				
			||||||
 | 
					        <translation type="vanished">Парсить</translation>
 | 
				
			||||||
 | 
					    </message>
 | 
				
			||||||
 | 
					    <message>
 | 
				
			||||||
 | 
					        <source>An error has occured. Check was matched incorrectly. Vector sizes are different. Please, contact the developer.</source>
 | 
				
			||||||
 | 
					        <translation type="vanished">Произошла ошибка. Чек был прочитан неверно. Размеры векторов различаются. Пожалуйста, сообщите об этом разработчику.</translation>
 | 
				
			||||||
 | 
					    </message>
 | 
				
			||||||
 | 
					    <message>
 | 
				
			||||||
 | 
					        <source>Error in parsing</source>
 | 
				
			||||||
 | 
					        <translation type="vanished">Ошибка в парсинге</translation>
 | 
				
			||||||
 | 
					    </message>
 | 
				
			||||||
 | 
					    <message>
 | 
				
			||||||
 | 
					        <source>Please, select a picture to scan</source>
 | 
				
			||||||
 | 
					        <translation type="vanished">Пожалуйста, выберете изображение для сканирования</translation>
 | 
				
			||||||
 | 
					    </message>
 | 
				
			||||||
 | 
					    <message>
 | 
				
			||||||
 | 
					        <source>Picture was not selected</source>
 | 
				
			||||||
 | 
					        <translation type="vanished">Изображение не было выбрано</translation>
 | 
				
			||||||
 | 
					    </message>
 | 
				
			||||||
 | 
					    <message>
 | 
				
			||||||
 | 
					        <source>Path to image: </source>
 | 
				
			||||||
 | 
					        <translation type="vanished">Путь к изображению: </translation>
 | 
				
			||||||
 | 
					    </message>
 | 
				
			||||||
 | 
					</context>
 | 
				
			||||||
 | 
					<context>
 | 
				
			||||||
 | 
					    <name>OFDScene</name>
 | 
				
			||||||
 | 
					    <message>
 | 
				
			||||||
 | 
					        <source>Form</source>
 | 
				
			||||||
 | 
					        <translation type="vanished">Форма</translation>
 | 
				
			||||||
 | 
					    </message>
 | 
				
			||||||
 | 
					    <message>
 | 
				
			||||||
 | 
					        <source>Total</source>
 | 
				
			||||||
 | 
					        <translation type="vanished">Итого</translation>
 | 
				
			||||||
 | 
					    </message>
 | 
				
			||||||
 | 
					    <message>
 | 
				
			||||||
 | 
					        <source>Back</source>
 | 
				
			||||||
 | 
					        <translation type="vanished">Назад</translation>
 | 
				
			||||||
 | 
					    </message>
 | 
				
			||||||
 | 
					    <message>
 | 
				
			||||||
 | 
					        <source>or</source>
 | 
				
			||||||
 | 
					        <translation type="vanished">или</translation>
 | 
				
			||||||
 | 
					    </message>
 | 
				
			||||||
 | 
					    <message>
 | 
				
			||||||
 | 
					        <source>FD (Fiscal Document)</source>
 | 
				
			||||||
 | 
					        <translation type="vanished">ФД</translation>
 | 
				
			||||||
 | 
					    </message>
 | 
				
			||||||
 | 
					    <message>
 | 
				
			||||||
 | 
					        <source>Date and time of purchase</source>
 | 
				
			||||||
 | 
					        <translation type="vanished">Дата и время покупки</translation>
 | 
				
			||||||
 | 
					    </message>
 | 
				
			||||||
 | 
					    <message>
 | 
				
			||||||
 | 
					        <source>Stop server</source>
 | 
				
			||||||
 | 
					        <translation type="vanished">Остановить сервер</translation>
 | 
				
			||||||
    </message>
 | 
					    </message>
 | 
				
			||||||
    <message>
 | 
					    <message>
 | 
				
			||||||
        <source>Funds income</source>
 | 
					        <source>Funds income</source>
 | 
				
			||||||
@@ -159,12 +392,48 @@
 | 
				
			|||||||
        <translation type="vanished">Возврат расхода</translation>
 | 
					        <translation type="vanished">Возврат расхода</translation>
 | 
				
			||||||
    </message>
 | 
					    </message>
 | 
				
			||||||
    <message>
 | 
					    <message>
 | 
				
			||||||
        <source>Total</source>
 | 
					        <source>Use your phone as a QR code scanner</source>
 | 
				
			||||||
        <translation type="vanished">Итого</translation>
 | 
					        <translation type="vanished">Использовать телефон как сканнер QR</translation>
 | 
				
			||||||
    </message>
 | 
					    </message>
 | 
				
			||||||
    <message>
 | 
					    <message>
 | 
				
			||||||
        <source>checks parser</source>
 | 
					        <source>FN (Fiscal Number)</source>
 | 
				
			||||||
        <translation type="vanished">Парсер чеков</translation>
 | 
					        <translation type="vanished">ФН</translation>
 | 
				
			||||||
 | 
					    </message>
 | 
				
			||||||
 | 
					    <message>
 | 
				
			||||||
 | 
					        <source>FI (Fiscal Identifier)</source>
 | 
				
			||||||
 | 
					        <translation type="vanished">ФП</translation>
 | 
				
			||||||
 | 
					    </message>
 | 
				
			||||||
 | 
					    <message>
 | 
				
			||||||
 | 
					        <source>Choose image on your PC</source>
 | 
				
			||||||
 | 
					        <translation type="vanished">Выбрать изображение на компьютере</translation>
 | 
				
			||||||
 | 
					    </message>
 | 
				
			||||||
 | 
					    <message>
 | 
				
			||||||
 | 
					        <source>Operation type</source>
 | 
				
			||||||
 | 
					        <translation type="vanished">Тип операции</translation>
 | 
				
			||||||
 | 
					    </message>
 | 
				
			||||||
 | 
					    <message>
 | 
				
			||||||
 | 
					        <source>Parse</source>
 | 
				
			||||||
 | 
					        <translation type="vanished">Парсить</translation>
 | 
				
			||||||
 | 
					    </message>
 | 
				
			||||||
 | 
					    <message>
 | 
				
			||||||
 | 
					        <source>Could not start http server. 10 times in a row random port was occupied. Either you should run for a lottery ticket, or the problem is in the program. If the lottery ticket wasn't lucky, please, contact the developer.</source>
 | 
				
			||||||
 | 
					        <translation type="vanished">Не смог поднять HTTP сервер. 10 раз подряд случайно выбранный порт был занят. Либо Вам следует бежать за лоттерейным билетом, или в программе баг. Если лотерейный билет не был выигрышным, пожалуйста, сообщите разработчику.</translation>
 | 
				
			||||||
 | 
					    </message>
 | 
				
			||||||
 | 
					    <message>
 | 
				
			||||||
 | 
					        <source>Could not start http server.</source>
 | 
				
			||||||
 | 
					        <translation type="vanished">Не получилось запустить HTTP сервер.</translation>
 | 
				
			||||||
 | 
					    </message>
 | 
				
			||||||
 | 
					    <message>
 | 
				
			||||||
 | 
					        <source>Please, select a picture where QR code that contains info about check is present</source>
 | 
				
			||||||
 | 
					        <translation type="vanished">Пожалуйста, выберете изображение, содержащее QR код с информацией о чеке</translation>
 | 
				
			||||||
 | 
					    </message>
 | 
				
			||||||
 | 
					    <message>
 | 
				
			||||||
 | 
					        <source>Picture was not selected</source>
 | 
				
			||||||
 | 
					        <translation type="vanished">Изображение не было выбрано</translation>
 | 
				
			||||||
 | 
					    </message>
 | 
				
			||||||
 | 
					    <message>
 | 
				
			||||||
 | 
					        <source>Selected image: </source>
 | 
				
			||||||
 | 
					        <translation type="vanished">Выбранное изображение: </translation>
 | 
				
			||||||
    </message>
 | 
					    </message>
 | 
				
			||||||
    <message>
 | 
					    <message>
 | 
				
			||||||
        <source>Captcha was not solved correctly!</source>
 | 
					        <source>Captcha was not solved correctly!</source>
 | 
				
			||||||
@@ -191,260 +460,12 @@
 | 
				
			|||||||
        <translation type="vanished">Чек не найден</translation>
 | 
					        <translation type="vanished">Чек не найден</translation>
 | 
				
			||||||
    </message>
 | 
					    </message>
 | 
				
			||||||
    <message>
 | 
					    <message>
 | 
				
			||||||
        <source>An error has occured. Check was matched incorrectly. Vector sizes are different. Please, contact the developer.</source>
 | 
					 | 
				
			||||||
        <translation type="vanished">Произошла ошибка. Чек был прочитан неверно. Размеры векторов различаются. Пожалуйста, сообщите об этом разработчику.</translation>
 | 
					 | 
				
			||||||
    </message>
 | 
					 | 
				
			||||||
    <message>
 | 
					 | 
				
			||||||
        <source>Error in parsing</source>
 | 
					 | 
				
			||||||
        <translation type="vanished">Ошибка в парсинге</translation>
 | 
					 | 
				
			||||||
    </message>
 | 
					 | 
				
			||||||
    <message>
 | 
					 | 
				
			||||||
        <source>Please, select a picture where QR code that contains info about check is present</source>
 | 
					 | 
				
			||||||
        <translation type="vanished">Пожалуйста, выберете изображение, содержащее QR код с информацией о чеке</translation>
 | 
					 | 
				
			||||||
    </message>
 | 
					 | 
				
			||||||
    <message>
 | 
					 | 
				
			||||||
        <source>Picture was not selected</source>
 | 
					 | 
				
			||||||
        <translation type="vanished">Изображение не было выбрано</translation>
 | 
					 | 
				
			||||||
    </message>
 | 
					 | 
				
			||||||
    <message>
 | 
					 | 
				
			||||||
        <source>Please, select a picture to scan</source>
 | 
					 | 
				
			||||||
        <translation type="vanished">Пожалуйста, выберете изображение для сканирования</translation>
 | 
					 | 
				
			||||||
    </message>
 | 
					 | 
				
			||||||
    <message>
 | 
					 | 
				
			||||||
        <location filename="../scenes/mainwindow.ui" line="26"/>
 | 
					 | 
				
			||||||
        <source>Form</source>
 | 
					 | 
				
			||||||
        <translation>Форма</translation>
 | 
					 | 
				
			||||||
    </message>
 | 
					 | 
				
			||||||
    <message>
 | 
					 | 
				
			||||||
        <location filename="../scenes/mainwindow.ui" line="87"/>
 | 
					 | 
				
			||||||
        <source>Optical Character Recognition</source>
 | 
					 | 
				
			||||||
        <translation>Оптическое распознавание символов</translation>
 | 
					 | 
				
			||||||
    </message>
 | 
					 | 
				
			||||||
    <message>
 | 
					 | 
				
			||||||
        <location filename="../scenes/mainwindow.ui" line="43"/>
 | 
					 | 
				
			||||||
        <source>Text from E-Mail</source>
 | 
					 | 
				
			||||||
        <translation>Текст из электронного письма</translation>
 | 
					 | 
				
			||||||
    </message>
 | 
					 | 
				
			||||||
</context>
 | 
					 | 
				
			||||||
<context>
 | 
					 | 
				
			||||||
    <name>OCRScene</name>
 | 
					 | 
				
			||||||
    <message>
 | 
					 | 
				
			||||||
        <location filename="../scenes/ocrscene.ui" line="20"/>
 | 
					 | 
				
			||||||
        <source>Form</source>
 | 
					 | 
				
			||||||
        <translation>Форма</translation>
 | 
					 | 
				
			||||||
    </message>
 | 
					 | 
				
			||||||
    <message>
 | 
					 | 
				
			||||||
        <location filename="../scenes/ocrscene.ui" line="64"/>
 | 
					 | 
				
			||||||
        <source>Choose</source>
 | 
					 | 
				
			||||||
        <translation>Выбрать</translation>
 | 
					 | 
				
			||||||
    </message>
 | 
					 | 
				
			||||||
    <message>
 | 
					 | 
				
			||||||
        <location filename="../scenes/ocrscene.ui" line="103"/>
 | 
					 | 
				
			||||||
        <source>Path to image:</source>
 | 
					 | 
				
			||||||
        <translation>Путь к изображению:</translation>
 | 
					 | 
				
			||||||
    </message>
 | 
					 | 
				
			||||||
    <message>
 | 
					 | 
				
			||||||
        <location filename="../scenes/ocrscene.ui" line="119"/>
 | 
					 | 
				
			||||||
        <source>Store:</source>
 | 
					 | 
				
			||||||
        <translation>Магазин:</translation>
 | 
					 | 
				
			||||||
    </message>
 | 
					 | 
				
			||||||
    <message>
 | 
					 | 
				
			||||||
        <location filename="../scenes/ocrscene.ui" line="90"/>
 | 
					 | 
				
			||||||
        <source>Recognized text will be shown below as soon as image will be processed. Please, edit it</source>
 | 
					 | 
				
			||||||
        <translation>Распознанный текст будет показан ниже как только изображение обработается. Пожалуйста, отредактируйте</translation>
 | 
					 | 
				
			||||||
    </message>
 | 
					 | 
				
			||||||
    <message>
 | 
					 | 
				
			||||||
        <location filename="../scenes/ocrscene.ui" line="77"/>
 | 
					 | 
				
			||||||
        <source>Back</source>
 | 
					 | 
				
			||||||
        <translation>Назад</translation>
 | 
					 | 
				
			||||||
    </message>
 | 
					 | 
				
			||||||
    <message>
 | 
					 | 
				
			||||||
        <location filename="../scenes/ocrscene.ui" line="45"/>
 | 
					 | 
				
			||||||
        <source>Parse</source>
 | 
					 | 
				
			||||||
        <translation>Парсить</translation>
 | 
					 | 
				
			||||||
    </message>
 | 
					 | 
				
			||||||
    <message>
 | 
					 | 
				
			||||||
        <location filename="../ocrscene.cpp" line="36"/>
 | 
					 | 
				
			||||||
        <source>An error has occured. Check was matched incorrectly. Vector sizes are different. Please, contact the developer.</source>
 | 
					 | 
				
			||||||
        <translation>Произошла ошибка. Чек был прочитан неверно. Размеры векторов различаются. Пожалуйста, сообщите об этом разработчику.</translation>
 | 
					 | 
				
			||||||
    </message>
 | 
					 | 
				
			||||||
    <message>
 | 
					 | 
				
			||||||
        <location filename="../ocrscene.cpp" line="38"/>
 | 
					 | 
				
			||||||
        <source>Error in parsing</source>
 | 
					 | 
				
			||||||
        <translation>Ошибка в парсинге</translation>
 | 
					 | 
				
			||||||
    </message>
 | 
					 | 
				
			||||||
    <message>
 | 
					 | 
				
			||||||
        <location filename="../ocrscene.cpp" line="56"/>
 | 
					 | 
				
			||||||
        <source>Please, select a picture to scan</source>
 | 
					 | 
				
			||||||
        <translation>Пожалуйста, выберете изображение для сканирования</translation>
 | 
					 | 
				
			||||||
    </message>
 | 
					 | 
				
			||||||
    <message>
 | 
					 | 
				
			||||||
        <location filename="../ocrscene.cpp" line="58"/>
 | 
					 | 
				
			||||||
        <source>Picture was not selected</source>
 | 
					 | 
				
			||||||
        <translation>Изображение не было выбрано</translation>
 | 
					 | 
				
			||||||
    </message>
 | 
					 | 
				
			||||||
    <message>
 | 
					 | 
				
			||||||
        <location filename="../ocrscene.cpp" line="64"/>
 | 
					 | 
				
			||||||
        <source>Path to image: </source>
 | 
					 | 
				
			||||||
        <translation>Путь к изображению: </translation>
 | 
					 | 
				
			||||||
    </message>
 | 
					 | 
				
			||||||
    <message>
 | 
					 | 
				
			||||||
        <location filename="../ocrscene.cpp" line="76"/>
 | 
					 | 
				
			||||||
        <source>Could not autodetect store. If you beleive that this is an error, please, report to the developer.</source>
 | 
					 | 
				
			||||||
        <translation type="unfinished"></translation>
 | 
					 | 
				
			||||||
    </message>
 | 
					 | 
				
			||||||
</context>
 | 
					 | 
				
			||||||
<context>
 | 
					 | 
				
			||||||
    <name>OFDScene</name>
 | 
					 | 
				
			||||||
    <message>
 | 
					 | 
				
			||||||
        <location filename="../scenes/ofdscene.ui" line="14"/>
 | 
					 | 
				
			||||||
        <source>Form</source>
 | 
					 | 
				
			||||||
        <translation>Форма</translation>
 | 
					 | 
				
			||||||
    </message>
 | 
					 | 
				
			||||||
    <message>
 | 
					 | 
				
			||||||
        <location filename="../scenes/ofdscene.ui" line="156"/>
 | 
					 | 
				
			||||||
        <source>Total</source>
 | 
					 | 
				
			||||||
        <translation>Итого</translation>
 | 
					 | 
				
			||||||
    </message>
 | 
					 | 
				
			||||||
    <message>
 | 
					 | 
				
			||||||
        <location filename="../scenes/ofdscene.ui" line="36"/>
 | 
					 | 
				
			||||||
        <source>Back</source>
 | 
					 | 
				
			||||||
        <translation>Назад</translation>
 | 
					 | 
				
			||||||
    </message>
 | 
					 | 
				
			||||||
    <message>
 | 
					 | 
				
			||||||
        <location filename="../scenes/ofdscene.ui" line="63"/>
 | 
					 | 
				
			||||||
        <source>or</source>
 | 
					 | 
				
			||||||
        <translation>или</translation>
 | 
					 | 
				
			||||||
    </message>
 | 
					 | 
				
			||||||
    <message>
 | 
					 | 
				
			||||||
        <location filename="../scenes/ofdscene.ui" line="79"/>
 | 
					 | 
				
			||||||
        <source>FD (Fiscal Document)</source>
 | 
					 | 
				
			||||||
        <translation>ФД</translation>
 | 
					 | 
				
			||||||
    </message>
 | 
					 | 
				
			||||||
    <message>
 | 
					 | 
				
			||||||
        <location filename="../scenes/ofdscene.ui" line="43"/>
 | 
					 | 
				
			||||||
        <source>Date and time of purchase</source>
 | 
					 | 
				
			||||||
        <translation>Дата и время покупки</translation>
 | 
					 | 
				
			||||||
    </message>
 | 
					 | 
				
			||||||
    <message>
 | 
					 | 
				
			||||||
        <location filename="../scenes/ofdscene.ui" line="199"/>
 | 
					 | 
				
			||||||
        <source>Stop server</source>
 | 
					 | 
				
			||||||
        <translation>Остановить сервер</translation>
 | 
					 | 
				
			||||||
    </message>
 | 
					 | 
				
			||||||
    <message>
 | 
					 | 
				
			||||||
        <location filename="../scenes/ofdscene.ui" line="107"/>
 | 
					 | 
				
			||||||
        <source>Funds income</source>
 | 
					 | 
				
			||||||
        <translation>Приход средств</translation>
 | 
					 | 
				
			||||||
    </message>
 | 
					 | 
				
			||||||
    <message>
 | 
					 | 
				
			||||||
        <location filename="../scenes/ofdscene.ui" line="112"/>
 | 
					 | 
				
			||||||
        <source>Funds return</source>
 | 
					 | 
				
			||||||
        <translation>Возврат средств</translation>
 | 
					 | 
				
			||||||
    </message>
 | 
					 | 
				
			||||||
    <message>
 | 
					 | 
				
			||||||
        <location filename="../scenes/ofdscene.ui" line="117"/>
 | 
					 | 
				
			||||||
        <source>Funds spend</source>
 | 
					 | 
				
			||||||
        <translation>Расход средств</translation>
 | 
					 | 
				
			||||||
    </message>
 | 
					 | 
				
			||||||
    <message>
 | 
					 | 
				
			||||||
        <location filename="../scenes/ofdscene.ui" line="122"/>
 | 
					 | 
				
			||||||
        <source>Spends return</source>
 | 
					 | 
				
			||||||
        <translation>Возврат расхода</translation>
 | 
					 | 
				
			||||||
    </message>
 | 
					 | 
				
			||||||
    <message>
 | 
					 | 
				
			||||||
        <location filename="../scenes/ofdscene.ui" line="50"/>
 | 
					 | 
				
			||||||
        <source>Use your phone as a QR code scanner</source>
 | 
					 | 
				
			||||||
        <translation>Использовать телефон как сканнер QR</translation>
 | 
					 | 
				
			||||||
    </message>
 | 
					 | 
				
			||||||
    <message>
 | 
					 | 
				
			||||||
        <location filename="../scenes/ofdscene.ui" line="149"/>
 | 
					 | 
				
			||||||
        <source>FN (Fiscal Number)</source>
 | 
					 | 
				
			||||||
        <translation>ФН</translation>
 | 
					 | 
				
			||||||
    </message>
 | 
					 | 
				
			||||||
    <message>
 | 
					 | 
				
			||||||
        <location filename="../scenes/ofdscene.ui" line="23"/>
 | 
					 | 
				
			||||||
        <source>FI (Fiscal Identifier)</source>
 | 
					 | 
				
			||||||
        <translation>ФП</translation>
 | 
					 | 
				
			||||||
    </message>
 | 
					 | 
				
			||||||
    <message>
 | 
					 | 
				
			||||||
        <location filename="../scenes/ofdscene.ui" line="179"/>
 | 
					 | 
				
			||||||
        <source>Choose image on your PC</source>
 | 
					 | 
				
			||||||
        <translation>Выбрать изображение на компьютере</translation>
 | 
					 | 
				
			||||||
    </message>
 | 
					 | 
				
			||||||
    <message>
 | 
					 | 
				
			||||||
        <location filename="../scenes/ofdscene.ui" line="99"/>
 | 
					 | 
				
			||||||
        <source>Operation type</source>
 | 
					 | 
				
			||||||
        <translation>Тип операции</translation>
 | 
					 | 
				
			||||||
    </message>
 | 
					 | 
				
			||||||
    <message>
 | 
					 | 
				
			||||||
        <location filename="../scenes/ofdscene.ui" line="92"/>
 | 
					 | 
				
			||||||
        <source>Parse</source>
 | 
					 | 
				
			||||||
        <translation>Парсить</translation>
 | 
					 | 
				
			||||||
    </message>
 | 
					 | 
				
			||||||
    <message>
 | 
					 | 
				
			||||||
        <location filename="../ofdscene.cpp" line="87"/>
 | 
					 | 
				
			||||||
        <source>Could not start http server. 10 times in a row random port was occupied. Either you should run for a lottery ticket, or the problem is in the program. If the lottery ticket wasn't lucky, please, contact the developer.</source>
 | 
					 | 
				
			||||||
        <translation>Не смог поднять HTTP сервер. 10 раз подряд случайно выбранный порт был занят. Либо Вам следует бежать за лоттерейным билетом, или в программе баг. Если лотерейный билет не был выигрышным, пожалуйста, сообщите разработчику.</translation>
 | 
					 | 
				
			||||||
    </message>
 | 
					 | 
				
			||||||
    <message>
 | 
					 | 
				
			||||||
        <location filename="../ofdscene.cpp" line="89"/>
 | 
					 | 
				
			||||||
        <source>Could not start http server.</source>
 | 
					 | 
				
			||||||
        <translation>Не получилось запустить HTTP сервер.</translation>
 | 
					 | 
				
			||||||
    </message>
 | 
					 | 
				
			||||||
    <message>
 | 
					 | 
				
			||||||
        <location filename="../ofdscene.cpp" line="126"/>
 | 
					 | 
				
			||||||
        <source>Please, select a picture where QR code that contains info about check is present</source>
 | 
					 | 
				
			||||||
        <translation>Пожалуйста, выберете изображение, содержащее QR код с информацией о чеке</translation>
 | 
					 | 
				
			||||||
    </message>
 | 
					 | 
				
			||||||
    <message>
 | 
					 | 
				
			||||||
        <location filename="../ofdscene.cpp" line="128"/>
 | 
					 | 
				
			||||||
        <source>Picture was not selected</source>
 | 
					 | 
				
			||||||
        <translation>Изображение не было выбрано</translation>
 | 
					 | 
				
			||||||
    </message>
 | 
					 | 
				
			||||||
    <message>
 | 
					 | 
				
			||||||
        <location filename="../ofdscene.cpp" line="133"/>
 | 
					 | 
				
			||||||
        <source>Selected image: </source>
 | 
					 | 
				
			||||||
        <translation>Выбранное изображение: </translation>
 | 
					 | 
				
			||||||
    </message>
 | 
					 | 
				
			||||||
    <message>
 | 
					 | 
				
			||||||
        <location filename="../ofdscene.cpp" line="193"/>
 | 
					 | 
				
			||||||
        <source>Captcha was not solved correctly!</source>
 | 
					 | 
				
			||||||
        <translation>Капча была решена неверно!</translation>
 | 
					 | 
				
			||||||
    </message>
 | 
					 | 
				
			||||||
    <message>
 | 
					 | 
				
			||||||
        <location filename="../ofdscene.cpp" line="195"/>
 | 
					 | 
				
			||||||
        <source>Captcha is incorrect</source>
 | 
					 | 
				
			||||||
        <translation>Капча введена неверно</translation>
 | 
					 | 
				
			||||||
    </message>
 | 
					 | 
				
			||||||
    <message>
 | 
					 | 
				
			||||||
        <location filename="../ofdscene.cpp" line="200"/>
 | 
					 | 
				
			||||||
        <source>Internal server error. Please, try again later.</source>
 | 
					 | 
				
			||||||
        <translation>Внутренняя ошибка сервера. Пожалуйста, попробуйте снова позже.</translation>
 | 
					 | 
				
			||||||
    </message>
 | 
					 | 
				
			||||||
    <message>
 | 
					 | 
				
			||||||
        <location filename="../ofdscene.cpp" line="202"/>
 | 
					 | 
				
			||||||
        <source>Internal server error</source>
 | 
					 | 
				
			||||||
        <translation>Внутренняя ошибка сервера</translation>
 | 
					 | 
				
			||||||
    </message>
 | 
					 | 
				
			||||||
    <message>
 | 
					 | 
				
			||||||
        <location filename="../ofdscene.cpp" line="207"/>
 | 
					 | 
				
			||||||
        <source>Check not found. Please, ensure correctness of entered data.</source>
 | 
					 | 
				
			||||||
        <translation>Чек не найден. Пожалуйста, убедитесь в правильности введённых данных.</translation>
 | 
					 | 
				
			||||||
    </message>
 | 
					 | 
				
			||||||
    <message>
 | 
					 | 
				
			||||||
        <location filename="../ofdscene.cpp" line="209"/>
 | 
					 | 
				
			||||||
        <source>Check was not found</source>
 | 
					 | 
				
			||||||
        <translation>Чек не найден</translation>
 | 
					 | 
				
			||||||
    </message>
 | 
					 | 
				
			||||||
    <message>
 | 
					 | 
				
			||||||
        <location filename="../ofdscene.cpp" line="80"/>
 | 
					 | 
				
			||||||
        <source>QR code for binaryeye to connect</source>
 | 
					        <source>QR code for binaryeye to connect</source>
 | 
				
			||||||
        <translation>QR код для подключения BinaryEye</translation>
 | 
					        <translation type="vanished">QR код для подключения BinaryEye</translation>
 | 
				
			||||||
    </message>
 | 
					    </message>
 | 
				
			||||||
    <message>
 | 
					    <message>
 | 
				
			||||||
        <location filename="../ofdscene.cpp" line="81"/>
 | 
					 | 
				
			||||||
        <source>I've scanned</source>
 | 
					        <source>I've scanned</source>
 | 
				
			||||||
        <translation>Просканировал</translation>
 | 
					        <translation type="vanished">Просканировал</translation>
 | 
				
			||||||
    </message>
 | 
					    </message>
 | 
				
			||||||
    <message>
 | 
					    <message>
 | 
				
			||||||
        <source>123 123</source>
 | 
					        <source>123 123</source>
 | 
				
			||||||
@@ -564,15 +585,23 @@
 | 
				
			|||||||
        <translation>Печатать Итого</translation>
 | 
					        <translation>Печатать Итого</translation>
 | 
				
			||||||
    </message>
 | 
					    </message>
 | 
				
			||||||
</context>
 | 
					</context>
 | 
				
			||||||
 | 
					<context>
 | 
				
			||||||
 | 
					    <name>QObject</name>
 | 
				
			||||||
 | 
					    <message>
 | 
				
			||||||
 | 
					        <location filename="../main.cpp" line="60"/>
 | 
				
			||||||
 | 
					        <source>Using locale: </source>
 | 
				
			||||||
 | 
					        <translation type="unfinished"></translation>
 | 
				
			||||||
 | 
					    </message>
 | 
				
			||||||
 | 
					</context>
 | 
				
			||||||
<context>
 | 
					<context>
 | 
				
			||||||
    <name>SettingsDialog</name>
 | 
					    <name>SettingsDialog</name>
 | 
				
			||||||
    <message>
 | 
					    <message>
 | 
				
			||||||
        <location filename="../settingsdialog.cpp" line="161"/>
 | 
					        <location filename="../settingsdialog.cpp" line="160"/>
 | 
				
			||||||
        <source>You need to restart program to apply language changes</source>
 | 
					        <source>You need to restart program to apply language changes</source>
 | 
				
			||||||
        <translation>Требуется перезагрузить программу, чтобы применить изменения языка</translation>
 | 
					        <translation>Требуется перезагрузить программу, чтобы применить изменения языка</translation>
 | 
				
			||||||
    </message>
 | 
					    </message>
 | 
				
			||||||
    <message>
 | 
					    <message>
 | 
				
			||||||
        <location filename="../settingsdialog.cpp" line="163"/>
 | 
					        <location filename="../settingsdialog.cpp" line="162"/>
 | 
				
			||||||
        <source>Restart required</source>
 | 
					        <source>Restart required</source>
 | 
				
			||||||
        <translation>Требуется перезагрузка</translation>
 | 
					        <translation>Требуется перезагрузка</translation>
 | 
				
			||||||
    </message>
 | 
					    </message>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -22,7 +22,6 @@
 | 
				
			|||||||
#include <fstream>
 | 
					#include <fstream>
 | 
				
			||||||
#include <boost/regex.hpp>
 | 
					#include <boost/regex.hpp>
 | 
				
			||||||
#include <net/net.h>
 | 
					#include <net/net.h>
 | 
				
			||||||
#include <parser/parser.h>
 | 
					 | 
				
			||||||
#include <settings/settings.h>
 | 
					#include <settings/settings.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -310,25 +309,3 @@ void generate_qr_code(std::string data) {
 | 
				
			|||||||
}
 | 
					}
 | 
				
			||||||
#endif // ifdef BUILD_OFD_BINARYEYE_SCAN
 | 
					#endif // ifdef BUILD_OFD_BINARYEYE_SCAN
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
void fetch_and_download_modules() {
 | 
					 | 
				
			||||||
    Net n;
 | 
					 | 
				
			||||||
    Parser p;
 | 
					 | 
				
			||||||
    std::string settings_file_path = get_path_relative_to_home(".local/share/checks_parser/settings.json");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    Settings s(settings_file_path);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    std::vector<std::string> storesUpdates = p.check_updates();
 | 
					 | 
				
			||||||
    for (auto &update : storesUpdates) {
 | 
					 | 
				
			||||||
        std::cout << "Downloading "
 | 
					 | 
				
			||||||
                  << s.get_setting("stores_modules_url") + update << " to "
 | 
					 | 
				
			||||||
                  << get_path_relative_to_home(s.get_setting("stores_modules_dir") +
 | 
					 | 
				
			||||||
                                               "/" + update)
 | 
					 | 
				
			||||||
                  << std::endl;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        n.get_file(s.get_setting("stores_modules_url") + "/" + update,
 | 
					 | 
				
			||||||
                   get_path_relative_to_home(s.get_setting("stores_modules_dir") +
 | 
					 | 
				
			||||||
                                             "/" + update));
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user