Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
W
WebRadioPi
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Thorfin89
WebRadioPi
Commits
42f33525
Commit
42f33525
authored
Jan 29, 2023
by
Thorfin89
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ajout incrémentation pages
parent
9bd67245
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
42 additions
and
4 deletions
+42
-4
radios.csv
data/radios.csv
+26
-0
pupitre.py
pupitre.py
+16
-4
No files found.
data/radios.csv
View file @
42f33525
...
@@ -32,3 +32,29 @@ Boom FM_Ottawa,CA,Rock,http://live.leanstream.co/CJOTFM-MP3,boom-ottawa.png
...
@@ -32,3 +32,29 @@ Boom FM_Ottawa,CA,Rock,http://live.leanstream.co/CJOTFM-MP3,boom-ottawa.png
Boom FM_Ottawa,CA,Rock,http://live.leanstream.co/CJOTFM-MP3,boom-ottawa.png
Boom FM_Ottawa,CA,Rock,http://live.leanstream.co/CJOTFM-MP3,boom-ottawa.png
Boom FM_Ottawa,CA,Rock,http://live.leanstream.co/CJOTFM-MP3,boom-ottawa.png
Boom FM_Ottawa,CA,Rock,http://live.leanstream.co/CJOTFM-MP3,boom-ottawa.png
Boom FM_Ottawa,CA,Rock,http://live.leanstream.co/CJOTFM-MP3,boom-ottawa.png
Boom FM_Ottawa,CA,Rock,http://live.leanstream.co/CJOTFM-MP3,boom-ottawa.png
Boom FM_Ottawa,CA,Rock,http://live.leanstream.co/CJOTFM-MP3,boom-ottawa.png
Boom FM_Ottawa,CA,Rock,http://live.leanstream.co/CJOTFM-MP3,boom-ottawa.png
Boom FM_Ottawa,CA,Rock,http://live.leanstream.co/CJOTFM-MP3,boom-ottawa.png
Boom FM_Ottawa,CA,Rock,http://live.leanstream.co/CJOTFM-MP3,boom-ottawa.png
Boom FM_Ottawa,CA,Rock,http://live.leanstream.co/CJOTFM-MP3,boom-ottawa.png
Boom FM_Ottawa,CA,Rock,http://live.leanstream.co/CJOTFM-MP3,boom-ottawa.png
Boom FM_Ottawa,CA,Rock,http://live.leanstream.co/CJOTFM-MP3,boom-ottawa.png
Boom FM_Ottawa,CA,Rock,http://live.leanstream.co/CJOTFM-MP3,boom-ottawa.png
Boom FM_Ottawa,CA,Rock,http://live.leanstream.co/CJOTFM-MP3,boom-ottawa.png
Boom FM_Ottawa,CA,Rock,http://live.leanstream.co/CJOTFM-MP3,boom-ottawa.png
Boom FM_Ottawa,CA,Rock,http://live.leanstream.co/CJOTFM-MP3,boom-ottawa.png
Boom FM_Ottawa,CA,Rock,http://live.leanstream.co/CJOTFM-MP3,boom-ottawa.png
Boom FM_Ottawa,CA,Rock,http://live.leanstream.co/CJOTFM-MP3,boom-ottawa.png
Boom FM_Ottawa,CA,Rock,http://live.leanstream.co/CJOTFM-MP3,boom-ottawa.png
Boom FM_Ottawa,CA,Rock,http://live.leanstream.co/CJOTFM-MP3,boom-ottawa.png
Boom FM_Ottawa,CA,Rock,http://live.leanstream.co/CJOTFM-MP3,boom-ottawa.png
Boom FM_Ottawa,CA,Rock,http://live.leanstream.co/CJOTFM-MP3,boom-ottawa.png
Boom FM_Ottawa,CA,Rock,http://live.leanstream.co/CJOTFM-MP3,boom-ottawa.png
Boom FM_Ottawa,CA,Rock,http://live.leanstream.co/CJOTFM-MP3,boom-ottawa.png
Boom FM_Ottawa,CA,Rock,http://live.leanstream.co/CJOTFM-MP3,boom-ottawa.png
Boom FM_Ottawa,CA,Rock,http://live.leanstream.co/CJOTFM-MP3,boom-ottawa.png
Boom FM_Ottawa,CA,Rock,http://live.leanstream.co/CJOTFM-MP3,boom-ottawa.png
Boom FM_Ottawa,CA,Rock,http://live.leanstream.co/CJOTFM-MP3,boom-ottawa.png
Boom FM_Ottawa,CA,Rock,http://live.leanstream.co/CJOTFM-MP3,boom-ottawa.png
Boom FM_Ottawa,CA,Rock,http://live.leanstream.co/CJOTFM-MP3,boom-ottawa.png
Boom FM_Ottawa,CA,Rock,http://live.leanstream.co/CJOTFM-MP3,boom-ottawa.png
\ No newline at end of file
pupitre.py
View file @
42f33525
...
@@ -26,8 +26,8 @@ class Pupitre:
...
@@ -26,8 +26,8 @@ class Pupitre:
def
__init__
(
self
):
def
__init__
(
self
):
# calcul du nombre de radios contenues dans le fichier CSV
# calcul du nombre de radios contenues dans le fichier CSV
self
.
nb_radios
=
len
(
radios_list
)
self
.
nb_radios
=
len
(
radios_list
)
self
.
nb_pages
=
self
.
nb_radios
//
20
# retient la partie entière de la division
self
.
nb_pages
=
self
.
nb_radios
//
20
# partie entière de la division + 1
print
(
"Nombre de pages : "
+
str
(
self
.
nb_pages
))
self
.
current_page
=
0
# déclaration de la fenêtre principale
# déclaration de la fenêtre principale
self
.
root
=
tk
.
Tk
()
self
.
root
=
tk
.
Tk
()
...
@@ -199,11 +199,23 @@ class Pupitre:
...
@@ -199,11 +199,23 @@ class Pupitre:
def
pages
(
self
):
def
pages
(
self
):
# bouton page arrière
# bouton page arrière
btn_pageb
=
ttk
.
Button
(
self
.
bandeau
,
image
=
self
.
icon_pageb
,
command
=
None
,
style
=
"BW.TLabel"
)
btn_pageb
=
ttk
.
Button
(
self
.
bandeau
,
image
=
self
.
icon_pageb
,
command
=
self
.
page_back
,
style
=
"BW.TLabel"
)
btn_pageb
.
place
(
width
=
40
,
height
=
32
,
x
=
5
,
y
=
10
)
btn_pageb
.
place
(
width
=
40
,
height
=
32
,
x
=
5
,
y
=
10
)
# bouton page avant
# bouton page avant
btn_pagef
=
ttk
.
Button
(
self
.
bandeau
,
image
=
self
.
icon_pagef
,
command
=
None
,
style
=
"BW.TLabel"
)
btn_pagef
=
ttk
.
Button
(
self
.
bandeau
,
image
=
self
.
icon_pagef
,
command
=
self
.
page_forward
,
style
=
"BW.TLabel"
)
btn_pagef
.
place
(
width
=
40
,
height
=
32
,
x
=
455
,
y
=
10
)
btn_pagef
.
place
(
width
=
40
,
height
=
32
,
x
=
455
,
y
=
10
)
def
page_back
(
self
):
self
.
current_page
-=
1
if
self
.
current_page
<
0
:
self
.
current_page
=
self
.
nb_pages
print
(
self
.
current_page
)
def
page_forward
(
self
):
self
.
current_page
+=
1
if
self
.
current_page
>
self
.
nb_pages
:
self
.
current_page
=
0
print
(
self
.
current_page
)
def
boucle
(
self
):
def
boucle
(
self
):
self
.
root
.
mainloop
()
self
.
root
.
mainloop
()
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment