- updated the GUI fields for the Scale and Offset in the Object UI to allow only numeric values and operators in the list [/,*,+,-], spaces, dots and comma

This commit is contained in:
Marius Stanciu
2020-05-25 03:37:34 +03:00
committed by Marius
parent 84ffa68cb0
commit 5f81d415a0
4 changed files with 20 additions and 3 deletions

View File

@@ -667,6 +667,19 @@ class NumericalEvalEntry(EvalEntry):
validator = QtGui.QRegExpValidator(regex, self)
self.setValidator(validator)
class NumericalEvalTupleEntry(EvalEntry):
"""
Will evaluate the input and return a value. Accepts only float numbers and formulas using the operators: /,*,+,-,%
"""
def __init__(self):
super().__init__()
regex = QtCore.QRegExp("[0-9\/\*\+\-\%\.\s\,]*")
validator = QtGui.QRegExpValidator(regex, self)
self.setValidator(validator)
class FCSpinner(QtWidgets.QSpinBox):
returnPressed = QtCore.pyqtSignal()