mirror of
https://github.com/m-labs/artiq.git
synced 2024-12-25 19:28:26 +08:00
dashboard/datasets: use scientific spinbox and increase number of decimals, closes #572
This commit is contained in:
parent
00402c9af9
commit
115204f2f4
@ -7,6 +7,7 @@ from PyQt5 import QtCore, QtWidgets
|
|||||||
from artiq.tools import short_format
|
from artiq.tools import short_format
|
||||||
from artiq.gui.tools import LayoutWidget, QRecursiveFilterProxyModel
|
from artiq.gui.tools import LayoutWidget, QRecursiveFilterProxyModel
|
||||||
from artiq.gui.models import DictSyncTreeSepModel
|
from artiq.gui.models import DictSyncTreeSepModel
|
||||||
|
from artiq.gui.scientific_spinbox import ScientificSpinBox
|
||||||
|
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
@ -50,10 +51,10 @@ class Editor(QtWidgets.QDialog):
|
|||||||
|
|
||||||
class NumberEditor(Editor):
|
class NumberEditor(Editor):
|
||||||
def get_edit_widget(self, initial_value):
|
def get_edit_widget(self, initial_value):
|
||||||
self.edit_widget = QtWidgets.QDoubleSpinBox()
|
self.edit_widget = ScientificSpinBox()
|
||||||
self.edit_widget.setMinimum(float("-inf"))
|
self.edit_widget.setDecimals(13)
|
||||||
self.edit_widget.setMaximum(float("+inf"))
|
self.edit_widget.setPrecision()
|
||||||
self.edit_widget.setDecimals(8)
|
self.edit_widget.setRelativeStep()
|
||||||
self.edit_widget.setValue(float(initial_value))
|
self.edit_widget.setValue(float(initial_value))
|
||||||
return self.edit_widget
|
return self.edit_widget
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user