-
Notifications
You must be signed in to change notification settings - Fork 0
/
SetUI.py
110 lines (100 loc) · 5.43 KB
/
SetUI.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
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'SetUI-s.ui'
#
# Created by: PyQt5 UI code generator 5.15.4
#
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
# run again. Do not edit this file unless you know what you are doing.
from PyQt5 import QtCore, QtGui, QtWidgets
import json
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_SettingWindow(object):
def setupUi(self, SettingWindow):
SettingWindow.setObjectName("SettingWindow")
SettingWindow.resize(400, 320)
SettingWindow.setWindowFlags(QtCore.Qt.WindowStaysOnTopHint)
SettingWindow.setWindowModality(QtCore.Qt.ApplicationModal)
SettingWindow.setFixedSize(SettingWindow.width(), SettingWindow.height())
self.centralwidget = QtWidgets.QWidget(SettingWindow)
self.centralwidget.setObjectName("centralwidget")
self.scrollArea = QtWidgets.QScrollArea(self.centralwidget)
self.scrollArea.setGeometry(QtCore.QRect(5, 150, 170, 160))
self.scrollArea.setWidgetResizable(True)
self.scrollArea.setObjectName("scrollArea")
self.scrollAreaWidgetContents = QtWidgets.QWidget()
self.scrollAreaWidgetContents.setGeometry(QtCore.QRect(0, 0, 168, 158))
self.scrollAreaWidgetContents.setObjectName("scrollAreaWidgetContents")
self.scrollArea.setWidget(self.scrollAreaWidgetContents)
self.SaveButton = QtWidgets.QPushButton(self.centralwidget)
self.SaveButton.setGeometry(QtCore.QRect(180, 270, 102, 40))
self.SaveButton.setStyleSheet("")
self.SaveButton.setObjectName("SaveButton")
self.CancelButton = QtWidgets.QPushButton(self.centralwidget)
self.CancelButton.setGeometry(QtCore.QRect(288, 270, 102, 40))
self.CancelButton.setObjectName("CancelButton")
self.SetBox = QtWidgets.QGroupBox(self.centralwidget)
self.SetBox.setGeometry(QtCore.QRect(5, 10, 170, 135))
self.SetBox.setObjectName("SetBox")
self.Log = QtWidgets.QCheckBox(self.SetBox)
self.Log.setGeometry(QtCore.QRect(10, 40, 75, 20))
self.Log.setCheckable(True)
self.Log.setObjectName("Log")
self.IPV6 = QtWidgets.QCheckBox(self.SetBox)
self.IPV6.setGeometry(QtCore.QRect(10, 20, 75, 20))
self.IPV6.setObjectName("IPV6")
self.DNSBox = QtWidgets.QGroupBox(self.centralwidget)
self.DNSBox.setGeometry(QtCore.QRect(180, 10, 215, 135))
self.DNSBox.setObjectName("DNSBox")
self.Dnscrypt = QtWidgets.QRadioButton(self.DNSBox)
self.Dnscrypt.setGeometry(QtCore.QRect(10, 60, 170, 20))
self.Dnscrypt.setChecked(True)
self.Dnscrypt.setObjectName("Dnscrypt")
self.CustomPort = QtWidgets.QCheckBox(self.DNSBox)
self.CustomPort.setGeometry(QtCore.QRect(25, 80, 80, 20))
self.CustomPort.setObjectName("CustomPort")
self.DNSEdit = QtWidgets.QLineEdit(self.DNSBox)
self.DNSEdit.setGeometry(QtCore.QRect(10, 40, 200, 20))
self.DNSEdit.setInputMask("")
self.DNSEdit.setText("")
self.DNSEdit.setEnabled(False)
self.DNSEdit.setReadOnly(True)
self.DNSEdit.setPlaceholderText("")
self.DNSEdit.setCursorMoveStyle(QtCore.Qt.LogicalMoveStyle)
self.DNSEdit.setClearButtonEnabled(False)
self.DNSEdit.setObjectName("DNSEdit")
self.DNSEdit.setPlaceholderText("自定义要使用的DNS。必须带端口!")
self.CustomDNS = QtWidgets.QRadioButton(self.DNSBox)
self.CustomDNS.setGeometry(QtCore.QRect(10, 20, 90, 20))
self.CustomDNS.setObjectName("CustomDNS")
self.PortEdit = QtWidgets.QLineEdit(self.DNSBox)
self.PortEdit.setGeometry(QtCore.QRect(110, 80, 30, 20))
self.PortEdit.setInputMask("")
self.PortEdit.setText("")
self.PortEdit.setEnabled(False)
self.PortEdit.setReadOnly(True)
self.PortEdit.setPlaceholderText("")
self.PortEdit.setCursorMoveStyle(QtCore.Qt.LogicalMoveStyle)
self.PortEdit.setClearButtonEnabled(False)
self.PortEdit.setObjectName("PortEdit")
self.PortEdit.setText("53")
SettingWindow.setCentralWidget(self.centralwidget)
self.CustomDNS.toggled.connect(SettingWindow.DNSClicked)
self.Dnscrypt.toggled.connect(SettingWindow.DNSClicked)
self.CustomPort.clicked.connect(SettingWindow.CustomPortClicked)
self.SaveButton.clicked.connect(SettingWindow.SaveConfig)
self.CancelButton.clicked.connect(SettingWindow.CancelSaveConfig)
self.retranslateUi(SettingWindow)
QtCore.QMetaObject.connectSlotsByName(SettingWindow)
SettingWindow.LoadConfig()
def retranslateUi(self, SettingWindow):
_translate = QtCore.QCoreApplication.translate
SettingWindow.setWindowTitle(_translate("SettingWindow", "设置"))
self.SaveButton.setText(_translate("SettingWindow", "保存"))
self.CancelButton.setText(_translate("SettingWindow", "取消"))
self.SetBox.setTitle(_translate("SettingWindow", "普通设置"))
self.Log.setText(_translate("SettingWindow", "详细日志"))
self.IPV6.setText(_translate("SettingWindow", "IPV6"))
self.DNSBox.setTitle(_translate("SettingWindow", "DNS相关"))
self.Dnscrypt.setText(_translate("SettingWindow", "[推荐]使用Dnscrypt Proxy "))
self.CustomPort.setText(_translate("SettingWindow", "自定义端口"))
self.CustomDNS.setText(_translate("SettingWindow", "自定义DNS"))