160 |
160 |
161 |
161 |
162 void MainWindow::fromInventoryMiscs() |
162 void MainWindow::fromInventoryMiscs() |
163 { |
163 { |
164 qDebug() << Q_FUNC_INFO; |
164 qDebug() << Q_FUNC_INFO; |
|
165 ui->mainStack->setCurrentIndex(-1); |
|
166 ui->mainStack->removeWidget(InventoryMiscsWindow); |
165 delete InventoryMiscsWindow; |
167 delete InventoryMiscsWindow; |
166 this->show(); |
168 setWindowTitle( QString("BMSapp - %1").arg(VERSIONSTRING) ); |
|
169 ui->menuBar->setVisible(true); |
167 } |
170 } |
168 |
171 |
169 |
172 |
170 void MainWindow::on_actionMiscs_triggered() |
173 void MainWindow::on_actionMiscs_triggered() |
171 { |
174 { |
172 qDebug() << Q_FUNC_INFO; |
175 qDebug() << Q_FUNC_INFO; |
173 InventoryMiscsWindow = new InventoryMiscs(this); |
176 InventoryMiscsWindow = new InventoryMiscs(this); |
174 QObject::connect(InventoryMiscsWindow, SIGNAL(firstWindow()), this, SLOT(fromInventoryMiscs())); |
177 int index = ui->mainStack->count(); |
175 this->hide(); // Close the main window |
178 ui->mainStack->addWidget(InventoryMiscsWindow); |
176 InventoryMiscsWindow->show(); // Show a second window |
179 ui->mainStack->setCurrentIndex(index); |
|
180 setWindowTitle(QString("BMSapp - %1 - Inventory Yeasts").arg(VERSIONSTRING)); |
|
181 ui->menuBar->setVisible(false); |
177 } |
182 } |
178 |
183 |
179 |
184 |
180 void MainWindow::fromInventoryWaters() |
185 void MainWindow::fromInventoryWaters() |
181 { |
186 { |