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
0d97eb9f
Commit
0d97eb9f
authored
Jan 08, 2023
by
Thorfin89
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ajout du potentiomètre de volume
parent
8e9a2c37
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
0 deletions
+13
-0
main.py
main.py
+5
-0
rw_pupitre.py
rw_pupitre.py
+8
-0
No files found.
main.py
View file @
0d97eb9f
...
...
@@ -29,6 +29,11 @@ class Radio(Pupitre):
def
radio_stop
(
self
):
self
.
player
.
stop
()
def
volume
(
self
,
vol
):
# on récupère la valeur du potentiomètre de volume
vol_audio
=
int
(
vol
)
self
.
player
.
audio_set_volume
(
vol_audio
)
app
=
Radio
()
# instancie l'application
app
.
boucle
()
rw_pupitre.py
View file @
0d97eb9f
...
...
@@ -10,6 +10,8 @@
# import ----------------------------------
import
tkinter
as
tk
from
tkinter
import
ttk
from
tkinter
import
Tk
,
RIGHT
,
LEFT
,
SOLID
,
VERTICAL
from
tkinter
import
Frame
,
Label
,
Button
,
messagebox
,
Scale
# classes ---------------------------------
...
...
@@ -39,6 +41,7 @@ class Pupitre:
# affichage de la radio en cours de lecture
lbl_radio
=
tk
.
Label
(
bandeau
,
text
=
"RADIO"
)
lbl_radio
.
pack
(
padx
=
20
,
pady
=
10
)
# boutons de commande
btn_play
=
ttk
.
Button
(
menu
,
text
=
"Play"
,
command
=
self
.
radio_play
)
btn_play
.
pack
()
...
...
@@ -46,3 +49,8 @@ class Pupitre:
btn_pause
.
pack
()
btn_stop
=
ttk
.
Button
(
menu
,
text
=
"Stop"
,
command
=
self
.
radio_stop
)
btn_stop
.
pack
()
# potar volume
potar
=
Scale
(
menu
,
from_
=
100
,
to
=
0
,
orient
=
VERTICAL
,
length
=
200
,
command
=
self
.
volume
)
potar
.
pack
(
padx
=
10
,
pady
=
5
)
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