-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathbilling.cpp
72 lines (65 loc) · 2.19 KB
/
billing.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
#include "mainwindow.h"
void MainWindow::Bill(){
// QWidget *parent = new QWidget; // parent widget
QVBoxLayout *main_layout = new QVBoxLayout();
setWindowTitle("Billings");
style();
rightside->setLayout(main_layout);
QWidget *tophalf = new QWidget;
// QVBoxLayout *main_layout = new QVBoxLayout();
QHBoxLayout *top_layout = new QHBoxLayout();
QLabel *selectRoomLabel = new QLabel("Select A Room");
QComboBox *selectRoom = new QComboBox();
selectRoom->addItem("Please select a Room");
selectRoom->addItem("Room 1 ( Common )");
selectRoom->addItem("Room 2 ( Common )");
selectRoom->addItem("Room 3 ( Common )");
selectRoom->addItem("Room 4 ( Common )");
selectRoom->addItem("Room 5 ( Deluxe )");
selectRoom->addItem("Room 6 ( Deluxe )");
selectRoom->addItem("Room 7 ( Deluxe )");
selectRoom->addItem("Room 8 ( Deluxe )");
top_layout->addWidget(selectRoomLabel);
top_layout->addWidget(selectRoom);
tophalf->setLayout(top_layout);
connect(selectRoom, static_cast<void(QComboBox::*)(int)>(&QComboBox::activated),
[=](int index){
switch (index){
case 0:
break;
case 1:
checkout(1);
break;
case 2:
checkout(2);
break;
case 3:
checkout(3);
break;
case 4:
checkout(4);
break;
case 5:
checkout(5);
break;
case 6:
checkout(6);
break;
case 7:
checkout(7);
break;
case 8:
checkout(8);
break;
default:
break;
}
});
//////////////////////////////////////
/// La dost baki timi gara hai
////////////////////////////
/// /////////////////////////
bottom_half = new QWidget();
main_layout->addWidget(tophalf);
main_layout->addWidget(bottom_half);
}