-
Notifications
You must be signed in to change notification settings - Fork 0
/
mainwindow.py
executable file
·191 lines (182 loc) · 9.83 KB
/
mainwindow.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
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'mainwindow.ui'
#
# Created by: PyQt4 UI code generator 4.11.4
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui
try:
_fromUtf8 = QtCore.QString.fromUtf8
except AttributeError:
def _fromUtf8(s):
return s
try:
_encoding = QtGui.QApplication.UnicodeUTF8
def _translate(context, text, disambig):
return QtGui.QApplication.translate(context, text, disambig, _encoding)
except AttributeError:
def _translate(context, text, disambig):
return QtGui.QApplication.translate(context, text, disambig)
class Ui_MainWindow(object):
def setupUi(self, MainWindow):
MainWindow.setObjectName(_fromUtf8("MainWindow"))
MainWindow.resize(1200, 400)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Expanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(MainWindow.sizePolicy().hasHeightForWidth())
MainWindow.setSizePolicy(sizePolicy)
self.centralWidget = QtGui.QWidget(MainWindow)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Expanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.centralWidget.sizePolicy().hasHeightForWidth())
self.centralWidget.setSizePolicy(sizePolicy)
self.centralWidget.setObjectName(_fromUtf8("centralWidget"))
self.verticalLayout = QtGui.QVBoxLayout(self.centralWidget)
self.verticalLayout.setMargin(11)
self.verticalLayout.setSpacing(6)
self.verticalLayout.setObjectName(_fromUtf8("verticalLayout"))
self.horizontalLayout = QtGui.QHBoxLayout()
self.horizontalLayout.setMargin(11)
self.horizontalLayout.setSpacing(6)
self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout"))
self.verticalLayout_5 = QtGui.QVBoxLayout()
self.verticalLayout_5.setMargin(11)
self.verticalLayout_5.setSpacing(10)
self.verticalLayout_5.setObjectName(_fromUtf8("verticalLayout_5"))
self.label = QtGui.QLabel(self.centralWidget)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Expanding)
sizePolicy.setHorizontalStretch(2)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.label.sizePolicy().hasHeightForWidth())
self.label.setSizePolicy(sizePolicy)
self.label.setMinimumSize(QtCore.QSize(640, 480))
self.label.setText(_fromUtf8(""))
self.label.setObjectName(_fromUtf8("label"))
self.verticalLayout_5.addWidget(self.label)
self.horizontalLayout.addLayout(self.verticalLayout_5)
self.verticalLayout_2 = QtGui.QVBoxLayout()
self.verticalLayout_2.setSizeConstraint(QtGui.QLayout.SetDefaultConstraint)
self.verticalLayout_2.setMargin(11)
self.verticalLayout_2.setSpacing(9)
self.verticalLayout_2.setObjectName(_fromUtf8("verticalLayout_2"))
self.pushButton_2 = QtGui.QPushButton(self.centralWidget)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.pushButton_2.sizePolicy().hasHeightForWidth())
self.pushButton_2.setSizePolicy(sizePolicy)
self.pushButton_2.setMaximumSize(QtCore.QSize(600, 16777215))
self.pushButton_2.setObjectName(_fromUtf8("pushButton_2"))
self.verticalLayout_2.addWidget(self.pushButton_2)
self.pushButton_3 = QtGui.QPushButton(self.centralWidget)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.pushButton_3.sizePolicy().hasHeightForWidth())
self.pushButton_3.setSizePolicy(sizePolicy)
self.pushButton_3.setMaximumSize(QtCore.QSize(600, 16777215))
self.pushButton_3.setObjectName(_fromUtf8("pushButton_3"))
self.verticalLayout_2.addWidget(self.pushButton_3)
self.pushButton = QtGui.QPushButton(self.centralWidget)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.pushButton.sizePolicy().hasHeightForWidth())
self.pushButton.setSizePolicy(sizePolicy)
self.pushButton.setMaximumSize(QtCore.QSize(600, 16777215))
self.pushButton.setObjectName(_fromUtf8("pushButton"))
self.verticalLayout_2.addWidget(self.pushButton)
self.horizontalLayout_3 = QtGui.QHBoxLayout()
self.horizontalLayout_3.setMargin(11)
self.horizontalLayout_3.setSpacing(0)
self.horizontalLayout_3.setObjectName(_fromUtf8("horizontalLayout_3"))
self.textBrowser = QtGui.QTextBrowser(self.centralWidget)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Preferred)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.textBrowser.sizePolicy().hasHeightForWidth())
self.textBrowser.setSizePolicy(sizePolicy)
self.textBrowser.setMinimumSize(QtCore.QSize(200, 0))
self.textBrowser.setMaximumSize(QtCore.QSize(600, 16777215))
self.textBrowser.setObjectName(_fromUtf8("textBrowser"))
self.horizontalLayout_3.addWidget(self.textBrowser)
self.verticalLayout_2.addLayout(self.horizontalLayout_3)
self.horizontalLayout_2 = QtGui.QHBoxLayout()
self.horizontalLayout_2.setMargin(11)
self.horizontalLayout_2.setSpacing(6)
self.horizontalLayout_2.setObjectName(_fromUtf8("horizontalLayout_2"))
self.verticalLayout_3 = QtGui.QVBoxLayout()
self.verticalLayout_3.setMargin(11)
self.verticalLayout_3.setSpacing(6)
self.verticalLayout_3.setObjectName(_fromUtf8("verticalLayout_3"))
self.checkBox_2 = QtGui.QCheckBox(self.centralWidget)
self.checkBox_2.setObjectName(_fromUtf8("checkBox_2"))
self.verticalLayout_3.addWidget(self.checkBox_2)
self.checkBox = QtGui.QCheckBox(self.centralWidget)
self.checkBox.setObjectName(_fromUtf8("checkBox"))
self.verticalLayout_3.addWidget(self.checkBox)
self.checkBox_3 = QtGui.QCheckBox(self.centralWidget)
self.checkBox_3.setObjectName(_fromUtf8("checkBox_3"))
self.verticalLayout_3.addWidget(self.checkBox_3)
self.checkBox_4 = QtGui.QCheckBox(self.centralWidget)
self.checkBox_4.setObjectName(_fromUtf8("checkBox_4"))
self.verticalLayout_3.addWidget(self.checkBox_4)
self.horizontalLayout_2.addLayout(self.verticalLayout_3)
self.verticalLayout_4 = QtGui.QVBoxLayout()
self.verticalLayout_4.setMargin(11)
self.verticalLayout_4.setSpacing(6)
self.verticalLayout_4.setObjectName(_fromUtf8("verticalLayout_4"))
self.lcdNumber = QtGui.QLCDNumber(self.centralWidget)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.lcdNumber.sizePolicy().hasHeightForWidth())
self.lcdNumber.setSizePolicy(sizePolicy)
self.lcdNumber.setMinimumSize(QtCore.QSize(0, 40))
font = QtGui.QFont()
font.setPointSize(9)
self.lcdNumber.setFont(font)
self.lcdNumber.setObjectName(_fromUtf8("lcdNumber"))
self.verticalLayout_4.addWidget(self.lcdNumber)
self.dial = QtGui.QDial(self.centralWidget)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.dial.sizePolicy().hasHeightForWidth())
self.dial.setSizePolicy(sizePolicy)
self.dial.setMinimumSize(QtCore.QSize(60, 60))
self.dial.setObjectName(_fromUtf8("dial"))
self.verticalLayout_4.addWidget(self.dial)
self.horizontalLayout_2.addLayout(self.verticalLayout_4)
self.verticalLayout_2.addLayout(self.horizontalLayout_2)
self.horizontalLayout.addLayout(self.verticalLayout_2)
self.verticalLayout.addLayout(self.horizontalLayout)
MainWindow.setCentralWidget(self.centralWidget)
self.mainToolBar = QtGui.QToolBar(MainWindow)
self.mainToolBar.setObjectName(_fromUtf8("mainToolBar"))
MainWindow.addToolBar(QtCore.Qt.TopToolBarArea, self.mainToolBar)
self.statusBar = QtGui.QStatusBar(MainWindow)
self.statusBar.setObjectName(_fromUtf8("statusBar"))
MainWindow.setStatusBar(self.statusBar)
self.retranslateUi(MainWindow)
QtCore.QMetaObject.connectSlotsByName(MainWindow)
def retranslateUi(self, MainWindow):
MainWindow.setWindowTitle(_translate("MainWindow", "MainWindow", None))
self.pushButton_2.setText(_translate("MainWindow", "START", None))
self.pushButton_3.setText(_translate("MainWindow", "STOP", None))
self.pushButton.setText(_translate("MainWindow", "QUIT", None))
self.checkBox_2.setText(_translate("MainWindow", "Detection", None))
self.checkBox.setText(_translate("MainWindow", "Landmark", None))
self.checkBox_3.setText(_translate("MainWindow", "Gender", None))
self.checkBox_4.setText(_translate("MainWindow", "Emotion", None))
self.checkBox_2.setChecked(True)
if __name__ == "__main__":
import sys
app = QtGui.QApplication(sys.argv)
MainWindow = QtGui.QMainWindow()
ui = Ui_MainWindow()
ui.setupUi(MainWindow)
MainWindow.show()
sys.exit(app.exec_())