Пример #1
0
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.horizontalLayout = QtWidgets.QHBoxLayout(self.centralwidget)
        self.horizontalLayout.setObjectName("horizontalLayout")
        self.verticalLayout_2 = QtWidgets.QVBoxLayout()
        self.verticalLayout_2.setObjectName("verticalLayout_2")
        self.fileTableWidget = QtWidgets.QTableWidget(self.centralwidget)
        self.fileTableWidget.setMaximumSize(QtCore.QSize(375, 16777215))
        self.fileTableWidget.setSizeAdjustPolicy(
            QtWidgets.QAbstractScrollArea.AdjustToContents)
        self.fileTableWidget.setEditTriggers(
            QtWidgets.QAbstractItemView.NoEditTriggers)
        self.fileTableWidget.setSelectionBehavior(
            QtWidgets.QAbstractItemView.SelectRows)
        self.fileTableWidget.setHorizontalScrollMode(
            QtWidgets.QAbstractItemView.ScrollPerPixel)
        self.fileTableWidget.setShowGrid(False)
        self.fileTableWidget.setCornerButtonEnabled(False)
        self.fileTableWidget.setObjectName("fileTableWidget")
        self.fileTableWidget.setColumnCount(2)
        self.fileTableWidget.setRowCount(0)
        item = QtWidgets.QTableWidgetItem()
        self.fileTableWidget.setHorizontalHeaderItem(0, item)
        item = QtWidgets.QTableWidgetItem()
        self.fileTableWidget.setHorizontalHeaderItem(1, item)
        self.fileTableWidget.horizontalHeader().setDefaultSectionSize(60)
        self.fileTableWidget.horizontalHeader().setHighlightSections(False)
        self.fileTableWidget.horizontalHeader().setStretchLastSection(True)
        self.fileTableWidget.verticalHeader().setVisible(False)
        self.verticalLayout_2.addWidget(self.fileTableWidget)
        self.horizontalLayout.addLayout(self.verticalLayout_2)
        spacerItem = QtWidgets.QSpacerItem(20, 20,
                                           QtWidgets.QSizePolicy.Minimum,
                                           QtWidgets.QSizePolicy.Minimum)
        self.horizontalLayout.addItem(spacerItem)
        self.verticalLayout_6 = QtWidgets.QVBoxLayout()
        self.verticalLayout_6.setObjectName("verticalLayout_6")
        self.videoWidget = VideoWidget(self.centralwidget)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding,
                                           QtWidgets.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.videoWidget.sizePolicy().hasHeightForWidth())
        self.videoWidget.setSizePolicy(sizePolicy)
        self.videoWidget.setMinimumSize(QtCore.QSize(10, 0))
        self.videoWidget.setObjectName("videoWidget")
        self.verticalLayout_6.addWidget(self.videoWidget)
        self.horizontalLayout_3 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_3.setObjectName("horizontalLayout_3")
        self.currentVideoTime = QtWidgets.QLabel(self.centralwidget)
        self.currentVideoTime.setObjectName("currentVideoTime")
        self.horizontalLayout_3.addWidget(self.currentVideoTime)
        spacerItem1 = QtWidgets.QSpacerItem(20, 20,
                                            QtWidgets.QSizePolicy.Preferred,
                                            QtWidgets.QSizePolicy.Minimum)
        self.horizontalLayout_3.addItem(spacerItem1)
        self.horizontalSlider = QtWidgets.QSlider(self.centralwidget)
        self.horizontalSlider.setMaximum(999)
        self.horizontalSlider.setOrientation(QtCore.Qt.Horizontal)
        self.horizontalSlider.setInvertedAppearance(False)
        self.horizontalSlider.setInvertedControls(False)
        self.horizontalSlider.setObjectName("horizontalSlider")
        self.horizontalLayout_3.addWidget(self.horizontalSlider)
        spacerItem2 = QtWidgets.QSpacerItem(20, 20,
                                            QtWidgets.QSizePolicy.Preferred,
                                            QtWidgets.QSizePolicy.Minimum)
        self.horizontalLayout_3.addItem(spacerItem2)
        self.fullVideoTime = QtWidgets.QLabel(self.centralwidget)
        self.fullVideoTime.setObjectName("fullVideoTime")
        self.horizontalLayout_3.addWidget(self.fullVideoTime)
        self.verticalLayout_6.addLayout(self.horizontalLayout_3)
        self.horizontalLayout_2 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_2.setObjectName("horizontalLayout_2")
        spacerItem3 = QtWidgets.QSpacerItem(30, 20,
                                            QtWidgets.QSizePolicy.Preferred,
                                            QtWidgets.QSizePolicy.Minimum)
        self.horizontalLayout_2.addItem(spacerItem3)
        spacerItem4 = QtWidgets.QSpacerItem(40, 20,
                                            QtWidgets.QSizePolicy.Expanding,
                                            QtWidgets.QSizePolicy.Minimum)
        self.horizontalLayout_2.addItem(spacerItem4)
        self.playButton = QtWidgets.QPushButton(self.centralwidget)
        self.playButton.setObjectName("playButton")
        self.horizontalLayout_2.addWidget(self.playButton)
        self.pauseButton = QtWidgets.QPushButton(self.centralwidget)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred,
                                           QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.pauseButton.sizePolicy().hasHeightForWidth())
        self.pauseButton.setSizePolicy(sizePolicy)
        self.pauseButton.setObjectName("pauseButton")
        self.horizontalLayout_2.addWidget(self.pauseButton)
        spacerItem5 = QtWidgets.QSpacerItem(20, 20,
                                            QtWidgets.QSizePolicy.Expanding,
                                            QtWidgets.QSizePolicy.Minimum)
        self.horizontalLayout_2.addItem(spacerItem5)
        spacerItem6 = QtWidgets.QSpacerItem(30, 20,
                                            QtWidgets.QSizePolicy.Preferred,
                                            QtWidgets.QSizePolicy.Minimum)
        self.horizontalLayout_2.addItem(spacerItem6)
        self.verticalLayout_6.addLayout(self.horizontalLayout_2)
        self.horizontalLayout.addLayout(self.verticalLayout_6)
        spacerItem7 = QtWidgets.QSpacerItem(20, 20,
                                            QtWidgets.QSizePolicy.Minimum,
                                            QtWidgets.QSizePolicy.Minimum)
        self.horizontalLayout.addItem(spacerItem7)
        self.verticalLayout = QtWidgets.QVBoxLayout()
        self.verticalLayout.setObjectName("verticalLayout")
        self.labelTableWidget = QtWidgets.QTableWidget(self.centralwidget)
        self.labelTableWidget.setMaximumSize(QtCore.QSize(300, 16777215))
        self.labelTableWidget.setEditTriggers(
            QtWidgets.QAbstractItemView.NoEditTriggers)
        self.labelTableWidget.setSelectionBehavior(
            QtWidgets.QAbstractItemView.SelectRows)
        self.labelTableWidget.setShowGrid(False)
        self.labelTableWidget.setObjectName("labelTableWidget")
        self.labelTableWidget.setColumnCount(2)
        self.labelTableWidget.setRowCount(0)
        item = QtWidgets.QTableWidgetItem()
        self.labelTableWidget.setHorizontalHeaderItem(0, item)
        item = QtWidgets.QTableWidgetItem()
        self.labelTableWidget.setHorizontalHeaderItem(1, item)
        self.labelTableWidget.horizontalHeader().setDefaultSectionSize(120)
        self.labelTableWidget.horizontalHeader().setHighlightSections(False)
        self.labelTableWidget.horizontalHeader().setMinimumSectionSize(9)
        self.labelTableWidget.horizontalHeader().setStretchLastSection(True)
        self.labelTableWidget.verticalHeader().setVisible(False)
        self.verticalLayout.addWidget(self.labelTableWidget)
        self.horizontalLayout_4 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_4.setObjectName("horizontalLayout_4")
        self.verticalLayout.addLayout(self.horizontalLayout_4)
        self.boundingBoxCheckbox = QtWidgets.QCheckBox(self.centralwidget)
        self.boundingBoxCheckbox.setObjectName("boundingBoxCheckbox")
        self.verticalLayout.addWidget(self.boundingBoxCheckbox)
        self.showLabelsCheckbox = QtWidgets.QCheckBox(self.centralwidget)
        self.showLabelsCheckbox.setObjectName("showLabelsCheckbox")
        self.verticalLayout.addWidget(self.showLabelsCheckbox)
        self.showLaneLinesCheckbox = QtWidgets.QCheckBox(self.centralwidget)
        self.showLaneLinesCheckbox.setObjectName("showLaneLinesCheckbox")
        self.verticalLayout.addWidget(self.showLaneLinesCheckbox)
        self.horizontalLayout.addLayout(self.verticalLayout)
        MainWindow.setCentralWidget(self.centralwidget)
        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.actionOpenFolder = QtWidgets.QAction(MainWindow)
        self.actionOpenFolder.setObjectName("actionOpenFolder")
        self.actionProcessVideos = QtWidgets.QAction(MainWindow)
        self.actionProcessVideos.setObjectName("actionProcessVideos")
        self.actionInfo = QtWidgets.QAction(MainWindow)
        self.actionInfo.setObjectName("actionInfo")
        self.actionDelete_Predictions_For_Selected_Videos = QtWidgets.QAction(
            MainWindow)
        self.actionDelete_Predictions_For_Selected_Videos.setObjectName(
            "actionDelete_Predictions_For_Selected_Videos")
        self.actionRemove_Selected_Videos = QtWidgets.QAction(MainWindow)
        self.actionRemove_Selected_Videos.setObjectName(
            "actionRemove_Selected_Videos")
        self.toolBar.addAction(self.actionInfo)
        self.toolBar.addSeparator()
        self.toolBar.addAction(self.actionOpenFolder)
        self.toolBar.addSeparator()
        self.toolBar.addAction(self.actionProcessVideos)
        self.toolBar.addSeparator()
        self.toolBar.addAction(
            self.actionDelete_Predictions_For_Selected_Videos)
        self.toolBar.addSeparator()
        self.toolBar.addAction(self.actionRemove_Selected_Videos)

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

    def retranslateUi(self, MainWindow):
        _translate = QtCore.QCoreApplication.translate
        MainWindow.setWindowTitle(_translate("MainWindow",
                                             "Dataset Annotator"))
        self.fileTableWidget.setSortingEnabled(True)
        item = self.fileTableWidget.horizontalHeaderItem(0)
        item.setText(_translate("MainWindow", "Done"))
        item = self.fileTableWidget.horizontalHeaderItem(1)
        item.setText(_translate("MainWindow", "Filename"))
        self.currentVideoTime.setText(_translate("MainWindow", "000"))
        self.fullVideoTime.setText(_translate("MainWindow", "000"))
        self.playButton.setText(_translate("MainWindow", "Play"))
        self.pauseButton.setText(_translate("MainWindow", "Pause"))
        item = self.labelTableWidget.horizontalHeaderItem(0)
        item.setText(_translate("MainWindow", "Label"))
        item = self.labelTableWidget.horizontalHeaderItem(1)
        item.setText(_translate("MainWindow", "Time"))
        self.boundingBoxCheckbox.setText(
            _translate("MainWindow", "Show Bounding Box"))
        self.showLabelsCheckbox.setText(
            _translate("MainWindow", "Show Current Label"))
        self.showLaneLinesCheckbox.setText(
            _translate("MainWindow", "Show Lane Lines"))
        self.toolBar.setWindowTitle(_translate("MainWindow", "toolBar"))
        self.actionOpenFolder.setText(_translate("MainWindow", "Open Folder"))
        self.actionOpenFolder.setToolTip(
            _translate("MainWindow", "Recursively Process Videos From Folder"))
        self.actionProcessVideos.setText(
            _translate("MainWindow", "Process Videos"))
        self.actionInfo.setText(_translate("MainWindow", "Info"))
        self.actionDelete_Predictions_For_Selected_Videos.setText(
            _translate("MainWindow", "Delete Predictions For Selected Videos"))
        self.actionRemove_Selected_Videos.setText(
            _translate("MainWindow", "Remove Selected Videos"))
Пример #2
0
class Ui_FaceDetection(object):
    def setupUi(self, FaceDetection):
        FaceDetection.setObjectName("FaceDetection")
        FaceDetection.setEnabled(True)
        FaceDetection.resize(992, 562)
        FaceDetection.setMinimumSize(QtCore.QSize(992, 562))
        FaceDetection.setMaximumSize(QtCore.QSize(16777215, 562))
        self.centralwidget = QtGui.QWidget(FaceDetection)
        self.centralwidget.setObjectName("centralwidget")
        self.verticalLayout_7 = QtGui.QVBoxLayout(self.centralwidget)
        self.verticalLayout_7.setObjectName("verticalLayout_7")
        self.horizontalLayout = QtGui.QHBoxLayout()
        self.horizontalLayout.setObjectName("horizontalLayout")
        self.verticalLayout = QtGui.QVBoxLayout()
        self.verticalLayout.setObjectName("verticalLayout")
        self.video = VideoWidget(self.centralwidget)
        self.video.setMinimumSize(QtCore.QSize(640, 480))
        self.video.setMaximumSize(QtCore.QSize(640, 480))
        self.video.setAutoFillBackground(False)
        self.video.setObjectName("video")
        self.verticalLayout.addWidget(self.video)
        self.horizontal_speed = QtGui.QSlider(self.centralwidget)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred,
                                       QtGui.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.horizontal_speed.sizePolicy().hasHeightForWidth())
        self.horizontal_speed.setSizePolicy(sizePolicy)
        self.horizontal_speed.setCursor(QtCore.Qt.SizeHorCursor)
        self.horizontal_speed.setFocusPolicy(QtCore.Qt.ClickFocus)
        self.horizontal_speed.setMinimum(-100)
        self.horizontal_speed.setMaximum(100)
        self.horizontal_speed.setPageStep(0)
        self.horizontal_speed.setOrientation(QtCore.Qt.Horizontal)
        self.horizontal_speed.setObjectName("horizontal_speed")
        self.verticalLayout.addWidget(self.horizontal_speed)
        self.horizontalLayout.addLayout(self.verticalLayout)
        self.vertical_speed = QtGui.QSlider(self.centralwidget)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred,
                                       QtGui.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.vertical_speed.sizePolicy().hasHeightForWidth())
        self.vertical_speed.setSizePolicy(sizePolicy)
        self.vertical_speed.setCursor(QtCore.Qt.SizeVerCursor)
        self.vertical_speed.setFocusPolicy(QtCore.Qt.ClickFocus)
        self.vertical_speed.setMinimum(-100)
        self.vertical_speed.setMaximum(100)
        self.vertical_speed.setPageStep(0)
        self.vertical_speed.setOrientation(QtCore.Qt.Vertical)
        self.vertical_speed.setObjectName("vertical_speed")
        self.horizontalLayout.addWidget(self.vertical_speed)
        self.verticalLayout_2 = QtGui.QVBoxLayout()
        self.verticalLayout_2.setObjectName("verticalLayout_2")
        self.groupBox_3 = QtGui.QGroupBox(self.centralwidget)
        self.groupBox_3.setObjectName("groupBox_3")
        self.verticalLayout_3 = QtGui.QVBoxLayout(self.groupBox_3)
        self.verticalLayout_3.setObjectName("verticalLayout_3")
        self.serial_select = QtGui.QComboBox(self.groupBox_3)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred,
                                       QtGui.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.serial_select.sizePolicy().hasHeightForWidth())
        self.serial_select.setSizePolicy(sizePolicy)
        self.serial_select.setCursor(QtCore.Qt.PointingHandCursor)
        self.serial_select.setFocusPolicy(QtCore.Qt.StrongFocus)
        self.serial_select.setObjectName("serial_select")
        self.serial_select.addItem("")
        self.verticalLayout_3.addWidget(self.serial_select)
        self.log = QtGui.QTextEdit(self.groupBox_3)
        self.log.setEnabled(True)
        self.log.setUndoRedoEnabled(True)
        self.log.setReadOnly(True)
        self.log.setObjectName("log")
        self.verticalLayout_3.addWidget(self.log)
        self.command_edit = QtGui.QLineEdit(self.groupBox_3)
        self.command_edit.setEnabled(False)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding,
                                       QtGui.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.command_edit.sizePolicy().hasHeightForWidth())
        self.command_edit.setSizePolicy(sizePolicy)
        self.command_edit.setPlaceholderText("Command")
        self.command_edit.setObjectName("command_edit")
        self.verticalLayout_3.addWidget(self.command_edit)
        self.verticalLayout_2.addWidget(self.groupBox_3)
        self.fanbox = QtGui.QGroupBox(self.centralwidget)
        self.fanbox.setEnabled(False)
        self.fanbox.setMaximumSize(QtCore.QSize(16777215, 184))
        self.fanbox.setObjectName("fanbox")
        self.verticalLayout_6 = QtGui.QVBoxLayout(self.fanbox)
        self.verticalLayout_6.setObjectName("verticalLayout_6")
        self.fan_enabled = QtGui.QCheckBox(self.fanbox)
        self.fan_enabled.setCursor(QtCore.Qt.PointingHandCursor)
        self.fan_enabled.setFocusPolicy(QtCore.Qt.ClickFocus)
        self.fan_enabled.setObjectName("fan_enabled")
        self.verticalLayout_6.addWidget(self.fan_enabled)
        self.horizontalLayout_3 = QtGui.QHBoxLayout()
        self.horizontalLayout_3.setObjectName("horizontalLayout_3")
        self.speed_dial = QtGui.QDial(self.fanbox)
        self.speed_dial.setCursor(QtCore.Qt.PointingHandCursor)
        self.speed_dial.setFocusPolicy(QtCore.Qt.ClickFocus)
        self.speed_dial.setMaximum(100)
        self.speed_dial.setSliderPosition(80)
        self.speed_dial.setOrientation(QtCore.Qt.Horizontal)
        self.speed_dial.setInvertedAppearance(False)
        self.speed_dial.setInvertedControls(False)
        self.speed_dial.setObjectName("speed_dial")
        self.horizontalLayout_3.addWidget(self.speed_dial)
        self.speed_label = QtGui.QLabel(self.fanbox)
        self.speed_label.setAlignment(QtCore.Qt.AlignLeading
                                      | QtCore.Qt.AlignLeft
                                      | QtCore.Qt.AlignVCenter)
        self.speed_label.setObjectName("speed_label")
        self.horizontalLayout_3.addWidget(self.speed_label)
        self.verticalLayout_6.addLayout(self.horizontalLayout_3)
        self.verticalLayout_2.addWidget(self.fanbox)
        self.movementbox = QtGui.QGroupBox(self.centralwidget)
        self.movementbox.setEnabled(False)
        self.movementbox.setObjectName("movementbox")
        self.verticalLayout_4 = QtGui.QVBoxLayout(self.movementbox)
        self.verticalLayout_4.setObjectName("verticalLayout_4")
        self.faces_enabled = QtGui.QCheckBox(self.movementbox)
        self.faces_enabled.setCursor(QtCore.Qt.PointingHandCursor)
        self.faces_enabled.setFocusPolicy(QtCore.Qt.ClickFocus)
        self.faces_enabled.setObjectName("faces_enabled")
        self.verticalLayout_4.addWidget(self.faces_enabled)
        self.verticalLayout_2.addWidget(self.movementbox)
        self.horizontalLayout.addLayout(self.verticalLayout_2)
        self.verticalLayout_7.addLayout(self.horizontalLayout)
        FaceDetection.setCentralWidget(self.centralwidget)
        self.menubar = QtGui.QMenuBar()
        self.menubar.setGeometry(QtCore.QRect(0, 0, 992, 22))
        self.menubar.setObjectName("menubar")
        self.menuBioRob_FaceDetection = QtGui.QMenu(self.menubar)
        self.menuBioRob_FaceDetection.setObjectName("menuBioRob_FaceDetection")
        self.menuAbout = QtGui.QMenu(self.menubar)
        self.menuAbout.setObjectName("menuAbout")
        FaceDetection.setMenuBar(self.menubar)
        self.menuBioRob_FaceDetection.addSeparator()
        self.menubar.addAction(self.menuBioRob_FaceDetection.menuAction())
        self.menubar.addAction(self.menuAbout.menuAction())

        self.retranslateUi(FaceDetection)
        QtCore.QObject.connect(self.faces_enabled,
                               QtCore.SIGNAL("toggled(bool)"),
                               self.horizontal_speed.setDisabled)
        QtCore.QObject.connect(self.faces_enabled,
                               QtCore.SIGNAL("toggled(bool)"),
                               self.vertical_speed.setDisabled)
        QtCore.QObject.connect(self.fan_enabled,
                               QtCore.SIGNAL("toggled(bool)"),
                               self.speed_dial.setDisabled)
        QtCore.QMetaObject.connectSlotsByName(FaceDetection)

    def retranslateUi(self, FaceDetection):
        FaceDetection.setWindowTitle(
            QtGui.QApplication.translate("FaceDetection",
                                         "BioRob FaceDetection", None,
                                         QtGui.QApplication.UnicodeUTF8))
        self.groupBox_3.setTitle(
            QtGui.QApplication.translate("FaceDetection", "Connection", None,
                                         QtGui.QApplication.UnicodeUTF8))
        self.serial_select.setItemText(
            0,
            QtGui.QApplication.translate("FaceDetection", "Not Connected",
                                         None, QtGui.QApplication.UnicodeUTF8))
        self.log.setHtml(
            QtGui.QApplication.translate(
                "FaceDetection",
                "<!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:\'Lucida Grande\'; 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>",
                None, QtGui.QApplication.UnicodeUTF8))
        self.fanbox.setTitle(
            QtGui.QApplication.translate("FaceDetection", "Fan", None,
                                         QtGui.QApplication.UnicodeUTF8))
        self.fan_enabled.setText(
            QtGui.QApplication.translate("FaceDetection", "Automatic", None,
                                         QtGui.QApplication.UnicodeUTF8))
        self.speed_label.setText(
            QtGui.QApplication.translate("FaceDetection", "80 %", None,
                                         QtGui.QApplication.UnicodeUTF8))
        self.movementbox.setTitle(
            QtGui.QApplication.translate("FaceDetection", "Movement", None,
                                         QtGui.QApplication.UnicodeUTF8))
        self.faces_enabled.setText(
            QtGui.QApplication.translate("FaceDetection", "Follow faces", None,
                                         QtGui.QApplication.UnicodeUTF8))
        self.menuBioRob_FaceDetection.setTitle(
            QtGui.QApplication.translate("FaceDetection",
                                         "BioRob FaceDetection", None,
                                         QtGui.QApplication.UnicodeUTF8))
        self.menuAbout.setTitle(
            QtGui.QApplication.translate("FaceDetection", "About", None,
                                         QtGui.QApplication.UnicodeUTF8))
Пример #3
0
class Ui_FaceDetection(object):
    def setupUi(self, FaceDetection):
        FaceDetection.setObjectName("FaceDetection")
        FaceDetection.setEnabled(True)
        FaceDetection.resize(992, 562)
        FaceDetection.setMinimumSize(QtCore.QSize(992, 562))
        FaceDetection.setMaximumSize(QtCore.QSize(16777215, 562))
        self.centralwidget = QtGui.QWidget(FaceDetection)
        self.centralwidget.setObjectName("centralwidget")
        self.verticalLayout_7 = QtGui.QVBoxLayout(self.centralwidget)
        self.verticalLayout_7.setObjectName("verticalLayout_7")
        self.horizontalLayout = QtGui.QHBoxLayout()
        self.horizontalLayout.setObjectName("horizontalLayout")
        self.verticalLayout = QtGui.QVBoxLayout()
        self.verticalLayout.setObjectName("verticalLayout")
        self.video = VideoWidget(self.centralwidget)
        self.video.setMinimumSize(QtCore.QSize(640, 480))
        self.video.setMaximumSize(QtCore.QSize(640, 480))
        self.video.setAutoFillBackground(False)
        self.video.setObjectName("video")
        self.verticalLayout.addWidget(self.video)
        self.horizontal_speed = QtGui.QSlider(self.centralwidget)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.horizontal_speed.sizePolicy().hasHeightForWidth())
        self.horizontal_speed.setSizePolicy(sizePolicy)
        self.horizontal_speed.setCursor(QtCore.Qt.SizeHorCursor)
        self.horizontal_speed.setFocusPolicy(QtCore.Qt.ClickFocus)
        self.horizontal_speed.setMinimum(-100)
        self.horizontal_speed.setMaximum(100)
        self.horizontal_speed.setPageStep(0)
        self.horizontal_speed.setOrientation(QtCore.Qt.Horizontal)
        self.horizontal_speed.setObjectName("horizontal_speed")
        self.verticalLayout.addWidget(self.horizontal_speed)
        self.horizontalLayout.addLayout(self.verticalLayout)
        self.vertical_speed = QtGui.QSlider(self.centralwidget)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.vertical_speed.sizePolicy().hasHeightForWidth())
        self.vertical_speed.setSizePolicy(sizePolicy)
        self.vertical_speed.setCursor(QtCore.Qt.SizeVerCursor)
        self.vertical_speed.setFocusPolicy(QtCore.Qt.ClickFocus)
        self.vertical_speed.setMinimum(-100)
        self.vertical_speed.setMaximum(100)
        self.vertical_speed.setPageStep(0)
        self.vertical_speed.setOrientation(QtCore.Qt.Vertical)
        self.vertical_speed.setObjectName("vertical_speed")
        self.horizontalLayout.addWidget(self.vertical_speed)
        self.verticalLayout_2 = QtGui.QVBoxLayout()
        self.verticalLayout_2.setObjectName("verticalLayout_2")
        self.groupBox_3 = QtGui.QGroupBox(self.centralwidget)
        self.groupBox_3.setObjectName("groupBox_3")
        self.verticalLayout_3 = QtGui.QVBoxLayout(self.groupBox_3)
        self.verticalLayout_3.setObjectName("verticalLayout_3")
        self.serial_select = QtGui.QComboBox(self.groupBox_3)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.serial_select.sizePolicy().hasHeightForWidth())
        self.serial_select.setSizePolicy(sizePolicy)
        self.serial_select.setCursor(QtCore.Qt.PointingHandCursor)
        self.serial_select.setFocusPolicy(QtCore.Qt.StrongFocus)
        self.serial_select.setObjectName("serial_select")
        self.serial_select.addItem("")
        self.verticalLayout_3.addWidget(self.serial_select)
        self.log = QtGui.QTextEdit(self.groupBox_3)
        self.log.setEnabled(True)
        self.log.setUndoRedoEnabled(True)
        self.log.setReadOnly(True)
        self.log.setObjectName("log")
        self.verticalLayout_3.addWidget(self.log)
        self.command_edit = QtGui.QLineEdit(self.groupBox_3)
        self.command_edit.setEnabled(False)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.command_edit.sizePolicy().hasHeightForWidth())
        self.command_edit.setSizePolicy(sizePolicy)
        self.command_edit.setPlaceholderText("Command")
        self.command_edit.setObjectName("command_edit")
        self.verticalLayout_3.addWidget(self.command_edit)
        self.verticalLayout_2.addWidget(self.groupBox_3)
        self.fanbox = QtGui.QGroupBox(self.centralwidget)
        self.fanbox.setEnabled(False)
        self.fanbox.setMaximumSize(QtCore.QSize(16777215, 184))
        self.fanbox.setObjectName("fanbox")
        self.verticalLayout_6 = QtGui.QVBoxLayout(self.fanbox)
        self.verticalLayout_6.setObjectName("verticalLayout_6")
        self.fan_enabled = QtGui.QCheckBox(self.fanbox)
        self.fan_enabled.setCursor(QtCore.Qt.PointingHandCursor)
        self.fan_enabled.setFocusPolicy(QtCore.Qt.ClickFocus)
        self.fan_enabled.setObjectName("fan_enabled")
        self.verticalLayout_6.addWidget(self.fan_enabled)
        self.horizontalLayout_3 = QtGui.QHBoxLayout()
        self.horizontalLayout_3.setObjectName("horizontalLayout_3")
        self.speed_dial = QtGui.QDial(self.fanbox)
        self.speed_dial.setCursor(QtCore.Qt.PointingHandCursor)
        self.speed_dial.setFocusPolicy(QtCore.Qt.ClickFocus)
        self.speed_dial.setMaximum(100)
        self.speed_dial.setSliderPosition(80)
        self.speed_dial.setOrientation(QtCore.Qt.Horizontal)
        self.speed_dial.setInvertedAppearance(False)
        self.speed_dial.setInvertedControls(False)
        self.speed_dial.setObjectName("speed_dial")
        self.horizontalLayout_3.addWidget(self.speed_dial)
        self.speed_label = QtGui.QLabel(self.fanbox)
        self.speed_label.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignVCenter)
        self.speed_label.setObjectName("speed_label")
        self.horizontalLayout_3.addWidget(self.speed_label)
        self.verticalLayout_6.addLayout(self.horizontalLayout_3)
        self.verticalLayout_2.addWidget(self.fanbox)
        self.movementbox = QtGui.QGroupBox(self.centralwidget)
        self.movementbox.setEnabled(False)
        self.movementbox.setObjectName("movementbox")
        self.verticalLayout_4 = QtGui.QVBoxLayout(self.movementbox)
        self.verticalLayout_4.setObjectName("verticalLayout_4")
        self.faces_enabled = QtGui.QCheckBox(self.movementbox)
        self.faces_enabled.setCursor(QtCore.Qt.PointingHandCursor)
        self.faces_enabled.setFocusPolicy(QtCore.Qt.ClickFocus)
        self.faces_enabled.setObjectName("faces_enabled")
        self.verticalLayout_4.addWidget(self.faces_enabled)
        self.verticalLayout_2.addWidget(self.movementbox)
        self.horizontalLayout.addLayout(self.verticalLayout_2)
        self.verticalLayout_7.addLayout(self.horizontalLayout)
        FaceDetection.setCentralWidget(self.centralwidget)
        self.menubar = QtGui.QMenuBar()
        self.menubar.setGeometry(QtCore.QRect(0, 0, 992, 22))
        self.menubar.setObjectName("menubar")
        self.menuBioRob_FaceDetection = QtGui.QMenu(self.menubar)
        self.menuBioRob_FaceDetection.setObjectName("menuBioRob_FaceDetection")
        self.menuAbout = QtGui.QMenu(self.menubar)
        self.menuAbout.setObjectName("menuAbout")
        FaceDetection.setMenuBar(self.menubar)
        self.menuBioRob_FaceDetection.addSeparator()
        self.menubar.addAction(self.menuBioRob_FaceDetection.menuAction())
        self.menubar.addAction(self.menuAbout.menuAction())

        self.retranslateUi(FaceDetection)
        QtCore.QObject.connect(self.faces_enabled, QtCore.SIGNAL("toggled(bool)"), self.horizontal_speed.setDisabled)
        QtCore.QObject.connect(self.faces_enabled, QtCore.SIGNAL("toggled(bool)"), self.vertical_speed.setDisabled)
        QtCore.QObject.connect(self.fan_enabled, QtCore.SIGNAL("toggled(bool)"), self.speed_dial.setDisabled)
        QtCore.QMetaObject.connectSlotsByName(FaceDetection)

    def retranslateUi(self, FaceDetection):
        FaceDetection.setWindowTitle(QtGui.QApplication.translate("FaceDetection", "BioRob FaceDetection", None, QtGui.QApplication.UnicodeUTF8))
        self.groupBox_3.setTitle(QtGui.QApplication.translate("FaceDetection", "Connection", None, QtGui.QApplication.UnicodeUTF8))
        self.serial_select.setItemText(0, QtGui.QApplication.translate("FaceDetection", "Not Connected", None, QtGui.QApplication.UnicodeUTF8))
        self.log.setHtml(QtGui.QApplication.translate("FaceDetection", "<!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:\'Lucida Grande\'; 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>", None, QtGui.QApplication.UnicodeUTF8))
        self.fanbox.setTitle(QtGui.QApplication.translate("FaceDetection", "Fan", None, QtGui.QApplication.UnicodeUTF8))
        self.fan_enabled.setText(QtGui.QApplication.translate("FaceDetection", "Automatic", None, QtGui.QApplication.UnicodeUTF8))
        self.speed_label.setText(QtGui.QApplication.translate("FaceDetection", "80 %", None, QtGui.QApplication.UnicodeUTF8))
        self.movementbox.setTitle(QtGui.QApplication.translate("FaceDetection", "Movement", None, QtGui.QApplication.UnicodeUTF8))
        self.faces_enabled.setText(QtGui.QApplication.translate("FaceDetection", "Follow faces", None, QtGui.QApplication.UnicodeUTF8))
        self.menuBioRob_FaceDetection.setTitle(QtGui.QApplication.translate("FaceDetection", "BioRob FaceDetection", None, QtGui.QApplication.UnicodeUTF8))
        self.menuAbout.setTitle(QtGui.QApplication.translate("FaceDetection", "About", None, QtGui.QApplication.UnicodeUTF8))