DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
edit_config_object.py
Go to the documentation of this file.
1from textual import on
2from textual.screen import Screen
3from textual.widgets import Input, Select, Button, Static
4
5from daqconf.cider.widgets.config_table import ConfigTable
6from daqconf.cider.widgets.configuration_controller import ConfigurationController
7
8"""
9Collection of objects that define the configuration object
10"""
11
13 """Configurable object selection panel"""
14
15 def Compose(self):
16 """Compose the app
17 """
18 main_screen = self.app.get_screen("main")
19 self._controller: ConfigurationController = main_screen.query_one(ConfigurationController)
20
21 if self._controller.handler is None:
22 raise Exception("Configuration handler not found")
23
24 yield Input(placeholder="Enter new object name", id="new_object_name")
25 yield Select.from_values(list(self._controller.handler.configuration_handler.get_all_conf_classes().keys()), id="new_object_class")
26 yield Button("Select", id="select_object")
27
28 @on(Select.Changed)
29 def select_changed(self, event: Select.Changed) -> None:
30 pass