From 736a566342b487661a6c6dadf483db21fb899a88 Mon Sep 17 00:00:00 2001 From: callumgassner <94658141+callumgassner@users.noreply.github.com> Date: Wed, 30 Oct 2024 15:17:47 +1100 Subject: [PATCH] =?UTF-8?q?owpolar:=20change=20=CE=B1=20value/TDM=20tilt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Added a validator to only allow integers between 0-90 to be entered. Changed the name from alpha value to TDM tilt to avoid confusion with absorptance Included a tooltip to clarify the meaning of this value --- orangecontrib/spectroscopy/widgets/owpolar.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/orangecontrib/spectroscopy/widgets/owpolar.py b/orangecontrib/spectroscopy/widgets/owpolar.py index 025719f74..19f9a47d5 100644 --- a/orangecontrib/spectroscopy/widgets/owpolar.py +++ b/orangecontrib/spectroscopy/widgets/owpolar.py @@ -10,6 +10,7 @@ import pandas as pd from AnyQt.QtCore import QItemSelectionModel, QItemSelection, QItemSelectionRange from AnyQt.QtWidgets import QFormLayout, QWidget, QListView, QLabel, QSizePolicy +from AnyQt.QtGui import QIntValidator from scipy.optimize import curve_fit @@ -575,8 +576,10 @@ def __init__(self): vbox.layout().addWidget(form) pbox = gui.widgetBox(vbox, sizePolicy=(QSizePolicy.Minimum, QSizePolicy.Fixed)) - gui.lineEdit(pbox, self, "alpha", "Alpha value", - callback=self._change_input, valueType=int) + gui.lineEdit(pbox, self, "alpha", u"TDM Tilt (\N{DEGREE SIGN})", + callback=self._change_input, valueType=int, + validator=QIntValidator(0, 90), tooltip= \ + "The angle (in degrees) between the long axis of the molecule and the transition dipole moment") gui.checkBox(pbox, self, 'invert_angles', label="Invert Angles", callback=self._change_input)