1537 """ |
1537 """ |
1538 from .MqttUserPropertiesEditor import MqttUserPropertiesEditorDialog |
1538 from .MqttUserPropertiesEditor import MqttUserPropertiesEditorDialog |
1539 |
1539 |
1540 preferencesKey = "{0}Properties".format(propertiesType.capitalize()) |
1540 preferencesKey = "{0}Properties".format(propertiesType.capitalize()) |
1541 properties = self.__plugin.getPreferences(preferencesKey) |
1541 properties = self.__plugin.getPreferences(preferencesKey) |
1542 dlg = MqttUserPropertiesEditorDialog(header, properties.get(key, []), self) |
1542 dlg = MqttUserPropertiesEditorDialog( |
|
1543 header, properties.get(key, []), parent=self |
|
1544 ) |
1543 if dlg.exec() == QDialog.DialogCode.Accepted: |
1545 if dlg.exec() == QDialog.DialogCode.Accepted: |
1544 properties[key] = dlg.getProperties() |
1546 properties[key] = dlg.getProperties() |
1545 self.__plugin.setPreferences(preferencesKey, properties) |
1547 self.__plugin.setPreferences(preferencesKey, properties) |
1546 |
1548 |
1547 ####################################################################### |
1549 ####################################################################### |