Add native QCustomPlot renderer and shared plot adapters

This commit is contained in:
2026-10-07 11:33:14 +03:00
parent 90046de7fd
commit 79b0cde20e
23 changed files with 44815 additions and 35 deletions
@@ -0,0 +1,24 @@
"""Tektronix-style record-length selector, including instrument readback."""
try:
from PySide6.QtWidgets import QComboBox
except ImportError:
from PySide2.QtWidgets import QComboBox
from set_devices.tektronix_presets import RECORD_LENGTHS
class RecordLengthBox(QComboBox):
def __init__(self, parent=None):
super().__init__(parent)
for value in RECORD_LENGTHS:
self.addItem(f"{value:,}".replace(",", " ") + " точек", value)
def value(self):
return int(self.currentData())
def setValue(self, value):
value = int(value)
index = self.findData(value)
if index < 0:
self.addItem(f"{value:,}".replace(",", " ") + " точек", value)
index = self.count() - 1
self.setCurrentIndex(index)