diff options
author | Norbert Preining <norbert@preining.info> | 2021-12-28 03:01:00 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2021-12-28 03:01:00 +0000 |
commit | ecdf859b6ce481abfd530425dcf6f0f764bd0001 (patch) | |
tree | 13bc161dc046876ac6c92fce5f9f5034ba9aa573 /graphics/asymptote/GUI/SetCustomAnchor.py | |
parent | 790995b7e79697514364450bf9c04f1b8d500838 (diff) |
CTAN sync 202112280300
Diffstat (limited to 'graphics/asymptote/GUI/SetCustomAnchor.py')
-rw-r--r-- | graphics/asymptote/GUI/SetCustomAnchor.py | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/graphics/asymptote/GUI/SetCustomAnchor.py b/graphics/asymptote/GUI/SetCustomAnchor.py index ad5925cddb..e4414fecc4 100644 --- a/graphics/asymptote/GUI/SetCustomAnchor.py +++ b/graphics/asymptote/GUI/SetCustomAnchor.py @@ -1,20 +1,20 @@ #!/usr/bin/env python3 -import PyQt5.QtWidgets as Qw -import PyQt5.QtGui as Qg -import PyQt5.QtCore as Qc +import PyQt5.QtWidgets as QtWidgets +import PyQt5.QtGui as QtGui +import PyQt5.QtCore as QtCore from pyUIClass.setCustomAnchor import Ui_Dialog -class CustomAnchorDialog(Qw.QDialog): +class CustomAnchorDialog(QtWidgets.QDialog): def __init__(self): super().__init__() self.ui = Ui_Dialog() self.ui.setupUi(self) - self.ui.buttonBox.button(Qw.QDialogButtonBox.Reset).clicked.connect(self.resetDialog) + self.ui.buttonBox.button(QtWidgets.QDialogButtonBox.Reset).clicked.connect(self.resetDialog) - validator = Qg.QDoubleValidator() + validator = QtGui.QDoubleValidator() self.ui.lineEditX.setValidator(validator) self.ui.lineEditY.setValidator(validator) @@ -24,18 +24,18 @@ class CustomAnchorDialog(Qw.QDialog): def checkTextChanged(self, text): if str(text) not in {'.', '-', '.-', '-.'} and str(text): - self.ui.buttonBox.button(Qw.QDialogButtonBox.Ok).setEnabled(True) + self.ui.buttonBox.button(QtWidgets.QDialogButtonBox.Ok).setEnabled(True) else: - self.ui.buttonBox.button(Qw.QDialogButtonBox.Ok).setEnabled(False) + self.ui.buttonBox.button(QtWidgets.QDialogButtonBox.Ok).setEnabled(False) def getPoint(self): xPoint = float(self.ui.lineEditX.text()) yPoint = float(self.ui.lineEditY.text()) - return Qc.QPointF(xPoint, yPoint) + return QtCore.QPointF(xPoint, yPoint) def handleBtnBoxClick(self, button): - assert isinstance(button, Qw.QAbstractButton) + assert isinstance(button, QtWidgets.QAbstractButton) if button.text() == 'Reset': self.resetDialog() |