95 ui->mainStack->setCurrentIndex(-1); |
95 ui->mainStack->setCurrentIndex(-1); |
96 ui->mainStack->removeWidget(InventoryFermentablesWindow); |
96 ui->mainStack->removeWidget(InventoryFermentablesWindow); |
97 delete InventoryFermentablesWindow; |
97 delete InventoryFermentablesWindow; |
98 setWindowTitle( QString("BMSapp - %1").arg(VERSIONSTRING) ); |
98 setWindowTitle( QString("BMSapp - %1").arg(VERSIONSTRING) ); |
99 ui->menuBar->setVisible(true); |
99 ui->menuBar->setVisible(true); |
|
100 statusBar()->clearMessage(); |
100 } |
101 } |
101 |
102 |
102 |
103 |
103 void MainWindow::on_actionFermentables_triggered() |
104 void MainWindow::on_actionFermentables_triggered() |
104 { |
105 { |
335 |
336 |
336 |
337 |
337 void MainWindow::fromSetup() |
338 void MainWindow::fromSetup() |
338 { |
339 { |
339 qDebug() << Q_FUNC_INFO; |
340 qDebug() << Q_FUNC_INFO; |
|
341 ui->mainStack->setCurrentIndex(-1); |
|
342 ui->mainStack->removeWidget(SetupWindow); |
340 delete SetupWindow; |
343 delete SetupWindow; |
341 this->show(); |
344 setWindowTitle( QString("BMSapp - %1").arg(VERSIONSTRING) ); |
|
345 ui->menuBar->setVisible(true); |
342 } |
346 } |
343 |
347 |
344 |
348 |
345 void MainWindow::on_actionSetup_triggered() |
349 void MainWindow::on_actionSetup_triggered() |
346 { |
350 { |
347 qDebug() << Q_FUNC_INFO; |
351 qDebug() << Q_FUNC_INFO; |
348 SetupWindow = new Setup(this); |
352 SetupWindow = new Setup(this); |
349 QObject::connect(SetupWindow, SIGNAL(firstWindow()), this, SLOT(fromSetup())); |
353 int index = ui->mainStack->count(); |
350 this->hide(); // Close the main window |
354 ui->mainStack->addWidget(SetupWindow); |
351 SetupWindow->show(); // Show a setup window |
355 ui->mainStack->setCurrentIndex(index); |
|
356 ui->menuBar->setVisible(false); |
352 } |
357 } |
353 |
358 |
354 |
359 |
355 void MainWindow::on_actionAbout_triggered() |
360 void MainWindow::on_actionAbout_triggered() |
356 { |
361 { |