def showMainWindow(self): self.move((self.screen.width() - self.width()) / 2, (self.screen.height() - self.height()) / 2) self.meidaPlayer = QMediaPlayer() self.playlist = QMediaPlaylist() self.playlist.setCurrentIndex(1) self.playlist.addMedia( QMediaContent(QUrl().fromLocalFile( "video/Radio-Digital-Scheme-Live-Wallpaper~1.mp4"))) self.playlist.setPlaybackMode(QMediaPlaylist.CurrentItemInLoop) self.meidaPlayer.setPlaylist(self.playlist) videoWidget = QVideoWidget() videoWidget.setAspectRatioMode(Qt.IgnoreAspectRatio) videoWidget.setAutoFillBackground(True) videoWidget.setSizePolicy( QSizePolicy(QSizePolicy.Expanding, QSizePolicy.Expanding)) # videoWidget.setMinimumSize(videoWidget.size()) self.meidaPlayer.setVideoOutput(videoWidget) self.videoLayout.insertWidget(0, videoWidget) self.meidaPlayer.play() # self.pushButton_4.clicked.connect(self.showColorDialog) self.pushButton_4.installEventFilter(self) # self.pushButton.setGeometry() self.setVisible(1)
def video_init(self): videoWidget = QVideoWidget(self.ui.widget_video) videoWidget.setObjectName("videoWidget") videoWidget.setAutoFillBackground(True) videoWidget.setAspectRatioMode(Qt.IgnoreAspectRatio) videoWidget.setContentsMargins(0, 0, 0, 0) videoWidget.show() self.player = QMediaPlayer(videoWidget) self.player.setVolume(100) self.player.setVideoOutput(videoWidget) srcList = self.get_video() self.CheckPlayList() time.sleep(2) self.update()
class Ui_main(object): def setupUi(self, main): main.setObjectName("main") main.resize(1024, 768) main.setContextMenuPolicy(QtCore.Qt.NoContextMenu) main.setAcceptDrops(False) main.setAutoFillBackground(False) self.verticalLayoutWidget = QtWidgets.QWidget(main) self.verticalLayoutWidget.setGeometry(QtCore.QRect(0, 10, 1021, 80)) self.verticalLayoutWidget.setObjectName("verticalLayoutWidget") self.titleLayout = QtWidgets.QVBoxLayout(self.verticalLayoutWidget) self.titleLayout.setSizeConstraint(QtWidgets.QLayout.SetMaximumSize) self.titleLayout.setContentsMargins(0, 0, 0, 0) self.titleLayout.setSpacing(0) self.titleLayout.setObjectName("titleLayout") self.title = QtWidgets.QLabel(self.verticalLayoutWidget) self.title.setEnabled(True) font = QtGui.QFont() font.setPointSize(26) font.setBold(True) font.setWeight(75) self.title.setFont(font) self.title.setTextFormat(QtCore.Qt.AutoText) self.title.setAlignment(QtCore.Qt.AlignCenter) self.title.setObjectName("title") self.titleLayout.addWidget(self.title) self.verticalLayoutWidget_2 = QtWidgets.QWidget(main) self.verticalLayoutWidget_2.setGeometry(QtCore.QRect( 50, 130, 371, 271)) self.verticalLayoutWidget_2.setObjectName("verticalLayoutWidget_2") self.menuLayout = QtWidgets.QVBoxLayout(self.verticalLayoutWidget_2) self.menuLayout.setSizeConstraint(QtWidgets.QLayout.SetMaximumSize) self.menuLayout.setContentsMargins(0, 0, 0, 0) self.menuLayout.setSpacing(0) self.menuLayout.setObjectName("menuLayout") self.selectButton = QtWidgets.QPushButton(self.verticalLayoutWidget_2) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.selectButton.sizePolicy().hasHeightForWidth()) self.selectButton.setSizePolicy(sizePolicy) font = QtGui.QFont() font.setPointSize(10) self.selectButton.setFont(font) self.selectButton.setObjectName("selectButton") self.menuLayout.addWidget(self.selectButton) self.heatmap = QtWidgets.QCheckBox(self.verticalLayoutWidget_2) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.heatmap.sizePolicy().hasHeightForWidth()) self.heatmap.setSizePolicy(sizePolicy) font = QtGui.QFont() font.setPointSize(12) self.heatmap.setFont(font) self.heatmap.setObjectName("heatmap") self.menuLayout.addWidget(self.heatmap) self.movementline = QtWidgets.QCheckBox(self.verticalLayoutWidget_2) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.movementline.sizePolicy().hasHeightForWidth()) self.movementline.setSizePolicy(sizePolicy) font = QtGui.QFont() font.setPointSize(12) self.movementline.setFont(font) self.movementline.setObjectName("movementline") self.menuLayout.addWidget(self.movementline) self.movementheatmap = QtWidgets.QCheckBox(self.verticalLayoutWidget_2) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.movementheatmap.sizePolicy().hasHeightForWidth()) self.movementheatmap.setSizePolicy(sizePolicy) font = QtGui.QFont() font.setPointSize(12) self.movementheatmap.setFont(font) self.movementheatmap.setObjectName("movementheatmap") self.menuLayout.addWidget(self.movementheatmap) self.counting = QtWidgets.QCheckBox(self.verticalLayoutWidget_2) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.counting.sizePolicy().hasHeightForWidth()) self.counting.setSizePolicy(sizePolicy) font = QtGui.QFont() font.setPointSize(12) self.counting.setFont(font) self.counting.setObjectName("counting") self.menuLayout.addWidget(self.counting) self.submitButton = QtWidgets.QPushButton(self.verticalLayoutWidget_2) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.submitButton.sizePolicy().hasHeightForWidth()) self.submitButton.setSizePolicy(sizePolicy) font = QtGui.QFont() font.setPointSize(10) self.submitButton.setFont(font) self.submitButton.setObjectName("submitButton") self.menuLayout.addWidget(self.submitButton) self.showWidget = QVideoWidget(main) self.showWidget.setGeometry(QtCore.QRect(500, 130, 480, 270)) self.showWidget.setAutoFillBackground(False) self.showWidget.setObjectName("showWidget") self.widget_2 = QVideoWidget(main) self.widget_2.setGeometry(QtCore.QRect(500, 450, 480, 270)) self.widget_2.setAutoFillBackground(False) self.widget_2.setObjectName("widget_2") self.horizontalLayoutWidget = QtWidgets.QWidget(main) self.horizontalLayoutWidget.setGeometry(QtCore.QRect( 670, 400, 171, 51)) self.horizontalLayoutWidget.setObjectName("horizontalLayoutWidget") self.peopleBox = QtWidgets.QHBoxLayout(self.horizontalLayoutWidget) self.peopleBox.setContentsMargins(0, 0, 0, 0) self.peopleBox.setObjectName("peopleBox") self.peopleNo = QtWidgets.QLCDNumber(self.horizontalLayoutWidget) self.peopleNo.setFrameShape(QtWidgets.QFrame.NoFrame) self.peopleNo.setSmallDecimalPoint(False) self.peopleNo.setSegmentStyle(QtWidgets.QLCDNumber.Filled) self.peopleNo.setObjectName("peopleNo") self.peopleBox.addWidget(self.peopleNo) self.peopleLabel = QtWidgets.QLabel(self.horizontalLayoutWidget) font = QtGui.QFont() font.setPointSize(11) self.peopleLabel.setFont(font) self.peopleLabel.setAlignment(QtCore.Qt.AlignCenter) self.peopleLabel.setObjectName("peopleLabel") self.peopleBox.addWidget(self.peopleLabel) self.retranslateUi(main) QtCore.QMetaObject.connectSlotsByName(main) def retranslateUi(self, main): _translate = QtCore.QCoreApplication.translate main.setWindowTitle(_translate("main", "Dialog")) self.title.setText(_translate("main", "[FTP] CCC System Beta")) self.selectButton.setText(_translate("main", "Select Video")) self.heatmap.setText(_translate("main", "Heatmap")) self.movementline.setText(_translate("main", "Movement line")) self.movementheatmap.setText(_translate("main", "Movement heatmap")) self.counting.setText(_translate("main", "Counting people")) self.submitButton.setText(_translate("main", "Submit")) self.peopleLabel.setText(_translate("main", "People"))
class Ui_MainWindow(QtWidgets.QMainWindow): def setupUi(self, MainWindow): MainWindow.setObjectName("MainWindow") MainWindow.setWindowModality(QtCore.Qt.NonModal) MainWindow.resize(999, 749) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( MainWindow.sizePolicy().hasHeightForWidth()) MainWindow.setSizePolicy(sizePolicy) MainWindow.setAnimated(True) self.centralwidget = QtWidgets.QWidget(MainWindow) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.centralwidget.sizePolicy().hasHeightForWidth()) self.centralwidget.setSizePolicy(sizePolicy) self.centralwidget.setObjectName("centralwidget") self.first_mediaplayer = QtWidgets.QFrame(self.centralwidget) self.first_mediaplayer.setGeometry(QtCore.QRect(540, 0, 461, 301)) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.first_mediaplayer.sizePolicy().hasHeightForWidth()) self.first_mediaplayer.setSizePolicy(sizePolicy) self.first_mediaplayer.setStyleSheet("") self.first_mediaplayer.setFrameShape(QtWidgets.QFrame.StyledPanel) self.first_mediaplayer.setFrameShadow(QtWidgets.QFrame.Raised) self.first_mediaplayer.setObjectName("first_mediaplayer") self.time_slider = QtWidgets.QSlider(self.first_mediaplayer) self.time_slider.setGeometry(QtCore.QRect(58, 240, 311, 31)) self.time_slider.setOrientation(QtCore.Qt.Horizontal) self.time_slider.setObjectName("time_slider") self.current_time_label = QtWidgets.QLabel(self.first_mediaplayer) self.current_time_label.setGeometry(QtCore.QRect(20, 248, 60, 16)) self.current_time_label.setObjectName("current_time_label") self.time_left_label = QtWidgets.QLabel(self.first_mediaplayer) self.time_left_label.setGeometry(QtCore.QRect(380, 248, 60, 16)) self.time_left_label.setObjectName("time_left_label") self.video_player = QVideoWidget(self.first_mediaplayer) self.video_player.setEnabled(True) self.video_player.setGeometry(QtCore.QRect(20, 7, 419, 236)) self.video_player.setAutoFillBackground(False) self.video_player.setStyleSheet( "background-color: rgb(255, 255, 255);") self.video_player.setObjectName("video_player") self.volume_control = QtWidgets.QSlider(self.first_mediaplayer) self.volume_control.setGeometry(QtCore.QRect(340, 262, 101, 22)) self.volume_control.setOrientation(QtCore.Qt.Horizontal) self.volume_control.setObjectName("volume_control") self.pauseButton = QtWidgets.QPushButton(self.first_mediaplayer) self.pauseButton.setGeometry(QtCore.QRect(150, 260, 31, 31)) self.pauseButton.setAutoFillBackground(False) self.pauseButton.setStyleSheet( "background-color: rgba(255, 255, 255, 0);") self.pauseButton.setText("") icon = QtGui.QIcon() icon.addPixmap( QtGui.QPixmap("resources/buttons/media_buttons/pause1.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.pauseButton.setIcon(icon) self.pauseButton.setIconSize(QtCore.QSize(31, 31)) self.pauseButton.setObjectName("pauseButton") self.playButton = QtWidgets.QPushButton(self.first_mediaplayer) self.playButton.setGeometry(QtCore.QRect(190, 260, 31, 31)) self.playButton.setAutoFillBackground(False) self.playButton.setStyleSheet( "background-color: rgba(255, 255, 255, 0);") self.playButton.setText("") icon1 = QtGui.QIcon() icon1.addPixmap( QtGui.QPixmap("resources/buttons/media_buttons/play1.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.playButton.setIcon(icon1) self.playButton.setIconSize(QtCore.QSize(31, 31)) self.playButton.setObjectName("playButton") self.nextButton = QtWidgets.QPushButton(self.first_mediaplayer) self.nextButton.setGeometry(QtCore.QRect(229, 260, 31, 31)) self.nextButton.setAutoFillBackground(False) self.nextButton.setStyleSheet( "background-color: rgba(255, 255, 255, 0);") self.nextButton.setText("") icon2 = QtGui.QIcon() icon2.addPixmap( QtGui.QPixmap("resources/buttons/media_buttons/next_vid1.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.nextButton.setIcon(icon2) self.nextButton.setIconSize(QtCore.QSize(31, 31)) self.nextButton.setObjectName("nextButton") self.stopButton = QtWidgets.QPushButton(self.first_mediaplayer) self.stopButton.setGeometry(QtCore.QRect(110, 260, 31, 31)) self.stopButton.setAutoFillBackground(False) self.stopButton.setStyleSheet( "background-color: rgba(255, 255, 255, 0);") self.stopButton.setText("") icon3 = QtGui.QIcon() icon3.addPixmap( QtGui.QPixmap("resources/buttons/media_buttons/stop1.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.stopButton.setIcon(icon3) self.stopButton.setIconSize(QtCore.QSize(31, 31)) self.stopButton.setObjectName("stopButton") self.muteButton = QtWidgets.QPushButton(self.first_mediaplayer) self.muteButton.setGeometry(QtCore.QRect(278, 262, 23, 23)) self.muteButton.setAutoFillBackground(False) self.muteButton.setStyleSheet( "background-color: rgba(255, 255, 255, 0);") self.muteButton.setText("") icon4 = QtGui.QIcon() icon4.addPixmap( QtGui.QPixmap("resources/buttons/media_buttons/mute1.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.muteButton.setIcon(icon4) self.muteButton.setIconSize(QtCore.QSize(31, 31)) self.muteButton.setObjectName("muteButton") self.volumeButton = QtWidgets.QPushButton(self.first_mediaplayer) self.volumeButton.setGeometry(QtCore.QRect(310, 261, 23, 23)) self.volumeButton.setAutoFillBackground(False) self.volumeButton.setStyleSheet( "background-color: rgba(255, 255, 255, 0);") self.volumeButton.setText("") icon5 = QtGui.QIcon() icon5.addPixmap( QtGui.QPixmap("resources/buttons/media_buttons/volume1.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.volumeButton.setIcon(icon5) self.volumeButton.setIconSize(QtCore.QSize(31, 31)) self.volumeButton.setObjectName("volumeButton") self.mini_viewer = QtWidgets.QFrame(self.centralwidget) self.mini_viewer.setGeometry(QtCore.QRect(10, 300, 991, 411)) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.mini_viewer.sizePolicy().hasHeightForWidth()) self.mini_viewer.setSizePolicy(sizePolicy) self.mini_viewer.setStyleSheet("\n" "") self.mini_viewer.setFrameShape(QtWidgets.QFrame.StyledPanel) self.mini_viewer.setFrameShadow(QtWidgets.QFrame.Raised) self.mini_viewer.setObjectName("mini_viewer") self.timeline_1 = QtWidgets.QGraphicsView(self.mini_viewer) self.timeline_1.setGeometry(QtCore.QRect(47, 77, 886, 24)) self.timeline_1.setStyleSheet("border-style: solid;\n" "border-width: 3px;\n" "border-color: rgb(250, 240, 242);") self.timeline_1.setObjectName("timeline_1") self.mini_view_1 = QtWidgets.QGraphicsView(self.mini_viewer) self.mini_view_1.setGeometry(QtCore.QRect(47, 107, 886, 86)) self.mini_view_1.setStyleSheet("border-style: solid;\n" "border-width: 3px;\n" "border-color: rgb(146, 130, 229);") self.mini_view_1.setObjectName("mini_view_1") self.timeline_2 = QtWidgets.QGraphicsView(self.mini_viewer) self.timeline_2.setGeometry(QtCore.QRect(47, 217, 886, 24)) self.timeline_2.setStyleSheet( "border-style: solid;\n" "border-width: 3px;\n" "border-left-color: rgb(255, 150, 150);\n" "border-right-color: rgb(255, 255, 255);\n" "border-top-color: rgb(255, 255, 255);\n" "border-bottom-color: rgb(255, 255, 255);\n") self.timeline_2.setObjectName("timeline_2") self.mini_view_2 = QtWidgets.QGraphicsView(self.mini_viewer) self.mini_view_2.setGeometry(QtCore.QRect(47, 317, 886, 86)) self.mini_view_2.setStyleSheet("border-style: solid;\n" "border-width: 3px;\n" "border-color: rgb(146, 130, 229);") self.mini_view_2.setObjectName("mini_view_2") # a button to extract videos self.push_extract_1 = QtWidgets.QPushButton(self.mini_viewer) self.push_extract_1.setGeometry(QtCore.QRect(40, 20, 141, 31)) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.push_extract_1.sizePolicy().hasHeightForWidth()) self.push_extract_1.setSizePolicy(sizePolicy) self.push_extract_1.setStyleSheet("") self.push_extract_1.setObjectName("push_extract_1") # a button for displaying anomalous time line self.push_extract_2 = QtWidgets.QPushButton(self.mini_viewer) self.push_extract_2.setGeometry(QtCore.QRect(200, 20, 141, 31)) self.push_extract_2.setSizePolicy(sizePolicy) self.push_extract_2.setStyleSheet("") self.push_extract_2.setObjectName("push_extract_2") self.timeline_3 = QtWidgets.QGraphicsView(self.mini_viewer) self.timeline_3.setGeometry(QtCore.QRect(47, 252, 886, 24)) self.timeline_3.setStyleSheet( "border-style: solid;\n" "border-width: 3px;\n" "border-left-color: rgb(150, 255, 150);\n" "border-right-color: rgb(255, 255, 255);\n" "border-top-color: rgb(255, 255, 255);\n" "border-bottom-color: rgb(255, 255, 255);\n") self.timeline_3.setObjectName("timeline_3") self.timeline_4 = QtWidgets.QGraphicsView(self.mini_viewer) self.timeline_4.setGeometry(QtCore.QRect(47, 287, 886, 24)) self.timeline_4.setStyleSheet( "border-style: solid;\n" "border-width: 3px;\n" "border-left-color: rgb(150, 150, 255);\n" "border-right-color: rgb(255, 255, 255);\n" "border-top-color: rgb(255, 255, 255);\n" "border-bottom-color: rgb(255, 255, 255);") self.timeline_4.setObjectName("timeline_4") self.lcdNumber_1 = QtWidgets.QLCDNumber(self.mini_viewer) self.lcdNumber_1.setGeometry(QtCore.QRect(20, 50, 64, 23)) self.lcdNumber_1.setObjectName("lcdNumber_1") self.lcdNumber_1.setStyleSheet("border-style: transparent;\n" "color: rgb(146, 130, 229); ") #self.lcdNumber.display('10:00') self.lcdNumber_2 = QtWidgets.QLCDNumber(self.mini_viewer) self.lcdNumber_2.setGeometry(QtCore.QRect(242, 50, 64, 23)) self.lcdNumber_2.setObjectName("lcdNumber_2") self.lcdNumber_2.setStyleSheet("border-style: transparent;\n" "color: rgb(146, 130, 229); ") self.lcdNumber_4 = QtWidgets.QLCDNumber(self.mini_viewer) self.lcdNumber_4.setGeometry(QtCore.QRect(465, 50, 64, 23)) self.lcdNumber_4.setObjectName("lcdNumber_4") self.lcdNumber_4.setStyleSheet("border-style: transparent;\n" "color: rgb(146, 130, 229); ") self.lcdNumber_5 = QtWidgets.QLCDNumber(self.mini_viewer) self.lcdNumber_5.setGeometry(QtCore.QRect(688, 50, 64, 23)) self.lcdNumber_5.setObjectName("lcdNumber_5") self.lcdNumber_5.setStyleSheet("border-style: transparent;\n" "color: rgb(146, 130, 229); ") self.lcdNumber_6 = QtWidgets.QLCDNumber(self.mini_viewer) self.lcdNumber_6.setGeometry(QtCore.QRect(910, 50, 64, 23)) self.lcdNumber_6.setObjectName("lcdNumber_6") self.lcdNumber_6.setStyleSheet("border-style: transparent;\n" "color: rgb(146, 130, 229); ") self.textEdit = QtWidgets.QTextEdit(self.mini_viewer) self.textEdit.setGeometry(QtCore.QRect(500, 20, 441, 51)) self.textEdit.setObjectName("textEdit") self.textEdit.setStyleSheet("background-color: transparent;") self.tabWidget = QtWidgets.QTabWidget(self.centralwidget) self.tabWidget.setGeometry(QtCore.QRect(20, 0, 511, 301)) self.tabWidget.setObjectName("tabWidget") self.tab1 = QtWidgets.QWidget() sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.tab1.sizePolicy().hasHeightForWidth()) self.tab1.setSizePolicy(sizePolicy) self.tab1.setObjectName("tab1") self.playlistView = QtWidgets.QListView(self.tab1) self.playlistView.setEnabled(True) self.playlistView.setGeometry(QtCore.QRect(0, 0, 511, 271)) self.playlistView.setObjectName("playlistView") self.tabWidget.addTab(self.tab1, "") self.tab_2 = QtWidgets.QWidget() sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.tab_2.sizePolicy().hasHeightForWidth()) self.tab_2.setSizePolicy(sizePolicy) self.tab_2.setObjectName("tab_2") self.treeView2 = QtWidgets.QTreeView(self.tab_2) self.treeView2.setGeometry(QtCore.QRect(0, 0, 511, 271)) self.treeView2.setAcceptDrops(True) self.treeView2.setObjectName("treeView2") self.tabWidget.addTab(self.tab_2, "") self.tab = QtWidgets.QWidget() self.tab.setObjectName("tab") self.treeView2_2 = QtWidgets.QTreeView(self.tab) self.treeView2_2.setGeometry(QtCore.QRect(0, 0, 511, 271)) self.treeView2_2.setAcceptDrops(True) self.treeView2_2.setObjectName("treeView2_2") ## button to run models self.run_mil_button = QtWidgets.QPushButton(self.tab) self.run_mil_button.setEnabled(True) self.run_mil_button.setGeometry(QtCore.QRect(80, 10, 112, 32)) self.run_mil_button.setObjectName("run_mil_button") self.run_ffpa_button = QtWidgets.QPushButton(self.tab) self.run_ffpa_button.setEnabled(True) self.run_ffpa_button.setGeometry(QtCore.QRect(200, 10, 112, 32)) self.run_ffpa_button.setObjectName("run_ffpa_button") self.tabWidget.addTab(self.tab, "") MainWindow.setCentralWidget(self.centralwidget) self.menuBar = QtWidgets.QMenuBar(MainWindow) self.menuBar.setGeometry(QtCore.QRect(0, 0, 999, 22)) self.menuBar.setToolTipDuration(0) self.menuBar.setObjectName("menuBar") self.menuHelp = QtWidgets.QMenu(self.menuBar) self.menuHelp.setObjectName("menuHelp") self.menuEdit = QtWidgets.QMenu(self.menuBar) self.menuEdit.setObjectName("menuEdit") self.menuView = QtWidgets.QMenu(self.menuBar) self.menuView.setObjectName("menuView") self.menuFiles = QtWidgets.QMenu(self.menuBar) self.menuFiles.setObjectName("menuFiles") self.menuVidsurveil = QtWidgets.QMenu(self.menuBar) self.menuVidsurveil.setObjectName("menuVidsurveil") MainWindow.setMenuBar(self.menuBar) self.actionLicense = QtWidgets.QAction(MainWindow) self.actionLicense.setObjectName("actionLicense") self.actionAdd_Files = QtWidgets.QAction(MainWindow) self.actionAdd_Files.setCheckable(True) self.actionAdd_Files.setChecked(False) self.actionAdd_Files.setObjectName("actionAdd_Files") self.actionAbout = QtWidgets.QAction(MainWindow) self.actionAbout.setObjectName("actionAbout") self.menuHelp.addAction(self.actionLicense) self.menuFiles.addAction(self.actionAdd_Files) self.menuVidsurveil.addAction(self.actionAbout) self.menuBar.addAction(self.menuVidsurveil.menuAction()) self.menuBar.addAction(self.menuFiles.menuAction()) self.menuBar.addAction(self.menuView.menuAction()) self.menuBar.addAction(self.menuEdit.menuAction()) self.menuBar.addAction(self.menuHelp.menuAction()) self.retranslateUi(MainWindow) self.tabWidget.setCurrentIndex(0) QtCore.QMetaObject.connectSlotsByName(MainWindow) def retranslateUi(self, MainWindow): _translate = QtCore.QCoreApplication.translate MainWindow.setWindowTitle(_translate("MainWindow", "MainWindow")) self.textEdit.setHtml( _translate( "MainWindow", "<!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:\'.AppleSystemUIFont\'; font-size:13pt; font-weight:400; 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=\" color:#faf0f2;\">⬤</span><span style=\" color:#ee5262;\"> </span><span style=\" font-size:20pt; font-weight:600; color:#000000; vertical-align:sub;\">Combined </span><span style=\" color:#ff9696;\">⬤</span><span style=\" color:#96ff96;\"> </span><span style=\" font-size:20pt; font-weight:600; color:#000000; vertical-align:sub;\">MIL+C3D</span><span style=\" font-size:20pt; color:#000000; vertical-align:sub;\"> </span><span style=\" color:#96ff96;\">⬤</span><span style=\" font-size:20pt; color:#ee5262; vertical-align:sub;\"> </span><span style=\" font-size:20pt; font-weight:600; color:#000000; vertical-align:sub;\">Future Frame </span><span style=\" color:#9696ff;\">⬤</span><span style=\" color:#ee5262;\"> </span><span style=\" font-size:20pt; font-weight:600; color:#000000; vertical-align:sub;\">MNAD</span></p>\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; font-size:18pt; color:#000000; vertical-align:sub;\"><br /></p></body></html>" )) self.current_time_label.setText(_translate("MainWindow", "0:00")) self.time_left_label.setText(_translate("MainWindow", "0:00")) self.push_extract_1.setText(_translate("MainWindow", "Extract Videos")) self.push_extract_2.setText( _translate("MainWindow", "Show Anomalous Time")) self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab1), _translate("MainWindow", "Original Videos")) self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_2), _translate("MainWindow", "Extracted Videos")) self.run_mil_button.setText(_translate("MainWindow", "Run MIL")) self.run_ffpa_button.setText(_translate("MainWindow", "Run FFPA")) self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab), _translate("MainWindow", "Model")) self.menuHelp.setTitle(_translate("MainWindow", "Help")) self.menuEdit.setTitle(_translate("MainWindow", "Edit")) self.menuView.setTitle(_translate("MainWindow", "View")) self.menuFiles.setTitle(_translate("MainWindow", "Files")) self.menuVidsurveil.setTitle(_translate("MainWindow", "Vidsurveil")) self.actionLicense.setText(_translate("MainWindow", "License")) self.actionAdd_Files.setText(_translate("MainWindow", "Add Files")) self.actionAbout.setText(_translate("MainWindow", "About"))
class Ui_main(object): def setupUi(self, main): main.setObjectName("main") main.resize(1024, 768) main.setContextMenuPolicy(QtCore.Qt.NoContextMenu) main.setAcceptDrops(False) main.setAutoFillBackground(False) self.verticalLayoutWidget = QtWidgets.QWidget(main) self.verticalLayoutWidget.setGeometry(QtCore.QRect(0, 10, 1021, 80)) self.verticalLayoutWidget.setObjectName("verticalLayoutWidget") self.titleLayout = QtWidgets.QVBoxLayout(self.verticalLayoutWidget) self.titleLayout.setSizeConstraint(QtWidgets.QLayout.SetMaximumSize) self.titleLayout.setContentsMargins(0, 0, 0, 0) self.titleLayout.setSpacing(0) self.titleLayout.setObjectName("titleLayout") self.title = QtWidgets.QLabel(self.verticalLayoutWidget) self.title.setEnabled(True) font = QtGui.QFont() font.setPointSize(26) font.setBold(True) font.setWeight(75) self.title.setFont(font) self.title.setTextFormat(QtCore.Qt.AutoText) self.title.setAlignment(QtCore.Qt.AlignCenter) self.title.setObjectName("title") self.titleLayout.addWidget(self.title) self.verticalLayoutWidget_2 = QtWidgets.QWidget(main) self.verticalLayoutWidget_2.setGeometry(QtCore.QRect( 50, 130, 391, 271)) self.verticalLayoutWidget_2.setObjectName("verticalLayoutWidget_2") self.menuLayout = QtWidgets.QVBoxLayout(self.verticalLayoutWidget_2) self.menuLayout.setSizeConstraint(QtWidgets.QLayout.SetMaximumSize) self.menuLayout.setContentsMargins(0, 0, 0, 0) self.menuLayout.setSpacing(0) self.menuLayout.setObjectName("menuLayout") spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) self.menuLayout.addItem(spacerItem) self.buttonLayout = QtWidgets.QHBoxLayout() self.buttonLayout.setObjectName("buttonLayout") self.selectButton = QtWidgets.QPushButton(self.verticalLayoutWidget_2) sizePolicy = QtWidgets.QSizePolicy( QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.MinimumExpanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.selectButton.sizePolicy().hasHeightForWidth()) self.selectButton.setSizePolicy(sizePolicy) font = QtGui.QFont() font.setPointSize(10) self.selectButton.setFont(font) self.selectButton.setObjectName("selectButton") self.buttonLayout.addWidget(self.selectButton) self.submitButton = QtWidgets.QPushButton(self.verticalLayoutWidget_2) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.submitButton.sizePolicy().hasHeightForWidth()) self.submitButton.setSizePolicy(sizePolicy) font = QtGui.QFont() font.setPointSize(10) self.submitButton.setFont(font) self.submitButton.setObjectName("submitButton") self.buttonLayout.addWidget(self.submitButton) self.menuLayout.addLayout(self.buttonLayout) spacerItem1 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed) self.menuLayout.addItem(spacerItem1) self.checkBoxLayout = QtWidgets.QHBoxLayout() self.checkBoxLayout.setObjectName("checkBoxLayout") self.heatmap = QtWidgets.QCheckBox(self.verticalLayoutWidget_2) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.heatmap.sizePolicy().hasHeightForWidth()) self.heatmap.setSizePolicy(sizePolicy) font = QtGui.QFont() font.setPointSize(12) self.heatmap.setFont(font) self.heatmap.setObjectName("heatmap") self.checkBoxLayout.addWidget(self.heatmap, 0, QtCore.Qt.AlignHCenter) self.counting = QtWidgets.QCheckBox(self.verticalLayoutWidget_2) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.counting.sizePolicy().hasHeightForWidth()) self.counting.setSizePolicy(sizePolicy) font = QtGui.QFont() font.setPointSize(12) self.counting.setFont(font) self.counting.setObjectName("counting") self.checkBoxLayout.addWidget(self.counting) self.menuLayout.addLayout(self.checkBoxLayout) spacerItem2 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) self.menuLayout.addItem(spacerItem2) self.videoWidget = QVideoWidget(main) self.videoWidget.setGeometry(QtCore.QRect(500, 130, 480, 270)) self.videoWidget.setAutoFillBackground(False) self.videoWidget.setObjectName("videoWidget") self.resultWidget = QVideoWidget(main) self.resultWidget.setGeometry(QtCore.QRect(500, 450, 480, 270)) self.resultWidget.setAutoFillBackground(False) self.resultWidget.setObjectName("resultWidget") self.horizontalLayoutWidget = QtWidgets.QWidget(main) self.horizontalLayoutWidget.setGeometry(QtCore.QRect( 670, 400, 171, 51)) self.horizontalLayoutWidget.setObjectName("horizontalLayoutWidget") self.peopleBox = QtWidgets.QHBoxLayout(self.horizontalLayoutWidget) self.peopleBox.setContentsMargins(0, 0, 0, 0) self.peopleBox.setObjectName("peopleBox") self.peopleNo = QtWidgets.QLCDNumber(self.horizontalLayoutWidget) self.peopleNo.setFrameShape(QtWidgets.QFrame.NoFrame) self.peopleNo.setSmallDecimalPoint(False) self.peopleNo.setSegmentStyle(QtWidgets.QLCDNumber.Filled) self.peopleNo.setObjectName("peopleNo") self.peopleBox.addWidget(self.peopleNo) self.peopleLabel = QtWidgets.QLabel(self.horizontalLayoutWidget) font = QtGui.QFont() font.setPointSize(11) self.peopleLabel.setFont(font) self.peopleLabel.setAlignment(QtCore.Qt.AlignCenter) self.peopleLabel.setObjectName("peopleLabel") self.peopleBox.addWidget(self.peopleLabel) self.verticalLayoutWidget_3 = QtWidgets.QWidget(main) self.verticalLayoutWidget_3.setGeometry(QtCore.QRect( 50, 450, 421, 271)) self.verticalLayoutWidget_3.setObjectName("verticalLayoutWidget_3") self.progressLayout = QtWidgets.QVBoxLayout( self.verticalLayoutWidget_3) self.progressLayout.setContentsMargins(0, 0, 0, 0) self.progressLayout.setObjectName("progressLayout") self.progressBar = QtWidgets.QProgressBar(self.verticalLayoutWidget_3) self.progressBar.setLocale( QtCore.QLocale(QtCore.QLocale.English, QtCore.QLocale.UnitedStates)) self.progressBar.setProperty("value", 0) self.progressBar.setAlignment(QtCore.Qt.AlignBottom | QtCore.Qt.AlignLeading | QtCore.Qt.AlignLeft) self.progressBar.setOrientation(QtCore.Qt.Horizontal) self.progressBar.setObjectName("progressBar") self.progressLayout.addWidget(self.progressBar) self.retranslateUi(main) QtCore.QMetaObject.connectSlotsByName(main) def retranslateUi(self, main): _translate = QtCore.QCoreApplication.translate main.setWindowTitle(_translate("main", "Dialog")) self.title.setText(_translate("main", "[FTP] CCC System Beta")) self.selectButton.setText(_translate("main", "Select Video")) self.submitButton.setText(_translate("main", "Submit")) self.heatmap.setText(_translate("main", "Heatmap")) self.counting.setText(_translate("main", "Counting People")) self.peopleLabel.setText(_translate("main", "People"))
class Ui_MainWindow(object): def setupUi(self, MainWindow): MainWindow.setObjectName("MainWindow") MainWindow.setWindowModality(QtCore.Qt.NonModal) MainWindow.resize(999, 749) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( MainWindow.sizePolicy().hasHeightForWidth()) MainWindow.setSizePolicy(sizePolicy) MainWindow.setStyleSheet("") MainWindow.setAnimated(True) self.centralwidget = QtWidgets.QWidget(MainWindow) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.centralwidget.sizePolicy().hasHeightForWidth()) self.centralwidget.setSizePolicy(sizePolicy) self.centralwidget.setObjectName("centralwidget") self.first_mediaplayer = QtWidgets.QFrame(self.centralwidget) self.first_mediaplayer.setGeometry(QtCore.QRect(540, 0, 461, 301)) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.first_mediaplayer.sizePolicy().hasHeightForWidth()) self.first_mediaplayer.setSizePolicy(sizePolicy) self.first_mediaplayer.setStyleSheet("") self.first_mediaplayer.setFrameShape(QtWidgets.QFrame.StyledPanel) self.first_mediaplayer.setFrameShadow(QtWidgets.QFrame.Raised) self.first_mediaplayer.setObjectName("first_mediaplayer") self.time_slider = QtWidgets.QSlider(self.first_mediaplayer) self.time_slider.setGeometry(QtCore.QRect(58, 240, 311, 31)) self.time_slider.setOrientation(QtCore.Qt.Horizontal) self.time_slider.setObjectName("time_slider") self.current_time_label = QtWidgets.QLabel(self.first_mediaplayer) self.current_time_label.setGeometry(QtCore.QRect(20, 248, 60, 16)) self.current_time_label.setObjectName("current_time_label") self.time_left_label = QtWidgets.QLabel(self.first_mediaplayer) self.time_left_label.setGeometry(QtCore.QRect(380, 248, 60, 16)) self.time_left_label.setObjectName("time_left_label") self.video_player = QVideoWidget(self.first_mediaplayer) self.video_player.setEnabled(True) self.video_player.setGeometry(QtCore.QRect(15, 19, 421, 211)) self.video_player.setAutoFillBackground(False) self.video_player.setStyleSheet( "background-color: rgb(255, 255, 255);") self.video_player.setObjectName("video_player") self.volume_control = QtWidgets.QSlider(self.first_mediaplayer) self.volume_control.setGeometry(QtCore.QRect(340, 262, 101, 22)) self.volume_control.setOrientation(QtCore.Qt.Horizontal) self.volume_control.setObjectName("volume_control") self.pauseButton = QtWidgets.QPushButton(self.first_mediaplayer) self.pauseButton.setGeometry(QtCore.QRect(150, 260, 31, 31)) self.pauseButton.setAutoFillBackground(False) self.pauseButton.setStyleSheet( "background-color: rgba(255, 255, 255, 0);") self.pauseButton.setText("") icon = QtGui.QIcon() icon.addPixmap( QtGui.QPixmap("resources/buttons/media_buttons/pause1.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.pauseButton.setIcon(icon) self.pauseButton.setIconSize(QtCore.QSize(31, 31)) self.pauseButton.setObjectName("pauseButton") self.playButton = QtWidgets.QPushButton(self.first_mediaplayer) self.playButton.setGeometry(QtCore.QRect(190, 260, 31, 31)) self.playButton.setAutoFillBackground(False) self.playButton.setStyleSheet( "background-color: rgba(255, 255, 255, 0);") self.playButton.setText("") icon1 = QtGui.QIcon() icon1.addPixmap( QtGui.QPixmap("resources/buttons/media_buttons/play1.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.playButton.setIcon(icon1) self.playButton.setIconSize(QtCore.QSize(31, 31)) self.playButton.setObjectName("playButton") self.nextButton = QtWidgets.QPushButton(self.first_mediaplayer) self.nextButton.setGeometry(QtCore.QRect(229, 260, 31, 31)) self.nextButton.setAutoFillBackground(False) self.nextButton.setStyleSheet( "background-color: rgba(255, 255, 255, 0);") self.nextButton.setText("") icon2 = QtGui.QIcon() icon2.addPixmap( QtGui.QPixmap("resources/buttons/media_buttons/next_vid1.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.nextButton.setIcon(icon2) self.nextButton.setIconSize(QtCore.QSize(31, 31)) self.nextButton.setObjectName("nextButton") self.stopButton = QtWidgets.QPushButton(self.first_mediaplayer) self.stopButton.setGeometry(QtCore.QRect(110, 260, 31, 31)) self.stopButton.setAutoFillBackground(False) self.stopButton.setStyleSheet( "background-color: rgba(255, 255, 255, 0);") self.stopButton.setText("") icon3 = QtGui.QIcon() icon3.addPixmap( QtGui.QPixmap("resources/buttons/media_buttons/stop1.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.stopButton.setIcon(icon3) self.stopButton.setIconSize(QtCore.QSize(31, 31)) self.stopButton.setObjectName("stopButton") self.muteButton = QtWidgets.QPushButton(self.first_mediaplayer) self.muteButton.setGeometry(QtCore.QRect(278, 262, 23, 23)) self.muteButton.setAutoFillBackground(False) self.muteButton.setStyleSheet( "background-color: rgba(255, 255, 255, 0);") self.muteButton.setText("") icon4 = QtGui.QIcon() icon4.addPixmap( QtGui.QPixmap("resources/buttons/media_buttons/mute1.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.muteButton.setIcon(icon4) self.muteButton.setIconSize(QtCore.QSize(31, 31)) self.muteButton.setObjectName("muteButton") self.volumeButton = QtWidgets.QPushButton(self.first_mediaplayer) self.volumeButton.setGeometry(QtCore.QRect(310, 261, 23, 23)) self.volumeButton.setAutoFillBackground(False) self.volumeButton.setStyleSheet( "background-color: rgba(255, 255, 255, 0);") self.volumeButton.setText("") icon5 = QtGui.QIcon() icon5.addPixmap( QtGui.QPixmap("resources/buttons/media_buttons/volume1.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.volumeButton.setIcon(icon5) self.volumeButton.setIconSize(QtCore.QSize(31, 31)) self.volumeButton.setObjectName("volumeButton") self.mini_viewer = QtWidgets.QFrame(self.centralwidget) self.mini_viewer.setGeometry(QtCore.QRect(10, 300, 991, 411)) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.mini_viewer.sizePolicy().hasHeightForWidth()) self.mini_viewer.setSizePolicy(sizePolicy) self.mini_viewer.setStyleSheet("") self.mini_viewer.setFrameShape(QtWidgets.QFrame.StyledPanel) self.mini_viewer.setFrameShadow(QtWidgets.QFrame.Raised) self.mini_viewer.setObjectName("mini_viewer") self.timeline_1 = QtWidgets.QGraphicsView(self.mini_viewer) self.timeline_1.setGeometry(QtCore.QRect(50, 80, 891, 21)) self.timeline_1.setStyleSheet("") self.timeline_1.setObjectName("timeline_1") self.mini_view_1 = QtWidgets.QGraphicsView(self.mini_viewer) self.mini_view_1.setGeometry(QtCore.QRect(50, 110, 891, 81)) self.mini_view_1.setStyleSheet("") self.mini_view_1.setObjectName("mini_view_1") self.timeline_2 = QtWidgets.QGraphicsView(self.mini_viewer) self.timeline_2.setGeometry(QtCore.QRect(50, 210, 891, 21)) self.timeline_2.setStyleSheet("") self.timeline_2.setObjectName("timeline_2") self.mini_view_2 = QtWidgets.QGraphicsView(self.mini_viewer) self.mini_view_2.setGeometry(QtCore.QRect(50, 320, 891, 81)) self.mini_view_2.setStyleSheet("") self.mini_view_2.setObjectName("mini_view_2") self.push_extract_1 = QtWidgets.QPushButton(self.mini_viewer) self.push_extract_1.setGeometry(QtCore.QRect(40, 40, 141, 31)) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.push_extract_1.sizePolicy().hasHeightForWidth()) self.push_extract_1.setSizePolicy(sizePolicy) self.push_extract_1.setStyleSheet("") self.push_extract_1.setObjectName("push_extract_1") self.timeline_3 = QtWidgets.QGraphicsView(self.mini_viewer) self.timeline_3.setGeometry(QtCore.QRect(50, 250, 891, 21)) self.timeline_3.setStyleSheet("") self.timeline_3.setObjectName("timeline_3") self.timeline_4 = QtWidgets.QGraphicsView(self.mini_viewer) self.timeline_4.setEnabled(False) self.timeline_4.setGeometry(QtCore.QRect(50, 290, 891, 21)) self.timeline_4.setStyleSheet("") self.timeline_4.setObjectName("timeline_4") self.tabWidget = QtWidgets.QTabWidget(self.centralwidget) self.tabWidget.setEnabled(True) self.tabWidget.setGeometry(QtCore.QRect(20, 0, 511, 301)) self.tabWidget.setObjectName("tabWidget") self.tab1 = QtWidgets.QWidget() sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.tab1.sizePolicy().hasHeightForWidth()) self.tab1.setSizePolicy(sizePolicy) self.tab1.setObjectName("tab1") self.playlistView = QtWidgets.QListView(self.tab1) self.playlistView.setEnabled(True) self.playlistView.setGeometry(QtCore.QRect(0, 0, 511, 271)) self.playlistView.setObjectName("playlistView") self.tabWidget.addTab(self.tab1, "") self.tab_2 = QtWidgets.QWidget() sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.tab_2.sizePolicy().hasHeightForWidth()) self.tab_2.setSizePolicy(sizePolicy) self.tab_2.setObjectName("tab_2") self.treeView2 = QtWidgets.QTreeView(self.tab_2) self.treeView2.setGeometry(QtCore.QRect(0, 0, 511, 271)) self.treeView2.setAcceptDrops(True) self.treeView2.setObjectName("treeView2") self.tabWidget.addTab(self.tab_2, "") self.tab = QtWidgets.QWidget() self.tab.setObjectName("tab") self.treeView2_2 = QtWidgets.QTreeView(self.tab) self.treeView2_2.setGeometry(QtCore.QRect(0, 0, 511, 271)) self.treeView2_2.setAcceptDrops(True) self.treeView2_2.setObjectName("treeView2_2") self.pushButton = QtWidgets.QPushButton(self.tab) self.pushButton.setEnabled(False) self.pushButton.setGeometry(QtCore.QRect(80, 10, 112, 32)) self.pushButton.setObjectName("pushButton") self.tabWidget.addTab(self.tab, "") MainWindow.setCentralWidget(self.centralwidget) self.menuBar = QtWidgets.QMenuBar(MainWindow) self.menuBar.setGeometry(QtCore.QRect(0, 0, 999, 22)) self.menuBar.setToolTipDuration(0) self.menuBar.setObjectName("menuBar") self.menuHelp = QtWidgets.QMenu(self.menuBar) self.menuHelp.setObjectName("menuHelp") self.menuEdit = QtWidgets.QMenu(self.menuBar) self.menuEdit.setObjectName("menuEdit") self.menuView = QtWidgets.QMenu(self.menuBar) self.menuView.setObjectName("menuView") self.menuFiles = QtWidgets.QMenu(self.menuBar) self.menuFiles.setObjectName("menuFiles") MainWindow.setMenuBar(self.menuBar) self.actionLicense = QtWidgets.QAction(MainWindow) self.actionLicense.setObjectName("actionLicense") self.actionAdd_Files = QtWidgets.QAction(MainWindow) self.actionAdd_Files.setCheckable(True) self.actionAdd_Files.setChecked(False) self.actionAdd_Files.setObjectName("actionAdd_Files") self.actionAbout = QtWidgets.QAction(MainWindow) self.actionAbout.setObjectName("actionAbout") self.menuHelp.addAction(self.actionLicense) self.menuFiles.addAction(self.actionAdd_Files) self.menuBar.addAction(self.menuFiles.menuAction()) self.menuBar.addAction(self.menuView.menuAction()) self.menuBar.addAction(self.menuEdit.menuAction()) self.menuBar.addAction(self.menuHelp.menuAction()) self.retranslateUi(MainWindow) self.tabWidget.setCurrentIndex(0) QtCore.QMetaObject.connectSlotsByName(MainWindow) def retranslateUi(self, MainWindow): _translate = QtCore.QCoreApplication.translate MainWindow.setWindowTitle(_translate("MainWindow", "MainWindow")) self.current_time_label.setText(_translate("MainWindow", "0:00")) self.time_left_label.setText(_translate("MainWindow", "0:00")) self.push_extract_1.setText(_translate("MainWindow", "Extract Videos")) self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab1), _translate("MainWindow", "Original Videos")) self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_2), _translate("MainWindow", "Extracted Videos")) self.pushButton.setText(_translate("MainWindow", "PushButton")) self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab), _translate("MainWindow", "Model")) self.menuHelp.setTitle(_translate("MainWindow", "Help")) self.menuEdit.setTitle(_translate("MainWindow", "Edit")) self.menuView.setTitle(_translate("MainWindow", "View")) self.menuFiles.setTitle(_translate("MainWindow", "Files")) self.actionLicense.setText(_translate("MainWindow", "License")) self.actionAdd_Files.setText(_translate("MainWindow", "Add Files")) self.actionAbout.setText(_translate("MainWindow", "About"))
class Ui_main(): global name_in, out, selected, checked, zone_cutted checked = True def __init__(self): self.horizontalLayoutWidget_3 = QtWidgets.QWidget(main) self.statusTitle = QtWidgets.QLabel(main) self.countingLabel = QtWidgets.QLabel(main) self.statusLabel = QtWidgets.QLabel(main) self.heatmapLabel = QtWidgets.QLabel(main) self.mediaPlayer = QMediaPlayer(None, QMediaPlayer.VideoSurface) self.videoWidget = QVideoWidget(main) self.counting = QtWidgets.QCheckBox(self.horizontalLayoutWidget_3) self.heatmap = QtWidgets.QCheckBox(self.horizontalLayoutWidget_3) self.selectButton = QtWidgets.QPushButton(self.horizontalLayoutWidget_3) self.buttonLayout = QtWidgets.QHBoxLayout(self.horizontalLayoutWidget_3) self.zone_cutted = False def setupUi(self, main): main.setObjectName("main") main.setWindowModality(QtCore.Qt.NonModal) main.resize(1230, 830) main.setFixedSize(QSize(1230, 830)) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.Maximum) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(main.sizePolicy().hasHeightForWidth()) main.setSizePolicy(sizePolicy) main.setContextMenuPolicy(QtCore.Qt.NoContextMenu) main.setAcceptDrops(False) main.setAutoFillBackground(False) main.setModal(False) # # self.horizontalLayoutWidget_3.setGeometry(QtCore.QRect(20, 420, 1191, 39)) self.horizontalLayoutWidget_3.setObjectName("horizontalLayoutWidget_3") self.buttonLayout.setContentsMargins(0, 0, 0, 0) self.buttonLayout.setObjectName("buttonLayout") self.heatmapLabel.setGeometry(QtCore.QRect(420, 20, 380, 380)) self.heatmapLabel.setFrameShape(QtWidgets.QFrame.Box) self.heatmapLabel.setAlignment(QtCore.Qt.AlignCenter) self.heatmapLabel.setObjectName("heatmapLabel") self.countingLabel.setGeometry(QtCore.QRect(830, 20, 380, 380)) self.countingLabel.setFrameShape(QtWidgets.QFrame.Box) self.countingLabel.setAlignment(QtCore.Qt.AlignCenter) self.countingLabel.setObjectName("countingLabel") sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.MinimumExpanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.selectButton.sizePolicy().hasHeightForWidth()) self.selectButton.setSizePolicy(sizePolicy) font = QtGui.QFont() font.setPointSize(10) self.selectButton.setFont(font) self.selectButton.setObjectName("selectButton") self.selectButton.clicked.connect(self.abrir) self.buttonLayout.addWidget(self.selectButton) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.heatmap.sizePolicy().hasHeightForWidth()) self.heatmap.setSizePolicy(sizePolicy) font = QtGui.QFont() font.setPointSize(12) self.heatmap.setFont(font) self.heatmap.setObjectName("heatmap") self.buttonLayout.addWidget(self.heatmap) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.counting.sizePolicy().hasHeightForWidth()) self.counting.setSizePolicy(sizePolicy) font = QtGui.QFont() font.setPointSize(12) self.counting.setFont(font) self.counting.setObjectName("counting") self.buttonLayout.addWidget(self.counting) spacerItem = QtWidgets.QSpacerItem(250, 20, QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Minimum) self.buttonLayout.addItem(spacerItem) self.beginTimeLabel = QtWidgets.QLabel(self.horizontalLayoutWidget_3) font = QtGui.QFont() font.setPointSize(12) self.beginTimeLabel.setFont(font) self.beginTimeLabel.setObjectName("beginTimeLabel") self.buttonLayout.addWidget(self.beginTimeLabel) self.beginTimeEdit = QtWidgets.QTimeEdit(self.horizontalLayoutWidget_3) self.beginTimeEdit.setLocale(QtCore.QLocale(QtCore.QLocale.English, QtCore.QLocale.UnitedStates)) self.beginTimeEdit.setObjectName("beginTimeEdit") self.buttonLayout.addWidget(self.beginTimeEdit) spacerItem1 = QtWidgets.QSpacerItem(50, 20, QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Minimum) self.buttonLayout.addItem(spacerItem1) self.startTimeLabel = QtWidgets.QLabel(self.horizontalLayoutWidget_3) font = QtGui.QFont() font.setPointSize(12) self.startTimeLabel.setFont(font) self.startTimeLabel.setObjectName("startTimeLabel") self.buttonLayout.addWidget(self.startTimeLabel) self.startTimeEdit = QtWidgets.QTimeEdit(self.horizontalLayoutWidget_3) self.startTimeEdit.setLocale(QtCore.QLocale(QtCore.QLocale.English, QtCore.QLocale.UnitedStates)) self.startTimeEdit.setObjectName("startTimeEdit") self.buttonLayout.addWidget(self.startTimeEdit) self.endTimeLabel = QtWidgets.QLabel(self.horizontalLayoutWidget_3) font = QtGui.QFont() font.setPointSize(12) self.endTimeLabel.setFont(font) self.endTimeLabel.setObjectName("endTimeLabel") self.buttonLayout.addWidget(self.endTimeLabel) self.endTimeEdit = QtWidgets.QTimeEdit(self.horizontalLayoutWidget_3) self.endTimeEdit.setLocale(QtCore.QLocale(QtCore.QLocale.English, QtCore.QLocale.UnitedStates)) self.endTimeEdit.setObjectName("endTimeEdit") self.buttonLayout.addWidget(self.endTimeEdit) # self.submitButton = QtWidgets.QPushButton(self.horizontalLayoutWidget_3) self.submitButton = QtWidgets.QPushButton(main) self.submitButton.setGeometry(QtCore.QRect(940, 540, 266, 41)) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.submitButton.sizePolicy().hasHeightForWidth()) self.submitButton.setSizePolicy(sizePolicy) font = QtGui.QFont() font.setPointSize(10) self.submitButton.setFont(font) self.submitButton.setObjectName("submitButton") self.submitButton.clicked.connect(self.run_process) self.submitButton.setEnabled(False) # self.buttonLayout.addWidget(self.submitButton) # # self.videoWidget.setGeometry(QtCore.QRect(20, 20, 380, 380)) self.videoWidget.setAutoFillBackground(False) self.videoWidget.setObjectName("videoWidget") # # self.statusLabel.setGeometry(QtCore.QRect(1140, 580, 71, 31)) self.statusLabel.setScaledContents(False) self.statusLabel.setAlignment(QtCore.Qt.AlignCenter) self.statusLabel.setIndent(-1) self.statusLabel.setObjectName("statusLabel") self.statusTitle.setGeometry(QtCore.QRect(1090, 580, 61, 31)) self.statusTitle.setScaledContents(False) self.statusTitle.setAlignment(QtCore.Qt.AlignCenter) self.statusTitle.setIndent(-1) self.statusTitle.setObjectName("statusTitle") # # ZONE NEW self.zoneButton = QtWidgets.QPushButton(main) self.zoneButton.setGeometry(QtCore.QRect(110, 770, 291, 37)) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.MinimumExpanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.zoneButton.sizePolicy().hasHeightForWidth()) self.zoneButton.setSizePolicy(sizePolicy) font = QtGui.QFont() font.setPointSize(10) self.zoneButton.setFont(font) self.zoneButton.setObjectName("zoneButton") self.zoneButton.clicked.connect(self.select_zone) self.zoneButton.setEnabled(False) # self.outputdiButton = QtWidgets.QPushButton(main) # self.outputdiButton.setGeometry(QtCore.QRect(546, 482, 171, 41)) # sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.MinimumExpanding) # sizePolicy.setHorizontalStretch(0) # sizePolicy.setVerticalStretch(0) # sizePolicy.setHeightForWidth(self.outputdiButton.sizePolicy().hasHeightForWidth()) # self.outputdiButton.setSizePolicy(sizePolicy) # font = QtGui.QFont() # font.setPointSize(10) # self.outputdiButton.setFont(font) # self.outputdiButton.setObjectName("outputdiButton") # self.outputdiText = QtWidgets.QTextEdit(main) # self.outputdiText.setGeometry(QtCore.QRect(730, 490, 481, 31)) # self.outputdiText.setObjectName("outputdiText") self.zoneLabel = QtWidgets.QLabel(main) self.zoneLabel.setGeometry(QtCore.QRect(20, 483, 480, 270)) self.zoneLabel.setFrameShape(QtWidgets.QFrame.Box) self.zoneLabel.setAlignment(QtCore.Qt.AlignCenter) self.zoneLabel.setObjectName("zoneLabel") # # self.retranslateUi(main) QtCore.QMetaObject.connectSlotsByName(main) # # self.mediaPlayer.setVideoOutput(self.videoWidget) # # # self.setGeometry(100, 100, 500, 300) # self.resize(self.image.width(), self.image.height()) # self.show() # # self.lastPoint = QPoint() self.startPoint = QPoint() self.drawing = False def retranslateUi(self, main): _translate = QtCore.QCoreApplication.translate main.setWindowTitle(_translate("main", "[FTP] Triple C System")) self.selectButton.setText(_translate("main", "Select Video")) self.heatmap.setText(_translate("main", "Heatmap")) self.counting.setText(_translate("main", "Counting People")) self.submitButton.setText(_translate("main", "Submit")) self.heatmapLabel.setText(_translate("main", "Heatmap")) self.statusLabel.setText(_translate("main", "Not Ready")) self.countingLabel.setText(_translate("main", "Counting People")) self.statusTitle.setText(_translate("main", "Status:")) self.beginTimeLabel.setText(_translate("main", "Begin Time:")) self.startTimeLabel.setText(_translate("main", "Start at:")) self.endTimeLabel.setText(_translate("main", "End at:")) self.beginTimeEdit.setDisplayFormat(_translate("main", "HH:mm:ss")) self.startTimeEdit.setDisplayFormat(_translate("main", "HH:mm:ss")) self.endTimeEdit.setDisplayFormat(_translate("main", "HH:mm:ss")) self.zoneButton.setText(_translate("main", "Zone Separate Analysis")) # self.outputdiButton.setText(_translate("main", "Output Directory")) self.zoneLabel.setText(_translate("main", "Zone Separate Analysis")) def abrir(self): global name_in selected_file, _ = QFileDialog.getOpenFileName(None, "Select a video", ".", "Video Files (*.mp4 *.flv *.ts *.mts *.avi *.mpg)") if selected_file != '': self.mediaPlayer.setMedia( QMediaContent(QUrl.fromLocalFile(selected_file))) self.play() name_of_file = QFileInfo(selected_file).fileName() self.selected = name_of_file self.name_in = name_of_file if QFileInfo(selected_file).path() != QDir.currentPath(): shutil.copy(selected_file, os.getcwd() + "\\" + name_of_file) f = open("zone_position.txt", "w+") self.statusLabel.setText("Ready") self.submitButton.setEnabled(True) self.zoneButton.setEnabled(True) self.heatmapLabel.clear() self.heatmapLabel.setText("Heatmap") self.countingLabel.clear() self.countingLabel.setText("Counting people") clip = VideoFileClip(name_of_file) clip.save_frame("selected_zone.jpg", 1) w = self.zoneLabel.width() h = self.zoneLabel.height() pixmap = QPixmap("selected_zone.jpg") pixmap = pixmap.scaled(w, h, QtCore.Qt.KeepAspectRatio) self.zoneLabel.setPixmap(pixmap) # self.select_zone() def play(self): self.mediaPlayer.play() def run_process(self): if (self.beginTimeEdit.time().toString() > self.startTimeEdit.time().toString()) or (self.beginTimeEdit.time().toString() > self.endTimeEdit.time().toString()): self.startTimeEdit.setTime(self.beginTimeEdit.time()) self.endTimeEdit.setTime(self.beginTimeEdit.time()) print(1) self.statusLabel.setText("Time Error") else: if self.startTimeEdit.time().toString() > self.endTimeEdit.time().toString(): self.endTimeEdit.setTime(self.startTimeEdit.time()) print(2) self.statusLabel.setText("Time Error") else: if (self.beginTimeEdit.time().toString() != self.endTimeEdit.time().toString()) or (self.startTimeEdit.time().toString() != self.endTimeEdit.time().toString()): self.write_time() self.statusLabel.setText("Converting") self.cut_video() self.statusLabel.setText("Processing") command = "conda activate yolov3 && python ftp_combine01.py --video " + self.name_in os.system(command) self.show_video() if self.heatmap.isChecked(): self.show_heatmap() if self.counting.isChecked(): self.show_counting() self.statusLabel.setText("Complete") self.selectButton.setEnabled(True) self.submitButton.setEnabled(False) def show_video(self): directory = QDir(os.getcwd()) directory.setFilter(QDir.Files | QDir.NoDotDot | QDir.NoDotAndDotDot) directory.setSorting(QDir.Time) set_filter = ["*.avi"] directory.setNameFilters(set_filter) for show in directory.entryInfoList(): print("%s %s" % (show.size(), show.fileName())) out = show.fileName() break # print(1) if self.zone_cutted: # print(2) x1, y1, x2, y2 = get_zone_position() clip = VideoFileClip(out) cut_video = crop(clip, x1, y1, x2, y2) name_of_file = QFileInfo(out).baseName() + "_zone.avi" cut_video.write_videofile(name_of_file, codec='mpeg4', audio=False) else: # print(3) name_of_file = out # print(4) self.mediaPlayer.setMedia( QMediaContent(QUrl.fromLocalFile(os.getcwd() + "\\" + name_of_file)) ) # print(5) # self.mediaPlayer.setPlaybackRate() self.play() # print(6) def show_heatmap(self): # print("a") directory = QDir(os.getcwd()) directory.setFilter(QDir.Files | QDir.NoDotDot | QDir.NoDotAndDotDot) directory.setSorting(QDir.Time) set_filter = ["*.jpg"] directory.setNameFilters(set_filter) # print("b") for show in directory.entryInfoList(): print("%s %s" % (show.size(), show.fileName())) if "heatmap" in show.fileName(): out = show.fileName() break # print("c") w = self.heatmapLabel.width() h = self.heatmapLabel.height() # print("d") # print("%r", self.zone_cutted) if self.zone_cutted: x1, y1, x2, y2 = get_zone_position() imageObject = Image.open(out) cropped = imageObject.crop((x1, y1, x2, y2)) name_of_file = QFileInfo(out).baseName() + "_zone.jpg" cropped.save(name_of_file) pixmap = QPixmap(name_of_file) else: pixmap = QPixmap(out) # print("e") pixmap = pixmap.scaled(w, h, QtCore.Qt.KeepAspectRatio) self.heatmapLabel.setPixmap(pixmap) # print("f") def show_counting(self): directory = QDir(os.getcwd()) directory.setFilter(QDir.Files | QDir.NoDotDot | QDir.NoDotAndDotDot) directory.setSorting(QDir.Time) set_filter = ["*.jpg"] directory.setNameFilters(set_filter) for show in directory.entryInfoList(): print("%s %s" % (show.size(), show.fileName())) if "graph" in show.fileName(): out = show.fileName() break w = self.countingLabel.width() h = self.countingLabel.height() pixmap = QPixmap(out) pixmap = pixmap.scaled(w, h, QtCore.Qt.KeepAspectRatio) self.countingLabel.setPixmap(pixmap) def cut_video(self): file = QFileInfo(self.selected).fileName() clip = VideoFileClip(file) starttime_hour = int(self.startTimeEdit.time().hour()) - int(self.beginTimeEdit.time().hour()) starttime_minute = int(self.startTimeEdit.time().minute()) - int(self.beginTimeEdit.time().minute()) starttime_second = int(self.startTimeEdit.time().second()) - int(self.beginTimeEdit.time().second()) endtime_hour = int(self.endTimeEdit.time().hour()) - int(self.beginTimeEdit.time().hour()) endtime_minute = int(self.endTimeEdit.time().minute()) - int(self.beginTimeEdit.time().minute()) endtime_second = int(self.endTimeEdit.time().second()) - int(self.beginTimeEdit.time().second()) cut_video = clip.subclip((starttime_hour, starttime_minute, starttime_second), (endtime_hour, endtime_minute, endtime_second)) # m = open('zone_position.txt', 'r').read() # lines = m.split('\n') # x = [] # y = [] # for line in lines: # if len(line) > 1: # x0, y0 = line.split(',') # x.append(x0) # y.append(y0) # x1 = x[0] # x2 = x[1] # y1 = y[0] # y2 = y[1] # # cut_video = crop(cut_video, x1, y1, x2, y2) name_of_file = QFileInfo(self.selected).baseName() + "_cut.avi" self.name_in = str(name_of_file) cut_video.write_videofile(name_of_file, codec='mpeg4', audio=False) def write_time(self): h = int(self.startTimeEdit.time().hour()) m = int(self.startTimeEdit.time().minute()) s = int(self.startTimeEdit.time().second()) x = "1970/01/01 " + str(h) + ":" + str(m) + ":" + str(s) x1 = str(h) + ":" + str(m) + ":" + str(s) fun = time.strptime(x, "%Y/%m/%d %H:%M:%S") y = calendar.timegm(fun) f = open("soul.txt", "w+") f.write("%s,%d\r\n" % (x1, y)) def select_zone(self): file = QFileInfo(self.selected).fileName() clip = VideoFileClip(file) clip.save_frame("selected_zone.jpg", 1) self.zone_cutted = True # self.image = QPixmap('cutzone.jpg') # self.zone_pic = self.image.scaled(self.image.size(), QtCore.Qt.KeepAspectRatio) # self.zoneLabel.setScaledContents(True) # self.zoneLabel.setPixmap(self.zone_pic) command = "python cut_zone.py" os.system(command) w = self.zoneLabel.width() h = self.zoneLabel.height() pixmap = QPixmap("cropped_zone.jpg") pixmap = pixmap.scaled(w, h, QtCore.Qt.KeepAspectRatio) # time.sleep(5) self.zoneLabel.setPixmap(pixmap)
class Ui_main(object): def setupUi(self, main): main.setObjectName("main") main.setWindowModality(QtCore.Qt.NonModal) main.resize(1230, 500) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.Maximum) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(main.sizePolicy().hasHeightForWidth()) main.setSizePolicy(sizePolicy) main.setContextMenuPolicy(QtCore.Qt.NoContextMenu) main.setAcceptDrops(False) main.setAutoFillBackground(False) main.setModal(False) self.videoWidget = QVideoWidget(main) self.videoWidget.setGeometry(QtCore.QRect(20, 20, 380, 380)) self.videoWidget.setAutoFillBackground(False) self.videoWidget.setObjectName("videoWidget") self.heatmapLabel = QtWidgets.QLabel(main) self.heatmapLabel.setGeometry(QtCore.QRect(420, 20, 380, 380)) self.heatmapLabel.setFrameShape(QtWidgets.QFrame.Box) self.heatmapLabel.setAlignment(QtCore.Qt.AlignCenter) self.heatmapLabel.setObjectName("heatmapLabel") self.statusLabel = QtWidgets.QLabel(main) self.statusLabel.setGeometry(QtCore.QRect(1140, 460, 70, 30)) self.statusLabel.setScaledContents(False) self.statusLabel.setAlignment(QtCore.Qt.AlignCenter) self.statusLabel.setIndent(-1) self.statusLabel.setObjectName("statusLabel") self.countingLabel = QtWidgets.QLabel(main) self.countingLabel.setGeometry(QtCore.QRect(830, 20, 380, 380)) self.countingLabel.setFrameShape(QtWidgets.QFrame.Box) self.countingLabel.setAlignment(QtCore.Qt.AlignCenter) self.countingLabel.setObjectName("countingLabel") self.horizontalLayoutWidget_3 = QtWidgets.QWidget(main) self.horizontalLayoutWidget_3.setGeometry( QtCore.QRect(20, 420, 1191, 39)) self.horizontalLayoutWidget_3.setObjectName("horizontalLayoutWidget_3") self.buttonLayout = QtWidgets.QHBoxLayout( self.horizontalLayoutWidget_3) self.buttonLayout.setContentsMargins(0, 0, 0, 0) self.buttonLayout.setObjectName("buttonLayout") self.selectButton = QtWidgets.QPushButton( self.horizontalLayoutWidget_3) sizePolicy = QtWidgets.QSizePolicy( QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.MinimumExpanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.selectButton.sizePolicy().hasHeightForWidth()) self.selectButton.setSizePolicy(sizePolicy) font = QtGui.QFont() font.setPointSize(10) self.selectButton.setFont(font) self.selectButton.setObjectName("selectButton") self.buttonLayout.addWidget(self.selectButton) self.heatmap = QtWidgets.QCheckBox(self.horizontalLayoutWidget_3) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.heatmap.sizePolicy().hasHeightForWidth()) self.heatmap.setSizePolicy(sizePolicy) font = QtGui.QFont() font.setPointSize(12) self.heatmap.setFont(font) self.heatmap.setObjectName("heatmap") self.buttonLayout.addWidget(self.heatmap) self.counting = QtWidgets.QCheckBox(self.horizontalLayoutWidget_3) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.counting.sizePolicy().hasHeightForWidth()) self.counting.setSizePolicy(sizePolicy) font = QtGui.QFont() font.setPointSize(12) self.counting.setFont(font) self.counting.setObjectName("counting") self.buttonLayout.addWidget(self.counting) spacerItem = QtWidgets.QSpacerItem(600, 20, QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Minimum) self.buttonLayout.addItem(spacerItem) self.submitButton = QtWidgets.QPushButton( self.horizontalLayoutWidget_3) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.submitButton.sizePolicy().hasHeightForWidth()) self.submitButton.setSizePolicy(sizePolicy) font = QtGui.QFont() font.setPointSize(10) self.submitButton.setFont(font) self.submitButton.setObjectName("submitButton") self.buttonLayout.addWidget(self.submitButton) self.statusTitle = QtWidgets.QLabel(main) self.statusTitle.setGeometry(QtCore.QRect(1090, 460, 61, 31)) self.statusTitle.setScaledContents(False) self.statusTitle.setAlignment(QtCore.Qt.AlignCenter) self.statusTitle.setIndent(-1) self.statusTitle.setObjectName("statusTitle") self.retranslateUi(main) QtCore.QMetaObject.connectSlotsByName(main) def retranslateUi(self, main): _translate = QtCore.QCoreApplication.translate main.setWindowTitle(_translate("main", "[FTP] Triple C")) self.heatmapLabel.setText(_translate("main", "Heatmap")) self.statusLabel.setText(_translate("main", "Not Ready")) self.countingLabel.setText(_translate("main", "Counting People")) self.selectButton.setText(_translate("main", "Select Video")) self.heatmap.setText(_translate("main", "Heatmap")) self.counting.setText(_translate("main", "Counting People")) self.submitButton.setText(_translate("main", "Submit")) self.statusTitle.setText(_translate("main", "Status:"))
class Ui_MainWindow(object): def setupUi(self, MainWindow): MainWindow.setObjectName("MainWindow") MainWindow.setEnabled(True) MainWindow.resize(843, 818) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(MainWindow.sizePolicy().hasHeightForWidth()) MainWindow.setSizePolicy(sizePolicy) MainWindow.setMinimumSize(QtCore.QSize(843, 818)) MainWindow.setMaximumSize(QtCore.QSize(843, 818)) icon = QtGui.QIcon() icon.addPixmap(QtGui.QPixmap("../../../Downloads/weightlifting.svg"), QtGui.QIcon.Normal, QtGui.QIcon.Off) MainWindow.setWindowIcon(icon) MainWindow.setAutoFillBackground(False) MainWindow.setStyleSheet("background-color: rgb(246, 255, 231);") self.centralwidget = QtWidgets.QWidget(MainWindow) self.centralwidget.setStyleSheet("background-color: rgb(252, 252, 252);") self.centralwidget.setObjectName("centralwidget") self.stackedWidget = QtWidgets.QStackedWidget(self.centralwidget) self.stackedWidget.setGeometry(QtCore.QRect(30, 20, 761, 771)) self.stackedWidget.setStyleSheet("background-color: rgb(252, 252, 252);") self.stackedWidget.setObjectName("stackedWidget") self.page = QtWidgets.QWidget() self.page.setObjectName("page") self.label = QtWidgets.QLabel(self.page) self.label.setGeometry(QtCore.QRect(-10, 20, 791, 81)) self.label.setStyleSheet("\n" "font-family:Tahoma, Helvetica, Arial, Sans-Serif;\n" "text-align: center;\n" "font-size: 36px;\n" "color: #222;\n" "text-shadow: 0px 2px 3px black;\n" "\n" "\n" "\n" "") self.label.setObjectName("label") self.pushButton = QtWidgets.QPushButton(self.page) self.pushButton.setGeometry(QtCore.QRect(230, 570, 321, 181)) self.pushButton.setStyleSheet("QPushButton{\n" "background-color:rgb(255, 144, 146);\n" "background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:1, stop:0 rgb(180, 17, 17), stop:1 rgba(255, 144, 146));\n" "color:white;\n" "border-style: outset;\n" "border-width:1px;\n" "border-radius:14px;\n" "border-color:rgb(255, 202, 203);\n" "font:bold 24px;\n" "padding:10px;\n" "}\n" "QPushButton:hover { \n" "background-color:rgb(255, 144, 146);\n" "background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:1, stop:0 rgba(255, 144, 146), stop:1 rgba(180, 17, 17));\n" "color:white;\n" "border-style: outset;\n" "border-width:1px;\n" "border-radius:14px;\n" "border-color:rgb(255, 202, 203);\n" "font:bold 26px;\n" "padding:10px;\n" "}\n" "\n" "QPushButton:pressed { \n" "background-color:rgb(255, 144, 146);\n" "color:white;\n" "border-style: outset;\n" "border-width:2px;\n" "border-radius:14px;\n" "border-color:rgb(180, 17, 17);\n" "font:bold 26px;\n" "padding:10px;\n" "}\n" "") self.pushButton.setObjectName("pushButton") self.pushButton_2 = QtWidgets.QPushButton(self.page) self.pushButton_2.setGeometry(QtCore.QRect(230, 170, 321, 181)) self.pushButton_2.setStyleSheet("QPushButton{\n" "background-color:rgb(255, 144, 146);\n" "background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:1, stop:0 rgb(180, 17, 17), stop:1 rgba(255, 144, 146));\n" "color:white;\n" "border-style: outset;\n" "border-width:1px;\n" "border-radius:14px;\n" "border-color:rgb(255, 202, 203);\n" "font:bold 24px;\n" "padding:10px;\n" "}\n" "QPushButton:hover { \n" "background-color:rgb(255, 144, 146);\n" "background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:1, stop:0 rgba(255, 144, 146), stop:1 rgba(180, 17, 17));\n" "color:white;\n" "border-style: outset;\n" "border-width:1px;\n" "border-radius:14px;\n" "border-color:rgb(255, 202, 203);\n" "font:bold 26px;\n" "padding:10px;\n" "}\n" "\n" "QPushButton:pressed { \n" "background-color:rgb(255, 144, 146);\n" "color:white;\n" "border-style: outset;\n" "border-width:2px;\n" "border-radius:14px;\n" "border-color:rgb(180, 17, 17);\n" "font:bold 26px;\n" "padding:10px;\n" "}\n" "\n" "") self.pushButton_2.setObjectName("pushButton_2") self.pushButton_13 = QtWidgets.QPushButton(self.page) self.pushButton_13.setGeometry(QtCore.QRect(230, 370, 321, 181)) self.pushButton_13.setStyleSheet("QPushButton{\n" "background-color:rgb(255, 144, 146);\n" "background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:1, stop:0 rgb(180, 17, 17), stop:1 rgba(255, 144, 146));\n" "color:white;\n" "border-style: outset;\n" "border-width:1px;\n" "border-radius:14px;\n" "border-color:rgb(255, 202, 203);\n" "font:bold 24px;\n" "padding:10px;\n" "}\n" "QPushButton:hover { \n" "background-color:rgb(255, 144, 146);\n" "background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:1, stop:0 rgba(255, 144, 146), stop:1 rgba(180, 17, 17));\n" "color:white;\n" "border-style: outset;\n" "border-width:1px;\n" "border-radius:14px;\n" "border-color:rgb(255, 202, 203);\n" "font:bold 26px;\n" "padding:10px;\n" "}\n" "\n" "QPushButton:pressed { \n" "background-color:rgb(255, 144, 146);\n" "color:white;\n" "border-style: outset;\n" "border-width:2px;\n" "border-radius:14px;\n" "border-color:rgb(180, 17, 17);\n" "font:bold 26px;\n" "padding:10px;\n" "}\n" "\n" "") self.pushButton_13.setObjectName("pushButton_13") self.stackedWidget.addWidget(self.page) self.page_6 = QtWidgets.QWidget() self.page_6.setObjectName("page_6") self.label_13 = QtWidgets.QLabel(self.page_6) self.label_13.setGeometry(QtCore.QRect(-10, 30, 771, 61)) self.label_13.setStyleSheet("text-align: center;\n" "font-size: 36px;\n" "color: #222;\n" "text-shadow: 0px 2px 3px black;") self.label_13.setObjectName("label_13") self.image_label_11 = QtWidgets.QLabel(self.page_6) self.image_label_11.setGeometry(QtCore.QRect(60, 110, 661, 511)) self.image_label_11.setAutoFillBackground(False) self.image_label_11.setStyleSheet("\n" "background-color: black;\n" "color:white;\n" "border-style: outset;\n" "border-width:1px;\n" "border-radius:14px;\n" "border-color:gray;\n" "font:bold 50px;\n" "padding:10px;\n" "text-align:center\n" "") self.image_label_11.setLineWidth(3) self.image_label_11.setMidLineWidth(2) self.image_label_11.setAlignment(QtCore.Qt.AlignCenter) self.image_label_11.setObjectName("image_label_11") self.pushButton19_4 = QtWidgets.QPushButton(self.page_6) self.pushButton19_4.setGeometry(QtCore.QRect(200, 650, 181, 101)) self.pushButton19_4.setStyleSheet("QPushButton{\n" "background-color:rgb(255, 144, 146);\n" "background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:1, stop:0 rgb(180, 17, 17), stop:1 rgba(255, 144, 146));\n" "color:white;\n" "border-style: outset;\n" "border-width:1px;\n" "border-radius:14px;\n" "border-color:rgb(255, 202, 203);\n" "font:bold 16px;\n" "padding:10px;\n" "}\n" "QPushButton:hover { \n" "background-color:rgb(255, 144, 146);\n" "background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:1, stop:0 rgba(255, 144, 146), stop:1 rgba(180, 17, 17));\n" "color:white;\n" "border-style: outset;\n" "border-width:1px;\n" "border-radius:14px;\n" "border-color:rgb(255, 202, 203);\n" "font:bold 18px;\n" "padding:10px;\n" "}\n" "\n" "QPushButton:pressed { \n" "background-color:rgb(255, 144, 146);\n" "color:white;\n" "border-style: outset;\n" "border-width:2px;\n" "border-radius:14px;\n" "border-color:rgb(180, 17, 17);\n" "font:bold 16px;\n" "padding:10px;\n" "}\n" "") self.pushButton19_4.setObjectName("pushButton19_4") self.pushButton20_7 = QtWidgets.QPushButton(self.page_6) self.pushButton20_7.setGeometry(QtCore.QRect(410, 650, 181, 101)) self.pushButton20_7.setStyleSheet("QPushButton{\n" "background-color:rgb(255, 144, 146);\n" "background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:1, stop:0 rgb(180, 17, 17), stop:1 rgba(255, 144, 146));\n" "color:white;\n" "border-style: outset;\n" "border-width:1px;\n" "border-radius:14px;\n" "border-color:rgb(255, 202, 203);\n" "font:bold 16px;\n" "padding:10px;\n" "}\n" "QPushButton:hover { \n" "background-color:rgb(255, 144, 146);\n" "background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:1, stop:0 rgba(255, 144, 146), stop:1 rgba(180, 17, 17));\n" "color:white;\n" "border-style: outset;\n" "border-width:1px;\n" "border-radius:14px;\n" "border-color:rgb(255, 202, 203);\n" "font:bold 18px;\n" "padding:10px;\n" "}\n" "\n" "QPushButton:pressed { \n" "background-color:rgb(255, 144, 146);\n" "color:white;\n" "border-style: outset;\n" "border-width:2px;\n" "border-radius:14px;\n" "border-color:rgb(180, 17, 17);\n" "font:bold 16px;\n" "padding:10px;\n" "}\n" "") self.pushButton20_7.setObjectName("pushButton20_7") self.stackedWidget.addWidget(self.page_6) self.page_2 = QtWidgets.QWidget() self.page_2.setObjectName("page_2") self.image_label = QtWidgets.QLabel(self.page_2) self.image_label.setGeometry(QtCore.QRect(60, 120, 661, 511)) self.image_label.setAutoFillBackground(False) self.image_label.setStyleSheet("\n" "background-color: black;\n" "color:white;\n" "border-style: outset;\n" "border-width:1px;\n" "border-radius:14px;\n" "border-color:gray;\n" "font:bold 16px;\n" "padding:10px") self.image_label.setLineWidth(3) self.image_label.setMidLineWidth(2) self.image_label.setText("") self.image_label.setObjectName("image_label") self.pushButton_3 = QtWidgets.QPushButton(self.page_2) self.pushButton_3.setGeometry(QtCore.QRect(80, 660, 181, 101)) self.pushButton_3.setStyleSheet("QPushButton{\n" "background-color:rgb(255, 144, 146);\n" "background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:1, stop:0 rgb(180, 17, 17), stop:1 rgba(255, 144, 146));\n" "color:white;\n" "border-style: outset;\n" "border-width:1px;\n" "border-radius:14px;\n" "border-color:rgb(255, 202, 203);\n" "font:bold 16px;\n" "padding:10px;\n" "}\n" "QPushButton:hover { \n" "background-color:rgb(255, 144, 146);\n" "background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:1, stop:0 rgba(255, 144, 146), stop:1 rgba(180, 17, 17));\n" "color:white;\n" "border-style: outset;\n" "border-width:1px;\n" "border-radius:14px;\n" "border-color:rgb(255, 202, 203);\n" "font:bold 18px;\n" "padding:10px;\n" "}\n" "\n" "QPushButton:pressed { \n" "background-color:rgb(255, 144, 146);\n" "color:white;\n" "border-style: outset;\n" "border-width:2px;\n" "border-radius:14px;\n" "border-color:rgb(180, 17, 17);\n" "font:bold 16px;\n" "padding:10px;\n" "}\n" "") self.pushButton_3.setObjectName("pushButton_3") self.pushButton_4 = QtWidgets.QPushButton(self.page_2) self.pushButton_4.setGeometry(QtCore.QRect(300, 660, 181, 101)) self.pushButton_4.setStyleSheet("QPushButton{\n" "background-color:rgb(255, 144, 146);\n" "background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:1, stop:0 rgb(180, 17, 17), stop:1 rgba(255, 144, 146));\n" "color:white;\n" "border-style: outset;\n" "border-width:1px;\n" "border-radius:14px;\n" "border-color:rgb(255, 202, 203);\n" "font:bold 16px;\n" "padding:10px;\n" "}\n" "QPushButton:hover { \n" "background-color:rgb(255, 144, 146);\n" "background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:1, stop:0 rgba(255, 144, 146), stop:1 rgba(180, 17, 17));\n" "color:white;\n" "border-style: outset;\n" "border-width:1px;\n" "border-radius:14px;\n" "border-color:rgb(255, 202, 203);\n" "font:bold 18px;\n" "padding:10px;\n" "}\n" "\n" "QPushButton:pressed { \n" "background-color:rgb(255, 144, 146);\n" "color:white;\n" "border-style: outset;\n" "border-width:2px;\n" "border-radius:14px;\n" "border-color:rgb(180, 17, 17);\n" "font:bold 16px;\n" "padding:10px;\n" "}\n" "") self.pushButton_4.setObjectName("pushButton_4") self.pushButton_5 = QtWidgets.QPushButton(self.page_2) self.pushButton_5.setGeometry(QtCore.QRect(520, 660, 181, 101)) self.pushButton_5.setStyleSheet("QPushButton{\n" "background-color:rgb(255, 144, 146);\n" "background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:1, stop:0 rgb(180, 17, 17), stop:1 rgba(255, 144, 146));\n" "color:white;\n" "border-style: outset;\n" "border-width:1px;\n" "border-radius:14px;\n" "border-color:rgb(255, 202, 203);\n" "font:bold 16px;\n" "padding:10px;\n" "}\n" "QPushButton:hover { \n" "background-color:rgb(255, 144, 146);\n" "background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:1, stop:0 rgba(255, 144, 146), stop:1 rgba(180, 17, 17));\n" "color:white;\n" "border-style: outset;\n" "border-width:1px;\n" "border-radius:14px;\n" "border-color:rgb(255, 202, 203);\n" "font:bold 18px;\n" "padding:10px;\n" "}\n" "\n" "QPushButton:pressed { \n" "background-color:rgb(255, 144, 146);\n" "color:white;\n" "border-style: outset;\n" "border-width:2px;\n" "border-radius:14px;\n" "border-color:rgb(180, 17, 17);\n" "font:bold 14px;\n" "padding:10px;\n" "}\n" "") self.pushButton_5.setObjectName("pushButton_5") self.label6_2 = QtWidgets.QLabel(self.page_2) self.label6_2.setGeometry(QtCore.QRect(0, 40, 761, 61)) font = QtGui.QFont() font.setPointSize(-1) self.label6_2.setFont(font) self.label6_2.setStyleSheet("QLabel{\n" "\n" "text-align: center;\n" "font-size: 36px;\n" "color: #222;\n" "text-shadow: 0px 2px 3px black;\n" "}\n" "\n" "\n" "") self.label6_2.setAlignment(QtCore.Qt.AlignCenter) self.label6_2.setObjectName("label6_2") self.stackedWidget.addWidget(self.page_2) self.page7 = QtWidgets.QWidget() self.page7.setObjectName("page7") self.label_11 = QtWidgets.QLabel(self.page7) self.label_11.setGeometry(QtCore.QRect(0, 40, 771, 61)) self.label_11.setStyleSheet("text-align: center;\n" "font-size: 36px;\n" "color: #222;\n" "text-shadow: 0px 2px 3px black;") self.label_11.setObjectName("label_11") self.pushButton19 = QtWidgets.QPushButton(self.page7) self.pushButton19.setGeometry(QtCore.QRect(300, 660, 181, 101)) self.pushButton19.setStyleSheet("QPushButton{\n" "background-color:rgb(255, 144, 146);\n" "background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:1, stop:0 rgb(180, 17, 17), stop:1 rgba(255, 144, 146));\n" "color:white;\n" "border-style: outset;\n" "border-width:1px;\n" "border-radius:14px;\n" "border-color:rgb(255, 202, 203);\n" "font:bold 16px;\n" "padding:10px;\n" "}\n" "QPushButton:hover { \n" "background-color:rgb(255, 144, 146);\n" "background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:1, stop:0 rgba(255, 144, 146), stop:1 rgba(180, 17, 17));\n" "color:white;\n" "border-style: outset;\n" "border-width:1px;\n" "border-radius:14px;\n" "border-color:rgb(255, 202, 203);\n" "font:bold 18px;\n" "padding:10px;\n" "}\n" "\n" "QPushButton:pressed { \n" "background-color:rgb(255, 144, 146);\n" "color:white;\n" "border-style: outset;\n" "border-width:2px;\n" "border-radius:14px;\n" "border-color:rgb(180, 17, 17);\n" "font:bold 16px;\n" "padding:10px;\n" "}\n" "") self.pushButton19.setObjectName("pushButton19") self.pushButton20 = QtWidgets.QPushButton(self.page7) self.pushButton20.setGeometry(QtCore.QRect(520, 660, 181, 101)) self.pushButton20.setStyleSheet("QPushButton{\n" "background-color:rgb(255, 144, 146);\n" "background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:1, stop:0 rgb(180, 17, 17), stop:1 rgba(255, 144, 146));\n" "color:white;\n" "border-style: outset;\n" "border-width:1px;\n" "border-radius:14px;\n" "border-color:rgb(255, 202, 203);\n" "font:bold 16px;\n" "padding:10px;\n" "}\n" "QPushButton:hover { \n" "background-color:rgb(255, 144, 146);\n" "background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:1, stop:0 rgba(255, 144, 146), stop:1 rgba(180, 17, 17));\n" "color:white;\n" "border-style: outset;\n" "border-width:1px;\n" "border-radius:14px;\n" "border-color:rgb(255, 202, 203);\n" "font:bold 18px;\n" "padding:10px;\n" "}\n" "\n" "QPushButton:pressed { \n" "background-color:rgb(255, 144, 146);\n" "color:white;\n" "border-style: outset;\n" "border-width:2px;\n" "border-radius:14px;\n" "border-color:rgb(180, 17, 17);\n" "font:bold 16px;\n" "padding:10px;\n" "}\n" "") self.pushButton20.setObjectName("pushButton20") self.video_label = QVideoWidget(self.page7) self.video_label.setGeometry(QtCore.QRect(60, 120, 661, 511)) self.video_label.setAutoFillBackground(False) self.video_label.setStyleSheet("\n" "background-color: black;\n" "color:white;\n" "border-style: outset;\n" "border-width:1px;\n" "border-radius:14px;\n" "border-color:gray;\n" "font:bold 16px;\n" "padding:10px") self.video_label.setObjectName("image_label_8") self.pushButton20_2 = QtWidgets.QPushButton(self.page7) self.pushButton20_2.setGeometry(QtCore.QRect(80, 660, 181, 101)) self.pushButton20_2.setStyleSheet("QPushButton{\n" "background-color:rgb(255, 144, 146);\n" "background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:1, stop:0 rgb(180, 17, 17), stop:1 rgba(255, 144, 146));\n" "color:white;\n" "border-style: outset;\n" "border-width:1px;\n" "border-radius:14px;\n" "border-color:rgb(255, 202, 203);\n" "font:bold 16px;\n" "padding:10px;\n" "}\n" "QPushButton:hover { \n" "background-color:rgb(255, 144, 146);\n" "background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:1, stop:0 rgba(255, 144, 146), stop:1 rgba(180, 17, 17));\n" "color:white;\n" "border-style: outset;\n" "border-width:1px;\n" "border-radius:14px;\n" "border-color:rgb(255, 202, 203);\n" "font:bold 18px;\n" "padding:10px;\n" "}\n" "\n" "QPushButton:pressed { \n" "background-color:rgb(255, 144, 146);\n" "color:white;\n" "border-style: outset;\n" "border-width:2px;\n" "border-radius:14px;\n" "border-color:rgb(180, 17, 17);\n" "font:bold 16px;\n" "padding:10px;\n" "}\n" "") self.pushButton20_2.setObjectName("pushButton20_2") self.stackedWidget.addWidget(self.page7) self.page_3 = QtWidgets.QWidget() self.page_3.setObjectName("page_3") self.label_3 = QtWidgets.QLabel(self.page_3) self.label_3.setGeometry(QtCore.QRect(-10, 50, 781, 61)) self.label_3.setStyleSheet("text-align: center;\n" "font-size: 36px;\n" "color: #222;\n" "text-shadow: 0px 2px 3px black;") self.label_3.setAlignment(QtCore.Qt.AlignCenter) self.label_3.setObjectName("label_3") self.pushButton_9 = QtWidgets.QPushButton(self.page_3) self.pushButton_9.setGeometry(QtCore.QRect(80, 160, 271, 221)) self.pushButton_9.setStyleSheet("QPushButton{\n" "background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:1, stop:0 rgb(255, 255, 0), stop:1 rgb(255, 255, 203));\n" "color:white;\n" "border-style: outset;\n" "border-width:1px;\n" "border-radius:14px;\n" "border-color:rgb(255, 202, 203);\n" "font:bold 20px;\n" "color: black;\n" "padding:10px;}\n" "\n" "QPushButton:hover { \n" "background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:1, stop:0 rgb(255, 255, 203), stop:1 rgb(255, 255, 0));\n" "color:white;\n" "border-style: outset;\n" "border-width:1px;\n" "border-radius:14px;\n" "border-color:rgb(255, 202, 203);\n" "font:bold 24px;\n" "padding:10px;\n" "}\n" "\n" "QPushButton:pressed { \n" "background-color:rgb(255, 255, 203);\n" "color:white;\n" "border-style: outset;\n" "border-width:2px;\n" "border-radius:14px;\n" "border-color:rgb(255, 255, 203);\n" "font:bold 24px;\n" "padding:10px;\n" "}\n" "\n" "") self.pushButton_9.setObjectName("pushButton_9") self.pushButton_6 = QtWidgets.QPushButton(self.page_3) self.pushButton_6.setGeometry(QtCore.QRect(80, 460, 271, 221)) self.pushButton_6.setStyleSheet("QPushButton{\n" "background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:1, stop:0 rgb(255, 61, 236), stop:1 rgb(255, 221, 254));\n" "color:white;\n" "border-style: outset;\n" "border-width:1px;\n" "border-radius:14px;\n" "border-color:rgb(255, 202, 203);\n" "font:bold 20px;\n" "color: black;\n" "padding:10px}\n" "\n" "QPushButton:hover { \n" "background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:1, stop:0 rgb(255, 221, 254) , stop:1 rgb(255, 61, 236));\n" "color:white;\n" "border-style: outset;\n" "border-width:1px;\n" "border-radius:14px;\n" "border-color:rgb(198, 255, 255);\n" "font:bold 24px;\n" "padding:10px;\n" "}\n" "\n" "QPushButton:pressed { \n" "background-color:rgb(255, 221, 254);\n" "color:white;\n" "border-style: outset;\n" "border-width:2px;\n" "border-radius:14px;\n" "border-color:rgb(255, 221, 254);\n" "font:bold 24px;\n" "padding:10px;\n" "}\n" "") self.pushButton_6.setObjectName("pushButton_6") self.pushButton_7 = QtWidgets.QPushButton(self.page_3) self.pushButton_7.setGeometry(QtCore.QRect(420, 160, 271, 221)) self.pushButton_7.setStyleSheet("QPushButton{\n" "background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:1, stop:0 rgb(75, 252, 255), stop:1 rgb(198, 255, 255));\n" "color:white;\n" "border-style: outset;\n" "border-width:1px;\n" "border-radius:14px;\n" "border-color:rgb(255, 202, 203);\n" "font:bold 20px;\n" "color: black;\n" "padding:10px}\n" "\n" "QPushButton:hover { \n" "background-color:qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:1, stop:0 rgb(198, 255, 255), stop:1 rgb(75, 252, 255));\n" "color:white;\n" "border-style: outset;\n" "border-width:1px;\n" "border-radius:14px;\n" "border-color:rgb(198, 255, 255);\n" "font:bold 24px;\n" "padding:10px;\n" "}\n" "\n" "QPushButton:pressed { \n" "background-color:rgb(198, 255, 255);\n" "color:white;\n" "border-style: outset;\n" "border-width:2px;\n" "border-radius:14px;\n" "border-color:rgb(255, 255, 203);\n" "font:bold 24px;\n" "padding:10px;\n" "}\n" "") self.pushButton_7.setObjectName("pushButton_7") self.pushButton_8 = QtWidgets.QPushButton(self.page_3) self.pushButton_8.setGeometry(QtCore.QRect(420, 460, 271, 221)) self.pushButton_8.setStyleSheet("QPushButton{\n" "background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:1, stop:0 rgb(17, 220, 51), stop:1 rgb(210, 255, 223));\n" "color:white;\n" "border-style: outset;\n" "border-width:1px;\n" "border-radius:14px;\n" "border-color:rgb(255, 202, 203);\n" "font:bold 20px;\n" "color: black;\n" "padding:10px;}\n" "\n" "QPushButton:hover { \n" "background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:1, stop:0 rgb(210, 255, 223) , stop:1 rgb(17, 220, 51) );\n" "color:white;\n" "border-style: outset;\n" "border-width:1px;\n" "border-radius:14px;\n" "border-color:rgb(198, 255, 255);\n" "font:bold 24px;\n" "padding:10px;\n" "}\n" "\n" "QPushButton:pressed { \n" "background-color:rgb(210, 255, 223);\n" "color:white;\n" "border-style: outset;\n" "border-width:2px;\n" "border-radius:24px;\n" "border-color:rgb(255, 221, 254);\n" "font:bold 16px;}") self.pushButton_8.setObjectName("pushButton_8") self.stackedWidget.addWidget(self.page_3) self.page_4 = QtWidgets.QWidget() self.page_4.setObjectName("page_4") self.label_4 = QtWidgets.QLabel(self.page_4) self.label_4.setGeometry(QtCore.QRect(0, 40, 761, 61)) font = QtGui.QFont() font.setPointSize(-1) self.label_4.setFont(font) self.label_4.setStyleSheet("QLabel{\n" "\n" "text-align: center;\n" "font-size: 36px;\n" "color: #222;\n" "text-shadow: 0px 2px 3px black;\n" "}\n" "\n" "\n" "") self.label_4.setAlignment(QtCore.Qt.AlignCenter) self.label_4.setObjectName("label_4") self.image_label_2 = QtWidgets.QLabel(self.page_4) self.image_label_2.setGeometry(QtCore.QRect(60, 120, 661, 511)) self.image_label_2.setAutoFillBackground(False) self.image_label_2.setStyleSheet("\n" "background-color: black;\n" "color:white;\n" "border-style: outset;\n" "border-width:1px;\n" "border-radius:14px;\n" "border-color:gray;\n" "font:bold 16px;\n" "padding:10px") self.image_label_2.setLineWidth(3) self.image_label_2.setMidLineWidth(2) self.image_label_2.setText("") self.image_label_2.setObjectName("image_label_2") self.pushButton_10 = QtWidgets.QPushButton(self.page_4) self.pushButton_10.setGeometry(QtCore.QRect(80, 660, 181, 101)) self.pushButton_10.setStyleSheet("QPushButton{\n" "background-color:rgb(255, 144, 146);\n" "background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:1, stop:0 rgb(180, 17, 17), stop:1 rgba(255, 144, 146));\n" "color:white;\n" "border-style: outset;\n" "border-width:1px;\n" "border-radius:14px;\n" "border-color:rgb(255, 202, 203);\n" "font:bold 16px;\n" "padding:10px;\n" "}\n" "QPushButton:hover { \n" "background-color:rgb(255, 144, 146);\n" "background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:1, stop:0 rgba(255, 144, 146), stop:1 rgba(180, 17, 17));\n" "color:white;\n" "border-style: outset;\n" "border-width:1px;\n" "border-radius:14px;\n" "border-color:rgb(255, 202, 203);\n" "font:bold 18px;\n" "padding:10px;\n" "}\n" "\n" "QPushButton:pressed { \n" "background-color:rgb(255, 144, 146);\n" "color:white;\n" "border-style: outset;\n" "border-width:2px;\n" "border-radius:14px;\n" "border-color:rgb(180, 17, 17);\n" "font:bold 16px;\n" "padding:10px;\n" "}\n" "") self.pushButton_10.setObjectName("pushButton_10") self.pushButton_11 = QtWidgets.QPushButton(self.page_4) self.pushButton_11.setGeometry(QtCore.QRect(300, 660, 181, 101)) font = QtGui.QFont() font.setPointSize(-1) font.setBold(True) font.setItalic(False) font.setWeight(75) self.pushButton_11.setFont(font) self.pushButton_11.setStyleSheet("QPushButton{\n" "background-color:rgb(255, 144, 146);\n" "background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:1, stop:0 rgb(180, 17, 17), stop:1 rgba(255, 144, 146));\n" "color:white;\n" "border-style: outset;\n" "border-width:1px;\n" "border-radius:14px;\n" "border-color:rgb(255, 202, 203);\n" "font:bold 16px;\n" "padding:10px;\n" "}\n" "QPushButton:hover { \n" "background-color:rgb(255, 144, 146);\n" "background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:1, stop:0 rgba(255, 144, 146), stop:1 rgba(180, 17, 17));\n" "color:white;\n" "border-style: outset;\n" "border-width:1px;\n" "border-radius:14px;\n" "border-color:rgb(255, 202, 203);\n" "font:bold 18px;\n" "padding:10px;\n" "}\n" "\n" "QPushButton:pressed { \n" "background-color:rgb(255, 144, 146);\n" "color:white;\n" "border-style: outset;\n" "border-width:2px;\n" "border-radius:14px;\n" "border-color:rgb(180, 17, 17);\n" "font:bold 16px;\n" "padding:10px;\n" "}\n" "") self.pushButton_11.setObjectName("pushButton_11") self.pushButton_12 = QtWidgets.QPushButton(self.page_4) self.pushButton_12.setGeometry(QtCore.QRect(520, 660, 181, 101)) self.pushButton_12.setStyleSheet("QPushButton{\n" "background-color:rgb(255, 144, 146);\n" "background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:1, stop:0 rgb(180, 17, 17), stop:1 rgba(255, 144, 146));\n" "color:white;\n" "border-style: outset;\n" "border-width:1px;\n" "border-radius:14px;\n" "border-color:rgb(255, 202, 203);\n" "font:bold 16px;\n" "padding:10px;\n" "}\n" "QPushButton:hover { \n" "background-color:rgb(255, 144, 146);\n" "background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:1, stop:0 rgba(255, 144, 146), stop:1 rgba(180, 17, 17));\n" "color:white;\n" "border-style: outset;\n" "border-width:1px;\n" "border-radius:14px;\n" "border-color:rgb(255, 202, 203);\n" "font:bold 18px;\n" "padding:10px;\n" "}\n" "\n" "QPushButton:pressed { \n" "background-color:rgb(255, 144, 146);\n" "color:white;\n" "border-style: outset;\n" "border-width:2px;\n" "border-radius:14px;\n" "border-color:rgb(180, 17, 17);\n" "font:bold 16px;\n" "padding:10px;\n" "}\n" "") self.pushButton_12.setObjectName("pushButton_12") self.stackedWidget.addWidget(self.page_4) self.page_5 = QtWidgets.QWidget() self.page_5.setObjectName("page_5") self.label_5 = QtWidgets.QLabel(self.page_5) self.label_5.setGeometry(QtCore.QRect(0, 40, 751, 61)) font = QtGui.QFont() font.setPointSize(-1) self.label_5.setFont(font) self.label_5.setStyleSheet("QLabel{\n" "\n" "text-align: center;\n" "font-size: 36px;\n" "color: #222;\n" "text-shadow: 0px 2px 3px black;\n" "}\n" "\n" "\n" "") self.label_5.setAlignment(QtCore.Qt.AlignCenter) self.label_5.setObjectName("label_5") self.image_label_3 = QtWidgets.QLabel(self.page_5) self.image_label_3.setGeometry(QtCore.QRect(60, 120, 661, 511)) self.image_label_3.setAutoFillBackground(False) self.image_label_3.setStyleSheet("\n" "background-color: black;\n" "color:white;\n" "border-style: outset;\n" "border-width:1px;\n" "border-radius:14px;\n" "border-color:gray;\n" "font:bold 16px;\n" "padding:10px") self.image_label_3.setLineWidth(3) self.image_label_3.setMidLineWidth(2) self.image_label_3.setText("") self.image_label_3.setObjectName("image_label_3") self.pushButton13 = QtWidgets.QPushButton(self.page_5) self.pushButton13.setGeometry(QtCore.QRect(80, 660, 181, 101)) self.pushButton13.setStyleSheet("QPushButton{\n" "background-color:rgb(255, 144, 146);\n" "background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:1, stop:0 rgb(180, 17, 17), stop:1 rgba(255, 144, 146));\n" "color:white;\n" "border-style: outset;\n" "border-width:1px;\n" "border-radius:14px;\n" "border-color:rgb(255, 202, 203);\n" "font:bold 16px;\n" "padding:10px;\n" "}\n" "QPushButton:hover { \n" "background-color:rgb(255, 144, 146);\n" "background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:1, stop:0 rgba(255, 144, 146), stop:1 rgba(180, 17, 17));\n" "color:white;\n" "border-style: outset;\n" "border-width:1px;\n" "border-radius:14px;\n" "border-color:rgb(255, 202, 203);\n" "font:bold 18px;\n" "padding:10px;\n" "}\n" "\n" "QPushButton:pressed { \n" "background-color:rgb(255, 144, 146);\n" "color:white;\n" "border-style: outset;\n" "border-width:2px;\n" "border-radius:14px;\n" "border-color:rgb(180, 17, 17);\n" "font:bold 16px;\n" "padding:10px;\n" "}\n" "") self.pushButton13.setObjectName("pushButton13") self.pushButton14 = QtWidgets.QPushButton(self.page_5) self.pushButton14.setGeometry(QtCore.QRect(300, 660, 181, 101)) font = QtGui.QFont() font.setPointSize(-1) font.setBold(True) font.setItalic(False) font.setWeight(75) self.pushButton14.setFont(font) self.pushButton14.setStyleSheet("QPushButton{\n" "background-color:rgb(255, 144, 146);\n" "background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:1, stop:0 rgb(180, 17, 17), stop:1 rgba(255, 144, 146));\n" "color:white;\n" "border-style: outset;\n" "border-width:1px;\n" "border-radius:14px;\n" "border-color:rgb(255, 202, 203);\n" "font:bold 16px;\n" "padding:10px;\n" "}\n" "QPushButton:hover { \n" "background-color:rgb(255, 144, 146);\n" "background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:1, stop:0 rgba(255, 144, 146), stop:1 rgba(180, 17, 17));\n" "color:white;\n" "border-style: outset;\n" "border-width:1px;\n" "border-radius:14px;\n" "border-color:rgb(255, 202, 203);\n" "font:bold 18px;\n" "padding:10px;\n" "}\n" "\n" "QPushButton:pressed { \n" "background-color:rgb(255, 144, 146);\n" "color:white;\n" "border-style: outset;\n" "border-width:2px;\n" "border-radius:14px;\n" "border-color:rgb(180, 17, 17);\n" "font:bold 16px;\n" "padding:10px;\n" "}\n" "") self.pushButton14.setObjectName("pushButton14") self.pushButton15 = QtWidgets.QPushButton(self.page_5) self.pushButton15.setGeometry(QtCore.QRect(520, 660, 181, 101)) self.pushButton15.setStyleSheet("QPushButton{\n" "background-color:rgb(255, 144, 146);\n" "background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:1, stop:0 rgb(180, 17, 17), stop:1 rgba(255, 144, 146));\n" "color:white;\n" "border-style: outset;\n" "border-width:1px;\n" "border-radius:14px;\n" "border-color:rgb(255, 202, 203);\n" "font:bold 16px;\n" "padding:10px;\n" "}\n" "QPushButton:hover { \n" "background-color:rgb(255, 144, 146);\n" "background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:1, stop:0 rgba(255, 144, 146), stop:1 rgba(180, 17, 17));\n" "color:white;\n" "border-style: outset;\n" "border-width:1px;\n" "border-radius:14px;\n" "border-color:rgb(255, 202, 203);\n" "font:bold 18px;\n" "padding:10px;\n" "}\n" "\n" "QPushButton:pressed { \n" "background-color:rgb(255, 144, 146);\n" "color:white;\n" "border-style: outset;\n" "border-width:2px;\n" "border-radius:14px;\n" "border-color:rgb(180, 17, 17);\n" "font:bold 16px;\n" "padding:10px;\n" "}\n" "") self.pushButton15.setObjectName("pushButton15") self.stackedWidget.addWidget(self.page_5) self.page6 = QtWidgets.QWidget() self.page6.setObjectName("page6") self.image_label_7 = QtWidgets.QLabel(self.page6) self.image_label_7.setGeometry(QtCore.QRect(60, 120, 661, 511)) self.image_label_7.setAutoFillBackground(False) self.image_label_7.setStyleSheet("\n" "background-color: black;\n" "color:white;\n" "border-style: outset;\n" "border-width:1px;\n" "border-radius:14px;\n" "border-color:gray;\n" "font:bold 16px;\n" "padding:10px") self.image_label_7.setLineWidth(3) self.image_label_7.setMidLineWidth(2) self.image_label_7.setText("") self.image_label_7.setObjectName("image_label_7") self.label6 = QtWidgets.QLabel(self.page6) self.label6.setGeometry(QtCore.QRect(0, 40, 761, 61)) font = QtGui.QFont() font.setPointSize(-1) self.label6.setFont(font) self.label6.setStyleSheet("QLabel{\n" "\n" "text-align: center;\n" "font-size: 36px;\n" "color: #222;\n" "text-shadow: 0px 2px 3px black;\n" "}\n" "\n" "\n" "") self.label6.setAlignment(QtCore.Qt.AlignCenter) self.label6.setObjectName("label6") self.pushButton16 = QtWidgets.QPushButton(self.page6) self.pushButton16.setGeometry(QtCore.QRect(80, 660, 181, 101)) self.pushButton16.setStyleSheet("QPushButton{\n" "background-color:rgb(255, 144, 146);\n" "background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:1, stop:0 rgb(180, 17, 17), stop:1 rgba(255, 144, 146));\n" "color:white;\n" "border-style: outset;\n" "border-width:1px;\n" "border-radius:14px;\n" "border-color:rgb(255, 202, 203);\n" "font:bold 16px;\n" "padding:10px;\n" "}\n" "QPushButton:hover { \n" "background-color:rgb(255, 144, 146);\n" "background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:1, stop:0 rgba(255, 144, 146), stop:1 rgba(180, 17, 17));\n" "color:white;\n" "border-style: outset;\n" "border-width:1px;\n" "border-radius:14px;\n" "border-color:rgb(255, 202, 203);\n" "font:bold 18px;\n" "padding:10px;\n" "}\n" "\n" "QPushButton:pressed { \n" "background-color:rgb(255, 144, 146);\n" "color:white;\n" "border-style: outset;\n" "border-width:2px;\n" "border-radius:14px;\n" "border-color:rgb(180, 17, 17);\n" "font:bold 16px;\n" "padding:10px;\n" "}\n" "") self.pushButton16.setObjectName("pushButton16") self.pushButton17 = QtWidgets.QPushButton(self.page6) self.pushButton17.setGeometry(QtCore.QRect(300, 660, 181, 101)) font = QtGui.QFont() font.setPointSize(-1) font.setBold(True) font.setItalic(False) font.setWeight(75) self.pushButton17.setFont(font) self.pushButton17.setStyleSheet("QPushButton{\n" "background-color:rgb(255, 144, 146);\n" "background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:1, stop:0 rgb(180, 17, 17), stop:1 rgba(255, 144, 146));\n" "color:white;\n" "border-style: outset;\n" "border-width:1px;\n" "border-radius:14px;\n" "border-color:rgb(255, 202, 203);\n" "font:bold 16px;\n" "padding:10px;\n" "}\n" "QPushButton:hover { \n" "background-color:rgb(255, 144, 146);\n" "background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:1, stop:0 rgba(255, 144, 146), stop:1 rgba(180, 17, 17));\n" "color:white;\n" "border-style: outset;\n" "border-width:1px;\n" "border-radius:14px;\n" "border-color:rgb(255, 202, 203);\n" "font:bold 18px;\n" "padding:10px;\n" "}\n" "\n" "QPushButton:pressed { \n" "background-color:rgb(255, 144, 146);\n" "color:white;\n" "border-style: outset;\n" "border-width:2px;\n" "border-radius:14px;\n" "border-color:rgb(180, 17, 17);\n" "font:bold 16px;\n" "padding:10px;\n" "}\n" "") self.pushButton17.setObjectName("pushButton17") self.pushButton18 = QtWidgets.QPushButton(self.page6) self.pushButton18.setGeometry(QtCore.QRect(520, 660, 181, 101)) self.pushButton18.setStyleSheet("QPushButton{\n" "background-color:rgb(255, 144, 146);\n" "background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:1, stop:0 rgb(180, 17, 17), stop:1 rgba(255, 144, 146));\n" "color:white;\n" "border-style: outset;\n" "border-width:1px;\n" "border-radius:14px;\n" "border-color:rgb(255, 202, 203);\n" "font:bold 16px;\n" "padding:10px;\n" "}\n" "QPushButton:hover { \n" "background-color:rgb(255, 144, 146);\n" "background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:1, stop:0 rgba(255, 144, 146), stop:1 rgba(180, 17, 17));\n" "color:white;\n" "border-style: outset;\n" "border-width:1px;\n" "border-radius:14px;\n" "border-color:rgb(255, 202, 203);\n" "font:bold 18px;\n" "padding:10px;\n" "}\n" "\n" "QPushButton:pressed { \n" "background-color:rgb(255, 144, 146);\n" "color:white;\n" "border-style: outset;\n" "border-width:2px;\n" "border-radius:14px;\n" "border-color:rgb(180, 17, 17);\n" "font:bold 16px;\n" "padding:10px;\n" "}\n" "") self.pushButton18.setObjectName("pushButton18") self.stackedWidget.addWidget(self.page6) MainWindow.setCentralWidget(self.centralwidget) self.retranslateUi(MainWindow) self.stackedWidget.setCurrentIndex(5) QtCore.QMetaObject.connectSlotsByName(MainWindow) def retranslateUi(self, MainWindow): _translate = QtCore.QCoreApplication.translate MainWindow.setWindowTitle(_translate("MainWindow", "eTrener")) self.label.setText(_translate("MainWindow", "<html><head/><body><p align=\"center\"><span style=\" font-size:48pt;\">e-Trener</span></p></body></html>")) self.pushButton.setText(_translate("MainWindow", "Wyjdź")) self.pushButton_2.setText(_translate("MainWindow", "Trening dokładności")) self.pushButton_13.setText(_translate("MainWindow", "Pomiar refleksu")) self.label_13.setText(_translate("MainWindow", "<html><head/><body><p align=\"center\"><span style=\" font-size:27pt;\">Sprawdź swój refleks</span></p></body></html>")) self.image_label_11.setText(_translate("MainWindow", "<html><head/><body><p align=\"center\"><br/></p></body></html>")) self.pushButton19_4.setText(_translate("MainWindow", "Start")) self.pushButton20_7.setText(_translate("MainWindow", "Powrót")) self.pushButton_3.setText(_translate("MainWindow", "Rozpocznij \n" " nagrywanie")) self.pushButton_4.setText(_translate("MainWindow", "Sprawdź")) self.pushButton_5.setText(_translate("MainWindow", "Powrót do \n" " menu")) self.label6_2.setText(_translate("MainWindow", "Wykroki")) self.label_11.setText(_translate("MainWindow", "<html><head/><body><p align=\"center\">Powtórka ćwiczenia</p><p align=\"center\"><br/></p></body></html>")) self.pushButton19.setText(_translate("MainWindow", "Start")) self.pushButton20.setText(_translate("MainWindow", "Powrót do menu")) self.pushButton20_2.setText(_translate("MainWindow", "Wybierz plik")) self.label_3.setText(_translate("MainWindow", "Wybierz trening")) self.pushButton_9.setText(_translate("MainWindow", "Wykroki")) self.pushButton_6.setText(_translate("MainWindow", "Pompki")) self.pushButton_7.setText(_translate("MainWindow", "Przysiady")) self.pushButton_8.setText(_translate("MainWindow", "Plank")) self.label_4.setText(_translate("MainWindow", "<html><head/><body><p><span style=\" font-size:22pt;\">Plank</span></p></body></html>")) self.pushButton_10.setText(_translate("MainWindow", "Rozpocznij \n" " nagrywanie")) self.pushButton_11.setText(_translate("MainWindow", "Sprawdź")) self.pushButton_12.setText(_translate("MainWindow", "Powrót do \n" " menu")) self.label_5.setText(_translate("MainWindow", "Pompki")) self.pushButton13.setText(_translate("MainWindow", "Rozpocznij \n" " nagrywanie")) self.pushButton14.setText(_translate("MainWindow", "Sprawdź")) self.pushButton15.setText(_translate("MainWindow", "Powrót do \n" " menu")) self.label6.setText(_translate("MainWindow", "Przysiady")) self.pushButton16.setText(_translate("MainWindow", "Rozpocznij \n" " nagrywanie")) self.pushButton17.setText(_translate("MainWindow", "Sprawdź")) self.pushButton18.setText(_translate("MainWindow", "Powrót do \n" " menu"))