Screen with a dialog to quit.
Definition at line 8 of file quit_screen.py.
◆ compose()
ComposeResult quit_screen.QuitScreen.compose |
( |
| self | ) |
|
Definition at line 14 of file quit_screen.py.
14 def compose(self) -> ComposeResult:
15 yield Grid(
16 Label("Are you sure you want to quit? [Any unsaved changes will be lost!]", id="question"),
17 Button("Save and Quit", variant="success", id="save_quit"),
18 Button("Quit", variant="error", id="quit"),
19 Button("Cancel", variant="primary", id="cancel"),
20 id="dialog",
21 )
22
◆ on_button_pressed()
None quit_screen.QuitScreen.on_button_pressed |
( |
| self, |
|
|
Button.Pressed | event ) |
Definition at line 23 of file quit_screen.py.
23 def on_button_pressed(self, event: Button.Pressed) -> None:
24 if event.button.id == "quit":
25 self.app.exit()
26 elif event.button.id == "save_quit":
27 main_screen = self.app.get_screen("main")
28 config_controller = main_screen.query_one("ConfigurationController")
29 config_controller.commit_configuration("Update configuration")
30 self.app.exit()
31 else:
32 self.app.pop_screen()
◆ css_file_path
str quit_screen.QuitScreen.css_file_path = f"{environ.get('DAQCONF_SHARE')}/config/textual_dbe/textual_css" |
|
static |
◆ CSS_PATH
str quit_screen.QuitScreen.CSS_PATH = f"{css_file_path}/quit_screen.tcss" |
|
static |
The documentation for this class was generated from the following file:
- /github/workspace/dunedaq/sourcecode/daqconf/python/daqconf/cider/widgets/popups/quit_screen.py