-
Notifications
You must be signed in to change notification settings - Fork 5
/
menu.cpp
237 lines (173 loc) · 6.57 KB
/
menu.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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
#include "mainwindow.h"
void MainWindow::Action()
{
saveAct = new QAction(tr("&Lock"), this);
saveAct->setStatusTip(tr("Logout"));
connect(saveAct, &QAction::triggered, this, &MainWindow::loginScreen);
contactAct = new QAction(tr("&Contact us"), this);
contactAct->setStatusTip(tr("Opening contact page"));
connect(contactAct, &QAction::triggered, this, &MainWindow::contact);
QuesAct = new QAction(tr("Ask us"), this);
QuesAct->setStatusTip(tr("Question portal"));
connect(QuesAct, &QAction::triggered, this, &MainWindow::question);
}
void MainWindow::MenuItem()
{
menuBar()->clear();
file = menuBar()->addMenu(tr("&File"));
file->addAction(saveAct);
help = menuBar()->addMenu(tr("&Help"));
help->addAction(QuesAct);
about= menuBar()->addMenu(tr("&contact us"));
about->addAction(contactAct);
}
void MainWindow::save()
{
QWidget *widget = new QWidget;
setCentralWidget(widget);
infoLabel = new QLabel();
infoLabel -> setAlignment(Qt::AlignCenter);
infoLabel->setText(tr("Saved"));
QVBoxLayout *layout = new QVBoxLayout;
layout->addWidget(infoLabel);
widget->setLayout(layout);
}
void MainWindow::contact()
{
QWidget *widget = new QWidget;
setCentralWidget(widget);
QLabel *title = new QLabel();
QLabel *subtitle1 = new QLabel();
QLabel *ssubtitle1 = new QLabel();
QLabel *subtitle2 = new QLabel();
QLabel *ssubtitle2 = new QLabel();
QLabel *subtitle3 = new QLabel();
QLabel *ssubtitle3 = new QLabel();
QFont banner("Helvetica",30,QFont::ExtraBold);
QFont question("Helvetica",20,QFont::Black);
QFont ans("Helvetica",15,QFont::ExtraLight);
title -> setAlignment(Qt::AlignCenter);
title ->setText(tr("CONTACT US" ));
title->setFont(banner);
//faq->setFixedHeight(40);
title->adjustSize();
subtitle1-> setAlignment(Qt::AlignLeft);
subtitle1->setText(tr("Contact Company"));
subtitle1->setFont(question);
subtitle1->adjustSize();
ssubtitle1-> setAlignment(Qt::AlignLeft);
ssubtitle1->setText("This project is brought to you by student of Kathmandu University.\n"
"You can contact us at : [email protected].");
ssubtitle1->setFont(ans);
ssubtitle1->adjustSize();
subtitle2-> setAlignment(Qt::AlignLeft);
subtitle2->setText(tr("About Developers"));
subtitle2->setFont(question);
subtitle2->adjustSize();
ssubtitle2-> setAlignment(Qt::AlignLeft);
ssubtitle2->setText("The developers of this application are\n"
"Aadarsha Dhakal \n"
"Ayush Paudel \n"
"Ayush Aryal \n"
"Sushant Adhikari");
ssubtitle2->setFont(ans);
ssubtitle2->adjustSize();
subtitle3-> setAlignment(Qt::AlignLeft);
subtitle3->setText(tr("HELP US GROW"));
subtitle3->setFont(question);
subtitle3->adjustSize();
ssubtitle3-> setAlignment(Qt::AlignLeft);
ssubtitle3->setText("You can help us by funding our work");
ssubtitle3->setFont(ans);
ssubtitle3->adjustSize();
QPushButton *backButton = new QPushButton("Back");
backButton->setStyleSheet("*{background:blue;height:30px;}");
//backButton->adjustSize();
connect(backButton,SIGNAL(clicked()),this,SLOT(dashboard()));
QVBoxLayout *layout = new QVBoxLayout;
layout->addWidget(title);
layout->addWidget(subtitle1);
layout->addWidget(ssubtitle1);
layout->addWidget(subtitle2);
layout->addWidget(ssubtitle2);
layout->addWidget(subtitle3);
layout->addWidget(ssubtitle3);
layout->addWidget(backButton);
widget->setLayout(layout);
}
void MainWindow::question()
{
QWidget *widget = new QWidget;
setCentralWidget(widget);
QLabel *faq = new QLabel();
QLabel *q1 = new QLabel();
QLabel *ans1 = new QLabel();
QLabel *q2 = new QLabel();
QLabel *ans2 = new QLabel();
QLabel *q3 = new QLabel();
QLabel *ans3 = new QLabel();
//setting font for the questions and answers
QFont banner("Helvetica",30,QFont::ExtraBold);
QFont question("Helvetica",20,QFont::Black);
QFont ans("Helvetica",15,QFont::ExtraLight);
faq -> setAlignment(Qt::AlignCenter);
faq ->setText(tr("FAQ" ));
faq->setFont(banner);
//faq->setFixedHeight(40);
faq->adjustSize();
q1-> setAlignment(Qt::AlignLeft);
//q1->setSizePolicy(QSizePolicy::Expanding,QSizePolicy::Expanding);
// q1->setFrameStyle(QFrame::Panel | QFrame::Sunken);
q1->setText(tr("Q1) What is this software used for?"));
q1->setFont(question);
//q1->setFixedHeight(40);
q1->adjustSize();
ans1-> setAlignment(Qt::AlignLeft);
//ans1->setFrameStyle(QFrame::Panel );
//ans1->setFixedHeight(100);
ans1->setText("Ans) This hotel management software is used to keep all the recording of the datas of\n"
"the costumers and enables to the smooth running of the hotel. It is basically used\n"
"to digitize the record keeping of the hotel.");
ans1->setFont(ans);
ans1->adjustSize();
q2-> setAlignment(Qt::AlignLeft);
// q1->setFrameStyle(QFrame::Panel | QFrame::Sunken);
q2->setText(tr("Q2) How do I login to the software?"));
q2->setFont(question);
//q2->setFixedHeight(40);
q2->adjustSize();
ans2-> setAlignment(Qt::AlignLeft);
//ans1->setFrameStyle(QFrame::Panel );
// ans2->setFixedHeight(60);
ans2->setText("Ans) To login to the software you need to be the employee of the hotel and you need to\n"
"have your login id and password provided to you by the hotel.");
ans2->setFont(ans);
ans2->adjustSize();
q3-> setAlignment(Qt::AlignLeft);
// q1->setFrameStyle(QFrame::Panel | QFrame::Sunken);
q3->setText(tr("Q3) How do I keep the datas of the guest?"));
q3->setFont(question);
//q3->setFixedHeight(40);
q3->adjustSize();
ans3-> setAlignment(Qt::AlignLeft);
//ans1->setFrameStyle(QFrame::Panel );
//ans3->setFixedHeight(60);
ans3->setText("Ans) To input the datas of the guest, click on the rooms button and then select the\n"
"preferred room by thr guest them a form pops up in the screen and then fill the\n information of the guest");
ans3->setFont(ans);
ans3->adjustSize();
QPushButton *backButton = new QPushButton("Back");
backButton->setStyleSheet("*{background:blue;height:30px;}");
//backButton->adjustSize();
connect(backButton,SIGNAL(clicked()),this,SLOT(dashboard()));
QVBoxLayout *layout = new QVBoxLayout;
layout->addWidget(faq);
layout->addWidget(q1);
layout->addWidget(ans1);
layout->addWidget(q2);
layout->addWidget(ans2);
layout->addWidget(q3);
layout->addWidget(ans3);
layout->addWidget(backButton);
widget->setLayout(layout);
}