35 #include <QApplication> |
35 #include <QApplication> |
36 #include <QCloseEvent> |
36 #include <QCloseEvent> |
37 #include <QDebug> |
37 #include <QDebug> |
38 #include <QStandardItem> |
38 #include <QStandardItem> |
39 #include <QWidget> |
39 #include <QWidget> |
|
40 #include <QtWidgets/QTableWidget> |
|
41 #include <QtWidgets/QGroupBox> |
|
42 #include <QtWidgets/QPushButton> |
40 |
43 |
41 |
44 |
42 MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow) |
45 MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow) |
43 { |
46 { |
44 qDebug() << Q_FUNC_INFO; |
47 qDebug() << Q_FUNC_INFO; |
63 |
66 |
64 |
67 |
65 void MainWindow::fromInventorySuppliers() |
68 void MainWindow::fromInventorySuppliers() |
66 { |
69 { |
67 qDebug() << Q_FUNC_INFO; |
70 qDebug() << Q_FUNC_INFO; |
68 // delete InventorySuppliersWindow; |
71 qDebug() << "fromInventorySuppliers() start"; |
69 ui->mainStack->setCurrentIndex(0); |
72 ui->mainStack->setCurrentIndex(-1); |
|
73 ui->mainStack->removeWidget(InventorySuppliersWindow); |
|
74 qDebug() << ui->mainStack->count(); |
|
75 delete InventorySuppliersWindow; |
70 setWindowTitle( QString("BMSapp - %1").arg(VERSIONSTRING) ); |
76 setWindowTitle( QString("BMSapp - %1").arg(VERSIONSTRING) ); |
71 qDebug() << "fromInventorySuppliers() done"; |
77 qDebug() << "fromInventorySuppliers() done"; |
72 } |
78 } |
73 |
79 |
74 |
80 |
75 void MainWindow::on_actionSuppliers_triggered() |
81 void MainWindow::on_actionSuppliers_triggered() |
76 { |
82 { |
77 qDebug() << Q_FUNC_INFO; |
83 qDebug() << Q_FUNC_INFO; |
|
84 |
78 InventorySuppliersWindow = new InventorySuppliers(this); |
85 InventorySuppliersWindow = new InventorySuppliers(this); |
79 // QObject::connect(InventorySuppliersWindow, SIGNAL(firstWindow()), this, SLOT(fromInventorySuppliers())); |
86 ui->mainStack->addWidget(InventorySuppliersWindow); |
80 qDebug() << ui->mainStack->count(); |
87 qDebug() << ui->mainStack->count(); |
81 ui->mainStack->setCurrentIndex(1); |
88 ui->mainStack->setCurrentIndex(2); |
82 // connect(InventorySuppliersWindow, SIGNAL(firstWindow()), this, SLOT(fromInventorySuppliers())); |
|
83 setWindowTitle( QString("BMSapp - %1 - Inventory Suppliers").arg(VERSIONSTRING)); |
89 setWindowTitle( QString("BMSapp - %1 - Inventory Suppliers").arg(VERSIONSTRING)); |
84 } |
90 } |
85 |
91 |
86 |
92 |
87 void MainWindow::fromInventoryFermentables() |
93 void MainWindow::fromInventoryFermentables() |