DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
dunedaq
sourcecode
daqconf
python
daqconf
cider
widgets
edit_config_object.py
Go to the documentation of this file.
1
from
textual
import
on
2
from
textual.screen
import
Screen
3
from
textual.widgets
import
Input, Select, Button, Static
4
5
from
daqconf.cider.widgets.config_table
import
ConfigTable
6
from
daqconf.cider.widgets.configuration_controller
import
ConfigurationController
7
8
"""
9
Collection of objects that define the configuration object
10
"""
11
12
class
ConfigObjectSelectionPanel
(Static):
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
cider.widgets.edit_config_object.ConfigObjectSelectionPanel
Definition
edit_config_object.py:12
cider.widgets.edit_config_object.ConfigObjectSelectionPanel._controller
ConfigurationController _controller
Definition
edit_config_object.py:19
cider.widgets.edit_config_object.ConfigObjectSelectionPanel.Compose
Compose(self)
Definition
edit_config_object.py:15
cider.widgets.edit_config_object.ConfigObjectSelectionPanel.select_changed
None select_changed(self, Select.Changed event)
Definition
edit_config_object.py:29
Generated on Sat Jun 28 2025 for DUNE-DAQ by
1.12.0