DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
quit_screen.QuitScreen Class Reference
Inheritance diagram for quit_screen.QuitScreen:
[legend]
Collaboration diagram for quit_screen.QuitScreen:
[legend]

Public Member Functions

ComposeResult compose (self)
 
None on_button_pressed (self, Button.Pressed event)
 

Static Public Attributes

str css_file_path = f"{environ.get('DAQCONF_SHARE')}/config/textual_dbe/textual_css"
 
str CSS_PATH = f"{css_file_path}/quit_screen.tcss"
 

Detailed Description

Screen with a dialog to quit.

Definition at line 8 of file quit_screen.py.

Member Function Documentation

◆ 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()

Member Data Documentation

◆ css_file_path

str quit_screen.QuitScreen.css_file_path = f"{environ.get('DAQCONF_SHARE')}/config/textual_dbe/textual_css"
static

Definition at line 10 of file quit_screen.py.

◆ CSS_PATH

str quit_screen.QuitScreen.CSS_PATH = f"{css_file_path}/quit_screen.tcss"
static

Definition at line 12 of file quit_screen.py.


The documentation for this class was generated from the following file: