README.md 1.03 KB
Newer Older
Antoine Lima's avatar
Antoine Lima committed
1
2
# source-rasp

Antoine Lima's avatar
Antoine Lima committed
3
4
5
6
7
8
9
10
11
12
Source code for the foosball embedded Raspberry PI. It runs the UI and manages games.

The UI is done with PyQt.

## Edit the UI
* Download qt4-designer (`sudo apt-get install qt4-designer`)
* Edit .ui files with qt4-designer
* Convert the .ui files to python sources (`pyuic5 file.ui -o file_ui.py`)
* Done!

Antoine Lima's avatar
UI v0.3  
Antoine Lima committed
13
14
15
16
17
## UI Organisation
The software is composed of only one window in which "panels" change. There are currently 3 panels:
* The main menu, default panel shown on startup
* The game itself, containing the scores, timers, ...
* The options menu, to configure some options
Antoine Lima's avatar
Antoine Lima committed
18

Antoine Lima's avatar
UI v0.3  
Antoine Lima committed
19
20
21
22
23
Those panels are stacked (in a QStackedWidget) and only one of them can be shown at a time.
We can then "swap" from one to the other, making sure to unload the previous and to load the )
For better control over what is being run, panels can be unloaded when swapped and re-loaded when shown again.
This can be done through two overloadable functions: load and unload.
Each panel (inheriting from the Panel class) can use those to perform actions when shown or hidden