-
Notifications
You must be signed in to change notification settings - Fork 2
/
dev_config.py
212 lines (204 loc) · 10.8 KB
/
dev_config.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
# Form implementation generated from reading ui file 'dev_config.ui'
#
# Created by: PyQt6 UI code generator 6.1.0
#
# WARNING: Any manual changes made to this file will be lost when pyuic6 is
# run again. Do not edit this file unless you know what you are doing.
from PyQt6 import QtCore, QtGui, QtWidgets
class Ui_Dialog(object):
def setupUi(self, Dialog):
Dialog.setObjectName("Dialog")
Dialog.resize(771, 393)
self.verticalLayout = QtWidgets.QVBoxLayout(Dialog)
self.verticalLayout.setObjectName("verticalLayout")
self.frame = QtWidgets.QFrame(Dialog)
self.frame.setFrameShape(QtWidgets.QFrame.Shape.StyledPanel)
self.frame.setFrameShadow(QtWidgets.QFrame.Shadow.Raised)
self.frame.setObjectName("frame")
self.verticalLayout_2 = QtWidgets.QVBoxLayout(self.frame)
self.verticalLayout_2.setObjectName("verticalLayout_2")
self.label_13 = QtWidgets.QLabel(self.frame)
font = QtGui.QFont()
font.setPointSize(11)
font.setBold(True)
font.setWeight(75)
self.label_13.setFont(font)
self.label_13.setObjectName("label_13")
self.verticalLayout_2.addWidget(self.label_13)
self.gridLayout_cmds = QtWidgets.QGridLayout()
self.gridLayout_cmds.setObjectName("gridLayout_cmds")
self.Topic = QtWidgets.QLineEdit(self.frame)
self.Topic.setObjectName("Topic")
self.gridLayout_cmds.addWidget(self.Topic, 3, 4, 1, 1)
self.label_5 = QtWidgets.QLabel(self.frame)
self.label_5.setObjectName("label_5")
self.gridLayout_cmds.addWidget(self.label_5, 2, 3, 1, 1)
self.MqttPort = QtWidgets.QLineEdit(self.frame)
self.MqttPort.setObjectName("MqttPort")
self.gridLayout_cmds.addWidget(self.MqttPort, 2, 4, 1, 1)
spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum)
self.gridLayout_cmds.addItem(spacerItem, 1, 2, 1, 1)
self.label_4 = QtWidgets.QLabel(self.frame)
self.label_4.setObjectName("label_4")
self.gridLayout_cmds.addWidget(self.label_4, 1, 3, 1, 1)
self.FriendlyName = QtWidgets.QLineEdit(self.frame)
self.FriendlyName.setObjectName("FriendlyName")
self.gridLayout_cmds.addWidget(self.FriendlyName, 5, 4, 1, 1)
self.label_2 = QtWidgets.QLabel(self.frame)
self.label_2.setObjectName("label_2")
self.gridLayout_cmds.addWidget(self.label_2, 2, 0, 1, 1)
self.FullTopic = QtWidgets.QLineEdit(self.frame)
self.FullTopic.setEnabled(True)
self.FullTopic.setObjectName("FullTopic")
self.gridLayout_cmds.addWidget(self.FullTopic, 4, 4, 1, 1)
self.label_3 = QtWidgets.QLabel(self.frame)
font = QtGui.QFont()
font.setBold(True)
font.setWeight(75)
self.label_3.setFont(font)
self.label_3.setObjectName("label_3")
self.gridLayout_cmds.addWidget(self.label_3, 0, 3, 1, 1)
self.password1 = QtWidgets.QLineEdit(self.frame)
self.password1.setEchoMode(QtWidgets.QLineEdit.EchoMode.PasswordEchoOnEdit)
self.password1.setObjectName("password1")
self.gridLayout_cmds.addWidget(self.password1, 2, 1, 1, 1)
self.label = QtWidgets.QLabel(self.frame)
self.label.setObjectName("label")
self.gridLayout_cmds.addWidget(self.label, 1, 0, 1, 1)
self.label_6 = QtWidgets.QLabel(self.frame)
self.label_6.setObjectName("label_6")
self.gridLayout_cmds.addWidget(self.label_6, 3, 3, 1, 1)
self.label_7 = QtWidgets.QLabel(self.frame)
self.label_7.setEnabled(True)
self.label_7.setObjectName("label_7")
self.gridLayout_cmds.addWidget(self.label_7, 4, 3, 1, 1)
self.MqttHost = QtWidgets.QLineEdit(self.frame)
self.MqttHost.setObjectName("MqttHost")
self.gridLayout_cmds.addWidget(self.MqttHost, 1, 4, 1, 1)
self.label_9 = QtWidgets.QLabel(self.frame)
self.label_9.setObjectName("label_9")
self.gridLayout_cmds.addWidget(self.label_9, 6, 3, 1, 1)
self.label_12 = QtWidgets.QLabel(self.frame)
font = QtGui.QFont()
font.setBold(True)
font.setWeight(75)
self.label_12.setFont(font)
self.label_12.setObjectName("label_12")
self.gridLayout_cmds.addWidget(self.label_12, 0, 0, 1, 1)
self.MqttPassword = QtWidgets.QLineEdit(self.frame)
self.MqttPassword.setObjectName("MqttPassword")
self.gridLayout_cmds.addWidget(self.MqttPassword, 7, 4, 1, 1)
self.label_8 = QtWidgets.QLabel(self.frame)
self.label_8.setObjectName("label_8")
self.gridLayout_cmds.addWidget(self.label_8, 5, 3, 1, 1)
self.MqttUser = QtWidgets.QLineEdit(self.frame)
self.MqttUser.setObjectName("MqttUser")
self.gridLayout_cmds.addWidget(self.MqttUser, 6, 4, 1, 1)
self.ssid1 = QtWidgets.QLineEdit(self.frame)
self.ssid1.setObjectName("ssid1")
self.gridLayout_cmds.addWidget(self.ssid1, 1, 1, 1, 1)
self.btn_save_conf = QtWidgets.QPushButton(self.frame)
self.btn_save_conf.setEnabled(False)
self.btn_save_conf.setObjectName("btn_save_conf")
self.gridLayout_cmds.addWidget(self.btn_save_conf, 10, 4, 1, 1)
self.label_11 = QtWidgets.QLabel(self.frame)
self.label_11.setObjectName("label_11")
self.gridLayout_cmds.addWidget(self.label_11, 10, 0, 1, 1)
self.label_10 = QtWidgets.QLabel(self.frame)
self.label_10.setObjectName("label_10")
self.gridLayout_cmds.addWidget(self.label_10, 7, 3, 1, 1)
spacerItem1 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Expanding)
self.gridLayout_cmds.addItem(spacerItem1, 9, 0, 1, 1)
self.backlog = QtWidgets.QLineEdit(self.frame)
self.backlog.setInputMask("")
self.backlog.setText("")
self.backlog.setObjectName("backlog")
self.gridLayout_cmds.addWidget(self.backlog, 10, 1, 1, 3)
self.label_15 = QtWidgets.QLabel(self.frame)
font = QtGui.QFont()
font.setBold(True)
font.setWeight(75)
self.label_15.setFont(font)
self.label_15.setObjectName("label_15")
self.gridLayout_cmds.addWidget(self.label_15, 4, 0, 1, 1)
self.label_16 = QtWidgets.QLabel(self.frame)
self.label_16.setObjectName("label_16")
self.gridLayout_cmds.addWidget(self.label_16, 5, 0, 1, 1)
self.DeviceName = QtWidgets.QLineEdit(self.frame)
self.DeviceName.setObjectName("DeviceName")
self.gridLayout_cmds.addWidget(self.DeviceName, 5, 1, 1, 1)
self.label_17 = QtWidgets.QLabel(self.frame)
self.label_17.setObjectName("label_17")
self.gridLayout_cmds.addWidget(self.label_17, 6, 0, 1, 1)
self.GroupTopic = QtWidgets.QLineEdit(self.frame)
self.GroupTopic.setObjectName("GroupTopic")
self.gridLayout_cmds.addWidget(self.GroupTopic, 6, 1, 1, 1)
self.label_18 = QtWidgets.QLabel(self.frame)
self.label_18.setObjectName("label_18")
self.gridLayout_cmds.addWidget(self.label_18, 7, 0, 1, 1)
self.OtaUrl = QtWidgets.QLineEdit(self.frame)
self.OtaUrl.setObjectName("OtaUrl")
self.gridLayout_cmds.addWidget(self.OtaUrl, 7, 1, 1, 1)
self.verticalLayout_2.addLayout(self.gridLayout_cmds)
spacerItem2 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Expanding)
self.verticalLayout_2.addItem(spacerItem2)
self.lay_button = QtWidgets.QVBoxLayout()
self.lay_button.setObjectName("lay_button")
self.label_14 = QtWidgets.QLabel(self.frame)
self.label_14.setObjectName("label_14")
self.lay_button.addWidget(self.label_14)
self.btn_send_conf = QtWidgets.QPushButton(self.frame)
self.btn_send_conf.setEnabled(True)
self.btn_send_conf.setObjectName("btn_send_conf")
self.lay_button.addWidget(self.btn_send_conf)
self.verticalLayout_2.addLayout(self.lay_button)
self.verticalLayout.addWidget(self.frame)
self.retranslateUi(Dialog)
QtCore.QMetaObject.connectSlotsByName(Dialog)
Dialog.setTabOrder(self.ssid1, self.password1)
Dialog.setTabOrder(self.password1, self.DeviceName)
Dialog.setTabOrder(self.DeviceName, self.GroupTopic)
Dialog.setTabOrder(self.GroupTopic, self.OtaUrl)
Dialog.setTabOrder(self.OtaUrl, self.MqttHost)
Dialog.setTabOrder(self.MqttHost, self.MqttPort)
Dialog.setTabOrder(self.MqttPort, self.Topic)
Dialog.setTabOrder(self.Topic, self.FullTopic)
Dialog.setTabOrder(self.FullTopic, self.FriendlyName)
Dialog.setTabOrder(self.FriendlyName, self.MqttUser)
Dialog.setTabOrder(self.MqttUser, self.MqttPassword)
Dialog.setTabOrder(self.MqttPassword, self.backlog)
Dialog.setTabOrder(self.backlog, self.btn_save_conf)
Dialog.setTabOrder(self.btn_save_conf, self.btn_send_conf)
def retranslateUi(self, Dialog):
_translate = QtCore.QCoreApplication.translate
Dialog.setWindowTitle(_translate("Dialog", "Device configuration"))
self.label_13.setText(_translate("Dialog", "Device Configuration"))
self.label_5.setText(_translate("Dialog", "Port"))
self.label_4.setText(_translate("Dialog", "Host"))
self.label_2.setText(_translate("Dialog", "Password1:"))
self.label_3.setText(_translate("Dialog", "MQTT"))
self.label.setText(_translate("Dialog", "SSID1:"))
self.label_6.setText(_translate("Dialog", "Topic"))
self.label_7.setText(_translate("Dialog", "FullTopic"))
self.label_9.setText(_translate("Dialog", "User (optional)"))
self.label_12.setText(_translate("Dialog", "WIFI"))
self.label_8.setText(_translate("Dialog", "FriendlyName"))
self.btn_save_conf.setText(_translate("Dialog", "Save backlog cmd to config"))
self.label_11.setText(_translate("Dialog", "Backlog CMD:"))
self.label_10.setText(_translate("Dialog", "Password (optional)"))
self.backlog.setToolTip(_translate("Dialog", "Maximum 30 commands!"))
self.backlog.setPlaceholderText(_translate("Dialog", "devicename tasmotadevice; topic testtopic; ssid1 wfissid"))
self.label_15.setText(_translate("Dialog", "Device"))
self.label_16.setText(_translate("Dialog", "DeviceName"))
self.label_17.setText(_translate("Dialog", "GroupTopic"))
self.label_18.setText(_translate("Dialog", "OtaUrl"))
self.label_14.setText(_translate("Dialog", "Note: Empty lines are not sent."))
self.btn_send_conf.setText(_translate("Dialog", "Send configuration to device"))
if __name__ == "__main__":
import sys
app = QtWidgets.QApplication(sys.argv)
Dialog = QtWidgets.QDialog()
ui = Ui_Dialog()
ui.setupUi(Dialog)
Dialog.show()
sys.exit(app.exec())