175 qDebug() << Q_FUNC_INFO; |
175 qDebug() << Q_FUNC_INFO; |
176 InventoryMiscsWindow = new InventoryMiscs(this); |
176 InventoryMiscsWindow = new InventoryMiscs(this); |
177 int index = ui->mainStack->count(); |
177 int index = ui->mainStack->count(); |
178 ui->mainStack->addWidget(InventoryMiscsWindow); |
178 ui->mainStack->addWidget(InventoryMiscsWindow); |
179 ui->mainStack->setCurrentIndex(index); |
179 ui->mainStack->setCurrentIndex(index); |
180 setWindowTitle(QString("BMSapp - %1 - Inventory Yeasts").arg(VERSIONSTRING)); |
180 setWindowTitle(QString("BMSapp - %1 - Inventory Miscs").arg(VERSIONSTRING)); |
181 ui->menuBar->setVisible(false); |
181 ui->menuBar->setVisible(false); |
182 } |
182 } |
183 |
183 |
184 |
184 |
185 void MainWindow::fromInventoryWaters() |
185 void MainWindow::fromInventoryWaters() |
186 { |
186 { |
187 qDebug() << Q_FUNC_INFO; |
187 qDebug() << Q_FUNC_INFO; |
|
188 ui->mainStack->setCurrentIndex(-1); |
|
189 ui->mainStack->removeWidget(InventoryWatersWindow); |
188 delete InventoryWatersWindow; |
190 delete InventoryWatersWindow; |
189 this->show(); |
191 setWindowTitle( QString("BMSapp - %1").arg(VERSIONSTRING) ); |
|
192 ui->menuBar->setVisible(true); |
190 } |
193 } |
191 |
194 |
192 |
195 |
193 void MainWindow::on_actionWaters_triggered() |
196 void MainWindow::on_actionWaters_triggered() |
194 { |
197 { |
195 qDebug() << Q_FUNC_INFO; |
198 qDebug() << Q_FUNC_INFO; |
196 InventoryWatersWindow = new InventoryWaters(this); |
199 InventoryWatersWindow = new InventoryWaters(this); |
197 QObject::connect(InventoryWatersWindow, SIGNAL(firstWindow()), this, SLOT(fromInventoryWaters())); |
200 int index = ui->mainStack->count(); |
198 this->hide(); // Close the main window |
201 ui->mainStack->addWidget(InventoryWatersWindow); |
199 InventoryWatersWindow->show(); // Show a second window |
202 ui->mainStack->setCurrentIndex(index); |
|
203 setWindowTitle(QString("BMSapp - %1 - Inventory Waters").arg(VERSIONSTRING)); |
|
204 ui->menuBar->setVisible(false); |
200 } |
205 } |
201 |
206 |
202 |
207 |
203 void MainWindow::fromInventoryEquipments() |
208 void MainWindow::fromInventoryEquipments() |
204 { |
209 { |