-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathValueWinModel.py
137 lines (130 loc) · 6.73 KB
/
ValueWinModel.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
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'ValueWin.ui'
#
# Created by: PyQt5 UI code generator 5.15.1
#
# 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 icons_rc
class Ui_Dialog(object):
def setupUi(self, Dialog):
Dialog.setObjectName("Dialog")
Dialog.resize(470, 135)
Dialog.setStyleSheet("#frame {\n"
" border: 1px solid black;\n"
" border-radius: 5px;\n"
" \n"
"background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:0.994, y2:1, stop:0 rgba("
"159, 165, 213, 255), stop:1 rgba(232, 245, 200, 255));\n "
"}\n"
"\n"
"#pathInput {\n"
" padding: 2px;\n"
" font: 11pt \"Source Code Pro\";\n"
" border: 2px solid #95a5a6;\n"
" background-color: rgba(255, 255, 255, 0);\n"
" border-radius: 3px;\n"
"}\n"
"\n"
"#pathInput:hover {\n"
" border-color: #7f8c8d;\n"
"}\n"
"\n"
"#pathInput:focus {\n"
" border-color: #bdc3c7;\n"
"}\n"
"\n"
"#findFileBtn {\n"
" border: none;\n"
" border-image: url(:/imgs/openFile.png);\n"
"}\n"
"#findFileBtn:hover {\n"
" border-image: url(:/imgs/openFile_hover.png);\n"
"}\n"
"#findFileBtn:pressed {\n"
" border-image: url(:/imgs/openFile_pressed.png);\n"
"}\n"
"\n"
"\n"
"#confirmBtn {\n"
" border: none;\n"
" border-image: url(:/imgs/confirm.png);\n"
"}\n"
"\n"
"#confirmBtn:hover {\n"
" border-image: url(:/imgs/confirm_hover.png);\n"
"}\n"
"\n"
"#confirmBtn:pressed {\n"
" border-image: url(:/imgs/confirm_pressed.png);\n"
"}\n"
"\n"
"#cancelBtn {\n"
" border: none;\n"
" border-image: url(:/imgs/cancel.png);\n"
"}\n"
"\n"
"#cancelBtn:hover {\n"
" border-image: url(:/imgs/cancel_hover.png);\n"
"}\n"
"\n"
"#cancelBtn:pressed {\n"
" border-image: url(:/imgs/cancel_pressed.png);\n"
"}")
self.horizontalLayout = QtWidgets.QHBoxLayout(Dialog)
self.horizontalLayout.setContentsMargins(0, 0, 0, 0)
self.horizontalLayout.setSpacing(0)
self.horizontalLayout.setObjectName("horizontalLayout")
self.frame = QtWidgets.QFrame(Dialog)
self.frame.setFrameShape(QtWidgets.QFrame.StyledPanel)
self.frame.setFrameShadow(QtWidgets.QFrame.Raised)
self.frame.setObjectName("frame")
self.pathInput = QtWidgets.QLineEdit(self.frame)
self.pathInput.setGeometry(QtCore.QRect(160, 20, 241, 40))
self.pathInput.setMinimumSize(QtCore.QSize(0, 25))
self.pathInput.setText("")
self.pathInput.setObjectName("pathInput")
self.findFileBtn = QtWidgets.QPushButton(self.frame)
self.findFileBtn.setGeometry(QtCore.QRect(413, 20, 40, 40))
self.findFileBtn.setText("")
self.findFileBtn.setObjectName("findFileBtn")
self.valueLabel = QtWidgets.QLabel(self.frame)
self.valueLabel.setGeometry(QtCore.QRect(30, 20, 111, 40))
font = QtGui.QFont()
font.setFamily("Times New Roman")
font.setPointSize(13)
font.setBold(True)
font.setWeight(75)
self.valueLabel.setFont(font)
self.valueLabel.setObjectName("valueLabel")
self.confirmBtn = QtWidgets.QPushButton(self.frame)
self.confirmBtn.setGeometry(QtCore.QRect(190, 70, 60, 60))
self.confirmBtn.setText("")
self.confirmBtn.setObjectName("confirmBtn")
self.cancelBtn = QtWidgets.QPushButton(self.frame)
self.cancelBtn.setGeometry(QtCore.QRect(310, 80, 41, 41))
self.cancelBtn.setText("")
self.cancelBtn.setObjectName("cancelBtn")
self.keyWarningLabel = QtWidgets.QLabel(self.frame)
self.keyWarningLabel.setGeometry(QtCore.QRect(160, 60, 238, 16))
font = QtGui.QFont()
font.setFamily("Times New Roman")
self.keyWarningLabel.setFont(font)
self.keyWarningLabel.setTextFormat(QtCore.Qt.AutoText)
self.keyWarningLabel.setAlignment(QtCore.Qt.AlignCenter)
self.keyWarningLabel.setObjectName("keyWarningLabel")
self.horizontalLayout.addWidget(self.frame)
self.retranslateUi(Dialog)
self.findFileBtn.clicked.connect(Dialog.openFileDialog)
self.cancelBtn.clicked.connect(Dialog.reject)
self.confirmBtn.clicked.connect(Dialog.confirmBtnClicked)
self.pathInput.textChanged['QString'].connect(self.keyWarningLabel.hide)
QtCore.QMetaObject.connectSlotsByName(Dialog)
def retranslateUi(self, Dialog):
_translate = QtCore.QCoreApplication.translate
Dialog.setWindowTitle(_translate("Dialog", "Dialog"))
self.valueLabel.setText(_translate("Dialog", "variable value "))
self.keyWarningLabel.setText(_translate("Dialog", "<html><head/><body><p><span style=\" font-weight:600; "
"color:#ff0000;\">the variable value can\'t be "
"empty!</span></p></body></html>"))