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): |