-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathoutletwindow.cpp
150 lines (130 loc) · 4.83 KB
/
outletwindow.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
#include "outletwindow.h"
#include "ui_outletwindow.h"
#include "ui_mainwindow.h"
#include <QMediaPlayer>
#include <QFontDatabase>
#include <QFont>
OutletWindow::OutletWindow(QWidget *parent) :
QWidget(parent),
ui(new Ui::OutletWindow)
{
ui->setupUi(this);
this->setWindowTitle("Outlets and Elementals");
//custom walking dead font
int id2 = QFontDatabase::addApplicationFont(":/fonts/DeadFontWalking-X2Ka.ttf");
QString family2= QFontDatabase::applicationFontFamilies(id2).at(0);
QFont zombie2(family2);
zombie2.setPointSize(20);
this->setFont(zombie2);
ui->gasOutletLabel->setPixmap(QPixmap(":/pics/outlet.jpg"));
ui->waterOutletLabel->setPixmap(QPixmap(":/pics/outlet.jpg"));
ui->electricOutletLabel->setPixmap(QPixmap(":/pics/outlet.jpg"));
ui->fireOutletLabel->setPixmap(QPixmap(":/pics/outlet.jpg"));
}
OutletWindow::~OutletWindow()
{
delete ui;
}
void OutletWindow::on_pushButton_clicked()
{
this->hide();
pmain->showMaximized();
}
void OutletWindow::on_pushButton_3_clicked()
{
QMediaPlayer *player = new QMediaPlayer;
player->setMedia(QUrl::fromLocalFile("C://Users//JB//Desktop//Code//zoms//sounds//drowning.mp3"));
player->setVolume(100);
player->play();
}
void OutletWindow::on_listWidget_itemEntered(QListWidgetItem *item)
{
}
void OutletWindow::on_listWidget_itemActivated(QListWidgetItem *item)
{
// ui->label->setText(item->text());
if(item->text() == "3rd Class Deck"){
ui->gas_location->setPixmap(QPixmap(":/pics/outlet-berths.jfif"));
};
if(item->text() == "Aft Decks"){
ui->gas_location->setPixmap(QPixmap(":/pics/outlet-aft.jfif"));
};
if(item->text() == "First Class Lounge *Bowie*"){
ui->gas_location->setPixmap(QPixmap(":/pics/outlet-1stclass.jfif"));
};
if(item->text() == "Grand Staircase"){
ui->gas_location->setPixmap(QPixmap(":/pics/outlet-grand.jfif"));
};
if(item->text() == "Dining Hall *White Room*"){
ui->gas_location->setPixmap(QPixmap(":/pics/outlet-dining.JPG"));
};
if(item->text() == "State Rooms *Left Left*"){
ui->gas_location->setPixmap(QPixmap(":/pics/outlet-state.jfif"));
};
}
void OutletWindow::on_listWidget_2_itemActivated(QListWidgetItem *item)
{
ui->water_location->setText(item->text());
if(item->text() == "3rd Class Deck"){
ui->water_location->setPixmap(QPixmap(":/pics/outlet-berths.jfif"));
};
if(item->text() == "Aft Decks"){
ui->water_location->setPixmap(QPixmap(":/pics/outlet-aft.jfif"));
};
if(item->text() == "First Class Lounge *Bowie*"){
ui->water_location->setPixmap(QPixmap(":/pics/outlet-1stclass.jfif"));
};
if(item->text() == "Grand Staircase"){
ui->water_location->setPixmap(QPixmap(":/pics/outlet-grand.jfif"));
};
if(item->text() == "Dining Hall *White Room*"){
ui->water_location->setPixmap(QPixmap(":/pics/outlet-dining.JPG"));
};
if(item->text() == "State Rooms *Left Left*"){
ui->water_location->setPixmap(QPixmap(":/pics/outlet-state.jfif"));
};
}
void OutletWindow::on_listWidget_3_itemActivated(QListWidgetItem *item)
{
ui->electric_location->setText(item->text());
if(item->text() == "3rd Class Deck"){
ui->electric_location->setPixmap(QPixmap(":/pics/outlet-berths.jfif"));
};
if(item->text() == "Aft Decks"){
ui->electric_location->setPixmap(QPixmap(":/pics/outlet-aft.jfif"));
};
if(item->text() == "First Class Lounge *Bowie*"){
ui->electric_location->setPixmap(QPixmap(":/pics/outlet-1stclass.jfif"));
};
if(item->text() == "Grand Staircase"){
ui->electric_location->setPixmap(QPixmap(":/pics/outlet-grand.jfif"));
};
if(item->text() == "Dining Hall *White Room*"){
ui->electric_location->setPixmap(QPixmap(":/pics/outlet-dining.JPG"));
};
if(item->text() == "State Rooms *Left Left*"){
ui->electric_location->setPixmap(QPixmap(":/pics/outlet-state.jfif"));
};
}
void OutletWindow::on_listWidget_4_itemActivated(QListWidgetItem *item)
{
ui->fire_location->setText(item->text());
if(item->text() == "3rd Class Deck"){
ui->fire_location->setPixmap(QPixmap(":/pics/outlet-berths.jfif"));
};
if(item->text() == "Aft Decks"){
ui->fire_location->setPixmap(QPixmap(":/pics/outlet-aft.jfif"));
};
if(item->text() == "First Class Lounge *Bowie*"){
ui->fire_location->setPixmap(QPixmap(":/pics/outlet-1stclass.jfif"));
};
if(item->text() == "Grand Staircase"){
ui->fire_location->setPixmap(QPixmap(":/pics/outlet-grand.jfif"));
};
if(item->text() == "Dining Hall *White Room*"){
ui->fire_location->setPixmap(QPixmap(":/pics/outlet-dining.JPG"));
};
if(item->text() == "State Rooms *Left Left*"){
ui->fire_location->setPixmap(QPixmap(":/pics/outlet-state.jfif"));
};
}