Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Internal ref add penalty kick #2344

Merged
merged 9 commits into from
Feb 26, 2025
8 changes: 8 additions & 0 deletions soccer/src/soccer/ui/main_window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1158,6 +1158,14 @@ void MainWindow::on_fastYellow_clicked() {
send_quick_command(PlayState::ready_free_kick(!context_->blue_team));
}

void MainWindow::on_fastPenaltyBlue_clicked() {
send_quick_command(PlayState::ready_penalty(context_->blue_team));
}

void MainWindow::on_fastPenaltyYellow_clicked() {
send_quick_command(PlayState::ready_penalty(!context_->blue_team));
}

bool MainWindow::live() { return !_playbackRate; }
void MainWindow::updateDebugLayers(const LogFrame& frame) {
// Check if any debug layers have been added
Expand Down
2 changes: 2 additions & 0 deletions soccer/src/soccer/ui/main_window.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,8 @@
void on_fastKickoffYellow_clicked();
void on_fastBlue_clicked();
void on_fastYellow_clicked();
void on_fastPenaltyBlue_clicked();

Check warning on line 166 in soccer/src/soccer/ui/main_window.hpp

View workflow job for this annotation

GitHub Actions / build-and-test

invalid case style for private method 'on_fastPenaltyBlue_clicked'
void on_fastPenaltyYellow_clicked();

Check warning on line 167 in soccer/src/soccer/ui/main_window.hpp

View workflow job for this annotation

GitHub Actions / build-and-test

invalid case style for private method 'on_fastPenaltyYellow_clicked'

// Robot Position Dropdowns and Reset Buttons
void on_robotPosition_0_currentIndexChanged(int value);
Expand Down
92 changes: 58 additions & 34 deletions soccer/src/soccer/ui/qt/MainWindow.ui
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<string>RoboJackets - Soccer</string>
</property>
<property name="windowIcon">
<iconset resource="main_icons.qrc">
<iconset resource="//wsl.localhost/Ubuntu-22.04/home/james/robocup-software/soccer/src/soccer/ui/qt/main_icons.qrc">
<normaloff>:/icons/SoccerBall.png</normaloff>:/icons/SoccerBall.png</iconset>
</property>
<widget class="QWidget" name="centralwidget">
Expand Down Expand Up @@ -73,7 +73,7 @@
<string>Halt</string>
</property>
<property name="icon">
<iconset resource="main_icons.qrc">
<iconset resource="//wsl.localhost/Ubuntu-22.04/home/james/robocup-software/soccer/src/soccer/ui/qt/main_icons.qrc">
<normaloff>:/icons/halt.svg</normaloff>:/icons/halt.svg</iconset>
</property>
<property name="iconSize">
Expand Down Expand Up @@ -115,7 +115,7 @@
<string>Stop</string>
</property>
<property name="icon">
<iconset resource="main_icons.qrc">
<iconset resource="//wsl.localhost/Ubuntu-22.04/home/james/robocup-software/soccer/src/soccer/ui/qt/main_icons.qrc">
<normaloff>:/icons/stop.svg</normaloff>:/icons/stop.svg</iconset>
</property>
<property name="iconSize">
Expand Down Expand Up @@ -157,7 +157,7 @@
<string>Ready</string>
</property>
<property name="icon">
<iconset resource="main_icons.qrc">
<iconset resource="//wsl.localhost/Ubuntu-22.04/home/james/robocup-software/soccer/src/soccer/ui/qt/main_icons.qrc">
<normaloff>:/icons/ready.svg</normaloff>:/icons/ready.svg</iconset>
</property>
<property name="iconSize">
Expand Down Expand Up @@ -196,7 +196,7 @@
<string>Force Start</string>
</property>
<property name="icon">
<iconset resource="main_icons.qrc">
<iconset resource="//wsl.localhost/Ubuntu-22.04/home/james/robocup-software/soccer/src/soccer/ui/qt/main_icons.qrc">
<normaloff>:/icons/force_start.svg</normaloff>:/icons/force_start.svg</iconset>
</property>
<property name="iconSize">
Expand Down Expand Up @@ -263,6 +263,47 @@
</property>
</spacer>
</item>
<item>
<layout class="QVBoxLayout" name="Penalties">
<item>
<widget class="QPushButton" name="fastPenaltyBlue">
<property name="icon">
<iconset resource="//wsl.localhost/Ubuntu-22.04/home/james/robocup-software/soccer/src/soccer/ui/qt/main_icons.qrc">
<normaloff>:/icons/penalty_blue.svg</normaloff>:/icons/penalty_blue.svg</iconset>
</property>
<property name="iconSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="flat">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="fastPenaltyYellow">
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="//wsl.localhost/Ubuntu-22.04/home/james/robocup-software/soccer/src/soccer/ui/qt/main_icons.qrc">
<normaloff>:/icons/penalty_yellow.svg</normaloff>:/icons/penalty_yellow.svg</iconset>
</property>
<property name="iconSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="flat">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QVBoxLayout" name="Kickoffs">
<item>
Expand All @@ -274,7 +315,7 @@
<string/>
</property>
<property name="icon">
<iconset resource="main_icons.qrc">
<iconset resource="//wsl.localhost/Ubuntu-22.04/home/james/robocup-software/soccer/src/soccer/ui/qt/main_icons.qrc">
<normaloff>:/icons/kickoff_blue.svg</normaloff>:/icons/kickoff_blue.svg</iconset>
</property>
<property name="iconSize">
Expand All @@ -297,7 +338,7 @@
<string/>
</property>
<property name="icon">
<iconset resource="main_icons.qrc">
<iconset resource="//wsl.localhost/Ubuntu-22.04/home/james/robocup-software/soccer/src/soccer/ui/qt/main_icons.qrc">
<normaloff>:/icons/kickoff_yellow.svg</normaloff>:/icons/kickoff_yellow.svg</iconset>
</property>
<property name="iconSize">
Expand All @@ -324,7 +365,7 @@
<string/>
</property>
<property name="icon">
<iconset resource="main_icons.qrc">
<iconset resource="//wsl.localhost/Ubuntu-22.04/home/james/robocup-software/soccer/src/soccer/ui/qt/main_icons.qrc">
<normaloff>:/icons/direct_blue.svg</normaloff>:/icons/direct_blue.svg</iconset>
</property>
<property name="iconSize">
Expand All @@ -347,7 +388,7 @@
<string/>
</property>
<property name="icon">
<iconset resource="main_icons.qrc">
<iconset resource="//wsl.localhost/Ubuntu-22.04/home/james/robocup-software/soccer/src/soccer/ui/qt/main_icons.qrc">
<normaloff>:/icons/direct_yellow.svg</normaloff>:/icons/direct_yellow.svg</iconset>
</property>
<property name="iconSize">
Expand Down Expand Up @@ -519,7 +560,7 @@
<string>Play log backwards quickly</string>
</property>
<property name="icon">
<iconset resource="main_icons.qrc">
<iconset resource="//wsl.localhost/Ubuntu-22.04/home/james/robocup-software/soccer/src/soccer/ui/qt/main_icons.qrc">
<normaloff>:/icons/rewind.svg</normaloff>:/icons/rewind.svg</iconset>
</property>
<property name="iconSize">
Expand Down Expand Up @@ -555,7 +596,7 @@
<string>Play log backwards</string>
</property>
<property name="icon">
<iconset resource="main_icons.qrc">
<iconset resource="//wsl.localhost/Ubuntu-22.04/home/james/robocup-software/soccer/src/soccer/ui/qt/main_icons.qrc">
<normaloff>:/icons/prev-frame.svg</normaloff>:/icons/prev-frame.svg</iconset>
</property>
<property name="iconSize">
Expand Down Expand Up @@ -597,7 +638,7 @@
<string notr="true">background-color: red</string>
</property>
<property name="icon">
<iconset resource="main_icons.qrc">
<iconset resource="//wsl.localhost/Ubuntu-22.04/home/james/robocup-software/soccer/src/soccer/ui/qt/main_icons.qrc">
<normaloff>:/icons/pause.svg</normaloff>:/icons/pause.svg</iconset>
</property>
<property name="iconSize">
Expand Down Expand Up @@ -636,7 +677,7 @@
<string/>
</property>
<property name="icon">
<iconset resource="main_icons.qrc">
<iconset resource="//wsl.localhost/Ubuntu-22.04/home/james/robocup-software/soccer/src/soccer/ui/qt/main_icons.qrc">
<normaloff>:/icons/next-frame.svg</normaloff>:/icons/next-frame.svg</iconset>
</property>
<property name="iconSize">
Expand Down Expand Up @@ -672,7 +713,7 @@
<string>Play log forwards quickly</string>
</property>
<property name="icon">
<iconset resource="main_icons.qrc">
<iconset resource="//wsl.localhost/Ubuntu-22.04/home/james/robocup-software/soccer/src/soccer/ui/qt/main_icons.qrc">
<normaloff>:/icons/play.svg</normaloff>:/icons/play.svg</iconset>
</property>
<property name="iconSize">
Expand Down Expand Up @@ -708,7 +749,7 @@
<string>Show live feed</string>
</property>
<property name="icon">
<iconset resource="main_icons.qrc">
<iconset resource="//wsl.localhost/Ubuntu-22.04/home/james/robocup-software/soccer/src/soccer/ui/qt/main_icons.qrc">
<normaloff>:/icons/live.svg</normaloff>:/icons/live.svg</iconset>
</property>
<property name="iconSize">
Expand Down Expand Up @@ -1813,7 +1854,6 @@
</item>
</layout>
</widget>

<widget class="QWidget" name="joystickTab">
<attribute name="title">
<string>Joystick</string>
Expand Down Expand Up @@ -1975,7 +2015,7 @@
<height>671</height>
</rect>
</property>
<layout class="QGridLayout" name="positions_gridLayout" rowstretch="0" columnstretch="0,0,0,0" rowminimumheight="0">
<layout class="QGridLayout" name="positions_gridLayout" rowstretch="0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0" columnstretch="0,0,0,0" rowminimumheight="0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0">
<property name="leftMargin">
<number>11</number>
</property>
Expand Down Expand Up @@ -2058,7 +2098,6 @@
</property>
</widget>
</item>

<item row="1" column="1">
<widget class="QLabel" name="positionsLabel_1">
<property name="text">
Expand Down Expand Up @@ -2129,7 +2168,6 @@
</property>
</widget>
</item>

<item row="2" column="1">
<widget class="QLabel" name="positionsLabel_2">
<property name="text">
Expand Down Expand Up @@ -2200,7 +2238,6 @@
</property>
</widget>
</item>

<item row="3" column="1">
<widget class="QLabel" name="positionsLabel_3">
<property name="text">
Expand Down Expand Up @@ -2271,7 +2308,6 @@
</property>
</widget>
</item>

<item row="4" column="1">
<widget class="QLabel" name="positionsLabel_4">
<property name="text">
Expand Down Expand Up @@ -2342,7 +2378,6 @@
</property>
</widget>
</item>

<item row="5" column="1">
<widget class="QLabel" name="positionsLabel_5">
<property name="text">
Expand Down Expand Up @@ -2413,7 +2448,6 @@
</property>
</widget>
</item>

<item row="6" column="1">
<widget class="QLabel" name="positionsLabel_6">
<property name="text">
Expand Down Expand Up @@ -2484,7 +2518,6 @@
</property>
</widget>
</item>

<item row="7" column="1">
<widget class="QLabel" name="positionsLabel_7">
<property name="text">
Expand Down Expand Up @@ -2555,7 +2588,6 @@
</property>
</widget>
</item>

<item row="8" column="1">
<widget class="QLabel" name="positionsLabel_8">
<property name="text">
Expand Down Expand Up @@ -2626,7 +2658,6 @@
</property>
</widget>
</item>

<item row="9" column="1">
<widget class="QLabel" name="positionsLabel_9">
<property name="text">
Expand Down Expand Up @@ -2697,7 +2728,6 @@
</property>
</widget>
</item>

<item row="10" column="1">
<widget class="QLabel" name="positionsLabel_10">
<property name="text">
Expand Down Expand Up @@ -2768,7 +2798,6 @@
</property>
</widget>
</item>

<item row="11" column="1">
<widget class="QLabel" name="positionsLabel_11">
<property name="text">
Expand Down Expand Up @@ -2839,7 +2868,6 @@
</property>
</widget>
</item>

<item row="12" column="1">
<widget class="QLabel" name="positionsLabel_12">
<property name="text">
Expand Down Expand Up @@ -2910,7 +2938,6 @@
</property>
</widget>
</item>

<item row="13" column="1">
<widget class="QLabel" name="positionsLabel_13">
<property name="text">
Expand Down Expand Up @@ -2981,7 +3008,6 @@
</property>
</widget>
</item>

<item row="14" column="1">
<widget class="QLabel" name="positionsLabel_14">
<property name="text">
Expand Down Expand Up @@ -3052,7 +3078,6 @@
</property>
</widget>
</item>

<item row="15" column="1">
<widget class="QLabel" name="positionsLabel_15">
<property name="text">
Expand Down Expand Up @@ -3123,7 +3148,6 @@
</property>
</widget>
</item>

</layout>
</widget>
</widget>
Expand All @@ -3140,7 +3164,7 @@
<x>0</x>
<y>0</y>
<width>1331</width>
<height>24</height>
<height>25</height>
</rect>
</property>
<widget class="QMenu" name="menu_View">
Expand Down
2 changes: 2 additions & 0 deletions soccer/src/soccer/ui/qt/main_icons.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
<file>force_start.svg</file>
<file>kickoff_blue.svg</file>
<file>kickoff_yellow.svg</file>
<file>penalty_blue.svg</file>
<file>penalty_yellow.svg</file>
<file>direct_blue.svg</file>
<file>direct_yellow.svg</file>
<file>indirect_blue.svg</file>
Expand Down
Loading
Loading