document.getElementById('scorebug2').style = css;
document.getElementById('clockbug2').style = css;
}
+
+function showmatch3()
+{
+ let css = "-webkit-animation: fade-in 1.0s ease; -webkit-animation-fill-mode: both;";
+ document.getElementById('scorebug3').style = css;
+ document.getElementById('clockbug3').style = css;
+}
+
+function hidematch3()
+{
+ let css = "-webkit-animation: fade-out 1.0s ease; -webkit-animation-fill-mode: both;";
+ document.getElementById('scorebug3').style = css;
+ document.getElementById('clockbug3').style = css;
+}
udp_thread = std::thread(&MainWindow::udp_thread_func, this, 6000);
udp_thread2 = std::thread(&MainWindow::udp_thread_func, this, 6001);
+ udp_thread3 = std::thread(&MainWindow::udp_thread_func, this, 6002);
connect(ui->ws_disconnect_btn, &QPushButton::clicked, this, &MainWindow::ws_disconnect_clicked);
connect(ui->set_initials_btn, &QPushButton::clicked, this, &MainWindow::set_initials_clicked);
connect(ui->set_match_2_initials_btn, &QPushButton::clicked, this, &MainWindow::set_match_2_initials_clicked);
+ connect(ui->set_match_3_initials_btn, &QPushButton::clicked, this, &MainWindow::set_match_3_initials_clicked);
connect(ui->set_color_btn, &QPushButton::clicked, this, &MainWindow::set_color_clicked);
connect(ui->set_score_btn, &QPushButton::clicked, this, &MainWindow::set_score_clicked);
connect(ui->set_all_scorebug_btn, &QPushButton::clicked, this, &MainWindow::set_all_scorebug_clicked);
connect(ui->hide_clock_btn, &QPushButton::clicked, this, &MainWindow::hide_clock_clicked);
connect(ui->show_match_2_btn, &QPushButton::clicked, this, &MainWindow::show_match_2_clicked);
connect(ui->hide_match_2_btn, &QPushButton::clicked, this, &MainWindow::hide_match_2_clicked);
+ connect(ui->show_match_3_btn, &QPushButton::clicked, this, &MainWindow::show_match_3_clicked);
+ connect(ui->hide_match_3_btn, &QPushButton::clicked, this, &MainWindow::hide_match_3_clicked);
connect(ui->set_comment_btn, &QPushButton::clicked, this, &MainWindow::set_comment_clicked);
connect(ui->set_and_show_comment_btn, &QPushButton::clicked, this, &MainWindow::set_and_show_comment_clicked);
ws->send_command("eval setteams2()");
}
+void MainWindow::set_match_3_initials_clicked()
+{
+ map<string, string> param;
+ param["team1"] = escape_html(ui->match_3_initials_1_edit->text().toStdString());
+ param["team2"] = escape_html(ui->match_3_initials_2_edit->text().toStdString());
+ ws->send_command("update " + serialize_as_json(param));
+ ws->send_command("eval setteams2()");
+}
+
void MainWindow::set_color_clicked()
{
map<string, string> param;
ws->send_command("eval hidematch2()");
}
+void MainWindow::show_match_3_clicked()
+{
+ ws->send_command("eval showmatch3()");
+}
+
+void MainWindow::hide_match_3_clicked()
+{
+ ws->send_command("eval hidematch3()");
+}
+
void MainWindow::set_comment_clicked()
{
map<string, string> param;
void MainWindow::bt6000_message_received(const string &msg, int port)
{
fprintf(stderr, "BT6000 message: '%s' (port %d)\n", msg.c_str(), port);
- if (port == 6001) {
+ if (port == 6002) {
+ if (!ui->bt6000_3_enable->isChecked()) {
+ return;
+ }
+ } else if (port == 6001) {
if (!ui->bt6000_2_enable->isChecked()) {
return;
}
void ws_disconnect_clicked();
void set_initials_clicked();
void set_match_2_initials_clicked();
+ void set_match_3_initials_clicked();
void set_color_clicked();
void set_score_clicked();
void set_all_scorebug_clicked();
void hide_clock_clicked();
void show_match_2_clicked();
void hide_match_2_clicked();
+ void show_match_3_clicked();
+ void hide_match_3_clicked();
void set_comment_clicked();
void set_and_show_comment_clicked();
void hide_comment_clicked();
std::thread udp_thread;
std::thread udp_thread2;
+ std::thread udp_thread3;
};
#endif // MAINWINDOW_H
<rect>
<x>0</x>
<y>0</y>
- <width>805</width>
+ <width>891</width>
<height>597</height>
</rect>
</property>
</property>
</widget>
</item>
+ <item>
+ <widget class="QCheckBox" name="bt6000_3_enable">
+ <property name="text">
+ <string>Score 3 UDP</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_3">
<item>
<layout class="QGridLayout" name="gridLayout">
- <item row="4" column="2">
+ <item row="4" column="3">
<layout class="QHBoxLayout" name="horizontalLayout_4">
<item>
<widget class="QPushButton" name="goal_2_btn">
</property>
</widget>
</item>
- <item row="3" column="2">
+ <item row="3" column="3">
<widget class="QSpinBox" name="score_2_box"/>
</item>
- <item row="3" column="3">
+ <item row="3" column="4">
<widget class="QPushButton" name="set_score_btn">
<property name="text">
<string>Set</string>
</property>
</widget>
</item>
- <item row="1" column="1">
+ <item row="1" column="2">
<widget class="QLineEdit" name="initials_1_edit">
<property name="text">
<string>PCL</string>
</property>
</widget>
</item>
- <item row="4" column="1">
+ <item row="4" column="2">
<layout class="QHBoxLayout" name="horizontalLayout_5">
<item>
<widget class="QPushButton" name="goal_1_btn">
</item>
</layout>
</item>
- <item row="2" column="1">
+ <item row="2" column="2">
<widget class="QLineEdit" name="color_1_edit">
<property name="text">
<string>red</string>
</property>
</widget>
</item>
- <item row="3" column="1">
+ <item row="3" column="2">
<widget class="QSpinBox" name="score_1_box"/>
</item>
- <item row="0" column="2">
+ <item row="0" column="3">
<widget class="QLabel" name="label_4">
<property name="text">
<string>Team 2</string>
</property>
</widget>
</item>
- <item row="0" column="1">
+ <item row="0" column="2">
<widget class="QLabel" name="label_3">
<property name="text">
<string>Team 1</string>
</property>
</widget>
</item>
- <item row="1" column="2">
+ <item row="1" column="3">
<widget class="QLineEdit" name="initials_2_edit">
<property name="text">
<string>TFK</string>
</property>
</widget>
</item>
- <item row="1" column="3">
+ <item row="1" column="4">
<widget class="QPushButton" name="set_initials_btn">
<property name="text">
<string>Set</string>
</property>
</widget>
</item>
- <item row="2" column="2">
+ <item row="2" column="3">
<widget class="QLineEdit" name="color_2_edit">
<property name="text">
<string>yellow</string>
</property>
</widget>
</item>
- <item row="2" column="3">
+ <item row="2" column="4">
<widget class="QPushButton" name="set_color_btn">
<property name="text">
<string>Set</string>
</property>
</widget>
</item>
- <item row="4" column="3">
+ <item row="4" column="4">
<widget class="QPushButton" name="set_all_scorebug_btn">
<property name="text">
<string>Set all</string>
</property>
</widget>
</item>
- <item row="5" column="1">
+ <item row="5" column="2">
<widget class="QLineEdit" name="match_2_initials_1_edit">
<property name="text">
<string>PCL</string>
</property>
</widget>
</item>
- <item row="5" column="2">
+ <item row="5" column="3">
<widget class="QLineEdit" name="match_2_initials_2_edit">
<property name="text">
<string>TFK</string>
</property>
</widget>
</item>
- <item row="5" column="3">
+ <item row="5" column="4">
<widget class="QPushButton" name="set_match_2_initials_btn">
<property name="text">
<string>Set</string>
</property>
</widget>
</item>
+ <item row="6" column="0">
+ <widget class="QLabel" name="label_16">
+ <property name="text">
+ <string>Match 3</string>
+ </property>
+ </widget>
+ </item>
+ <item row="6" column="2">
+ <widget class="QLineEdit" name="match_3_initials_1_edit">
+ <property name="text">
+ <string>PCL</string>
+ </property>
+ </widget>
+ </item>
+ <item row="6" column="3">
+ <widget class="QLineEdit" name="match_3_initials_2_edit">
+ <property name="text">
+ <string>TFK</string>
+ </property>
+ </widget>
+ </item>
+ <item row="6" column="4">
+ <widget class="QPushButton" name="set_match_3_initials_btn">
+ <property name="text">
+ <string>Set</string>
+ </property>
+ </widget>
+ </item>
</layout>
</item>
</layout>
</property>
</widget>
</item>
+ <item>
+ <widget class="QPushButton" name="show_match_3_btn">
+ <property name="text">
+ <string>Show match 3</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="hide_match_3_btn">
+ <property name="text">
+ <string>Hide match 3</string>
+ </property>
+ </widget>
+ </item>
</layout>
</item>
<item>
<td class="clock" id="clock2">0:00</td>
</tr>
</table>
+ <table class="scorebug scorebug3" id="scorebug3" style="display: none">
+ <tr>
+ <td class="team1" id="score3_team1">TM3</td>
+ <td class="score" id="score3_score">0 – 0</td>
+ <td class="team2" id="score3_team2">TM4</td>
+ </tr>
+ </table>
+ <table class="clockbug3 clockbug-hidden" id="clockbug3" style="display: none">
+ <tr>
+ <td class="clock" id="clock3">0:00</td>
+ </tr>
+ </table>
</div>
<div class="lowerthird-headline lowerthird-headline-hidden" id="lowerthird-headline"><div class="lowerthird-headline-content lowerthird-headline-content-hidden" id="lowerthird-headline-content">
Call on the field: Foul
'use strict';
-let num_clocks = 2;
+let num_clocks = 3;
let clocks = [
{ 'running': false, 'elapsed': 0, 'origin': undefined, 'id': 'clock' },
- { 'running': false, 'elapsed': 0, 'origin': undefined, 'id': 'clock2' }
+ { 'running': false, 'elapsed': 0, 'origin': undefined, 'id': 'clock2' },
+ { 'running': false, 'elapsed': 0, 'origin': undefined, 'id': 'clock3' }
];
let clock_visible = false;
document.getElementById('score2_team2').innerHTML = state['team2'];
}
+function setteams3()
+{
+ document.getElementById('score3_team1').innerHTML = state['team1'];
+ document.getElementById('score3_team2').innerHTML = state['team2'];
+}
+
function setcolors()
{
document.getElementById('team1color').style.backgroundColor = state['team1color'];
document.getElementById('score2_score').innerHTML = scoreA + " – " + scoreB;
}
+function setscore3()
+{
+ scoreA = state['score1'];
+ scoreB = state['score2'];
+ document.getElementById('score3_score').innerHTML = scoreA + " – " + scoreB;
+}
+
function startclock(num)
{
if (!clocks[num].running) {
border: 1px solid #ccc;
}
}
-.scorebug2 td {
+.scorebug2 td, .scorebug3 td {
border: 1px solid #ccc8;
}
.scorebug2 {
- /*top: 52px; */
- /* left: 22px; */
left: 1275px;
top: 13px;
font-size: 20px;
top: 13px;
font-size: 20px;
}
+.scorebug3 {
+ left: 1275px;
+ top: 47px;
+ font-size: 20px;
+}
+#clockbug3 {
+ left: 1360px;
+ top: 47px;
+ font-size: 20px;
+}
.team1color, .team2color {
width: 12px;
margin: 5px;
}
padding-top: var(--main-padding-top-adjust);
}
-#score2_team1, #score2_team2 {
+#score2_team1, #score2_team2, #score3_team1, #score3_team2 {
@if $trondisk {
background: linear-gradient(to bottom, #00a8, #0088);
} @else {
background: linear-gradient(to bottom, #fff8, #eee8);
}
}
-#score2_team1, #score2_team2, #score2_score {
+#score2_team1, #score2_team2, #score2_score, #score3_team1, #score3_team2, #score3_score {
height: 30px;
}
.score {
height: 35px;
padding-top: var(--main-padding-top-adjust);
}
-#score2_score {
+#score2_score, #score3_score {
@if $trondisk {
background: linear-gradient(to bottom, #00c8, #00a8);
} @else {
}
/* Clock, to the right of score */
-.clockbug, .clockbug2 {
+.clockbug, .clockbug2, .clockbug3 {
position: fixed;
font-size: 25px;
left: 352px;
padding-top: var(--main-padding-top-adjust);
width: 90px;
}
-#clock2 {
+#clock2, #clock3 {
border: 1px solid #ccc8;
@if $trondisk {
background: linear-gradient(to bottom, #00a8, #0088);