_clockalarm.UI package¶
Submodules¶
_clockalarm.UI.AlertListWidget module¶
-
class
_clockalarm.UI.AlertListWidget.
AlertListWidget
[source]¶ Bases:
PyQt5.QtWidgets.QTableWidget
Visual list displaying the Alerts from the database.
_clockalarm.UI.ColorSelectorWidget module¶
-
class
_clockalarm.UI.ColorSelectorWidget.
ColorSelectorWidget
(hex_color=None, parent=None)[source]¶ Bases:
PyQt5.QtWidgets.QWidget
Custom widget to selected a color for the notification
Called when the color_select_button is clicked.
Choose a color from a palette.
_clockalarm.UI.MainWindow module¶
-
class
_clockalarm.UI.MainWindow.
MainWindow
(application, *args)[source]¶ Bases:
PyQt5.QtWidgets.QMainWindow
Main window interface extending
PyQt5.QtWidgets.QMainWindow
.Shows a list of all the alerts retrieved from a JSON file.
-
application
¶ The main application
-
*args
The parent pointer or window flags
-
add_simple_alert
()[source]¶ Creates a
SimpleAlertEditWidget
and shows it to the user.
-
closeEvent
(event)[source]¶ Overrides
closeEvent()
method.Allows to intercept the window closing event.
-
edit_simple_alert
()[source]¶ Edits the selected alert and shows an SimpleAlertEditWidget to the user.
Mutes the alerts and updates the mute button.
-
_clockalarm.UI.NotificationWidget module¶
-
class
_clockalarm.UI.NotificationWidget.
NotificationWidget
(geometry, notification, parent=None)[source]¶ Bases:
PyQt5.QtWidgets.QWidget
Notification widget
-
geometry
¶ The position and size of the widget on the screen
-
notification
¶ The notification
-
init_ui
(geom)[source]¶ Helper method that sets the style of the NotificationWidget.
-
geom
¶ The position and size of the widget on the screen
-
-
popup_close
¶
-
_clockalarm.UI.SimpleAlertEditWidget module¶
-
class
_clockalarm.UI.SimpleAlertEditWidget.
SimpleAlertEditWidget
(alert: _clockalarm.SimpleAlert.SimpleAlert = None)[source]¶ Bases:
PyQt5.QtWidgets.QWidget
Widget allowing to create or edit a
SimpleAlert
.-
alert
¶ A
SimpleAlert
to edit, default None
-
init_ui
(alert)[source]¶ Initialization helper method.
-
alert
The
SimpleAlert
to edit
-
-
_clockalarm.UI.SoundSelectorWidget module¶
-
class
_clockalarm.UI.SoundSelectorWidget.
SoundSelectorWidget
(sound_name: str = None, parent=None)[source]¶ Bases:
PyQt5.QtWidgets.QWidget
Costum widget to selected a sound
Select a wave file and import it in the application sound folder.
Called when the sound_select_button is clicked. Get a wave sound file path from the file explorer.
-
load_sound
(sound_path: str)[source]¶ Load the given .wave sound file in the application folder
If the file already exist in the sound folder of the app, nothing append. If a file with the same name already exist in the sound folder, he is overwritten.
-
sound_path
¶ the full path of the sound file.
- Exceptions:
- ValueError: If the given sound_path isn’t a valid wave sound.
-