15 QVBoxLayout, |
15 QVBoxLayout, |
16 QLabel, |
16 QLabel, |
17 QWidget, |
17 QWidget, |
18 ) |
18 ) |
19 |
19 |
|
20 try: |
|
21 from eric7.EricGui import EricPixmapCache |
|
22 except ImportError: |
|
23 from UI import PixmapCache as EricPixmapCache |
|
24 |
20 from .Ui_MqttUserPropertiesEditor import Ui_MqttUserPropertiesEditor |
25 from .Ui_MqttUserPropertiesEditor import Ui_MqttUserPropertiesEditor |
21 |
|
22 import UI.PixmapCache |
|
23 |
26 |
24 |
27 |
25 class MqttUserPropertiesEditor(QWidget, Ui_MqttUserPropertiesEditor): |
28 class MqttUserPropertiesEditor(QWidget, Ui_MqttUserPropertiesEditor): |
26 """ |
29 """ |
27 Class implementing an editor for MQTT v5 user properties. |
30 Class implementing an editor for MQTT v5 user properties. |
35 @type QWidget (optional) |
38 @type QWidget (optional) |
36 """ |
39 """ |
37 super().__init__(parent) |
40 super().__init__(parent) |
38 self.setupUi(self) |
41 self.setupUi(self) |
39 |
42 |
40 self.addButton.setIcon(UI.PixmapCache.getIcon("plus")) |
43 self.addButton.setIcon(EricPixmapCache.getIcon("plus")) |
41 self.deleteButton.setIcon(UI.PixmapCache.getIcon("minus")) |
44 self.deleteButton.setIcon(EricPixmapCache.getIcon("minus")) |
42 self.clearButton.setIcon(UI.PixmapCache.getIcon("editDelete")) |
45 self.clearButton.setIcon(EricPixmapCache.getIcon("editDelete")) |
43 |
46 |
44 self.clearButton.clicked.connect(self.clear) |
47 self.clearButton.clicked.connect(self.clear) |
45 |
48 |
46 self.deleteButton.setEnabled(False) |
49 self.deleteButton.setEnabled(False) |
47 |
50 |