src/MainWindow.cpp

changeset 15
c58b82549713
parent 6
f8474f2c5db9
child 16
a5d8e783a7b0
equal deleted inserted replaced
14:8a304c898a75 15:c58b82549713
15 * along with this program. If not, see <http://www.gnu.org/licenses/>. 15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
16 */ 16 */
17 #include "MainWindow.h" 17 #include "MainWindow.h"
18 #include "AboutDialog.h" 18 #include "AboutDialog.h"
19 #include "InventorySuppliers.h" 19 #include "InventorySuppliers.h"
20 #include "Setup.h"
20 #include "../ui/ui_MainWindow.h" 21 #include "../ui/ui_MainWindow.h"
21 #include "config.h" 22 #include "config.h"
22 23
23 #include <QApplication> 24 #include <QApplication>
24 #include <QCloseEvent> 25 #include <QCloseEvent>
66 this->hide(); // Close the main window 67 this->hide(); // Close the main window
67 InventorySuppliersWindow->show(); // Show a second window 68 InventorySuppliersWindow->show(); // Show a second window
68 } 69 }
69 70
70 71
72 void MainWindow::fromSetup()
73 {
74 qDebug() << Q_FUNC_INFO;
75 delete SetupWindow;
76 this->show();
77 }
78
79
80 void MainWindow::on_actionSetup_triggered()
81 {
82 qDebug() << Q_FUNC_INFO;
83 SetupWindow = new Setup(this);
84 QObject::connect(SetupWindow, SIGNAL(firstWindow()), this, SLOT(fromSetup()));
85 this->hide(); // Close the main window
86 SetupWindow->show(); // Show a second window
87 }
88
89
71 void MainWindow::on_actionAbout_triggered() 90 void MainWindow::on_actionAbout_triggered()
72 { 91 {
73 qDebug() << Q_FUNC_INFO; 92 qDebug() << Q_FUNC_INFO;
74 AboutDialog dialog(this); 93 AboutDialog dialog(this);
75 dialog.setModal(true); 94 dialog.setModal(true);

mercurial