4 # |
4 # |
5 |
5 |
6 """ |
6 """ |
7 Module implementing a dialog to enter MQTT connection options. |
7 Module implementing a dialog to enter MQTT connection options. |
8 """ |
8 """ |
9 |
|
10 from __future__ import unicode_literals |
|
11 |
9 |
12 from PyQt5.QtCore import pyqtSlot, QUuid |
10 from PyQt5.QtCore import pyqtSlot, QUuid |
13 from PyQt5.QtWidgets import QDialog, QDialogButtonBox, QAbstractButton |
11 from PyQt5.QtWidgets import QDialog, QDialogButtonBox, QAbstractButton |
14 |
12 |
15 from E5Gui import E5MessageBox |
13 from E5Gui import E5MessageBox |
54 |
52 |
55 def __updateOkButton(self): |
53 def __updateOkButton(self): |
56 """ |
54 """ |
57 Private method to update the enabled state of the OK button. |
55 Private method to update the enabled state of the OK button. |
58 """ |
56 """ |
59 if self.clientIdEdit.text() == "" and \ |
57 if ( |
60 not self.cleanSessionCheckBox.isChecked(): |
58 self.clientIdEdit.text() == "" and |
|
59 not self.cleanSessionCheckBox.isChecked() |
|
60 ): |
61 enable = False |
61 enable = False |
62 E5MessageBox.critical( |
62 E5MessageBox.critical( |
63 self, |
63 self, |
64 self.tr("Invalid Connection Parameters"), |
64 self.tr("Invalid Connection Parameters"), |
65 self.tr("""An empty Client ID requires a clean session.""")) |
65 self.tr("""An empty Client ID requires a clean session.""")) |