added table manager, to manage tables and handle the treeview
This commit is contained in:
20
tools/cfg_util/cfg_util_qt/commands/__init__.py
Normal file
20
tools/cfg_util/cfg_util_qt/commands/__init__.py
Normal file
@@ -0,0 +1,20 @@
|
||||
from tools.cfg_util.cfg_util_qt.layout import window
|
||||
from tools.cfg_util.cfg_util_qt.tables import update_tree
|
||||
from tools.cfg_util.cfg_util_qt.imgs import TkImages
|
||||
|
||||
|
||||
async def btn_light(ips: list):
|
||||
_table = window["cmd_table"].Widget
|
||||
data = []
|
||||
iids = _table.get_children()
|
||||
for idx in ips:
|
||||
item = _table.item(iids[idx])
|
||||
data.append(
|
||||
{
|
||||
"IP": item["values"][0],
|
||||
"Model": item["values"][1],
|
||||
"Command Output": item["values"][2],
|
||||
"Light": True,
|
||||
}
|
||||
)
|
||||
await update_tree(data)
|
||||
Reference in New Issue
Block a user