summaryrefslogtreecommitdiff
path: root/ui/config_dialog.py
diff options
context:
space:
mode:
Diffstat (limited to 'ui/config_dialog.py')
-rw-r--r--ui/config_dialog.py46
1 files changed, 3 insertions, 43 deletions
diff --git a/ui/config_dialog.py b/ui/config_dialog.py
index 4976b36..bafac24 100644
--- a/ui/config_dialog.py
+++ b/ui/config_dialog.py
@@ -4,8 +4,8 @@ ui/config_dialog.py — Device configuration dialog (tabbed).
from PyQt6.QtWidgets import (
QDialog, QVBoxLayout, QHBoxLayout, QTabWidget,
- QWidget, QFormLayout, QGroupBox, QScrollArea,
- QLabel, QLineEdit, QDoubleSpinBox, QCheckBox,
+ QWidget, QFormLayout, QScrollArea,
+ QLabel, QLineEdit,
QPushButton,
)
from PyQt6.QtCore import Qt
@@ -37,10 +37,7 @@ class DeviceConfigDialog(QDialog):
scroll.setWidget(cfg_widget)
tabs.addTab(scroll, "Hardware / Backend")
- # ── Tab 2: Channel settings ───────────────────────────────────
- tabs.addTab(self._channel_tab(), "Channels")
-
- # ── Tab 3: Device info ────────────────────────────────────────
+ # ── Tab 2: Device info ────────────────────────────────────────
tabs.addTab(self._info_tab(), "Info")
layout.addWidget(tabs)
@@ -53,43 +50,6 @@ class DeviceConfigDialog(QDialog):
btn_row.addWidget(close_btn)
layout.addLayout(btn_row)
- def _channel_tab(self):
- w = QScrollArea()
- w.setWidgetResizable(True)
- container = QWidget()
- layout = QVBoxLayout(container)
-
- for ch in self.device.info.channels:
- grp = QGroupBox(f"{ch.channel_id} — {ch.name}")
- form = QFormLayout(grp)
-
- name_e = QLineEdit(ch.name)
- unit_e = QLineEdit(ch.unit)
- en_chk = QCheckBox()
- en_chk.setChecked(ch.enabled)
-
- form.addRow("Name:", name_e)
- form.addRow("Unit:", unit_e)
- form.addRow("Enabled:", en_chk)
-
- apply = QPushButton("Apply")
- apply.setObjectName("applyButton")
-
- def _make_apply(c, ne, ue, ec):
- def _do():
- c.name = ne.text()
- c.unit = ue.text()
- c.enabled = ec.isChecked()
- return _do
-
- apply.clicked.connect(_make_apply(ch, name_e, unit_e, en_chk))
- form.addRow(apply)
- layout.addWidget(grp)
-
- layout.addStretch()
- w.setWidget(container)
- return w
-
def _info_tab(self):
w = QWidget()
form = QFormLayout(w)