You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
exercise_2/myTelloProject-master/UIfile/SpeechRecognitionUI.py

122 lines
8.3 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'SpeechRecognitionUI.ui'
#
# Created by: PyQt5 UI code generator 5.15.2
#
# 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_SpeechRecognitionUI(object):
def setupUi(self, SpeechRecognitionUI):
SpeechRecognitionUI.setObjectName("SpeechRecognitionUI")
SpeechRecognitionUI.resize(546, 450)
self.gridLayout_2 = QtWidgets.QGridLayout(SpeechRecognitionUI)
self.gridLayout_2.setObjectName("gridLayout_2")
self.sentOrders = QtWidgets.QTextEdit(SpeechRecognitionUI)
font = QtGui.QFont()
font.setFamily("Heiti SC")
font.setPointSize(13)
font.setBold(False)
font.setItalic(False)
font.setWeight(50)
self.sentOrders.setFont(font)
self.sentOrders.setAutoFillBackground(False)
self.sentOrders.setStyleSheet("font: 13pt \"Heiti SC\";")
self.sentOrders.setFrameShape(QtWidgets.QFrame.Box)
self.sentOrders.setFrameShadow(QtWidgets.QFrame.Sunken)
self.sentOrders.setLineWidth(2)
self.sentOrders.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
self.sentOrders.setReadOnly(True)
self.sentOrders.setObjectName("sentOrders")
self.gridLayout_2.addWidget(self.sentOrders, 2, 0, 1, 1)
self.frame = QtWidgets.QFrame(SpeechRecognitionUI)
self.frame.setFrameShape(QtWidgets.QFrame.NoFrame)
self.frame.setFrameShadow(QtWidgets.QFrame.Sunken)
self.frame.setObjectName("frame")
self.verticalLayout = QtWidgets.QVBoxLayout(self.frame)
self.verticalLayout.setObjectName("verticalLayout")
self.label_voiceRecorder = QtWidgets.QLabel(self.frame)
self.label_voiceRecorder.setText("")
self.label_voiceRecorder.setPixmap(QtGui.QPixmap("../ico/voicerecorder_250px_1107359_easyicon.net.png"))
self.label_voiceRecorder.setAlignment(QtCore.Qt.AlignCenter)
self.label_voiceRecorder.setObjectName("label_voiceRecorder")
self.verticalLayout.addWidget(self.label_voiceRecorder)
self.gridLayout = QtWidgets.QGridLayout()
self.gridLayout.setObjectName("gridLayout")
self.btn_speech_pause_start = QtWidgets.QPushButton(self.frame)
font = QtGui.QFont()
font.setFamily("PingFang SC")
font.setBold(False)
font.setWeight(50)
self.btn_speech_pause_start.setFont(font)
self.btn_speech_pause_start.setCursor(QtGui.QCursor(QtCore.Qt.PointingHandCursor))
icon = QtGui.QIcon()
icon.addPixmap(QtGui.QPixmap("../ico/play_128px_1183440_easyicon.net.ico"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.btn_speech_pause_start.setIcon(icon)
self.btn_speech_pause_start.setObjectName("btn_speech_pause_start")
self.gridLayout.addWidget(self.btn_speech_pause_start, 0, 0, 1, 1)
self.verticalLayout.addLayout(self.gridLayout)
self.gridLayout_2.addWidget(self.frame, 1, 0, 1, 1)
self.dockWidget = QtWidgets.QDockWidget(SpeechRecognitionUI)
self.dockWidget.setCursor(QtGui.QCursor(QtCore.Qt.ArrowCursor))
self.dockWidget.setFloating(False)
self.dockWidget.setObjectName("dockWidget")
self.dockWidgetContents = QtWidgets.QWidget()
self.dockWidgetContents.setObjectName("dockWidgetContents")
self.horizontalLayout = QtWidgets.QHBoxLayout(self.dockWidgetContents)
self.horizontalLayout.setObjectName("horizontalLayout")
self.textBrowser_HintHelp = QtWidgets.QTextBrowser(self.dockWidgetContents)
self.textBrowser_HintHelp.setMinimumSize(QtCore.QSize(0, 150))
font = QtGui.QFont()
font.setFamily("Heiti SC")
font.setPointSize(18)
font.setBold(True)
font.setWeight(75)
self.textBrowser_HintHelp.setFont(font)
self.textBrowser_HintHelp.setAutoFillBackground(False)
self.textBrowser_HintHelp.setStyleSheet("background-color: Transparent;")
self.textBrowser_HintHelp.setFrameShape(QtWidgets.QFrame.NoFrame)
self.textBrowser_HintHelp.setVerticalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
self.textBrowser_HintHelp.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
self.textBrowser_HintHelp.setSizeAdjustPolicy(QtWidgets.QAbstractScrollArea.AdjustIgnored)
self.textBrowser_HintHelp.setObjectName("textBrowser_HintHelp")
self.horizontalLayout.addWidget(self.textBrowser_HintHelp)
self.dockWidget.setWidget(self.dockWidgetContents)
self.gridLayout_2.addWidget(self.dockWidget, 1, 1, 1, 1)
self.retranslateUi(SpeechRecognitionUI)
QtCore.QMetaObject.connectSlotsByName(SpeechRecognitionUI)
def retranslateUi(self, SpeechRecognitionUI):
_translate = QtCore.QCoreApplication.translate
SpeechRecognitionUI.setWindowTitle(_translate("SpeechRecognitionUI", "语音控制"))
self.sentOrders.setToolTip(_translate("SpeechRecognitionUI", "语音指令"))
self.sentOrders.setHtml(_translate("SpeechRecognitionUI", "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n"
"<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
"p, li { white-space: pre-wrap; }\n"
"</style></head><body style=\" font-family:\'Heiti SC\'; font-size:13pt; font-weight:400; font-style:normal;\">\n"
"<p style=\"-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><br /></p></body></html>"))
self.sentOrders.setPlaceholderText(_translate("SpeechRecognitionUI", ">>"))
self.btn_speech_pause_start.setToolTip(_translate("SpeechRecognitionUI", "暂停或开始语音控制"))
self.btn_speech_pause_start.setText(_translate("SpeechRecognitionUI", "开始"))
self.dockWidget.setWindowTitle(_translate("SpeechRecognitionUI", "帮助"))
self.textBrowser_HintHelp.setHtml(_translate("SpeechRecognitionUI", "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n"
"<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
"p, li { white-space: pre-wrap; }\n"
"</style></head><body style=\" font-family:\'Heiti SC\'; font-size:18pt; font-weight:600; font-style:normal;\">\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:13pt;\">有效语音指令如下:</span></p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:13pt;\">起飞;</span></p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:13pt;\">降落;</span></p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:13pt;\">悬停;</span></p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:13pt;\">向前/后/左/右/上/下飞x厘米x=20~500)</span></p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:13pt;\">顺时针旋转x度x=1~360)</span></p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:13pt;\">向前/后/左/右翻滚;</span></p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:13pt;\">速度设为x厘米每秒x=10~100)</span></p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:13pt;\">向前/后/左/右;(此时会一直朝某个方向飞,直到得到“停”指令)</span></p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:13pt;\">停;</span></p></body></html>"))