From a8549c838c0e1b069d4717127f0cfb76adcb7060 Mon Sep 17 00:00:00 2001 From: leca Date: Mon, 19 May 2025 01:05:56 +0300 Subject: [PATCH] check queue WIP --- CMakeLists.txt | 1 + a.out | Bin 0 -> 16024 bytes check/check.cpp | 4 + mainwindow.cpp | 83 ++++---- mainwindow.h | 4 +- scenes/mainwindow.ui | 334 ++++++++++++++++--------------- scenes/outputdialog.ui | 3 + test.cpp | 13 ++ translations/en_US.ts | 80 ++++---- translations/ru_RU.ts | 84 ++++---- widgets/checkqueuetablemodel.cpp | 94 +++++++++ widgets/checkqueuetablemodel.h | 30 +++ 12 files changed, 457 insertions(+), 273 deletions(-) create mode 100755 a.out create mode 100644 test.cpp create mode 100644 widgets/checkqueuetablemodel.cpp create mode 100644 widgets/checkqueuetablemodel.h diff --git a/CMakeLists.txt b/CMakeLists.txt index fe07f73..d502a78 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -165,6 +165,7 @@ else() add_executable(checks-parser ${PROJECT_SOURCES} ${SOURCES} + widgets/checkqueuetablemodel.h widgets/checkqueuetablemodel.cpp ) endif() diff --git a/a.out b/a.out new file mode 100755 index 0000000000000000000000000000000000000000..7275cc330147cc39bea3187c8ea93352520ac7f2 GIT binary patch literal 16024 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 Hj}`v{lELbc literal 0 HcmV?d00001 diff --git a/check/check.cpp b/check/check.cpp index 72fcf2b..4f728ec 100644 --- a/check/check.cpp +++ b/check/check.cpp @@ -53,6 +53,10 @@ void Check::set_operation_type(OperationType t) { this->operation_type = t; } +void Check::set_total(double total){ + this->total = total; +} + double Check::get_total() { return total; } diff --git a/mainwindow.cpp b/mainwindow.cpp index 6704aa3..d8aacf0 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -8,6 +8,7 @@ #ifdef BUILD_OFD_LOCAL_QR_SCAN # include +#include #endif #include @@ -32,14 +33,15 @@ MainWindow::MainWindow(QWidget *parent) ui->setupUi(this); ui->stop_server_button->hide(); - QVBoxLayout *layout = new QVBoxLayout; - ui->checks_scroll_area->setLayout(layout); - ui->scrollAreaWidgetContents->setLayout(layout); ui->checks_to_parse_label->hide(); - ui->checks_scroll_area->hide(); + ui->checkQueueTable->hide(); - connect(this, &MainWindow::deleteCheckFromList, this, &MainWindow::deleteCheckFromListHandler); + model = new CheckQueueTableModel(&checks, this); + ui->checkQueueTable->setModel(model); + + // ui-> + // connect(this, &MainWindow::deleteCheckFromList, this, &MainWindow::deleteCheckFromListHandler); #ifdef BUILD_OFD_BINARYEYE_SCAN QObject::connect(this, &MainWindow::httpErrorOccured, this, &MainWindow::notifyHttpServerFailure); @@ -195,42 +197,43 @@ void MainWindow::on_parse_email_button_clicked() { #endif // ifdef BUILD_EMAIL_MODE void MainWindow::on_parse_button_clicked() { - // if (checks.empty()) { - // QMessageBox infoDialog; - // infoDialog.setText(tr("Please, add check(s) to parse")); - // infoDialog.setIcon(QMessageBox::Warning); - // infoDialog.setWindowTitle(tr("No checks to parse")); - // infoDialog.exec(); - // return; - // } + + if (checks.empty()) { + QMessageBox infoDialog; + infoDialog.setText(tr("Please, add check(s) to parse")); + infoDialog.setIcon(QMessageBox::Warning); + infoDialog.setWindowTitle(tr("No checks to parse")); + infoDialog.exec(); + return; + } OutputDialog d = OutputDialog(this, &checks); d.exec(); } -void MainWindow::deleteCheckFromListHandler(Check &check) { - for (unsigned int i = 0; i < ui->scrollAreaWidgetContents->layout()->count(); i ++) { - QLayoutItem *item = ui->scrollAreaWidgetContents->layout()->itemAt(i); - QObject *child = item->widget(); - CheckListViewWidget *c = (CheckListViewWidget *)child; - if (c->get_check() == check) { - ui->scrollAreaWidgetContents->layout()->removeItem(item); - delete item; - delete child; - ui->scrollAreaWidgetContents->layout()->update(); - ui->scrollAreaWidgetContents->update(); +// void MainWindow::deleteCheckFromListHandler(Check &check) { +// for (unsigned int i = 0; i < ui->scrollAreaWidgetContents->layout()->count(); i ++) { +// QLayoutItem *item = ui->scrollAreaWidgetContents->layout()->itemAt(i); +// QObject *child = item->widget(); +// CheckListViewWidget *c = (CheckListViewWidget *)child; +// if (c->get_check() == check) { +// ui->scrollAreaWidgetContents->layout()->removeItem(item); +// delete item; +// delete child; +// ui->scrollAreaWidgetContents->layout()->update(); +// ui->scrollAreaWidgetContents->update(); - } - } +// } +// } - int position = std::find(checks.begin(), checks.end(), check) - checks.begin() - 1; - checks.erase(checks.begin() + position); +// int position = std::find(checks.begin(), checks.end(), check) - checks.begin() - 1; +// checks.erase(checks.begin() + position); - if (ui->scrollAreaWidgetContents->layout()->count() == 0) { - ui->checks_to_parse_label->hide(); - ui->checks_scroll_area->hide(); - } -} +// if (ui->scrollAreaWidgetContents->layout()->count() == 0) { +// ui->checks_to_parse_label->hide(); +// ui->checks_scroll_area->hide(); +// } +// } void MainWindow::on_add_new_check_button_clicked() { Check *new_check = parse_new_check(); @@ -240,14 +243,15 @@ void MainWindow::on_add_new_check_button_clicked() { checks.push_back(*new_check); - CheckListViewWidget *check_list_widget = new CheckListViewWidget(this, *new_check); - - ui->scrollAreaWidgetContents->layout()->addWidget(check_list_widget); + unsigned int newRowIndex = checks.size(); + model->insertRow(newRowIndex, 1); + model->setData(model->index(newRowIndex, 0), QVariant::fromValue(new_check->get_date())); + model->setData(model->index(newRowIndex, 1), QVariant::fromValue(new_check->get_total())); delete new_check; - if (checks.size() == 1) { - ui->checks_scroll_area->show(); + if (checks.size() > 0) { + ui->checkQueueTable->show(); ui->checks_to_parse_label->show(); } } @@ -272,7 +276,8 @@ Check *MainWindow::parse_new_check() { 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); + solved_captcha + ); (*check) = parseOfdRuAnswer(check_content); check->set_date(ui->purchase_datetime_edit->dateTime().toString(Qt::ISODate).toStdString()); diff --git a/mainwindow.h b/mainwindow.h index 2e66a0c..c84efe1 100644 --- a/mainwindow.h +++ b/mainwindow.h @@ -4,6 +4,7 @@ #include #include #include +#include #include @@ -22,6 +23,7 @@ public: ~MainWindow(); Check *parse_new_check(); + CheckQueueTableModel *model; #ifdef BUILD_OFD_BINARYEYE_SCAN void startHttpServer(); @@ -47,7 +49,7 @@ private slots: void on_stop_server_button_clicked(); void httpNewMessageHandler(QString message); - void deleteCheckFromListHandler(Check&); + // void deleteCheckFromListHandler(Check&); #endif #ifdef BUILD_EMAIL_MODE void on_parse_email_button_clicked(); diff --git a/scenes/mainwindow.ui b/scenes/mainwindow.ui index 92e155e..1ff732c 100644 --- a/scenes/mainwindow.ui +++ b/scenes/mainwindow.ui @@ -26,23 +26,26 @@ Form - - + + + + Checks to parse + + + Qt::AlignmentFlag::AlignCenter + + + + + - + 0 0 - or - - - - - - - Date and time of purchase + Parse an E-Mail @@ -59,102 +62,6 @@ - - - - 4294967296.000000000000000 - - - - - - - Checks to parse - - - Qt::AlignmentFlag::AlignCenter - - - - - - - FI (Fiscal Identifier) - - - - - - - - 0 - 0 - - - - Parse - - - - - - - - 0 - 0 - - - - Settings - - - - - - - - 0 - 0 - - - - FN (Fiscal Number) - - - - - - - Total - - - - - - - - 0 - 0 - - - - Use your phone as a QR code scanner - - - - - - - - 0 - 0 - - - - or - - - @@ -168,42 +75,36 @@ - - - - - 0 - 0 - + + + + Date and time of purchase - - - - - + + - + 0 0 - + or - - + + - + 0 0 - Stop server + Parse @@ -231,15 +132,21 @@ - - + + + + + 0 + 0 + + - Operation type + Stop server - - + + 0 @@ -247,14 +154,144 @@ - Parse an E-Mail + Use your phone as a QR code scanner - + + + + + + + + 0 + 0 + + + + FN (Fiscal Number) + + + + + + + + + + Operation type + + + + + + + 4294967296.000000000000000 + + + + + + + QAbstractItemView::EditTrigger::DoubleClicked|QAbstractItemView::EditTrigger::EditKeyPressed + + + false + + + true + + + false + + + QAbstractItemView::DragDropMode::InternalMove + + + Qt::DropAction::TargetMoveAction + + + true + + + QAbstractItemView::SelectionMode::SingleSelection + + + QAbstractItemView::SelectionBehavior::SelectRows + + + + + + + + 0 + 0 + + + + + + + + + + + FI (Fiscal Identifier) + + + + + + + + + + Total + + + + + + + + 0 + 0 + + + + Settings + + + + + + + + 0 + 0 + + + + or + + + + + + + + 0 + 0 + + + + + - + 0 0 @@ -264,36 +301,19 @@ - - - - + + + + 0 + 0 + + Add new check - - - - - - - true - - - - - 0 - 0 - 273 - 404 - - - - - diff --git a/scenes/outputdialog.ui b/scenes/outputdialog.ui index c0bb2f4..8c2285a 100644 --- a/scenes/outputdialog.ui +++ b/scenes/outputdialog.ui @@ -37,6 +37,9 @@ + + QAbstractItemView::EditTrigger::DoubleClicked|QAbstractItemView::EditTrigger::EditKeyPressed + true diff --git a/test.cpp b/test.cpp new file mode 100644 index 0000000..8e79c14 --- /dev/null +++ b/test.cpp @@ -0,0 +1,13 @@ +#include +using namespace std; + +int main () { + char lowerGender; + cin >> lowerGender; + if ((lowerGender != 'm' && lowerGender != 'f') && (lowerGender != 'м' && lowerGender != 'ж' )) { + cout << "хуйня" << std::endl; + cout << (int)lowerGender << endl; + } else { + cout << "норм" << endl; + } +} diff --git a/translations/en_US.ts b/translations/en_US.ts index 1403f41..22025e1 100644 --- a/translations/en_US.ts +++ b/translations/en_US.ts @@ -70,7 +70,7 @@ Store type - + Parse Parse @@ -113,13 +113,13 @@ 0000000000000000 - + FN (Fiscal Number) FN = Фискальный Номер FN (Fiscal Number) - + FD (Fiscal Document) FD = Фискальный Документ FD (Fiscal Document) @@ -133,93 +133,93 @@ Back - + Stop server Stop server - + Choose image on your PC Choose image on your PC - - + + or or - + Use your phone as a QR code scanner Use your phone as a QR code scanner - + FI (Fiscal Identifier) FI = Фискальный Признак FI (Fiscal Identifier) - + Add new check Add new check - + Clear Clear - + Date and time of purchase Date and time of purchase - + Operation type Operation type - + Parse an E-Mail Parse an E-Mail - + Funds income Приход средств Funds income - + Funds return Возврат средств Funds return - + Funds spend Расход средств Funds spend - + Spends return Возврат расхода Spends return - + Checks to parse Checks to parse - + Settings Settings - + Total Total @@ -228,75 +228,77 @@ checks parser - + QR code for binaryeye to connect QR code for binaryeye to connect - + I've scanned I've scanned - + 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. 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. - + Could not start http server. Could not start http server. - + Selected image: Selected image: - + This feature is under development. Wait it to appear in next updates. This feature is under development. Wait for it to appear in next updates. - + Under development Under development + Please, add check(s) to parse - Please, add check(s) to parse + Please, add check(s) to parse + No checks to parse - No checks to parse + No checks to parse - + Captcha was not solved correctly! Captcha was not solved correctly! - + Captcha is incorrect Captcha is incorrect - + Internal server error. Please, try again later. Internal server error. Please, try again later. - + Internal server error Internal server error - + Check not found. Please, ensure correctness of entered data. Check not found. Please, ensure correctness of entered data. - + Check was not found Check was not found @@ -309,12 +311,12 @@ Error in parsing - + Please, select a picture where QR code that contains info about check is present Please, select a picture where QR code that contains info about check is present - + Picture was not selected Picture was not selected @@ -532,7 +534,7 @@ Choose - + Print header Print header diff --git a/translations/ru_RU.ts b/translations/ru_RU.ts index 10553d4..d13457b 100644 --- a/translations/ru_RU.ts +++ b/translations/ru_RU.ts @@ -70,7 +70,7 @@ Магазин - + Parse Парсить @@ -113,13 +113,13 @@ 0000000000000000 - + FN (Fiscal Number) Фискальный Норма ФН - + FD (Fiscal Document) Фискальный Документ ФД @@ -133,89 +133,89 @@ Назад - + Stop server Остановить сервер - + Choose image on your PC Выбрать изображение на компьютере - - + + or или - + Use your phone as a QR code scanner Использовать телефон как сканнер QR - + FI (Fiscal Identifier) Фискальный Признак ФП - + Add new check - + Clear - + Date and time of purchase Дата и время покупки - + Operation type Тип операции - + Parse an E-Mail Парсить E-Mail - + Funds income Приход средств - + Funds return Возврат средств - + Funds spend Расход средств - + Spends return Возврат расхода - + Checks to parse - + Settings Настройки - + Total Итого @@ -224,67 +224,77 @@ Парсер чеков - + QR code for binaryeye to connect QR код для подключения BinaryEye - + I've scanned Просканировал - + 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. Не смог поднять HTTP сервер. 10 раз подряд случайно выбранный порт был занят. Либо Вам следует бежать за лоттерейным билетом, или в программе баг. Если лотерейный билет не был выигрышным, пожалуйста, сообщите разработчику. - + Could not start http server. Не получилось запустить HTTP сервер. - + Selected image: Выбранное изображение: - + This feature is under development. Wait it to appear in next updates. - + Under development - + + Please, add check(s) to parse + + + + + No checks to parse + + + + Captcha was not solved correctly! Капча была решена неверно! - + Captcha is incorrect Капча введена неверно - + Internal server error. Please, try again later. Внутренняя ошибка сервера. Пожалуйста, попробуйте снова позже. - + Internal server error Внутренняя ошибка сервера - + Check not found. Please, ensure correctness of entered data. Чек не найден. Пожалуйста, убедитесь в правильности введённых данных. - + Check was not found Чек не найден @@ -297,12 +307,12 @@ Ошибка в парсинге - + Please, select a picture where QR code that contains info about check is present Пожалуйста, выберете изображение, содержащее QR код с информацией о чеке - + Picture was not selected Изображение не было выбрано @@ -520,7 +530,7 @@ Выбрать - + Print header Печатать заголовок diff --git a/widgets/checkqueuetablemodel.cpp b/widgets/checkqueuetablemodel.cpp new file mode 100644 index 0000000..51a7d91 --- /dev/null +++ b/widgets/checkqueuetablemodel.cpp @@ -0,0 +1,94 @@ +#include "checkqueuetablemodel.h" + +#include + +CheckQueueTableModel::CheckQueueTableModel(std::vector *checks, QObject *parent) + : checks(checks), QAbstractTableModel{parent} +{} + +int CheckQueueTableModel::rowCount(const QModelIndex &parent) const { return checks->size(); } +int CheckQueueTableModel::columnCount(const QModelIndex &parent) const { return 3; } + +QVariant CheckQueueTableModel::data(const QModelIndex &index, int role) const { + if (role != Qt::DisplayRole) return QVariant(); + Check& c = (*checks).at(index.row()); + switch (index.column()) { + case 0: + return QVariant::fromValue(QString::fromStdString(c.get_date())); + break; + case 1: + return QVariant::fromValue(c.get_total()); + break; + case 2: + return QVariant::fromValue(QString("кнопка")); + break; + } + + return QVariant(); +} + +bool CheckQueueTableModel::setData(const QModelIndex &index, const QVariant &value, int role) { + if (role == Qt::EditRole) { + if (!checkIndex(index)) + return false; + unsigned int row = index.row(); + switch (index.column()) { + case 0: + checks->at(row).set_date(value.value()); + break; + case 1: + checks->at(row).set_total(value.value()); + break; + case 2: + // delete Button + break; + } + + //for presentation purposes only: build and emit a joined string + // QString result = "dick"; + // for (int row = 0; row < checks->size(); row++) { + // for (int col= 0; col < 3; col++) + // result += m_gridData[row][col] + ' '; + // } + // emit editCompleted(result); + return true; + } + return false; +} + +QVariant CheckQueueTableModel::headerData(int section, Qt::Orientation orientation, int role) const { + if (role == Qt::DisplayRole && orientation == Qt::Horizontal) { + switch (section) { + case 0: + return tr("Date&Time"); + break; + case 1: + return tr("Total"); + break; + case 2: + return tr("Delete button"); + break; + } + } + return QVariant(); +} + +Qt::ItemFlags CheckQueueTableModel::flags(const QModelIndex &index) const { + Qt::ItemFlags defaultFlags = QAbstractTableModel::flags(index); + + if (index.isValid()) + return Qt::ItemIsDragEnabled | defaultFlags; + else + return Qt::ItemIsDropEnabled | defaultFlags; + // return Qt::ItemIsSelectable | QAbstractTableModel::flags(index); +} + +bool CheckQueueTableModel::insertRow(int row, int count, const QModelIndex &parent) { + beginInsertRows(QModelIndex(), row, row+count-1); + + for (int i = 0; i < count; ++i) + checks->emplace(checks->begin() + row, Check()); + + endInsertRows(); + return true; +} diff --git a/widgets/checkqueuetablemodel.h b/widgets/checkqueuetablemodel.h new file mode 100644 index 0000000..3d759bc --- /dev/null +++ b/widgets/checkqueuetablemodel.h @@ -0,0 +1,30 @@ +#ifndef CHECKQUEUETABLEMODEL_H +#define CHECKQUEUETABLEMODEL_H + +#include + +#include + +class CheckQueueTableModel : public QAbstractTableModel +{ + Q_OBJECT +public: + explicit CheckQueueTableModel(std::vector *checks, QObject *parent = nullptr); + + int rowCount(const QModelIndex &parent = QModelIndex()) const override; + int columnCount(const QModelIndex &parent = QModelIndex()) const override; + + QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override; + bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole) override; + + QVariant headerData(int section, Qt::Orientation orientation, int role) const override; + Qt::ItemFlags flags(const QModelIndex &index) const override; + + bool insertRow(int row, int count, const QModelIndex &parent = QModelIndex()); +private: + std::vector *checks; +signals: + void editCompleted(const QString &); +}; + +#endif // CHECKQUEUETABLEMODEL_H