# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'gui_demo.ui'
#
# Created by: PyQt5 UI code generator 5.9.2
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
# 以下4行是手动添加的
from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg as FigureCanvas
from matplotlib.backends.backend_qt5 import NavigationToolbar2QT as NavigationToolbar
import matplotlib.pyplot as plt
import numpy as np
class Ui_Form(object):
def setupUi(self, Form):
Form.setObjectName("Form")
Form.resize(1191, 686)
self.gridLayout = QtWidgets.QGridLayout(Form)
self.gridLayout.setObjectName("gridLayout")
self.widget = QtWidgets.QWidget(Form)
self.widget.setObjectName("widget")
self.gridLayout_2 = QtWidgets.QGridLayout(self.widget)
self.gridLayout_2.setObjectName("gridLayout_2")
self.frame = QtWidgets.QFrame(self.widget)
self.frame.setMinimumSize(QtCore.QSize(331, 0))
self.frame.setMaximumSize(QtCore.QSize(331, 16777215))
self.frame.setFrameShape(QtWidgets.QFrame.Box)
self.frame.setFrameShadow(QtWidgets.QFrame.Raised)
self.frame.setObjectName("frame")
self.gridLayout_4 = QtWidgets.QGridLayout(self.frame)
self.gridLayout_4.setObjectName("gridLayout_4")
self.frame_RGB = QtWidgets.QFrame(self.frame)
self.frame_RGB.setMinimumSize(QtCore.QSize(311, 111))
self.frame_RGB.setMaximumSize(QtCore.QSize(311, 111))
self.frame_RGB.setFrameShape(QtWidgets.QFrame.StyledPanel)
self.frame_RGB.setFrameShadow(QtWidgets.QFrame.Plain)
self.frame_RGB.setObjectName("frame_RGB")
self.frame_RGB_quyu = QtWidgets.QFrame(self.frame_RGB)
self.frame_RGB_quyu.setGeometry(QtCore.QRect(180, 10, 121, 91))
self.frame_RGB_quyu.setMinimumSize(QtCore.QSize(121, 91))
self.frame_RGB_quyu.setMaximumSize(QtCore.QSize(121, 91))
self.frame_RGB_quyu.setFrameShape(QtWidgets.QFrame.StyledPanel)
self.frame_RGB_quyu.setFrameShadow(QtWidgets.QFrame.Plain)
self.frame_RGB_quyu.setObjectName("frame_RGB_quyu")
self.gridLayout_5 = QtWidgets.QGridLayout(self.frame_RGB_quyu)
self.gridLayout_5.setObjectName("gridLayout_5")
# 以下4行是手动修改的,用来显示调色板颜色的控件
self.figure2, self.figaxes2 = plt.subplots()
self.figure2.subplots_adjust(left=0.0,top=1.0,right=1.0,bottom=0.0)
self.canvas2 = FigureCanvas(self.figure2)
self.gridLayout_5.addWidget(self.canvas2, 0, 0, 1, 1)
self.layoutWidget = QtWidgets.QWidget(self.frame_RGB)
self.layoutWidget.setGeometry(QtCore.QRect(10, 10, 161, 91))
self.layoutWidget.setObjectName("layoutWidget")
self.horizontalLayout_4 = QtWidgets.QHBoxLayout(self.layoutWidget)
self.horizontalLayout_4.setContentsMargins(0, 0, 0, 0)
self.horizontalLayout_4.setObjectName("horizontalLayout_4")
self.verticalLayout = QtWidgets.QVBoxLayout()
self.verticalLayout.setObjectName("verticalLayout")
self.horizontalLayout = QtWidgets.QHBoxLayout()
self.horizontalLayout.setObjectName("horizontalLayout")
self.label = QtWidgets.QLabel(self.layoutWidget)
self.label.setObjectName("label")
self.horizontalLayout.addWidget(self.label)
self.RGB_R_slider = QtWidgets.QSlider(self.layoutWidget)
self.RGB_R_slider.setMaximum(255)
self.RGB_R_slider.setPageStep(1)
self.RGB_R_slider.setProperty("value", 255)
self.RGB_R_slider.setOrientation(QtCore.Qt.Horizontal)
self.RGB_R_slider.setObjectName("RGB_R_slider")
self.horizontalLayout.addWidget(self.RGB_R_slider)
self.verticalLayout.addLayout(self.horizontalLayout)
self.horizontalLayout_2 = QtWidgets.QHBoxLayout()
self.horizontalLayout_2.setObjectName("horizontalLayout_2")
self.label_2 = QtWidgets.QLabel(self.layoutWidget)
self.label_2.setObjectName("label_2")
self.horizontalLayout_2.addWidget(self.label_2)
self.RGB_G_slider = QtWidgets.QSlider(self.layoutWidget)
self.RGB_G_slider.setMaximum(255)
self.RGB_G_slider.setPageStep(1)
self.RGB_G_slider.setOrientation(QtCore.Qt.Horizontal)
self.RGB_G_slider.setObjectName("RGB_G_slider")
self.horizontalLayout_2.addWidget(self.RGB_G_slider)
self.verticalLayout.addLayout(self.horizontalLayout_2)
self.horizontalLayout_3 = QtWidgets.QHBoxLayout()
self.horizontalLayout_3.setObjectName("horizontalLayout_3")
self.label_3 = QtWidgets.QLabel(self.layoutWidget)
self.label_3.setObjectName("label_3")
self.horizontalLayout_3.addWidget(self.label_3)
self.RGB_B_slider = QtWidgets.QSlider(self.layoutWidget)
self.RGB_B_slider.setMaximum(255)
self.RGB_B_slider.setPageStep(1)
self.RGB_B_slider.setOrientation(QtCore.Qt.Horizontal)
self.RGB_B_slider.setObjectName("RGB_B_slider")
self.horizontalLayout_3.addWidget(self.RGB_B_slider)
self.verticalLayout.addLayout(self.horizontalLayout_3)
self.horizontalLayout_4.addLayout(self.verticalLayout)
self.verticalLayout_2 = QtWidgets.QVBoxLayout()
self.verticalLayout_2.setObjectName("verticalLayout_2")
self.RGB_R_spinBox = QtWidgets.QSpinBox(self.layoutWidget)
self.RGB_R_spinBox.setMaximum(255)
self.RGB_R_spinBox.setProperty("value", 255)
self.RGB_R_spinBox.setObjectName("RGB_R_spinBox")
self.verticalLayout_2.addWidget(self.RGB_R_spinBox)
self.RGB_G_spinBox = QtWidgets.QSpinBox(self.layoutWidget)
self.RGB_G_spinBox.setMaximum(255)
self.RGB_G_spinBox.setObjectName("RGB_G_spinBox")
self.verticalLayout_2.addWidget(self.RGB_G_spinBox)
self.RGB_B_spinBox = QtWidgets.QSpinBox(self.layoutWidget)
self.RGB_B_spinBox.setMaximum(255)
self.RGB_B_spinBox.setObjectName("RGB_B_spinBox")
self.verticalLayout_2.addWidget(self.RGB_B_spinBox)
self.horizontalLayout_4.addLayout(self.verticalLayout_2)
self.gridLayout_4.addWidget(self.frame_RGB, 0, 0, 1, 1)
self.toolBox = QtWidgets.QToolBox(self.frame)
self.toolBox.setObjectName("toolBox")
self.page = QtWidgets.QWidget()
self.page.setGeometry(QtCore.QRect(0, 0, 309, 407))
self.page.setObjectName("page")
self.gridLayout_6 = QtWidgets.QGridLayout(self.page)
self.gridLayout_6.setObjectName("gridLayout_6")
self.frame_3 = QtWidgets.QFrame(self.page)
self.frame_3.setFrameShape(QtWidgets.QFrame.NoFrame)
self.frame_3.setFrameShadow(QtWidgets.QFrame.Raised)
self.frame_3.setObjectName("frame_3")
self.pushButton = QtWidgets.QPushButton(self.frame_3)
self.pushButton.setGeometry(QtCore.QRect(210, 10, 75, 23))
self.pushButton.setObjectName("pushButton")
self.comboBox_type = QtWidgets.QComboBox(self.frame_3)
self.comboBox_type.setGeometry(QtCore.QRect(10, 50, 69, 22))
self.comboBox_type.setObjectName("comboBox_type")
self.comboBox_type.addItem("")
self.comboBox_type.addItem("")
self.comboBox_type.addItem("")
self.comboBox_type.addItem("")
self.comboBox_type.addItem("")
self.frame_wenzi = QtWidgets.QFrame(self.frame_3)
self.frame_wenzi.setGeometry(QtCore.QRect(10, 80, 271, 171))
self.frame_wenzi.setFrameShape(QtWidgets.QFrame.StyledPanel)
self.frame_wenzi.setFrameShadow(QtWidgets.QFrame.Plain)
self.frame_wenzi.setObjectName("frame_wenzi")
self.label_7 = QtWidgets.QLabel(self.frame_wenzi)
self.label_7.setGeometry(QtCore.QRect(20, 10, 41, 21))
self.lab