src/MainWindow.cpp

changeset 70
556b4202c5e7
parent 69
228cb2a01acf
child 71
5bd0d7be0167
equal deleted inserted replaced
69:228cb2a01acf 70:556b4202c5e7
137 137
138 138
139 void MainWindow::fromInventoryYeasts() 139 void MainWindow::fromInventoryYeasts()
140 { 140 {
141 qDebug() << Q_FUNC_INFO; 141 qDebug() << Q_FUNC_INFO;
142 ui->mainStack->setCurrentIndex(-1);
143 ui->mainStack->removeWidget(InventoryYeastsWindow);
142 delete InventoryYeastsWindow; 144 delete InventoryYeastsWindow;
143 this->show(); 145 setWindowTitle( QString("BMSapp - %1").arg(VERSIONSTRING) );
146 ui->menuBar->setVisible(true);
144 } 147 }
145 148
146 149
147 void MainWindow::on_actionYeasts_triggered() 150 void MainWindow::on_actionYeasts_triggered()
148 { 151 {
149 qDebug() << Q_FUNC_INFO; 152 qDebug() << Q_FUNC_INFO;
150 InventoryYeastsWindow = new InventoryYeasts(this); 153 InventoryYeastsWindow = new InventoryYeasts(this);
151 QObject::connect(InventoryYeastsWindow, SIGNAL(firstWindow()), this, SLOT(fromInventoryYeasts())); 154 int index = ui->mainStack->count();
152 this->hide(); // Close the main window 155 ui->mainStack->addWidget(InventoryYeastsWindow);
153 InventoryYeastsWindow->show(); // Show a second window 156 ui->mainStack->setCurrentIndex(index);
157 setWindowTitle(QString("BMSapp - %1 - Inventory Yeasts").arg(VERSIONSTRING));
158 ui->menuBar->setVisible(false);
154 } 159 }
155 160
156 161
157 void MainWindow::fromInventoryMiscs() 162 void MainWindow::fromInventoryMiscs()
158 { 163 {

mercurial