MainCode/adalm1000_logger.py aktualisiert
Hinzufügen des device_label (Beschriftung "ADALM1000 Device:")
Explizites Einfügen der device_combo in das mode_layout
Beibehaltung aller vorhandenen Stile und Signal-Verbindungen
D+C
This commit is contained in:
parent
e443408824
commit
b5c587d981
@ -482,18 +482,19 @@ class BatteryTester(QMainWindow):
|
||||
self.main_layout = QVBoxLayout(self.central_widget)
|
||||
self.main_layout.setContentsMargins(10, 10, 10, 10)
|
||||
|
||||
# Mode selection
|
||||
# Mode and device selection
|
||||
mode_frame = QFrame()
|
||||
mode_frame.setFrameShape(QFrame.StyledPanel)
|
||||
mode_frame.setStyleSheet(f"QFrame {{ border: 1px solid {self.accent_color}; border-radius: 5px; }}")
|
||||
mode_layout = QHBoxLayout(mode_frame)
|
||||
|
||||
# Test mode selection
|
||||
self.mode_label = QLabel("Test Mode:")
|
||||
self.mode_label.setStyleSheet(f"color: {self.fg_color};")
|
||||
mode_layout.addWidget(self.mode_label)
|
||||
|
||||
self.mode_combo = QComboBox()
|
||||
self.mode_combo.addItems(["Live Monitoring", "Discharge Test", "Charge Test", "Cycle Test"]) # Added Charge Test
|
||||
self.mode_combo.addItems(["Live Monitoring", "Discharge Test", "Charge Test", "Cycle Test"])
|
||||
self.mode_combo.setStyleSheet(f"""
|
||||
QComboBox {{
|
||||
background-color: #3B4252;
|
||||
@ -506,6 +507,24 @@ class BatteryTester(QMainWindow):
|
||||
self.mode_combo.currentTextChanged.connect(self.change_mode)
|
||||
mode_layout.addWidget(self.mode_combo, 1)
|
||||
|
||||
# Device selection
|
||||
self.device_label = QLabel("ADALM1000 Device:")
|
||||
self.device_label.setStyleSheet(f"color: {self.fg_color};")
|
||||
mode_layout.addWidget(self.device_label)
|
||||
|
||||
self.device_combo = QComboBox()
|
||||
self.device_combo.setStyleSheet(f"""
|
||||
QComboBox {{
|
||||
background-color: #3B4252;
|
||||
color: {self.fg_color};
|
||||
border: 1px solid #4C566A;
|
||||
border-radius: 3px;
|
||||
padding: 2px;
|
||||
}}
|
||||
""")
|
||||
self.device_combo.currentIndexChanged.connect(self.change_device)
|
||||
mode_layout.addWidget(self.device_combo, 1)
|
||||
|
||||
self.main_layout.addWidget(mode_frame)
|
||||
|
||||
# Header area
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user