QScintilla/MarkupProviders/HyperlinkMarkupDialog.py

changeset 5412
db5a520f69d3
parent 5407
f833f89571b8
child 6048
82ad8ec9548c
equal deleted inserted replaced
5411:a163fbbf2bea 5412:db5a520f69d3
4 # 4 #
5 5
6 """ 6 """
7 Module implementing a dialog to enter data to insert a hyperlink. 7 Module implementing a dialog to enter data to insert a hyperlink.
8 """ 8 """
9
10 from __future__ import unicode_literals
9 11
10 from PyQt5.QtCore import pyqtSlot 12 from PyQt5.QtCore import pyqtSlot
11 from PyQt5.QtWidgets import QDialog, QDialogButtonBox 13 from PyQt5.QtWidgets import QDialog, QDialogButtonBox
12 14
13 from .Ui_HyperlinkMarkupDialog import Ui_HyperlinkMarkupDialog 15 from .Ui_HyperlinkMarkupDialog import Ui_HyperlinkMarkupDialog
49 def __updateOkButton(self): 51 def __updateOkButton(self):
50 """ 52 """
51 Private method to update the state of the OK button. 53 Private method to update the state of the OK button.
52 """ 54 """
53 self.buttonBox.button(QDialogButtonBox.Ok).setEnabled( 55 self.buttonBox.button(QDialogButtonBox.Ok).setEnabled(
54 (bool(self.textEdit.text()) or self.__allowEmptyText) and 56 (bool(self.textEdit.text()) or self.__allowEmptyText) and
55 (bool(self.targetEdit.text()) or self.__allowEmptyTarget) 57 (bool(self.targetEdit.text()) or self.__allowEmptyTarget)
56 ) 58 )
57 59
58 @pyqtSlot(str) 60 @pyqtSlot(str)
59 def on_textEdit_textChanged(self, txt): 61 def on_textEdit_textChanged(self, txt):
64 @type str 66 @type str
65 """ 67 """
66 self.__updateOkButton() 68 self.__updateOkButton()
67 69
68 @pyqtSlot(str) 70 @pyqtSlot(str)
69 def on_targetEdit_textChanged(self, tyt): 71 def on_targetEdit_textChanged(self, txt):
70 """ 72 """
71 Private slot handling a change of the link target. 73 Private slot handling a change of the link target.
72 74
73 @param txt link target 75 @param txt link target
74 @type str 76 @type str

eric ide

mercurial