-
Notifications
You must be signed in to change notification settings - Fork 2
/
mainwindow.cpp
60 lines (53 loc) · 1.49 KB
/
mainwindow.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#include "mainwindow.h"
#include "ui_mainwindow.h"
#include <QDesktopServices>
#include <QMessageBox>
#include <QUrl>
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{
ui->setupUi(this);
}
MainWindow::~MainWindow()
{
delete ui;
}
void MainWindow::on_nextPassenger_clicked()
{
QString username = ui->lineEdit_username->text();
QString password = ui->lineEdit_password->text();
if(username == "test" && password == "test"){
jou1 = new Journey(this);
this->hide();
jou1->show();
}
else
ui->statusBar->showMessage("username and password not correct. Please try again!", 3500);
}
void MainWindow::on_actionAbout_Qt_triggered()
{
QMessageBox::aboutQt(this);
}
void MainWindow::on_actionAbout_triggered()
{
QMessageBox::about(this, "About",
"This is a Railway Reservation System \n"
"developed for the OOP project.\n\n"
"Tools & Technologies used:\n"
"C++\n"
"Qt\n\n"
"Developers:\n"
"Harshit Kumar (024)\n"
"Abhishek (002)\n"
"Aman Deep (008)");
}
void MainWindow::on_actionQuit_triggered()
{
QApplication::quit();
}
void MainWindow::on_actionReport_Bug_triggered()
{
QString url = "https://github.com/kHarshit/railway-ticketing-system/issues/new";
QDesktopServices::openUrl(QUrl(url));
}