Chargement en cours main.py +5 −0 Changes for main.py: 5 added lines, 0 removed line. Numéro de ligne d'origine Ligne d'origine Numéro de ligne de diff Ligne de diff Chargement en cours @@ -29,6 +29,11 @@ class Radio(Pupitre): def radio_stop(self): def radio_stop(self): self.player.stop() 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 = Radio() # instancie l'application app.boucle() app.boucle() rw_pupitre.py +8 −0 Changes for rw_pupitre.py: 8 added lines, 0 removed line. Numéro de ligne d'origine Ligne d'origine Numéro de ligne de diff Ligne de diff Chargement en cours @@ -10,6 +10,8 @@ # import ---------------------------------- # import ---------------------------------- import tkinter as tk import tkinter as tk from tkinter import ttk from tkinter import ttk from tkinter import Tk, RIGHT, LEFT, SOLID, VERTICAL from tkinter import Frame, Label, Button, messagebox, Scale # classes --------------------------------- # classes --------------------------------- Chargement en cours Chargement en cours @@ -39,6 +41,7 @@ class Pupitre: # affichage de la radio en cours de lecture # affichage de la radio en cours de lecture lbl_radio = tk.Label(bandeau, text="RADIO") lbl_radio = tk.Label(bandeau, text="RADIO") lbl_radio.pack(padx=20, pady=10) lbl_radio.pack(padx=20, pady=10) # boutons de commande # boutons de commande btn_play = ttk.Button(menu, text="Play", command=self.radio_play) btn_play = ttk.Button(menu, text="Play", command=self.radio_play) btn_play.pack() btn_play.pack() Chargement en cours @@ -46,3 +49,8 @@ class Pupitre: btn_pause.pack() btn_pause.pack() btn_stop = ttk.Button(menu, text="Stop", command=self.radio_stop) btn_stop = ttk.Button(menu, text="Stop", command=self.radio_stop) btn_stop.pack() 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) Chargement en cours
main.py +5 −0 Changes for main.py: 5 added lines, 0 removed line. Numéro de ligne d'origine Ligne d'origine Numéro de ligne de diff Ligne de diff Chargement en cours @@ -29,6 +29,11 @@ class Radio(Pupitre): def radio_stop(self): def radio_stop(self): self.player.stop() 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 = Radio() # instancie l'application app.boucle() app.boucle()
rw_pupitre.py +8 −0 Changes for rw_pupitre.py: 8 added lines, 0 removed line. Numéro de ligne d'origine Ligne d'origine Numéro de ligne de diff Ligne de diff Chargement en cours @@ -10,6 +10,8 @@ # import ---------------------------------- # import ---------------------------------- import tkinter as tk import tkinter as tk from tkinter import ttk from tkinter import ttk from tkinter import Tk, RIGHT, LEFT, SOLID, VERTICAL from tkinter import Frame, Label, Button, messagebox, Scale # classes --------------------------------- # classes --------------------------------- Chargement en cours Chargement en cours @@ -39,6 +41,7 @@ class Pupitre: # affichage de la radio en cours de lecture # affichage de la radio en cours de lecture lbl_radio = tk.Label(bandeau, text="RADIO") lbl_radio = tk.Label(bandeau, text="RADIO") lbl_radio.pack(padx=20, pady=10) lbl_radio.pack(padx=20, pady=10) # boutons de commande # boutons de commande btn_play = ttk.Button(menu, text="Play", command=self.radio_play) btn_play = ttk.Button(menu, text="Play", command=self.radio_play) btn_play.pack() btn_play.pack() Chargement en cours @@ -46,3 +49,8 @@ class Pupitre: btn_pause.pack() btn_pause.pack() btn_stop = ttk.Button(menu, text="Stop", command=self.radio_stop) btn_stop = ttk.Button(menu, text="Stop", command=self.radio_stop) btn_stop.pack() 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)