diff --git a/check/check.h b/check/check.h index 58a2684..a7b8299 100644 --- a/check/check.h +++ b/check/check.h @@ -3,16 +3,16 @@ #include "../goods/goods.h" #include -class Check -{ +class Check { std::vector goods; + public: Check(); void add_goods(Goods); double calculae_total_price(); - std::vector& get_goods(); + std::vector &get_goods(); }; #endif // CHECK_H diff --git a/mainwindow.cpp b/mainwindow.cpp index 58afbb0..4d6a1a7 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -5,6 +5,7 @@ #include "outputdialog.h" #include "settings.h" #include +#include MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow) { @@ -35,14 +36,16 @@ void MainWindow::setupStoresList() { } void MainWindow::on_checkType_currentIndexChanged(int index) { - switch (index) { - case 0: - ui->checkInfoText->setVisible(true); - break; - case 1: - ui->checkInfoText->setVisible(false); - break; - } + + ui->inputHolder->setCurrentIndex(index); + // switch (index) { + // case 0: + // ui->checkInfoText->setVisible(true); + // break; + // case 1: + // ui->checkInfoText->setVisible(false); + // break; + // } } void MainWindow::on_parseButton_clicked() { @@ -72,3 +75,12 @@ void MainWindow::on_storeType_currentIndexChanged(int index) { std::string module = parser.search_modules()[index]; parser.set_module(module); } + +void MainWindow::on_chooseImageButton_clicked() { + QString filename = QFileDialog::getOpenFileName(); + std::cout << filename.toStdString() << std::endl; + + // this->options.set_path(filename.toStdString()); + ui->pathLabel->setText("Path to export: " + filename); +} + diff --git a/mainwindow.h b/mainwindow.h index e0ce513..1a6c749 100644 --- a/mainwindow.h +++ b/mainwindow.h @@ -31,6 +31,8 @@ private slots: void on_storeType_currentIndexChanged(int index); + void on_chooseImageButton_clicked(); + private: Ui::MainWindow *ui; }; diff --git a/mainwindow.ui b/mainwindow.ui index 06903e4..4ef0e51 100644 --- a/mainwindow.ui +++ b/mainwindow.ui @@ -66,115 +66,76 @@ - Image (not yet implemented) + Image (OCR) - - - true - + - 0 - 70 - 421 - 511 + 10 + 80 + 501 + 471 - - - - 20 - 10 - 121 - 18 - - - - Check content - - - - - - 20 - 40 - 401 - 411 - - - - - - - - - - 20 - 480 - 80 - 26 - - - - Parse - - - - - - - 460 - 270 - 301 - 221 - - - - QTabWidget::TabPosition::North - - - QTabWidget::TabShape::Rounded - - 0 + 1 - - Qt::TextElideMode::ElideNone - - - true - - - false - - - true - - - - Text - + + + + + 10 + 10 + 101 + 18 + + + + Check content + + + + + + 10 + 50 + 431 + 401 + + + - - - Image - + + + + + 110 + 20 + 161 + 18 + + + + Path to image: + + + + + + 10 + 20 + 80 + 26 + + + + Choose + + - - - - 460 - 60 - 241 - 151 - - - - - diff --git a/outputdialog.cpp b/outputdialog.cpp index 46e3abd..f9b4f97 100644 --- a/outputdialog.cpp +++ b/outputdialog.cpp @@ -102,7 +102,6 @@ void update_settings(OutputOptions &options, ColumnType t, std::string name, void OutputDialog::on_chooseFileButton_clicked() { QString filename = QFileDialog::getSaveFileName(); - std::cout << filename.toStdString() << std::endl; this->options.set_path(filename.toStdString()); ui->pathLabel->setText("Path to export: " + filename); }