-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprogram_buttons.cpp
133 lines (129 loc) · 3.68 KB
/
program_buttons.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
/***********************************************************************************
** This file is part of Senior Project Launcher.
**
** Senior Project Launcher is free software: you can redistribute it and/or modify
** it under the terms of the GNU Lesser General Public License as published by
** the Free Software Foundation, either version 2.1 of the License, or
** (at your option) any later version.
**
** Senior Project Launcher is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
** GNU Lesser General Public License for more details.
**
** You should have received a copy of the GNU Lesser General Public License
** along with Senior Project Launcher. If not, see <http://www.gnu.org/licenses/>.
**************************************************************************************/
//Back
void SeniorProject::on_Back_clicked()
{
prev_prog = prog;
prog = 0;
if (mediaPlayer->state() == QMediaPlayer::PlayingState)
{
on_playButton_clicked();
}
animation(ui->programs_window, winx, winy, +winw, 0,
ui->mainbox, -winw, winy, +winw, 0,
999);
if (!ui->Run->isHidden())
ui->Run->hide();
changevid = true;
ui->Options_3->show();
ui->Information->setTabEnabled(1, true);
}
void SeniorProject::on_program_TradingPost_clicked()
{
url = "qrc:/html/html/TradingPost.html";
ui->source->setUrl(url);
if (prog != 1)
{
mainanimation();
prog = 1;
if (prev_prog != prog)
ui->Information->setCurrentIndex(0);
else
on_playButton_clicked();
}
}
void SeniorProject::on_program_MCUHelper_clicked()
{
ui->Run->setText(tr("Install MCUHelper"));
ui->Run->show();
url = "qrc:/html/html/MCUHelper.html";
ui->source->setUrl(url);
if (prog != 2)
{
mainanimation();
prog = 2;
if (prev_prog != prog)
ui->Information->setCurrentIndex(0);
else
on_playButton_clicked();
}
}
void SeniorProject::on_program_AccessFlashDrive_clicked()
{
url = "qrc:/html/html/AccessFlashDrive.html";
qDebug() << url;
ui->source->setUrl(url);
if (prog != 3)
{
mainanimation();
prog = 3;
if (prev_prog != prog)
ui->Information->setCurrentIndex(0);
else
on_playButton_clicked();
}
}
void SeniorProject::on_program_FizzBuzz_clicked()
{
ui->Run->setText(tr("Run FizzBuzz Test"));
ui->Run->show();
url = "qrc:/html/html/FizzBuzz.html";
qDebug() << url;
ui->source->setUrl(url);
if (prog != 4)
{
mainanimation();
prog = 4;
if (prev_prog != prog)
ui->Information->setCurrentIndex(0);
else
on_playButton_clicked();
}
}
void SeniorProject::on_program_SPL_clicked()
{
url = "https://github.com/seang96/SeniorProject#js-repo-pjax-container";
qDebug() << url;
ui->Information->setTabEnabled(1, false);
ui->source->setUrl(url);
if (prog != 5)
{
mainanimation();
prog = 5;
}
}
//Picture Click
void SeniorProject::on_program_TradingPost_picture_clicked()
{
on_program_TradingPost_clicked();
}
void SeniorProject::on_program_MCUHelper_picture_clicked()
{
on_program_MCUHelper_clicked();
}
void SeniorProject::on_program_AccessFlashDrive_picture_clicked()
{
on_program_AccessFlashDrive_clicked();
}
void SeniorProject::on_program_FizzBuzz_picture_clicked()
{
on_program_FizzBuzz_clicked();
}
void SeniorProject::on_program_SPL_picture_clicked()
{
on_program_SPL_clicked();
}