Python/pyqt5/CODE/ROIpractice/test1.py
2024-06-25 22:02:02 +08:00

85 lines
4.1 KiB
Python

# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'test1.ui'
#
# Created by: PyQt5 UI code generator 5.15.9
#
# 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
class Ui_MainWindow(object):
def setupUi(self, MainWindow):
MainWindow.setObjectName("MainWindow")
MainWindow.resize(1065, 798)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(MainWindow.sizePolicy().hasHeightForWidth())
MainWindow.setSizePolicy(sizePolicy)
self.centralwidget = QtWidgets.QWidget(MainWindow)
self.centralwidget.setObjectName("centralwidget")
self.PhotoOpen_Btn_1 = QtWidgets.QPushButton(self.centralwidget)
self.PhotoOpen_Btn_1.setGeometry(QtCore.QRect(10, 10, 75, 23))
self.PhotoOpen_Btn_1.setObjectName("PhotoOpen_Btn_1")
self.photoshow1 = QtWidgets.QLabel(self.centralwidget)
self.photoshow1.setGeometry(QtCore.QRect(60, 130, 431, 571))
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.photoshow1.sizePolicy().hasHeightForWidth())
self.photoshow1.setSizePolicy(sizePolicy)
self.photoshow1.setScaledContents(True)
self.photoshow1.setObjectName("photoshow1")
self.ROI_Btn = QtWidgets.QPushButton(self.centralwidget)
self.ROI_Btn.setGeometry(QtCore.QRect(10, 60, 75, 23))
self.ROI_Btn.setObjectName("ROI_Btn")
self.photoshow2 = QtWidgets.QLabel(self.centralwidget)
self.photoshow2.setGeometry(QtCore.QRect(550, 130, 431, 571))
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.photoshow2.sizePolicy().hasHeightForWidth())
self.photoshow2.setSizePolicy(sizePolicy)
self.photoshow2.setScaledContents(True)
self.photoshow2.setObjectName("photoshow2")
self.MouseEvent = QtWidgets.QLabel(self.centralwidget)
self.MouseEvent.setGeometry(QtCore.QRect(140, 30, 121, 31))
font = QtGui.QFont()
font.setBold(False)
font.setItalic(False)
font.setUnderline(False)
font.setWeight(50)
self.MouseEvent.setFont(font)
self.MouseEvent.setMouseTracking(True)
self.MouseEvent.setTabletTracking(True)
self.MouseEvent.setScaledContents(True)
self.MouseEvent.setObjectName("MouseEvent")
MainWindow.setCentralWidget(self.centralwidget)
self.menubar = QtWidgets.QMenuBar(MainWindow)
self.menubar.setGeometry(QtCore.QRect(0, 0, 1065, 21))
self.menubar.setObjectName("menubar")
MainWindow.setMenuBar(self.menubar)
self.statusbar = QtWidgets.QStatusBar(MainWindow)
self.statusbar.setObjectName("statusbar")
MainWindow.setStatusBar(self.statusbar)
self.toolBar = QtWidgets.QToolBar(MainWindow)
self.toolBar.setObjectName("toolBar")
MainWindow.addToolBar(QtCore.Qt.TopToolBarArea, self.toolBar)
self.retranslateUi(MainWindow)
QtCore.QMetaObject.connectSlotsByName(MainWindow)
def retranslateUi(self, MainWindow):
_translate = QtCore.QCoreApplication.translate
MainWindow.setWindowTitle(_translate("MainWindow", "MainWindow"))
self.PhotoOpen_Btn_1.setText(_translate("MainWindow", "開啟圖片1"))
self.photoshow1.setText(_translate("MainWindow", "TextLabel"))
self.ROI_Btn.setText(_translate("MainWindow", "ROI擷取"))
self.photoshow2.setText(_translate("MainWindow", "TextLabel"))
self.MouseEvent.setText(_translate("MainWindow", "MouseEvent"))
self.toolBar.setWindowTitle(_translate("MainWindow", "toolBar"))