class Ui_MainWindow(QWidget): #create media player object mediaPlayer = QMediaPlayer(None, QMediaPlayer.VideoSurface) repeatMedia = False repeatItem = "" def formatTime(self, ms): h, r = divmod(ms, 3600000) m, r = divmod(r, 60000) s, _ = divmod(r, 1000) return ("%02d:%02d:%02d" % (h,m,s)) if h else ("%02d:%02d" % (m,s)) def browseFile(self): if self.mediaPlayer.state() == QMediaPlayer.PlayingState: self.play.setIcon(self.playIcon) self.mediaPlayer.pause() elif self.mediaPlayer.state() == QMediaPlayer.PausedState: self.play.setIcon(self.pauseIcon) self.mediaPlayer.play() else: media, _ = QFileDialog.getOpenFileName(self, "Open Video") if media != "": self.mediaPlayer.setMedia(QMediaContent(QUrl.fromLocalFile(media))) self.mediaPlayer.play() self.play.setIcon(self.pauseIcon) def openFile(self): media, _ = QFileDialog.getOpenFileName(self, "Open Video") if media != "": self.mediaPlayer.setMedia(QMediaContent(QUrl.fromLocalFile(media))) self.mediaPlayer.play() def closeFile(self): sys.exit(app.exec_()) def pauseVideo(self): self.mediaPlayer.pause() def stopVideo(self): self.mediaPlayer.stop() def vidPosition(self, position): self.mediaPlayer.setPosition(position) def locationChanged(self, position): self.duration.setValue(position) if position >= 0: self.startTime.setText(self.formatTime(position)) if self.mediaPlayer.state() == 0: if self.repeatMedia: self.mediaPlayer.play() else: self.duration.setValue(0) self.play.setIcon(self.playIcon) self.startTime.setText("--:--") self.endTime.setText("--:--") def durationChanged(self, duration): self.duration.setRange(0, duration) playTime = self.mediaPlayer.duration() self.endTime.setText(self.formatTime(playTime)) def volumeControl(self, percentage): self.mediaPlayer.setVolume(percentage) if percentage <= 100 and percentage >= 60: self.volume.setIcon(self.volumeUp) elif percentage < 60 and percentage >= 30: self.volume.setIcon(self.volumeMed) elif percentage < 30 and percentage >= 1: self.volume.setIcon(self.volumeDown) else: self.volume.setIcon(self.volumeMute) def muteVolume(self): if self.mediaPlayer.isMuted() == True: self.mediaPlayer.setMuted(False) self.volumeControl(self.volume_2.value()) else: self.mediaPlayer.setMuted(True) self.volume.setIcon(self.volumeMute) def loopMedia(self): if self.repeatMedia == True: self.repeatMedia = False self.repeat.setIcon(self.repeatDeactive) elif self.repeatMedia == False: self.repeatMedia = True self.repeat.setIcon(self.repeatActive) def setupUi(self, MainWindow): MainWindow.setObjectName("MainWindow") MainWindow.resize(1027, 648) icon = QtGui.QIcon() icon.addPixmap(QtGui.QPixmap(":/imgs/white Icons/video.svg"), QtGui.QIcon.Normal, QtGui.QIcon.Off) MainWindow.setWindowIcon(icon) MainWindow.setStyleSheet("#startTime, #endTime{\n" " color: #fff;\n" "}") self.centralwidget = QtWidgets.QWidget(MainWindow) self.centralwidget.setObjectName("centralwidget") self.horizontalLayout = QtWidgets.QHBoxLayout(self.centralwidget) self.horizontalLayout.setObjectName("horizontalLayout") self.frame = QtWidgets.QFrame(self.centralwidget) self.frame.setStyleSheet("#frame{\n" "background-color:rgb(0, 13, 20);\n" "}\n" "\n" "QPushButton{\n" "background: transparent;\n" "text-align: center;\n" "font: 75 15pt \"Comic Sans MS\";\n" "color: rgb(58, 180, 204);\n" "border-radius: 30px;\n" "}\n" "") self.frame.setFrameShape(QtWidgets.QFrame.StyledPanel) self.frame.setFrameShadow(QtWidgets.QFrame.Raised) self.frame.setObjectName("frame") self.verticalLayout_3 = QtWidgets.QVBoxLayout(self.frame) self.verticalLayout_3.setObjectName("verticalLayout_3") self.verticalLayout_4 = QtWidgets.QVBoxLayout() self.verticalLayout_4.setObjectName("verticalLayout_4") self.videoWidget = QVideoWidget(self.frame) 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(700, 200)) ## self.videoWidget.setStyleSheet("background-color: #43549C") self.videoWidget.setStyleSheet("background-color: #e33a0b") self.videoWidget.setObjectName("videoWidget") self.verticalLayout_4.addWidget(self.videoWidget) self.verticalLayout_3.addLayout(self.verticalLayout_4) self.horizontalLayout_2 = QtWidgets.QHBoxLayout() self.horizontalLayout_2.setObjectName("horizontalLayout_2") self.startTime = QtWidgets.QLabel(self.frame) self.startTime.setObjectName("startTime") self.horizontalLayout_2.addWidget(self.startTime) self.duration = QtWidgets.QSlider(self.frame) self.duration.setMouseTracking(False) self.duration.setTabletTracking(False) self.duration.setFocusPolicy(QtCore.Qt.StrongFocus) self.duration.setAcceptDrops(False) self.duration.setLayoutDirection(QtCore.Qt.LeftToRight) self.duration.setAutoFillBackground(False) self.duration.setStyleSheet("background: transparent;\n" "-webkit-appearance:round;\n" "border-radius: 5px;\n" "color: rgb(0, 255, 204);\n" "") self.duration.setInputMethodHints(QtCore.Qt.ImhNone) self.duration.setSingleStep(1) self.duration.setProperty("value", 0) self.duration.setSliderPosition(0) self.duration.setTracking(True) self.duration.setOrientation(QtCore.Qt.Horizontal) self.duration.setInvertedAppearance(False) self.duration.setInvertedControls(False) self.duration.setObjectName("duration") self.horizontalLayout_2.addWidget(self.duration) self.endTime = QtWidgets.QLabel(self.frame) self.endTime.setObjectName("endTime") self.horizontalLayout_2.addWidget(self.endTime) self.verticalLayout_3.addLayout(self.horizontalLayout_2) self.horizontalLayout_5 = QtWidgets.QHBoxLayout() self.horizontalLayout_5.setObjectName("horizontalLayout_5") self.frame_2 = QtWidgets.QFrame(self.frame) self.frame_2.setStyleSheet("QPushButoon{\n" "border-radius: 20px;\n" "}") self.frame_2.setFrameShape(QtWidgets.QFrame.StyledPanel) self.frame_2.setFrameShadow(QtWidgets.QFrame.Raised) self.frame_2.setObjectName("frame_2") self.horizontalLayout_6 = QtWidgets.QHBoxLayout(self.frame_2) self.horizontalLayout_6.setContentsMargins(0, 0, 0, 0) self.horizontalLayout_6.setSpacing(7) self.horizontalLayout_6.setObjectName("horizontalLayout_6") self.volume = QtWidgets.QPushButton(self.frame_2) font = QtGui.QFont() font.setFamily("Comic Sans MS") font.setPointSize(15) font.setBold(False) font.setItalic(False) font.setWeight(9) self.volume.setFont(font) self.volume.setStyleSheet("#volume:hover{\n" "icon: url(:/buttons/white Icons/mute-hover.svg);\n" "cursor: pointer;\n" "}") self.volume.setText("") self.volumeMute = QtGui.QIcon() self.volumeMute.addPixmap(QtGui.QPixmap(":/buttons/white Icons/mute1.svg"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.volumeDown = QtGui.QIcon() self.volumeDown.addPixmap(QtGui.QPixmap(":/buttons/white Icons/volume-down.svg"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.volumeMed = QtGui.QIcon() self.volumeMed.addPixmap(QtGui.QPixmap(":/buttons/white Icons/volume-medium.svg"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.volumeUp = QtGui.QIcon() self.volumeUp.addPixmap(QtGui.QPixmap(":/buttons/white Icons/volume-up.svg"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.volume.setIcon(self.volumeUp) self.volume.setIconSize(QtCore.QSize(35, 35)) self.volume.setFlat(False) self.volume.setObjectName("volume") self.horizontalLayout_6.addWidget(self.volume) self.volume_2 = QtWidgets.QSlider(self.frame_2) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.volume_2.sizePolicy().hasHeightForWidth()) self.volume_2.setSizePolicy(sizePolicy) font = QtGui.QFont() font.setPointSize(1) self.volume_2.setFont(font) self.volume_2.setMaximum(26) self.volume_2.setPageStep(6) self.volume_2.setOrientation(QtCore.Qt.Horizontal) self.volume_2.setObjectName("volume_2") self.horizontalLayout_6.addWidget(self.volume_2) self.prev = QtWidgets.QPushButton(self.frame_2) self.prev.setStyleSheet("#prev:hover{\n" "icon: url(:/buttons/cyan icons/previous.svg);\n" "}") self.prev.setText("") icon2 = QtGui.QIcon() icon2.addPixmap(QtGui.QPixmap(":/buttons/white Icons/previous (1).svg"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.prev.setIcon(icon2) self.prev.setIconSize(QtCore.QSize(35, 35)) self.prev.setObjectName("prev") self.horizontalLayout_6.addWidget(self.prev) self.play = QtWidgets.QPushButton(self.frame_2) self.play.setToolTip("") self.play.setStyleSheet("border-radius: 38px;") self.play.setText("") self.playIcon = QtGui.QIcon() self.playIcon.addPixmap(QtGui.QPixmap(":/imgs/cyan icons/play.svg"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.pauseIcon = QtGui.QIcon() self.pauseIcon.addPixmap(QtGui.QPixmap(":/imgs/cyan icons/pause.svg"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.play.setIcon(self.playIcon) self.play.setIconSize(QtCore.QSize(70, 70)) self.play.setObjectName("play") self.horizontalLayout_6.addWidget(self.play) self.next = QtWidgets.QPushButton(self.frame_2) self.next.setStyleSheet("#next:hover{\n" "icon: url(:/buttons/cyan icons/next (1).svg);\n" "}") self.next.setText("") icon4 = QtGui.QIcon() icon4.addPixmap(QtGui.QPixmap(":/buttons/white Icons/next.svg"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.next.setIcon(icon4) self.next.setIconSize(QtCore.QSize(35, 35)) self.next.setObjectName("next") self.horizontalLayout_6.addWidget(self.next) self.repeat = QtWidgets.QPushButton(self.frame_2) self.repeat.setWhatsThis("") self.repeat.setAccessibleName("") self.repeat.setAccessibleDescription("") self.repeat.setStyleSheet("#repeat{\n" "border-radius: 10px;\n" "}\n" "#repeat:hover{\n" "icon: url(:/buttons/cyan icons/repeat (1).svg);\n" "}") self.repeat.setText("") self.repeatDeactive = QtGui.QIcon() self.repeatDeactive.addPixmap(QtGui.QPixmap(":/buttons/white Icons/repeat.svg"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.repeatActive = QtGui.QIcon() self.repeatActive.addPixmap(QtGui.QPixmap(":/buttons/cyan icons/repeat (1).svg"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.repeat.setIcon(self.repeatDeactive) self.repeat.setIconSize(QtCore.QSize(35, 35)) self.repeat.setObjectName("repeat") self.horizontalLayout_6.addWidget(self.repeat) self.playlist = QtWidgets.QPushButton(self.frame_2) self.playlist.setText("") icon6 = QtGui.QIcon() icon6.addPixmap(QtGui.QPixmap(":/imgs/cyan icons/playlist.svg"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.playlist.setIcon(icon6) self.playlist.setIconSize(QtCore.QSize(40, 40)) self.playlist.setObjectName("playlist") self.horizontalLayout_6.addWidget(self.playlist) self.horizontalLayout_5.addWidget(self.frame_2) self.verticalLayout_3.addLayout(self.horizontalLayout_5) self.horizontalLayout.addWidget(self.frame) MainWindow.setCentralWidget(self.centralwidget) self.menuBar = QtWidgets.QMenuBar(MainWindow) self.menuBar.setGeometry(QtCore.QRect(0, 0, 1027, 21)) self.menuBar.setObjectName("menuBar") self.menuFile = QtWidgets.QMenu(self.menuBar) self.menuFile.setObjectName("menuFile") MainWindow.setMenuBar(self.menuBar) self.actionOpen_File = QtWidgets.QAction(MainWindow) self.actionOpen_File.setObjectName("actionOpen_File") self.actionPlaylist = QtWidgets.QAction(MainWindow) self.actionPlaylist.setObjectName("actionPlaylist") self.actionQuit = QtWidgets.QAction(MainWindow) self.actionQuit.setObjectName("actionQuit") self.menuFile.addAction(self.actionOpen_File) self.menuFile.addAction(self.actionPlaylist) self.menuFile.addSeparator() self.menuFile.addAction(self.actionQuit) self.menuBar.addAction(self.menuFile.menuAction()) self.retranslateUi(MainWindow) QtCore.QMetaObject.connectSlotsByName(MainWindow) ################### Video Widget ################ self.mediaPlayer.setVideoOutput(self.videoWidget) ################################################# ################### Video Slider ################# self.duration.setRange(0,0) self.duration.sliderMoved.connect(self.vidPosition) self.mediaPlayer.positionChanged.connect(self.locationChanged) self.mediaPlayer.durationChanged.connect(self.durationChanged) ################################################## ################### Play Button ################## self.play.clicked.connect(self.browseFile) ################################################## ################### Repeat Button ################ self.repeat.clicked.connect(self.loopMedia) ################################################## ################### Volume Icon ################## self.volume.clicked.connect(self.muteVolume) ################################################## ################### Volume Slider ################ self.volume_2.setRange(0,100) self.volume_2.setValue(100) self.volume_2.valueChanged.connect(self.volumeControl) ################################################## ################### Open Button ################## self.actionOpen_File.triggered.connect(self.openFile) ################################################## ################### Close Button ################# self.actionQuit.triggered.connect(self.closeFile) ################################################## def retranslateUi(self, MainWindow): _translate = QtCore.QCoreApplication.translate MainWindow.setWindowTitle(_translate("MainWindow", "Music Player")) self.startTime.setText(_translate("MainWindow", "--:--")) self.endTime.setText(_translate("MainWindow", "--:--")) self.volume.setToolTip(_translate("MainWindow", "volume")) self.volume.setShortcut(_translate("MainWindow", "P")) self.prev.setToolTip(_translate("MainWindow", "previous")) self.prev.setShortcut(_translate("MainWindow", "P")) self.play.setShortcut(_translate("MainWindow", "Space")) self.next.setToolTip(_translate("MainWindow", "next")) self.next.setShortcut(_translate("MainWindow", "N")) self.repeat.setToolTip(_translate("MainWindow", "repeat")) self.repeat.setShortcut(_translate("MainWindow", "R")) self.playlist.setToolTip(_translate("MainWindow", "playlist")) self.playlist.setShortcut(_translate("MainWindow", "P")) self.menuFile.setTitle(_translate("MainWindow", "File")) self.actionOpen_File.setText(_translate("MainWindow", "Open File...")) self.actionPlaylist.setText(_translate("MainWindow", "Playlist")) self.actionQuit.setText(_translate("MainWindow", "Quit"))
class Ui_MainWindow(object): def setupUi(self, MainWindow): if MainWindow.objectName(): MainWindow.setObjectName(u"MainWindow") MainWindow.resize(900, 800) sizePolicy = QSizePolicy(QSizePolicy.Expanding, QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(MainWindow.sizePolicy().hasHeightForWidth()) MainWindow.setSizePolicy(sizePolicy) MainWindow.setMinimumSize(QSize(900, 800)) self.actionAdd_heatmap = QAction(MainWindow) self.actionAdd_heatmap.setObjectName(u"actionAdd_heatmap") self.actionAdd_video = QAction(MainWindow) self.actionAdd_video.setObjectName(u"actionAdd_video") self.centralwidget = QWidget(MainWindow) self.centralwidget.setObjectName(u"centralwidget") sizePolicy.setHeightForWidth(self.centralwidget.sizePolicy().hasHeightForWidth()) self.centralwidget.setSizePolicy(sizePolicy) self.gridLayout_5 = QGridLayout(self.centralwidget) self.gridLayout_5.setObjectName(u"gridLayout_5") self.frame_3 = QFrame(self.centralwidget) self.frame_3.setObjectName(u"frame_3") sizePolicy.setHeightForWidth(self.frame_3.sizePolicy().hasHeightForWidth()) self.frame_3.setSizePolicy(sizePolicy) self.frame_3.setFrameShape(QFrame.StyledPanel) self.frame_3.setFrameShadow(QFrame.Raised) self.gridLayout_4 = QGridLayout(self.frame_3) self.gridLayout_4.setObjectName(u"gridLayout_4") self.gridLayout_3 = QGridLayout() self.gridLayout_3.setObjectName(u"gridLayout_3") self.frame = QFrame(self.frame_3) self.frame.setObjectName(u"frame") sizePolicy.setHeightForWidth(self.frame.sizePolicy().hasHeightForWidth()) self.frame.setSizePolicy(sizePolicy) self.frame.setMinimumSize(QSize(400, 300)) self.frame.setMaximumSize(QSize(16777215, 16777215)) self.frame.setLayoutDirection(Qt.LeftToRight) self.frame.setFrameShape(QFrame.StyledPanel) self.frame.setFrameShadow(QFrame.Raised) self.verticalLayout_2 = QVBoxLayout(self.frame) self.verticalLayout_2.setObjectName(u"verticalLayout_2") self.VideoPlayer = QVideoWidget(self.frame) self.VideoPlayer.setObjectName(u"VideoPlayer") sizePolicy.setHeightForWidth(self.VideoPlayer.sizePolicy().hasHeightForWidth()) self.VideoPlayer.setSizePolicy(sizePolicy) self.VideoPlayer.setMinimumSize(QSize(400, 300)) self.VideoPlayer.setFocusPolicy(Qt.NoFocus) self.VideoPlayer.setLayoutDirection(Qt.LeftToRight) self.verticalLayout_2.addWidget(self.VideoPlayer) self.gridLayout_3.addWidget(self.frame, 0, 0, 1, 1) self.frame_2 = QFrame(self.frame_3) self.frame_2.setObjectName(u"frame_2") sizePolicy.setHeightForWidth(self.frame_2.sizePolicy().hasHeightForWidth()) self.frame_2.setSizePolicy(sizePolicy) self.frame_2.setMinimumSize(QSize(400, 300)) self.frame_2.setFrameShape(QFrame.StyledPanel) self.frame_2.setFrameShadow(QFrame.Raised) self.gridLayout_2 = QGridLayout(self.frame_2) self.gridLayout_2.setObjectName(u"gridLayout_2") self.heatMap = QLabel(self.frame_2) self.heatMap.setObjectName(u"heatMap") sizePolicy.setHeightForWidth(self.heatMap.sizePolicy().hasHeightForWidth()) self.heatMap.setSizePolicy(sizePolicy) self.heatMap.setMinimumSize(QSize(400, 300)) self.heatMap.setLayoutDirection(Qt.LeftToRight) self.heatMap.setScaledContents(True) self.heatMap.setAlignment(Qt.AlignCenter) self.gridLayout_2.addWidget(self.heatMap, 0, 0, 1, 1, Qt.AlignHCenter|Qt.AlignVCenter) self.gridLayout_3.addWidget(self.frame_2, 0, 1, 1, 1) self.gridLayout_4.addLayout(self.gridLayout_3, 0, 0, 1, 1) self.horizontalLayout = QHBoxLayout() self.horizontalLayout.setObjectName(u"horizontalLayout") self.ProgressBar = QSlider(self.frame_3) self.ProgressBar.setObjectName(u"ProgressBar") sizePolicy1 = QSizePolicy(QSizePolicy.Expanding, QSizePolicy.Fixed) sizePolicy1.setHorizontalStretch(0) sizePolicy1.setVerticalStretch(0) sizePolicy1.setHeightForWidth(self.ProgressBar.sizePolicy().hasHeightForWidth()) self.ProgressBar.setSizePolicy(sizePolicy1) self.ProgressBar.setMinimumSize(QSize(0, 0)) self.ProgressBar.setMaximumSize(QSize(16777215, 400)) self.ProgressBar.setOrientation(Qt.Horizontal) self.ProgressBar.setTickPosition(QSlider.NoTicks) self.horizontalLayout.addWidget(self.ProgressBar) self.progressLabel = QLabel(self.frame_3) self.progressLabel.setObjectName(u"progressLabel") sizePolicy2 = QSizePolicy(QSizePolicy.Fixed, QSizePolicy.Fixed) sizePolicy2.setHorizontalStretch(0) sizePolicy2.setVerticalStretch(0) sizePolicy2.setHeightForWidth(self.progressLabel.sizePolicy().hasHeightForWidth()) self.progressLabel.setSizePolicy(sizePolicy2) self.horizontalLayout.addWidget(self.progressLabel) self.gridLayout_4.addLayout(self.horizontalLayout, 2, 0, 1, 1) self.horizontalLayout_2 = QHBoxLayout() self.horizontalLayout_2.setSpacing(2) self.horizontalLayout_2.setObjectName(u"horizontalLayout_2") self.PlayButton = QPushButton(self.frame_3) self.PlayButton.setObjectName(u"PlayButton") sizePolicy1.setHeightForWidth(self.PlayButton.sizePolicy().hasHeightForWidth()) self.PlayButton.setSizePolicy(sizePolicy1) self.PlayButton.setMaximumSize(QSize(16777215, 100)) self.horizontalLayout_2.addWidget(self.PlayButton) self.StopButton = QPushButton(self.frame_3) self.StopButton.setObjectName(u"StopButton") sizePolicy1.setHeightForWidth(self.StopButton.sizePolicy().hasHeightForWidth()) self.StopButton.setSizePolicy(sizePolicy1) self.StopButton.setMaximumSize(QSize(16777215, 100)) self.horizontalLayout_2.addWidget(self.StopButton) self.PauseButton = QPushButton(self.frame_3) self.PauseButton.setObjectName(u"PauseButton") sizePolicy1.setHeightForWidth(self.PauseButton.sizePolicy().hasHeightForWidth()) self.PauseButton.setSizePolicy(sizePolicy1) self.PauseButton.setMaximumSize(QSize(16777215, 100)) self.horizontalLayout_2.addWidget(self.PauseButton) self.verticalLayout = QVBoxLayout() self.verticalLayout.setObjectName(u"verticalLayout") self.stabilityLabel = QLabel(self.frame_3) self.stabilityLabel.setObjectName(u"stabilityLabel") sizePolicy1.setHeightForWidth(self.stabilityLabel.sizePolicy().hasHeightForWidth()) self.stabilityLabel.setSizePolicy(sizePolicy1) self.verticalLayout.addWidget(self.stabilityLabel) self.poseLabel = QLabel(self.frame_3) self.poseLabel.setObjectName(u"poseLabel") sizePolicy3 = QSizePolicy(QSizePolicy.MinimumExpanding, QSizePolicy.Fixed) sizePolicy3.setHorizontalStretch(0) sizePolicy3.setVerticalStretch(0) sizePolicy3.setHeightForWidth(self.poseLabel.sizePolicy().hasHeightForWidth()) self.poseLabel.setSizePolicy(sizePolicy3) self.verticalLayout.addWidget(self.poseLabel) self.horizontalLayout_2.addLayout(self.verticalLayout) self.gridLayout_4.addLayout(self.horizontalLayout_2, 1, 0, 1, 1) self.gridLayout_5.addWidget(self.frame_3, 0, 0, 1, 1) MainWindow.setCentralWidget(self.centralwidget) self.menubar = QMenuBar(MainWindow) self.menubar.setObjectName(u"menubar") self.menubar.setGeometry(QRect(0, 0, 900, 39)) self.menuAdd_video = QMenu(self.menubar) self.menuAdd_video.setObjectName(u"menuAdd_video") MainWindow.setMenuBar(self.menubar) self.statusbar = QStatusBar(MainWindow) self.statusbar.setObjectName(u"statusbar") MainWindow.setStatusBar(self.statusbar) self.menubar.addAction(self.menuAdd_video.menuAction()) self.menuAdd_video.addAction(self.actionAdd_heatmap) self.menuAdd_video.addAction(self.actionAdd_video) self.retranslateUi(MainWindow) QMetaObject.connectSlotsByName(MainWindow) # setupUi def retranslateUi(self, MainWindow): MainWindow.setWindowTitle(QCoreApplication.translate("MainWindow", u"MainWindow", None)) self.actionAdd_heatmap.setText(QCoreApplication.translate("MainWindow", u"Add heatmap", None)) self.actionAdd_video.setText(QCoreApplication.translate("MainWindow", u"Add video", None)) self.heatMap.setText("") self.progressLabel.setText(QCoreApplication.translate("MainWindow", u"0:0:0/0:0:0", None)) self.PlayButton.setText(QCoreApplication.translate("MainWindow", u"Play", None)) self.StopButton.setText(QCoreApplication.translate("MainWindow", u"Stop", None)) self.PauseButton.setText(QCoreApplication.translate("MainWindow", u"Pause", None)) self.stabilityLabel.setText(QCoreApplication.translate("MainWindow", u"stability", None)) self.poseLabel.setText(QCoreApplication.translate("MainWindow", u"pose", None)) self.menuAdd_video.setTitle(QCoreApplication.translate("MainWindow", u"Add", None))
class Ui_AddNewRecord(object): def setupUi(self, AddNewRecord): if not AddNewRecord.objectName(): AddNewRecord.setObjectName(u"AddNewRecord") AddNewRecord.resize(1724, 1243) self.horizontalLayout = QHBoxLayout(AddNewRecord) self.horizontalLayout.setObjectName(u"horizontalLayout") self.groupBox = QGroupBox(AddNewRecord) self.groupBox.setObjectName(u"groupBox") self.groupBox.setFlat(True) self.tbl_assets = QTableWidget(self.groupBox) if (self.tbl_assets.columnCount() < 12): self.tbl_assets.setColumnCount(12) self.tbl_assets.setObjectName(u"tbl_assets") self.tbl_assets.setGeometry(QRect(15, 31, 1161, 1191)) self.tbl_assets.setColumnCount(12) self.tbl_assets.horizontalHeader().setVisible(True) self.tbl_assets.verticalHeader().setVisible(True) self.horizontalLayout.addWidget(self.groupBox) self.groupBox_2 = QGroupBox(AddNewRecord) self.groupBox_2.setObjectName(u"groupBox_2") sizePolicy = QSizePolicy(QSizePolicy.Fixed, QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.groupBox_2.sizePolicy().hasHeightForWidth()) self.groupBox_2.setSizePolicy(sizePolicy) self.groupBox_2.setMinimumSize(QSize(500, 0)) self.groupBox_2.setFlat(True) self.layoutWidget = QWidget(self.groupBox_2) self.layoutWidget.setObjectName(u"layoutWidget") self.layoutWidget.setGeometry(QRect(20, 30, 461, 1186)) self.verticalLayout = QVBoxLayout(self.layoutWidget) self.verticalLayout.setObjectName(u"verticalLayout") self.verticalLayout.setContentsMargins(0, 0, 0, 0) self.prv_media_player = QVideoWidget(self.layoutWidget) self.prv_media_player.setObjectName(u"prv_media_player") sizePolicy1 = QSizePolicy(QSizePolicy.Preferred, QSizePolicy.Fixed) sizePolicy1.setHorizontalStretch(0) sizePolicy1.setVerticalStretch(0) sizePolicy1.setHeightForWidth( self.prv_media_player.sizePolicy().hasHeightForWidth()) self.prv_media_player.setSizePolicy(sizePolicy1) self.prv_media_player.setMinimumSize(QSize(0, 300)) self.verticalLayout.addWidget(self.prv_media_player) self.horizontalLayout_2 = QHBoxLayout() self.horizontalLayout_2.setObjectName(u"horizontalLayout_2") self.btn_play = QToolButton(self.layoutWidget) self.btn_play.setObjectName(u"btn_play") sizePolicy2 = QSizePolicy(QSizePolicy.Fixed, QSizePolicy.Fixed) sizePolicy2.setHorizontalStretch(0) sizePolicy2.setVerticalStretch(0) sizePolicy2.setHeightForWidth( self.btn_play.sizePolicy().hasHeightForWidth()) self.btn_play.setSizePolicy(sizePolicy2) self.horizontalLayout_2.addWidget(self.btn_play) self.sld_progress = QSlider(self.layoutWidget) self.sld_progress.setObjectName(u"sld_progress") sizePolicy3 = QSizePolicy(QSizePolicy.Expanding, QSizePolicy.Fixed) sizePolicy3.setHorizontalStretch(0) sizePolicy3.setVerticalStretch(0) sizePolicy3.setHeightForWidth( self.sld_progress.sizePolicy().hasHeightForWidth()) self.sld_progress.setSizePolicy(sizePolicy3) self.sld_progress.setOrientation(Qt.Horizontal) self.horizontalLayout_2.addWidget(self.sld_progress) self.label = QLabel(self.layoutWidget) self.label.setObjectName(u"label") sizePolicy1.setHeightForWidth( self.label.sizePolicy().hasHeightForWidth()) self.label.setSizePolicy(sizePolicy1) self.horizontalLayout_2.addWidget(self.label) self.verticalLayout.addLayout(self.horizontalLayout_2) self.groupBox_3 = QGroupBox(self.layoutWidget) self.groupBox_3.setObjectName(u"groupBox_3") sizePolicy4 = QSizePolicy(QSizePolicy.Preferred, QSizePolicy.Expanding) sizePolicy4.setHorizontalStretch(0) sizePolicy4.setVerticalStretch(0) sizePolicy4.setHeightForWidth( self.groupBox_3.sizePolicy().hasHeightForWidth()) self.groupBox_3.setSizePolicy(sizePolicy4) self.groupBox_3.setMinimumSize(QSize(0, 800)) self.groupBox_3.setMaximumSize(QSize(16777215, 750)) self.groupBox_3.setFlat(False) self.lbl_file_info = QLabel(self.groupBox_3) self.lbl_file_info.setObjectName(u"lbl_file_info") self.lbl_file_info.setGeometry(QRect(10, 30, 441, 721)) self.verticalLayout.addWidget(self.groupBox_3) self.horizontalLayout.addWidget(self.groupBox_2) self.retranslateUi(AddNewRecord) QMetaObject.connectSlotsByName(AddNewRecord) # setupUi def retranslateUi(self, AddNewRecord): AddNewRecord.setWindowTitle( QCoreApplication.translate("AddNewRecord", u"AssLib - Adding New Record(s)", None)) self.groupBox.setTitle( QCoreApplication.translate("AddNewRecord", u"Task", None)) self.groupBox_2.setTitle( QCoreApplication.translate("AddNewRecord", u"Output", None)) self.btn_play.setText( QCoreApplication.translate("AddNewRecord", u"...", None)) self.label.setText( QCoreApplication.translate("AddNewRecord", u"TextLabel", None)) self.groupBox_3.setTitle( QCoreApplication.translate("AddNewRecord", u"Info", None)) self.lbl_file_info.setText( QCoreApplication.translate("AddNewRecord", u"TextLabel", None))