-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmainwindow_gui.py
123 lines (117 loc) · 6.67 KB
/
mainwindow_gui.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
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'mainwindow.ui'
#
# Created by: PyQt5 UI code generator 5.7.1
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_MainWindow(object):
def setupUi(self, MainWindow):
MainWindow.setObjectName("MainWindow")
MainWindow.resize(1024, 768)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(MainWindow.sizePolicy().hasHeightForWidth())
MainWindow.setSizePolicy(sizePolicy)
MainWindow.setMinimumSize(QtCore.QSize(400, 300))
self.centralWidget = QtWidgets.QWidget(MainWindow)
self.centralWidget.setObjectName("centralWidget")
self.frame = QtWidgets.QFrame(self.centralWidget)
self.frame.setGeometry(QtCore.QRect(340, 0, 341, 291))
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.frame.sizePolicy().hasHeightForWidth())
self.frame.setSizePolicy(sizePolicy)
self.frame.setFrameShape(QtWidgets.QFrame.StyledPanel)
self.frame.setFrameShadow(QtWidgets.QFrame.Raised)
self.frame.setObjectName("frame")
self.image_measurement = QtWidgets.QLabel(self.frame)
self.image_measurement.setEnabled(True)
self.image_measurement.setGeometry(QtCore.QRect(10, 0, 141, 101))
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.image_measurement.sizePolicy().hasHeightForWidth())
self.image_measurement.setSizePolicy(sizePolicy)
self.image_measurement.setText("")
self.image_measurement.setPixmap(QtGui.QPixmap("measurement.png"))
self.image_measurement.setScaledContents(True)
self.image_measurement.setAlignment(QtCore.Qt.AlignBottom|QtCore.Qt.AlignHCenter)
self.image_measurement.setObjectName("image_measurement")
self.image_calibrate = QtWidgets.QLabel(self.frame)
self.image_calibrate.setGeometry(QtCore.QRect(190, 0, 141, 101))
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.image_calibrate.sizePolicy().hasHeightForWidth())
self.image_calibrate.setSizePolicy(sizePolicy)
self.image_calibrate.setText("")
self.image_calibrate.setPixmap(QtGui.QPixmap("calibrate.png"))
self.image_calibrate.setScaledContents(True)
self.image_calibrate.setObjectName("image_calibrate")
self.pushButton_measurement = QtWidgets.QPushButton(self.frame)
self.pushButton_measurement.setGeometry(QtCore.QRect(20, 100, 121, 23))
self.pushButton_measurement.setObjectName("pushButton_measurement")
self.pushButton_calibrate = QtWidgets.QPushButton(self.frame)
self.pushButton_calibrate.setGeometry(QtCore.QRect(200, 100, 121, 23))
self.pushButton_calibrate.setObjectName("pushButton_calibrate")
self.image_analysis = QtWidgets.QLabel(self.frame)
self.image_analysis.setGeometry(QtCore.QRect(190, 140, 141, 101))
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.image_analysis.sizePolicy().hasHeightForWidth())
self.image_analysis.setSizePolicy(sizePolicy)
self.image_analysis.setText("")
self.image_analysis.setPixmap(QtGui.QPixmap("analysis.png"))
self.image_analysis.setScaledContents(True)
self.image_analysis.setObjectName("image_analysis")
self.pushButton_analysis = QtWidgets.QPushButton(self.frame)
self.pushButton_analysis.setGeometry(QtCore.QRect(200, 240, 121, 23))
self.pushButton_analysis.setObjectName("pushButton_analysis")
self.image_setup = QtWidgets.QLabel(self.frame)
self.image_setup.setGeometry(QtCore.QRect(10, 140, 141, 101))
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.image_setup.sizePolicy().hasHeightForWidth())
self.image_setup.setSizePolicy(sizePolicy)
self.image_setup.setText("")
self.image_setup.setPixmap(QtGui.QPixmap("setup.png"))
self.image_setup.setScaledContents(True)
self.image_setup.setObjectName("image_setup")
self.pushButton_setup = QtWidgets.QPushButton(self.frame)
self.pushButton_setup.setGeometry(QtCore.QRect(20, 240, 121, 23))
self.pushButton_setup.setObjectName("pushButton_setup")
MainWindow.setCentralWidget(self.centralWidget)
self.menuBar = QtWidgets.QMenuBar(MainWindow)
self.menuBar.setGeometry(QtCore.QRect(0, 0, 1024, 21))
self.menuBar.setObjectName("menuBar")
MainWindow.setMenuBar(self.menuBar)
self.mainToolBar = QtWidgets.QToolBar(MainWindow)
self.mainToolBar.setObjectName("mainToolBar")
MainWindow.addToolBar(QtCore.Qt.TopToolBarArea, self.mainToolBar)
self.statusBar = QtWidgets.QStatusBar(MainWindow)
self.statusBar.setObjectName("statusBar")
MainWindow.setStatusBar(self.statusBar)
self.retranslateUi(MainWindow)
QtCore.QMetaObject.connectSlotsByName(MainWindow)
def retranslateUi(self, MainWindow):
_translate = QtCore.QCoreApplication.translate
MainWindow.setWindowTitle(_translate("MainWindow", "Electronic Nose"))
self.pushButton_measurement.setText(_translate("MainWindow", "Measurement"))
self.pushButton_calibrate.setText(_translate("MainWindow", "Calibrate"))
self.pushButton_analysis.setText(_translate("MainWindow", "Analysis"))
self.pushButton_setup.setText(_translate("MainWindow", "Setup"))
'''
if __name__ == "__main__":
import sys
app = QtWidgets.QApplication(sys.argv)
MainWindow = QtWidgets.QMainWindow()
ui = Ui_MainWindow()
ui.setupUi(MainWindow)
MainWindow.show()
sys.exit(app.exec_())
'''