# -*- coding: utf-8 -*-

# Form implementation generated from reading ui file 'GUI.ui'
#
# Created by: PyQt5 UI code generator 5.15.0
#
# 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 cv2
import dlib
import time
import threading
import math

from PIL import ImageDraw, ImageFont, Image
from hyperlpr import *
import numpy
from numpy import unicode
#
# carCascade = cv2.CascadeClassifier('myhaar.xml')
# video = cv2.VideoCapture('output_yolov4.avi')
#
# WIDTH = 1280
# HEIGHT = 720
# # 速度限制
# speed_limit = 50


class Ui_MainWindow(object):
    def setupUi(self, MainWindow):
        MainWindow.setObjectName("MainWindow")
        MainWindow.resize(1920, 1080)
        self.centralwidget = QtWidgets.QWidget(MainWindow)
        self.centralwidget.setObjectName("centralwidget")
        self.pushButton = QtWidgets.QPushButton(self.centralwidget)
        self.pushButton.setGeometry(QtCore.QRect(1500, 850, 240, 100))
        font = QtGui.QFont()
        font.setFamily("宋体")
        self.pushButton.setFont(font)
        self.pushButton.setAccessibleName("")
        self.pushButton.setObjectName("pushButton")
        self.pushButton_2 = QtWidgets.QPushButton(self.centralwidget)
        self.pushButton_2.setGeometry(QtCore.QRect(550, 900, 120, 60))
        font = QtGui.QFont()
        font.setFamily("宋体")
        self.pushButton_2.setFont(font)
        self.pushButton_2.setObjectName("pushButton_2")
        self.pushButton_3 = QtWidgets.QPushButton(self.centralwidget)
        self.pushButton_3.setGeometry(QtCore.QRect(700, 900, 120, 60))
        font = QtGui.QFont()
        font.setFamily("宋体")
        self.pushButton_3.setFont(font)
        self.pushButton_3.setObjectName("pushButton_3")
        self.label = QtWidgets.QLabel(self.centralwidget)
        self.label.setGeometry(QtCore.QRect(1300, 850, 72, 15))
        self.label.setObjectName("label")
        self.horizontalSlider = QtWidgets.QSlider(self.centralwidget)
        self.horizontalSlider.setGeometry(QtCore.QRect(70, 850, 1200,30))
        self.horizontalSlider.setOrientation(QtCore.Qt.Horizontal)
        self.horizontalSlider.setObjectName("horizontalSlider")
        self.widget = myVideoWidget(self.centralwidget)
        self.widget.setGeometry(QtCore.QRect(50, 50, 1280, 720))
        self.widget.setObjectName("widget")
        MainWindow.setCentralWidget(self.centralwidget)
        self.menubar = QtWidgets.QMenuBar(MainWindow)
        self.menubar.setGeometry(QtCore.QRect(0, 0, 800, 25))
        self.menubar.setObjectName("menubar")
        MainWindow.setMenuBar(self.menubar)
        self.statusbar = QtWidgets.QStatusBar(MainWindow)
        self.statusbar.setObjectName("statusbar")
        MainWindow.setStatusBar(self.statusbar)
        self.pic = QtWidgets.QGraphicsView(self.centralwidget)
        self.pic.setObjectName("pic")
        self.pic.setGeometry(50,50,800,450)
        self.label_1 = QtWidgets.QLabel(self.centralwidget)
        self.label_1.setGeometry(QtCore.QRect(1400, 100, 200, 50))
        self.label_1.setObjectName("label_1")
        self.label_1.setFont(QtGui.QFont("宋体",25))
        self.text = QtWidgets.QTextEdit(self.centralwidget)
        self.text.setGeometry(QtCore.QRect(1400, 170, 400, 600))
        self.text.setObjectName("text")
        #self.text.setFocusPolicy(QtCore.Qt.NoFocus)
        self.text.setFont(QtGui.QFont("宋体",24 ))


        self.retranslateUi(MainWindow)
        QtCore.QMetaObject.connectSlotsByName(MainWindow)

    def retranslateUi(self, MainWindow):
        _translate = QtCore.QCoreApplication.translate
        MainWindow.setWindowTitle(_translate("MainWindow", "MainWindow"))
        self.pushButton.setText(_translate("MainWindow", "打开视频文件"))
        self.pushButton_2.setText(_translate("MainWindow", "开始"))
        self.pushButton_3.setText(_translate("MainWindow", "暂停"))
        self.label.setText(_translate("MainWindow", "0%"))
        self.label_1.setText(_translate("MainWindow", "违规行为："))
        self.text.setText(_translate("MainWindow",""))

from myVideoWidget import myVideoWidget
