class Ui_MainWindow(object): def setupUi(self, MainWindow): if MainWindow.objectName(): MainWindow.setObjectName(u"MainWindow") MainWindow.resize(900, 800) sizePolicy = QSizePolicy(QSizePolicy.Expanding, QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(MainWindow.sizePolicy().hasHeightForWidth()) MainWindow.setSizePolicy(sizePolicy) MainWindow.setMinimumSize(QSize(900, 800)) self.actionAdd_heatmap = QAction(MainWindow) self.actionAdd_heatmap.setObjectName(u"actionAdd_heatmap") self.actionAdd_video = QAction(MainWindow) self.actionAdd_video.setObjectName(u"actionAdd_video") self.centralwidget = QWidget(MainWindow) self.centralwidget.setObjectName(u"centralwidget") sizePolicy.setHeightForWidth(self.centralwidget.sizePolicy().hasHeightForWidth()) self.centralwidget.setSizePolicy(sizePolicy) self.gridLayout_5 = QGridLayout(self.centralwidget) self.gridLayout_5.setObjectName(u"gridLayout_5") self.frame_3 = QFrame(self.centralwidget) self.frame_3.setObjectName(u"frame_3") sizePolicy.setHeightForWidth(self.frame_3.sizePolicy().hasHeightForWidth()) self.frame_3.setSizePolicy(sizePolicy) self.frame_3.setFrameShape(QFrame.StyledPanel) self.frame_3.setFrameShadow(QFrame.Raised) self.gridLayout_4 = QGridLayout(self.frame_3) self.gridLayout_4.setObjectName(u"gridLayout_4") self.gridLayout_3 = QGridLayout() self.gridLayout_3.setObjectName(u"gridLayout_3") self.frame = QFrame(self.frame_3) self.frame.setObjectName(u"frame") sizePolicy.setHeightForWidth(self.frame.sizePolicy().hasHeightForWidth()) self.frame.setSizePolicy(sizePolicy) self.frame.setMinimumSize(QSize(400, 300)) self.frame.setMaximumSize(QSize(16777215, 16777215)) self.frame.setLayoutDirection(Qt.LeftToRight) self.frame.setFrameShape(QFrame.StyledPanel) self.frame.setFrameShadow(QFrame.Raised) self.verticalLayout_2 = QVBoxLayout(self.frame) self.verticalLayout_2.setObjectName(u"verticalLayout_2") self.VideoPlayer = QVideoWidget(self.frame) self.VideoPlayer.setObjectName(u"VideoPlayer") sizePolicy.setHeightForWidth(self.VideoPlayer.sizePolicy().hasHeightForWidth()) self.VideoPlayer.setSizePolicy(sizePolicy) self.VideoPlayer.setMinimumSize(QSize(400, 300)) self.VideoPlayer.setFocusPolicy(Qt.NoFocus) self.VideoPlayer.setLayoutDirection(Qt.LeftToRight) self.verticalLayout_2.addWidget(self.VideoPlayer) self.gridLayout_3.addWidget(self.frame, 0, 0, 1, 1) self.frame_2 = QFrame(self.frame_3) self.frame_2.setObjectName(u"frame_2") sizePolicy.setHeightForWidth(self.frame_2.sizePolicy().hasHeightForWidth()) self.frame_2.setSizePolicy(sizePolicy) self.frame_2.setMinimumSize(QSize(400, 300)) self.frame_2.setFrameShape(QFrame.StyledPanel) self.frame_2.setFrameShadow(QFrame.Raised) self.gridLayout_2 = QGridLayout(self.frame_2) self.gridLayout_2.setObjectName(u"gridLayout_2") self.heatMap = QLabel(self.frame_2) self.heatMap.setObjectName(u"heatMap") sizePolicy.setHeightForWidth(self.heatMap.sizePolicy().hasHeightForWidth()) self.heatMap.setSizePolicy(sizePolicy) self.heatMap.setMinimumSize(QSize(400, 300)) self.heatMap.setLayoutDirection(Qt.LeftToRight) self.heatMap.setScaledContents(True) self.heatMap.setAlignment(Qt.AlignCenter) self.gridLayout_2.addWidget(self.heatMap, 0, 0, 1, 1, Qt.AlignHCenter|Qt.AlignVCenter) self.gridLayout_3.addWidget(self.frame_2, 0, 1, 1, 1) self.gridLayout_4.addLayout(self.gridLayout_3, 0, 0, 1, 1) self.horizontalLayout = QHBoxLayout() self.horizontalLayout.setObjectName(u"horizontalLayout") self.ProgressBar = QSlider(self.frame_3) self.ProgressBar.setObjectName(u"ProgressBar") sizePolicy1 = QSizePolicy(QSizePolicy.Expanding, QSizePolicy.Fixed) sizePolicy1.setHorizontalStretch(0) sizePolicy1.setVerticalStretch(0) sizePolicy1.setHeightForWidth(self.ProgressBar.sizePolicy().hasHeightForWidth()) self.ProgressBar.setSizePolicy(sizePolicy1) self.ProgressBar.setMinimumSize(QSize(0, 0)) self.ProgressBar.setMaximumSize(QSize(16777215, 400)) self.ProgressBar.setOrientation(Qt.Horizontal) self.ProgressBar.setTickPosition(QSlider.NoTicks) self.horizontalLayout.addWidget(self.ProgressBar) self.progressLabel = QLabel(self.frame_3) self.progressLabel.setObjectName(u"progressLabel") sizePolicy2 = QSizePolicy(QSizePolicy.Fixed, QSizePolicy.Fixed) sizePolicy2.setHorizontalStretch(0) sizePolicy2.setVerticalStretch(0) sizePolicy2.setHeightForWidth(self.progressLabel.sizePolicy().hasHeightForWidth()) self.progressLabel.setSizePolicy(sizePolicy2) self.horizontalLayout.addWidget(self.progressLabel) self.gridLayout_4.addLayout(self.horizontalLayout, 2, 0, 1, 1) self.horizontalLayout_2 = QHBoxLayout() self.horizontalLayout_2.setSpacing(2) self.horizontalLayout_2.setObjectName(u"horizontalLayout_2") self.PlayButton = QPushButton(self.frame_3) self.PlayButton.setObjectName(u"PlayButton") sizePolicy1.setHeightForWidth(self.PlayButton.sizePolicy().hasHeightForWidth()) self.PlayButton.setSizePolicy(sizePolicy1) self.PlayButton.setMaximumSize(QSize(16777215, 100)) self.horizontalLayout_2.addWidget(self.PlayButton) self.StopButton = QPushButton(self.frame_3) self.StopButton.setObjectName(u"StopButton") sizePolicy1.setHeightForWidth(self.StopButton.sizePolicy().hasHeightForWidth()) self.StopButton.setSizePolicy(sizePolicy1) self.StopButton.setMaximumSize(QSize(16777215, 100)) self.horizontalLayout_2.addWidget(self.StopButton) self.PauseButton = QPushButton(self.frame_3) self.PauseButton.setObjectName(u"PauseButton") sizePolicy1.setHeightForWidth(self.PauseButton.sizePolicy().hasHeightForWidth()) self.PauseButton.setSizePolicy(sizePolicy1) self.PauseButton.setMaximumSize(QSize(16777215, 100)) self.horizontalLayout_2.addWidget(self.PauseButton) self.verticalLayout = QVBoxLayout() self.verticalLayout.setObjectName(u"verticalLayout") self.stabilityLabel = QLabel(self.frame_3) self.stabilityLabel.setObjectName(u"stabilityLabel") sizePolicy1.setHeightForWidth(self.stabilityLabel.sizePolicy().hasHeightForWidth()) self.stabilityLabel.setSizePolicy(sizePolicy1) self.verticalLayout.addWidget(self.stabilityLabel) self.poseLabel = QLabel(self.frame_3) self.poseLabel.setObjectName(u"poseLabel") sizePolicy3 = QSizePolicy(QSizePolicy.MinimumExpanding, QSizePolicy.Fixed) sizePolicy3.setHorizontalStretch(0) sizePolicy3.setVerticalStretch(0) sizePolicy3.setHeightForWidth(self.poseLabel.sizePolicy().hasHeightForWidth()) self.poseLabel.setSizePolicy(sizePolicy3) self.verticalLayout.addWidget(self.poseLabel) self.horizontalLayout_2.addLayout(self.verticalLayout) self.gridLayout_4.addLayout(self.horizontalLayout_2, 1, 0, 1, 1) self.gridLayout_5.addWidget(self.frame_3, 0, 0, 1, 1) MainWindow.setCentralWidget(self.centralwidget) self.menubar = QMenuBar(MainWindow) self.menubar.setObjectName(u"menubar") self.menubar.setGeometry(QRect(0, 0, 900, 39)) self.menuAdd_video = QMenu(self.menubar) self.menuAdd_video.setObjectName(u"menuAdd_video") MainWindow.setMenuBar(self.menubar) self.statusbar = QStatusBar(MainWindow) self.statusbar.setObjectName(u"statusbar") MainWindow.setStatusBar(self.statusbar) self.menubar.addAction(self.menuAdd_video.menuAction()) self.menuAdd_video.addAction(self.actionAdd_heatmap) self.menuAdd_video.addAction(self.actionAdd_video) self.retranslateUi(MainWindow) QMetaObject.connectSlotsByName(MainWindow) # setupUi def retranslateUi(self, MainWindow): MainWindow.setWindowTitle(QCoreApplication.translate("MainWindow", u"MainWindow", None)) self.actionAdd_heatmap.setText(QCoreApplication.translate("MainWindow", u"Add heatmap", None)) self.actionAdd_video.setText(QCoreApplication.translate("MainWindow", u"Add video", None)) self.heatMap.setText("") self.progressLabel.setText(QCoreApplication.translate("MainWindow", u"0:0:0/0:0:0", None)) self.PlayButton.setText(QCoreApplication.translate("MainWindow", u"Play", None)) self.StopButton.setText(QCoreApplication.translate("MainWindow", u"Stop", None)) self.PauseButton.setText(QCoreApplication.translate("MainWindow", u"Pause", None)) self.stabilityLabel.setText(QCoreApplication.translate("MainWindow", u"stability", None)) self.poseLabel.setText(QCoreApplication.translate("MainWindow", u"pose", None)) self.menuAdd_video.setTitle(QCoreApplication.translate("MainWindow", u"Add", None))
class Ui_MainWindow(object): def setupUi(self, MainWindow): MainWindow.setObjectName("MainWindow") MainWindow.resize(864, 717) self.centralwidget = QtWidgets.QWidget(MainWindow) self.centralwidget.setObjectName("centralwidget") self.horizontalLayout_7 = QtWidgets.QHBoxLayout(self.centralwidget) self.horizontalLayout_7.setObjectName("horizontalLayout_7") self.verticalLayout_4 = QtWidgets.QVBoxLayout() self.verticalLayout_4.setObjectName("verticalLayout_4") self.videoWidget = QVideoWidget(self.centralwidget) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.videoWidget.sizePolicy().hasHeightForWidth()) self.videoWidget.setSizePolicy(sizePolicy) self.videoWidget.setObjectName("videoWidget") self.verticalLayout_4.addWidget(self.videoWidget) self.horizontalLayout_3 = QtWidgets.QHBoxLayout() self.horizontalLayout_3.setObjectName("horizontalLayout_3") self.lTempsCourant = QtWidgets.QLabel(self.centralwidget) self.lTempsCourant.setObjectName("lTempsCourant") self.horizontalLayout_3.addWidget(self.lTempsCourant) self.sTempsCourant = QtWidgets.QSlider(self.centralwidget) self.sTempsCourant.setMinimumSize(QtCore.QSize(0, 40)) self.sTempsCourant.setOrientation(QtCore.Qt.Horizontal) self.sTempsCourant.setObjectName("sTempsCourant") self.horizontalLayout_3.addWidget(self.sTempsCourant) self.lTempsTotal = QtWidgets.QLabel(self.centralwidget) self.lTempsTotal.setObjectName("lTempsTotal") self.horizontalLayout_3.addWidget(self.lTempsTotal) self.verticalLayout_4.addLayout(self.horizontalLayout_3) self.horizontalLayout_2 = QtWidgets.QHBoxLayout() self.horizontalLayout_2.setObjectName("horizontalLayout_2") self.pbLecture = QtWidgets.QPushButton(self.centralwidget) self.pbLecture.setObjectName("pbLecture") self.horizontalLayout_2.addWidget(self.pbLecture) self.pbPause = QtWidgets.QPushButton(self.centralwidget) self.pbPause.setObjectName("pbPause") self.horizontalLayout_2.addWidget(self.pbPause) self.pbStop = QtWidgets.QPushButton(self.centralwidget) self.pbStop.setObjectName("pbStop") self.horizontalLayout_2.addWidget(self.pbStop) self.pbPrec = QtWidgets.QPushButton(self.centralwidget) self.pbPrec.setObjectName("pbPrec") self.horizontalLayout_2.addWidget(self.pbPrec) self.pbSuiv = QtWidgets.QPushButton(self.centralwidget) self.pbSuiv.setObjectName("pbSuiv") self.horizontalLayout_2.addWidget(self.pbSuiv) self.verticalLayout_4.addLayout(self.horizontalLayout_2) self.horizontalLayout_7.addLayout(self.verticalLayout_4) self.verticalLayout_5 = QtWidgets.QVBoxLayout() self.verticalLayout_5.setObjectName("verticalLayout_5") self.line = QtWidgets.QFrame(self.centralwidget) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.line.sizePolicy().hasHeightForWidth()) self.line.setSizePolicy(sizePolicy) self.line.setFrameShape(QtWidgets.QFrame.HLine) self.line.setFrameShadow(QtWidgets.QFrame.Sunken) self.line.setObjectName("line") self.verticalLayout_5.addWidget(self.line) spacerItem = QtWidgets.QSpacerItem(20, 85, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Preferred) self.verticalLayout_5.addItem(spacerItem) self.horizontalLayout_7.addLayout(self.verticalLayout_5) self.verticalLayout_8 = QtWidgets.QVBoxLayout() self.verticalLayout_8.setObjectName("verticalLayout_8") self.label_5 = QtWidgets.QLabel(self.centralwidget) self.label_5.setObjectName("label_5") self.verticalLayout_8.addWidget(self.label_5) self.listeLecture = QtWidgets.QListWidget(self.centralwidget) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.listeLecture.sizePolicy().hasHeightForWidth()) self.listeLecture.setSizePolicy(sizePolicy) self.listeLecture.setObjectName("listeLecture") self.verticalLayout_8.addWidget(self.listeLecture) self.horizontalLayout_5 = QtWidgets.QHBoxLayout() self.horizontalLayout_5.setObjectName("horizontalLayout_5") spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum) self.horizontalLayout_5.addItem(spacerItem1) self.pbAjouter = QtWidgets.QPushButton(self.centralwidget) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.pbAjouter.sizePolicy().hasHeightForWidth()) self.pbAjouter.setSizePolicy(sizePolicy) self.pbAjouter.setObjectName("pbAjouter") self.horizontalLayout_5.addWidget(self.pbAjouter) self.pbSupprimer = QtWidgets.QPushButton(self.centralwidget) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.pbSupprimer.sizePolicy().hasHeightForWidth()) self.pbSupprimer.setSizePolicy(sizePolicy) self.pbSupprimer.setObjectName("pbSupprimer") self.horizontalLayout_5.addWidget(self.pbSupprimer) self.verticalLayout_8.addLayout(self.horizontalLayout_5) self.horizontalLayout_6 = QtWidgets.QHBoxLayout() self.horizontalLayout_6.setObjectName("horizontalLayout_6") spacerItem2 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Minimum) self.horizontalLayout_6.addItem(spacerItem2) self.label_3 = QtWidgets.QLabel(self.centralwidget) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.label_3.sizePolicy().hasHeightForWidth()) self.label_3.setSizePolicy(sizePolicy) self.label_3.setObjectName("label_3") self.horizontalLayout_6.addWidget(self.label_3) self.dial = QtWidgets.QDial(self.centralwidget) self.dial.setMaximumSize(QtCore.QSize(50, 50)) self.dial.setObjectName("dial") self.horizontalLayout_6.addWidget(self.dial) self.volume = QtWidgets.QLabel(self.centralwidget) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.volume.sizePolicy().hasHeightForWidth()) self.volume.setSizePolicy(sizePolicy) self.volume.setObjectName("volume") self.horizontalLayout_6.addWidget(self.volume) self.verticalLayout_8.addLayout(self.horizontalLayout_6) self.horizontalLayout_7.addLayout(self.verticalLayout_8) MainWindow.setCentralWidget(self.centralwidget) self.menubar = QtWidgets.QMenuBar(MainWindow) self.menubar.setGeometry(QtCore.QRect(0, 0, 864, 21)) self.menubar.setObjectName("menubar") MainWindow.setMenuBar(self.menubar) self.statusbar = QtWidgets.QStatusBar(MainWindow) self.statusbar.setObjectName("statusbar") MainWindow.setStatusBar(self.statusbar) self.retranslateUi(MainWindow) QtCore.QMetaObject.connectSlotsByName(MainWindow) def retranslateUi(self, MainWindow): MainWindow.setWindowTitle(QtWidgets.QApplication.translate("MainWindow", "MainWindow", None, -1)) self.lTempsCourant.setText(QtWidgets.QApplication.translate("MainWindow", "00:00:00", None, -1)) self.lTempsTotal.setText(QtWidgets.QApplication.translate("MainWindow", "00:00:00", None, -1)) self.pbLecture.setText(QtWidgets.QApplication.translate("MainWindow", "Lecture", None, -1)) self.pbPause.setText(QtWidgets.QApplication.translate("MainWindow", "Pause", None, -1)) self.pbStop.setText(QtWidgets.QApplication.translate("MainWindow", "Stop", None, -1)) self.pbPrec.setText(QtWidgets.QApplication.translate("MainWindow", "Precedent", None, -1)) self.pbSuiv.setText(QtWidgets.QApplication.translate("MainWindow", "Suivant", None, -1)) self.label_5.setText(QtWidgets.QApplication.translate("MainWindow", "Liste de lecture :", None, -1)) self.pbAjouter.setText(QtWidgets.QApplication.translate("MainWindow", "+", None, -1)) self.pbSupprimer.setText(QtWidgets.QApplication.translate("MainWindow", "-", None, -1)) self.label_3.setText(QtWidgets.QApplication.translate("MainWindow", "Volume :", None, -1)) self.volume.setText(QtWidgets.QApplication.translate("MainWindow", "TextLabel", None, -1))
class Ui_ImportSlipDlg(object): def setupUi(self, ImportSlipDlg): if not ImportSlipDlg.objectName(): ImportSlipDlg.setObjectName(u"ImportSlipDlg") ImportSlipDlg.resize(850, 587) self.verticalLayout = QVBoxLayout(ImportSlipDlg) self.verticalLayout.setSpacing(6) self.verticalLayout.setObjectName(u"verticalLayout") self.verticalLayout.setContentsMargins(2, 2, 2, 2) self.InputFrame = QFrame(ImportSlipDlg) self.InputFrame.setObjectName(u"InputFrame") sizePolicy = QSizePolicy(QSizePolicy.Preferred, QSizePolicy.Maximum) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.InputFrame.sizePolicy().hasHeightForWidth()) self.InputFrame.setSizePolicy(sizePolicy) self.InputFrame.setFrameShape(QFrame.NoFrame) self.InputFrame.setFrameShadow(QFrame.Plain) self.horizontalLayout_3 = QHBoxLayout(self.InputFrame) self.horizontalLayout_3.setSpacing(2) self.horizontalLayout_3.setObjectName(u"horizontalLayout_3") self.horizontalLayout_3.setContentsMargins(0, 0, 0, 0) self.QRGroup = QGroupBox(self.InputFrame) self.QRGroup.setObjectName(u"QRGroup") sizePolicy1 = QSizePolicy(QSizePolicy.Preferred, QSizePolicy.Preferred) sizePolicy1.setHorizontalStretch(0) sizePolicy1.setVerticalStretch(0) sizePolicy1.setHeightForWidth(self.QRGroup.sizePolicy().hasHeightForWidth()) self.QRGroup.setSizePolicy(sizePolicy1) self.QRGroup.setAlignment(Qt.AlignLeading|Qt.AlignLeft|Qt.AlignVCenter) self.verticalLayout_3 = QVBoxLayout(self.QRGroup) self.verticalLayout_3.setSpacing(6) self.verticalLayout_3.setObjectName(u"verticalLayout_3") self.verticalLayout_3.setContentsMargins(2, 2, 2, 2) self.GetQRfromCameraBtn = QPushButton(self.QRGroup) self.GetQRfromCameraBtn.setObjectName(u"GetQRfromCameraBtn") self.verticalLayout_3.addWidget(self.GetQRfromCameraBtn) self.LoadQRfromFileBtn = QPushButton(self.QRGroup) self.LoadQRfromFileBtn.setObjectName(u"LoadQRfromFileBtn") self.verticalLayout_3.addWidget(self.LoadQRfromFileBtn) self.GetQRfromClipboardBtn = QPushButton(self.QRGroup) self.GetQRfromClipboardBtn.setObjectName(u"GetQRfromClipboardBtn") self.verticalLayout_3.addWidget(self.GetQRfromClipboardBtn) self.verticalSpacer = QSpacerItem(20, 40, QSizePolicy.Minimum, QSizePolicy.Expanding) self.verticalLayout_3.addItem(self.verticalSpacer) self.horizontalLayout_3.addWidget(self.QRGroup) self.SlipDataGroup = QGroupBox(self.InputFrame) self.SlipDataGroup.setObjectName(u"SlipDataGroup") sizePolicy1.setHeightForWidth(self.SlipDataGroup.sizePolicy().hasHeightForWidth()) self.SlipDataGroup.setSizePolicy(sizePolicy1) self.gridLayout_2 = QGridLayout(self.SlipDataGroup) self.gridLayout_2.setObjectName(u"gridLayout_2") self.gridLayout_2.setContentsMargins(2, 2, 2, 2) self.GetSlipBtn = QPushButton(self.SlipDataGroup) self.GetSlipBtn.setObjectName(u"GetSlipBtn") self.gridLayout_2.addWidget(self.GetSlipBtn, 7, 1, 1, 1) self.AmountLbl = QLabel(self.SlipDataGroup) self.AmountLbl.setObjectName(u"AmountLbl") self.gridLayout_2.addWidget(self.AmountLbl, 0, 2, 1, 1) self.SlipType = QLineEdit(self.SlipDataGroup) self.SlipType.setObjectName(u"SlipType") self.gridLayout_2.addWidget(self.SlipType, 4, 3, 1, 1) self.SlipTimstamp = QDateTimeEdit(self.SlipDataGroup) self.SlipTimstamp.setObjectName(u"SlipTimstamp") self.gridLayout_2.addWidget(self.SlipTimstamp, 0, 1, 1, 1) self.TimestampLbl = QLabel(self.SlipDataGroup) self.TimestampLbl.setObjectName(u"TimestampLbl") self.gridLayout_2.addWidget(self.TimestampLbl, 0, 0, 1, 1) self.FDlbl = QLabel(self.SlipDataGroup) self.FDlbl.setObjectName(u"FDlbl") self.gridLayout_2.addWidget(self.FDlbl, 2, 0, 1, 1) self.SlipAmount = QLineEdit(self.SlipDataGroup) self.SlipAmount.setObjectName(u"SlipAmount") self.gridLayout_2.addWidget(self.SlipAmount, 0, 3, 1, 1) self.FP = QLineEdit(self.SlipDataGroup) self.FP.setObjectName(u"FP") self.gridLayout_2.addWidget(self.FP, 2, 3, 1, 1) self.FD = QLineEdit(self.SlipDataGroup) self.FD.setObjectName(u"FD") self.gridLayout_2.addWidget(self.FD, 2, 1, 1, 1) self.FNlbl = QLabel(self.SlipDataGroup) self.FNlbl.setObjectName(u"FNlbl") self.gridLayout_2.addWidget(self.FNlbl, 4, 0, 1, 1) self.DummyLbl = QLabel(self.SlipDataGroup) self.DummyLbl.setObjectName(u"DummyLbl") self.gridLayout_2.addWidget(self.DummyLbl, 7, 0, 1, 1) self.SlipTypeLbl = QLabel(self.SlipDataGroup) self.SlipTypeLbl.setObjectName(u"SlipTypeLbl") self.gridLayout_2.addWidget(self.SlipTypeLbl, 4, 2, 1, 1) self.FN = QLineEdit(self.SlipDataGroup) self.FN.setObjectName(u"FN") self.gridLayout_2.addWidget(self.FN, 4, 1, 1, 1) self.LoadJSONfromFileBtn = QPushButton(self.SlipDataGroup) self.LoadJSONfromFileBtn.setObjectName(u"LoadJSONfromFileBtn") self.gridLayout_2.addWidget(self.LoadJSONfromFileBtn, 7, 3, 1, 1) self.FPlbl = QLabel(self.SlipDataGroup) self.FPlbl.setObjectName(u"FPlbl") self.gridLayout_2.addWidget(self.FPlbl, 2, 2, 1, 1) self.line = QFrame(self.SlipDataGroup) self.line.setObjectName(u"line") self.line.setFrameShape(QFrame.HLine) self.line.setFrameShadow(QFrame.Sunken) self.gridLayout_2.addWidget(self.line, 5, 0, 1, 4) self.horizontalLayout_3.addWidget(self.SlipDataGroup) self.CameraGroup = QGroupBox(self.InputFrame) self.CameraGroup.setObjectName(u"CameraGroup") self.verticalLayout_2 = QVBoxLayout(self.CameraGroup) self.verticalLayout_2.setSpacing(2) self.verticalLayout_2.setObjectName(u"verticalLayout_2") self.verticalLayout_2.setContentsMargins(2, 2, 2, 2) self.Viewfinder = QVideoWidget(self.CameraGroup) self.Viewfinder.setObjectName(u"Viewfinder") sizePolicy2 = QSizePolicy(QSizePolicy.Preferred, QSizePolicy.Expanding) sizePolicy2.setHorizontalStretch(0) sizePolicy2.setVerticalStretch(0) sizePolicy2.setHeightForWidth(self.Viewfinder.sizePolicy().hasHeightForWidth()) self.Viewfinder.setSizePolicy(sizePolicy2) self.verticalLayout_2.addWidget(self.Viewfinder) self.CameraBtnFrame = QFrame(self.CameraGroup) self.CameraBtnFrame.setObjectName(u"CameraBtnFrame") sizePolicy3 = QSizePolicy(QSizePolicy.Preferred, QSizePolicy.Minimum) sizePolicy3.setHorizontalStretch(0) sizePolicy3.setVerticalStretch(0) sizePolicy3.setHeightForWidth(self.CameraBtnFrame.sizePolicy().hasHeightForWidth()) self.CameraBtnFrame.setSizePolicy(sizePolicy3) self.CameraBtnFrame.setFrameShape(QFrame.NoFrame) self.CameraBtnFrame.setFrameShadow(QFrame.Plain) self.horizontalLayout_5 = QHBoxLayout(self.CameraBtnFrame) self.horizontalLayout_5.setSpacing(2) self.horizontalLayout_5.setObjectName(u"horizontalLayout_5") self.horizontalLayout_5.setContentsMargins(0, 0, 0, 0) self.StopCameraBtn = QPushButton(self.CameraBtnFrame) self.StopCameraBtn.setObjectName(u"StopCameraBtn") self.horizontalLayout_5.addWidget(self.StopCameraBtn) self.verticalLayout_2.addWidget(self.CameraBtnFrame) self.horizontalLayout_3.addWidget(self.CameraGroup) self.verticalLayout.addWidget(self.InputFrame) self.SlipGroup = QGroupBox(ImportSlipDlg) self.SlipGroup.setObjectName(u"SlipGroup") sizePolicy2.setHeightForWidth(self.SlipGroup.sizePolicy().hasHeightForWidth()) self.SlipGroup.setSizePolicy(sizePolicy2) self.gridLayout = QGridLayout(self.SlipGroup) self.gridLayout.setObjectName(u"gridLayout") self.gridLayout.setContentsMargins(2, 2, 2, 2) self.PeerLbl = QLabel(self.SlipGroup) self.PeerLbl.setObjectName(u"PeerLbl") self.gridLayout.addWidget(self.PeerLbl, 3, 0, 1, 1) self.LinesTableView = QTableView(self.SlipGroup) self.LinesTableView.setObjectName(u"LinesTableView") self.LinesTableView.verticalHeader().setVisible(False) self.LinesTableView.verticalHeader().setMinimumSectionSize(20) self.LinesTableView.verticalHeader().setDefaultSectionSize(20) self.gridLayout.addWidget(self.LinesTableView, 4, 1, 1, 3) self.SlipDateTime = QDateTimeEdit(self.SlipGroup) self.SlipDateTime.setObjectName(u"SlipDateTime") self.gridLayout.addWidget(self.SlipDateTime, 2, 1, 1, 1) self.DateTimeLbl = QLabel(self.SlipGroup) self.DateTimeLbl.setObjectName(u"DateTimeLbl") self.gridLayout.addWidget(self.DateTimeLbl, 1, 1, 1, 1) self.AccountLbl = QLabel(self.SlipGroup) self.AccountLbl.setObjectName(u"AccountLbl") self.gridLayout.addWidget(self.AccountLbl, 1, 3, 1, 1) self.PeerEdit = PeerSelector(self.SlipGroup) self.PeerEdit.setObjectName(u"PeerEdit") self.gridLayout.addWidget(self.PeerEdit, 3, 3, 1, 1) self.SlipShopName = QLineEdit(self.SlipGroup) self.SlipShopName.setObjectName(u"SlipShopName") self.SlipShopName.setEnabled(False) self.gridLayout.addWidget(self.SlipShopName, 3, 1, 1, 1) self.LinesLbl = QLabel(self.SlipGroup) self.LinesLbl.setObjectName(u"LinesLbl") self.LinesLbl.setAlignment(Qt.AlignLeading|Qt.AlignLeft|Qt.AlignTop) self.gridLayout.addWidget(self.LinesLbl, 4, 0, 1, 1) self.AccountEdit = AccountSelector(self.SlipGroup) self.AccountEdit.setObjectName(u"AccountEdit") self.gridLayout.addWidget(self.AccountEdit, 2, 3, 1, 1) self.label = QLabel(self.SlipGroup) self.label.setObjectName(u"label") self.gridLayout.addWidget(self.label, 3, 2, 1, 1) self.verticalLayout.addWidget(self.SlipGroup) self.DialogButtonsFrame = QFrame(ImportSlipDlg) self.DialogButtonsFrame.setObjectName(u"DialogButtonsFrame") self.DialogButtonsFrame.setFrameShape(QFrame.NoFrame) self.DialogButtonsFrame.setFrameShadow(QFrame.Plain) self.horizontalLayout_4 = QHBoxLayout(self.DialogButtonsFrame) self.horizontalLayout_4.setObjectName(u"horizontalLayout_4") self.horizontalLayout_4.setContentsMargins(2, 2, 2, 2) self.ClearBtn = QPushButton(self.DialogButtonsFrame) self.ClearBtn.setObjectName(u"ClearBtn") self.ClearBtn.setEnabled(True) self.horizontalLayout_4.addWidget(self.ClearBtn) self.AddOperationBtn = QPushButton(self.DialogButtonsFrame) self.AddOperationBtn.setObjectName(u"AddOperationBtn") self.AddOperationBtn.setEnabled(True) self.horizontalLayout_4.addWidget(self.AddOperationBtn) self.CloseBtn = QPushButton(self.DialogButtonsFrame) self.CloseBtn.setObjectName(u"CloseBtn") self.horizontalLayout_4.addWidget(self.CloseBtn) self.verticalLayout.addWidget(self.DialogButtonsFrame) self.retranslateUi(ImportSlipDlg) self.CloseBtn.clicked.connect(ImportSlipDlg.close) QMetaObject.connectSlotsByName(ImportSlipDlg) # setupUi def retranslateUi(self, ImportSlipDlg): ImportSlipDlg.setWindowTitle(QCoreApplication.translate("ImportSlipDlg", u"Import Slip", None)) self.QRGroup.setTitle(QCoreApplication.translate("ImportSlipDlg", u"QR-code", None)) self.GetQRfromCameraBtn.setText(QCoreApplication.translate("ImportSlipDlg", u"Get from camera", None)) self.LoadQRfromFileBtn.setText(QCoreApplication.translate("ImportSlipDlg", u"Load from file", None)) self.GetQRfromClipboardBtn.setText(QCoreApplication.translate("ImportSlipDlg", u"Get from clipboard", None)) self.SlipDataGroup.setTitle(QCoreApplication.translate("ImportSlipDlg", u"Slip data", None)) self.GetSlipBtn.setText(QCoreApplication.translate("ImportSlipDlg", u"Get slip from internet", None)) self.AmountLbl.setText(QCoreApplication.translate("ImportSlipDlg", u"Amount:", None)) self.SlipTimstamp.setDisplayFormat(QCoreApplication.translate("ImportSlipDlg", u"dd/MM/yyyy hh:mm:ss", None)) self.TimestampLbl.setText(QCoreApplication.translate("ImportSlipDlg", u"Date/Time:", None)) self.FDlbl.setText(QCoreApplication.translate("ImportSlipDlg", u"FD:", None)) self.FNlbl.setText(QCoreApplication.translate("ImportSlipDlg", u"FN:", None)) self.DummyLbl.setText("") self.SlipTypeLbl.setText(QCoreApplication.translate("ImportSlipDlg", u"Type:", None)) self.LoadJSONfromFileBtn.setText(QCoreApplication.translate("ImportSlipDlg", u"Load slip from JSON file", None)) self.FPlbl.setText(QCoreApplication.translate("ImportSlipDlg", u"FP:", None)) self.CameraGroup.setTitle(QCoreApplication.translate("ImportSlipDlg", u"Camera", None)) self.StopCameraBtn.setText(QCoreApplication.translate("ImportSlipDlg", u"Stop camera", None)) self.SlipGroup.setTitle(QCoreApplication.translate("ImportSlipDlg", u"Slip", None)) self.PeerLbl.setText(QCoreApplication.translate("ImportSlipDlg", u"Peer:", None)) self.SlipDateTime.setDisplayFormat(QCoreApplication.translate("ImportSlipDlg", u"dd/MM/yyyy hh:mm:ss", None)) self.DateTimeLbl.setText(QCoreApplication.translate("ImportSlipDlg", u"Date / Time:", None)) self.AccountLbl.setText(QCoreApplication.translate("ImportSlipDlg", u"Account:", None)) self.LinesLbl.setText(QCoreApplication.translate("ImportSlipDlg", u"Lines:", None)) self.label.setText(QCoreApplication.translate("ImportSlipDlg", u"-->", None)) self.ClearBtn.setText(QCoreApplication.translate("ImportSlipDlg", u"Clear", None)) self.AddOperationBtn.setText(QCoreApplication.translate("ImportSlipDlg", u"Add", None)) self.CloseBtn.setText(QCoreApplication.translate("ImportSlipDlg", u"Close", None))
class Ui_MainWindow(object): def setupUi(self, MainWindow): MainWindow.setObjectName("MainWindow") MainWindow.resize(757, 817) self.centralwidget = QtWidgets.QWidget(MainWindow) self.centralwidget.setObjectName("centralwidget") self.horizontalLayout_3 = QtWidgets.QHBoxLayout(self.centralwidget) self.horizontalLayout_3.setObjectName("horizontalLayout_3") self.verticalLayout_2 = QtWidgets.QVBoxLayout() self.verticalLayout_2.setObjectName("verticalLayout_2") self.ecranWidget = QVideoWidget(self.centralwidget) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.ecranWidget.sizePolicy().hasHeightForWidth()) self.ecranWidget.setSizePolicy(sizePolicy) self.ecranWidget.setObjectName("ecranWidget") self.verticalLayout_2.addWidget(self.ecranWidget) self.horizontalLayout_5 = QtWidgets.QHBoxLayout() self.horizontalLayout_5.setObjectName("horizontalLayout_5") self.tempLecture = QtWidgets.QLabel(self.centralwidget) self.tempLecture.setObjectName("tempLecture") self.horizontalLayout_5.addWidget(self.tempLecture) self.barreLect = QtWidgets.QSlider(self.centralwidget) self.barreLect.setOrientation(QtCore.Qt.Horizontal) self.barreLect.setObjectName("barreLect") self.horizontalLayout_5.addWidget(self.barreLect) self.tempRestant = QtWidgets.QLabel(self.centralwidget) self.tempRestant.setObjectName("tempRestant") self.horizontalLayout_5.addWidget(self.tempRestant) self.verticalLayout_2.addLayout(self.horizontalLayout_5) self.horizontalLayout_2 = QtWidgets.QHBoxLayout() self.horizontalLayout_2.setSizeConstraint( QtWidgets.QLayout.SetNoConstraint) self.horizontalLayout_2.setObjectName("horizontalLayout_2") self.pbLecture = QtWidgets.QPushButton(self.centralwidget) self.pbLecture.setObjectName("pbLecture") self.horizontalLayout_2.addWidget(self.pbLecture) self.pbPause = QtWidgets.QPushButton(self.centralwidget) self.pbPause.setObjectName("pbPause") self.horizontalLayout_2.addWidget(self.pbPause) self.pbStop = QtWidgets.QPushButton(self.centralwidget) self.pbStop.setObjectName("pbStop") self.horizontalLayout_2.addWidget(self.pbStop) self.pbPrecedent = QtWidgets.QPushButton(self.centralwidget) self.pbPrecedent.setObjectName("pbPrecedent") self.horizontalLayout_2.addWidget(self.pbPrecedent) self.pbSuivant = QtWidgets.QPushButton(self.centralwidget) self.pbSuivant.setObjectName("pbSuivant") self.horizontalLayout_2.addWidget(self.pbSuivant) self.verticalLayout_2.addLayout(self.horizontalLayout_2) self.horizontalLayout_3.addLayout(self.verticalLayout_2) self.verticalLayout_3 = QtWidgets.QVBoxLayout() self.verticalLayout_3.setSpacing(6) self.verticalLayout_3.setObjectName("verticalLayout_3") self.line = QtWidgets.QFrame(self.centralwidget) self.line.setEnabled(True) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(1) sizePolicy.setHeightForWidth( self.line.sizePolicy().hasHeightForWidth()) self.line.setSizePolicy(sizePolicy) self.line.setFrameShape(QtWidgets.QFrame.VLine) self.line.setFrameShadow(QtWidgets.QFrame.Sunken) self.line.setObjectName("line") self.verticalLayout_3.addWidget(self.line) spacerItem = QtWidgets.QSpacerItem(20, 100, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed) self.verticalLayout_3.addItem(spacerItem) self.horizontalLayout_3.addLayout(self.verticalLayout_3) self.verticalLayout = QtWidgets.QVBoxLayout() self.verticalLayout.setObjectName("verticalLayout") self.label = QtWidgets.QLabel(self.centralwidget) self.label.setObjectName("label") self.verticalLayout.addWidget(self.label) self.listWidget = QtWidgets.QListWidget(self.centralwidget) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.listWidget.sizePolicy().hasHeightForWidth()) self.listWidget.setSizePolicy(sizePolicy) self.listWidget.setObjectName("listWidget") self.verticalLayout.addWidget(self.listWidget) self.horizontalLayout = QtWidgets.QHBoxLayout() self.horizontalLayout.setObjectName("horizontalLayout") spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum) self.horizontalLayout.addItem(spacerItem1) self.pbPlus = QtWidgets.QPushButton(self.centralwidget) self.pbPlus.setObjectName("pbPlus") self.horizontalLayout.addWidget(self.pbPlus) self.pbMoins = QtWidgets.QPushButton(self.centralwidget) self.pbMoins.setObjectName("pbMoins") self.horizontalLayout.addWidget(self.pbMoins) self.verticalLayout.addLayout(self.horizontalLayout) self.horizontalLayout_4 = QtWidgets.QHBoxLayout() self.horizontalLayout_4.setObjectName("horizontalLayout_4") spacerItem2 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum) self.horizontalLayout_4.addItem(spacerItem2) self.label_2 = QtWidgets.QLabel(self.centralwidget) self.label_2.setObjectName("label_2") self.horizontalLayout_4.addWidget(self.label_2) self.dialVolume = QtWidgets.QDial(self.centralwidget) self.dialVolume.setObjectName("dialVolume") self.horizontalLayout_4.addWidget(self.dialVolume) self.nivoVolume = QtWidgets.QLabel(self.centralwidget) self.nivoVolume.setObjectName("nivoVolume") self.horizontalLayout_4.addWidget(self.nivoVolume) self.verticalLayout.addLayout(self.horizontalLayout_4) self.horizontalLayout_3.addLayout(self.verticalLayout) MainWindow.setCentralWidget(self.centralwidget) self.menubar = QtWidgets.QMenuBar(MainWindow) self.menubar.setGeometry(QtCore.QRect(0, 0, 757, 21)) self.menubar.setObjectName("menubar") MainWindow.setMenuBar(self.menubar) self.statusbar = QtWidgets.QStatusBar(MainWindow) self.statusbar.setObjectName("statusbar") MainWindow.setStatusBar(self.statusbar) self.retranslateUi(MainWindow) QtCore.QMetaObject.connectSlotsByName(MainWindow) def retranslateUi(self, MainWindow): MainWindow.setWindowTitle( QtWidgets.QApplication.translate("MainWindow", "MainWindow", None, -1)) self.tempLecture.setText( QtWidgets.QApplication.translate("MainWindow", "TextLabel", None, -1)) self.tempRestant.setText( QtWidgets.QApplication.translate("MainWindow", "TextLabel", None, -1)) self.pbLecture.setText( QtWidgets.QApplication.translate("MainWindow", "Lecture", None, -1)) self.pbPause.setText( QtWidgets.QApplication.translate("MainWindow", "Pause", None, -1)) self.pbStop.setText( QtWidgets.QApplication.translate("MainWindow", "Stop", None, -1)) self.pbPrecedent.setText( QtWidgets.QApplication.translate("MainWindow", "Precedent", None, -1)) self.pbSuivant.setText( QtWidgets.QApplication.translate("MainWindow", "Suivant", None, -1)) self.label.setText( QtWidgets.QApplication.translate("MainWindow", "Liste de lecture :", None, -1)) self.pbPlus.setText( QtWidgets.QApplication.translate("MainWindow", "+", None, -1)) self.pbMoins.setText( QtWidgets.QApplication.translate("MainWindow", "-", None, -1)) self.label_2.setText( QtWidgets.QApplication.translate("MainWindow", "Volume :", None, -1)) self.nivoVolume.setText( QtWidgets.QApplication.translate("MainWindow", "TextLabel", None, -1))
class Ui_MainWindow(QWidget): #create media player object mediaPlayer = QMediaPlayer(None, QMediaPlayer.VideoSurface) repeatMedia = False repeatItem = "" def formatTime(self, ms): h, r = divmod(ms, 3600000) m, r = divmod(r, 60000) s, _ = divmod(r, 1000) return ("%02d:%02d:%02d" % (h,m,s)) if h else ("%02d:%02d" % (m,s)) def browseFile(self): if self.mediaPlayer.state() == QMediaPlayer.PlayingState: self.play.setIcon(self.playIcon) self.mediaPlayer.pause() elif self.mediaPlayer.state() == QMediaPlayer.PausedState: self.play.setIcon(self.pauseIcon) self.mediaPlayer.play() else: media, _ = QFileDialog.getOpenFileName(self, "Open Video") if media != "": self.mediaPlayer.setMedia(QMediaContent(QUrl.fromLocalFile(media))) self.mediaPlayer.play() self.play.setIcon(self.pauseIcon) def openFile(self): media, _ = QFileDialog.getOpenFileName(self, "Open Video") if media != "": self.mediaPlayer.setMedia(QMediaContent(QUrl.fromLocalFile(media))) self.mediaPlayer.play() def closeFile(self): sys.exit(app.exec_()) def pauseVideo(self): self.mediaPlayer.pause() def stopVideo(self): self.mediaPlayer.stop() def vidPosition(self, position): self.mediaPlayer.setPosition(position) def locationChanged(self, position): self.duration.setValue(position) if position >= 0: self.startTime.setText(self.formatTime(position)) if self.mediaPlayer.state() == 0: if self.repeatMedia: self.mediaPlayer.play() else: self.duration.setValue(0) self.play.setIcon(self.playIcon) self.startTime.setText("--:--") self.endTime.setText("--:--") def durationChanged(self, duration): self.duration.setRange(0, duration) playTime = self.mediaPlayer.duration() self.endTime.setText(self.formatTime(playTime)) def volumeControl(self, percentage): self.mediaPlayer.setVolume(percentage) if percentage <= 100 and percentage >= 60: self.volume.setIcon(self.volumeUp) elif percentage < 60 and percentage >= 30: self.volume.setIcon(self.volumeMed) elif percentage < 30 and percentage >= 1: self.volume.setIcon(self.volumeDown) else: self.volume.setIcon(self.volumeMute) def muteVolume(self): if self.mediaPlayer.isMuted() == True: self.mediaPlayer.setMuted(False) self.volumeControl(self.volume_2.value()) else: self.mediaPlayer.setMuted(True) self.volume.setIcon(self.volumeMute) def loopMedia(self): if self.repeatMedia == True: self.repeatMedia = False self.repeat.setIcon(self.repeatDeactive) elif self.repeatMedia == False: self.repeatMedia = True self.repeat.setIcon(self.repeatActive) def setupUi(self, MainWindow): MainWindow.setObjectName("MainWindow") MainWindow.resize(1027, 648) icon = QtGui.QIcon() icon.addPixmap(QtGui.QPixmap(":/imgs/white Icons/video.svg"), QtGui.QIcon.Normal, QtGui.QIcon.Off) MainWindow.setWindowIcon(icon) MainWindow.setStyleSheet("#startTime, #endTime{\n" " color: #fff;\n" "}") self.centralwidget = QtWidgets.QWidget(MainWindow) self.centralwidget.setObjectName("centralwidget") self.horizontalLayout = QtWidgets.QHBoxLayout(self.centralwidget) self.horizontalLayout.setObjectName("horizontalLayout") self.frame = QtWidgets.QFrame(self.centralwidget) self.frame.setStyleSheet("#frame{\n" "background-color:rgb(0, 13, 20);\n" "}\n" "\n" "QPushButton{\n" "background: transparent;\n" "text-align: center;\n" "font: 75 15pt \"Comic Sans MS\";\n" "color: rgb(58, 180, 204);\n" "border-radius: 30px;\n" "}\n" "") self.frame.setFrameShape(QtWidgets.QFrame.StyledPanel) self.frame.setFrameShadow(QtWidgets.QFrame.Raised) self.frame.setObjectName("frame") self.verticalLayout_3 = QtWidgets.QVBoxLayout(self.frame) self.verticalLayout_3.setObjectName("verticalLayout_3") self.verticalLayout_4 = QtWidgets.QVBoxLayout() self.verticalLayout_4.setObjectName("verticalLayout_4") self.videoWidget = QVideoWidget(self.frame) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.videoWidget.sizePolicy().hasHeightForWidth()) self.videoWidget.setSizePolicy(sizePolicy) self.videoWidget.setMinimumSize(QtCore.QSize(700, 200)) ## self.videoWidget.setStyleSheet("background-color: #43549C") self.videoWidget.setStyleSheet("background-color: #e33a0b") self.videoWidget.setObjectName("videoWidget") self.verticalLayout_4.addWidget(self.videoWidget) self.verticalLayout_3.addLayout(self.verticalLayout_4) self.horizontalLayout_2 = QtWidgets.QHBoxLayout() self.horizontalLayout_2.setObjectName("horizontalLayout_2") self.startTime = QtWidgets.QLabel(self.frame) self.startTime.setObjectName("startTime") self.horizontalLayout_2.addWidget(self.startTime) self.duration = QtWidgets.QSlider(self.frame) self.duration.setMouseTracking(False) self.duration.setTabletTracking(False) self.duration.setFocusPolicy(QtCore.Qt.StrongFocus) self.duration.setAcceptDrops(False) self.duration.setLayoutDirection(QtCore.Qt.LeftToRight) self.duration.setAutoFillBackground(False) self.duration.setStyleSheet("background: transparent;\n" "-webkit-appearance:round;\n" "border-radius: 5px;\n" "color: rgb(0, 255, 204);\n" "") self.duration.setInputMethodHints(QtCore.Qt.ImhNone) self.duration.setSingleStep(1) self.duration.setProperty("value", 0) self.duration.setSliderPosition(0) self.duration.setTracking(True) self.duration.setOrientation(QtCore.Qt.Horizontal) self.duration.setInvertedAppearance(False) self.duration.setInvertedControls(False) self.duration.setObjectName("duration") self.horizontalLayout_2.addWidget(self.duration) self.endTime = QtWidgets.QLabel(self.frame) self.endTime.setObjectName("endTime") self.horizontalLayout_2.addWidget(self.endTime) self.verticalLayout_3.addLayout(self.horizontalLayout_2) self.horizontalLayout_5 = QtWidgets.QHBoxLayout() self.horizontalLayout_5.setObjectName("horizontalLayout_5") self.frame_2 = QtWidgets.QFrame(self.frame) self.frame_2.setStyleSheet("QPushButoon{\n" "border-radius: 20px;\n" "}") self.frame_2.setFrameShape(QtWidgets.QFrame.StyledPanel) self.frame_2.setFrameShadow(QtWidgets.QFrame.Raised) self.frame_2.setObjectName("frame_2") self.horizontalLayout_6 = QtWidgets.QHBoxLayout(self.frame_2) self.horizontalLayout_6.setContentsMargins(0, 0, 0, 0) self.horizontalLayout_6.setSpacing(7) self.horizontalLayout_6.setObjectName("horizontalLayout_6") self.volume = QtWidgets.QPushButton(self.frame_2) font = QtGui.QFont() font.setFamily("Comic Sans MS") font.setPointSize(15) font.setBold(False) font.setItalic(False) font.setWeight(9) self.volume.setFont(font) self.volume.setStyleSheet("#volume:hover{\n" "icon: url(:/buttons/white Icons/mute-hover.svg);\n" "cursor: pointer;\n" "}") self.volume.setText("") self.volumeMute = QtGui.QIcon() self.volumeMute.addPixmap(QtGui.QPixmap(":/buttons/white Icons/mute1.svg"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.volumeDown = QtGui.QIcon() self.volumeDown.addPixmap(QtGui.QPixmap(":/buttons/white Icons/volume-down.svg"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.volumeMed = QtGui.QIcon() self.volumeMed.addPixmap(QtGui.QPixmap(":/buttons/white Icons/volume-medium.svg"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.volumeUp = QtGui.QIcon() self.volumeUp.addPixmap(QtGui.QPixmap(":/buttons/white Icons/volume-up.svg"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.volume.setIcon(self.volumeUp) self.volume.setIconSize(QtCore.QSize(35, 35)) self.volume.setFlat(False) self.volume.setObjectName("volume") self.horizontalLayout_6.addWidget(self.volume) self.volume_2 = QtWidgets.QSlider(self.frame_2) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.volume_2.sizePolicy().hasHeightForWidth()) self.volume_2.setSizePolicy(sizePolicy) font = QtGui.QFont() font.setPointSize(1) self.volume_2.setFont(font) self.volume_2.setMaximum(26) self.volume_2.setPageStep(6) self.volume_2.setOrientation(QtCore.Qt.Horizontal) self.volume_2.setObjectName("volume_2") self.horizontalLayout_6.addWidget(self.volume_2) self.prev = QtWidgets.QPushButton(self.frame_2) self.prev.setStyleSheet("#prev:hover{\n" "icon: url(:/buttons/cyan icons/previous.svg);\n" "}") self.prev.setText("") icon2 = QtGui.QIcon() icon2.addPixmap(QtGui.QPixmap(":/buttons/white Icons/previous (1).svg"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.prev.setIcon(icon2) self.prev.setIconSize(QtCore.QSize(35, 35)) self.prev.setObjectName("prev") self.horizontalLayout_6.addWidget(self.prev) self.play = QtWidgets.QPushButton(self.frame_2) self.play.setToolTip("") self.play.setStyleSheet("border-radius: 38px;") self.play.setText("") self.playIcon = QtGui.QIcon() self.playIcon.addPixmap(QtGui.QPixmap(":/imgs/cyan icons/play.svg"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.pauseIcon = QtGui.QIcon() self.pauseIcon.addPixmap(QtGui.QPixmap(":/imgs/cyan icons/pause.svg"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.play.setIcon(self.playIcon) self.play.setIconSize(QtCore.QSize(70, 70)) self.play.setObjectName("play") self.horizontalLayout_6.addWidget(self.play) self.next = QtWidgets.QPushButton(self.frame_2) self.next.setStyleSheet("#next:hover{\n" "icon: url(:/buttons/cyan icons/next (1).svg);\n" "}") self.next.setText("") icon4 = QtGui.QIcon() icon4.addPixmap(QtGui.QPixmap(":/buttons/white Icons/next.svg"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.next.setIcon(icon4) self.next.setIconSize(QtCore.QSize(35, 35)) self.next.setObjectName("next") self.horizontalLayout_6.addWidget(self.next) self.repeat = QtWidgets.QPushButton(self.frame_2) self.repeat.setWhatsThis("") self.repeat.setAccessibleName("") self.repeat.setAccessibleDescription("") self.repeat.setStyleSheet("#repeat{\n" "border-radius: 10px;\n" "}\n" "#repeat:hover{\n" "icon: url(:/buttons/cyan icons/repeat (1).svg);\n" "}") self.repeat.setText("") self.repeatDeactive = QtGui.QIcon() self.repeatDeactive.addPixmap(QtGui.QPixmap(":/buttons/white Icons/repeat.svg"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.repeatActive = QtGui.QIcon() self.repeatActive.addPixmap(QtGui.QPixmap(":/buttons/cyan icons/repeat (1).svg"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.repeat.setIcon(self.repeatDeactive) self.repeat.setIconSize(QtCore.QSize(35, 35)) self.repeat.setObjectName("repeat") self.horizontalLayout_6.addWidget(self.repeat) self.playlist = QtWidgets.QPushButton(self.frame_2) self.playlist.setText("") icon6 = QtGui.QIcon() icon6.addPixmap(QtGui.QPixmap(":/imgs/cyan icons/playlist.svg"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.playlist.setIcon(icon6) self.playlist.setIconSize(QtCore.QSize(40, 40)) self.playlist.setObjectName("playlist") self.horizontalLayout_6.addWidget(self.playlist) self.horizontalLayout_5.addWidget(self.frame_2) self.verticalLayout_3.addLayout(self.horizontalLayout_5) self.horizontalLayout.addWidget(self.frame) MainWindow.setCentralWidget(self.centralwidget) self.menuBar = QtWidgets.QMenuBar(MainWindow) self.menuBar.setGeometry(QtCore.QRect(0, 0, 1027, 21)) self.menuBar.setObjectName("menuBar") self.menuFile = QtWidgets.QMenu(self.menuBar) self.menuFile.setObjectName("menuFile") MainWindow.setMenuBar(self.menuBar) self.actionOpen_File = QtWidgets.QAction(MainWindow) self.actionOpen_File.setObjectName("actionOpen_File") self.actionPlaylist = QtWidgets.QAction(MainWindow) self.actionPlaylist.setObjectName("actionPlaylist") self.actionQuit = QtWidgets.QAction(MainWindow) self.actionQuit.setObjectName("actionQuit") self.menuFile.addAction(self.actionOpen_File) self.menuFile.addAction(self.actionPlaylist) self.menuFile.addSeparator() self.menuFile.addAction(self.actionQuit) self.menuBar.addAction(self.menuFile.menuAction()) self.retranslateUi(MainWindow) QtCore.QMetaObject.connectSlotsByName(MainWindow) ################### Video Widget ################ self.mediaPlayer.setVideoOutput(self.videoWidget) ################################################# ################### Video Slider ################# self.duration.setRange(0,0) self.duration.sliderMoved.connect(self.vidPosition) self.mediaPlayer.positionChanged.connect(self.locationChanged) self.mediaPlayer.durationChanged.connect(self.durationChanged) ################################################## ################### Play Button ################## self.play.clicked.connect(self.browseFile) ################################################## ################### Repeat Button ################ self.repeat.clicked.connect(self.loopMedia) ################################################## ################### Volume Icon ################## self.volume.clicked.connect(self.muteVolume) ################################################## ################### Volume Slider ################ self.volume_2.setRange(0,100) self.volume_2.setValue(100) self.volume_2.valueChanged.connect(self.volumeControl) ################################################## ################### Open Button ################## self.actionOpen_File.triggered.connect(self.openFile) ################################################## ################### Close Button ################# self.actionQuit.triggered.connect(self.closeFile) ################################################## def retranslateUi(self, MainWindow): _translate = QtCore.QCoreApplication.translate MainWindow.setWindowTitle(_translate("MainWindow", "Music Player")) self.startTime.setText(_translate("MainWindow", "--:--")) self.endTime.setText(_translate("MainWindow", "--:--")) self.volume.setToolTip(_translate("MainWindow", "volume")) self.volume.setShortcut(_translate("MainWindow", "P")) self.prev.setToolTip(_translate("MainWindow", "previous")) self.prev.setShortcut(_translate("MainWindow", "P")) self.play.setShortcut(_translate("MainWindow", "Space")) self.next.setToolTip(_translate("MainWindow", "next")) self.next.setShortcut(_translate("MainWindow", "N")) self.repeat.setToolTip(_translate("MainWindow", "repeat")) self.repeat.setShortcut(_translate("MainWindow", "R")) self.playlist.setToolTip(_translate("MainWindow", "playlist")) self.playlist.setShortcut(_translate("MainWindow", "P")) self.menuFile.setTitle(_translate("MainWindow", "File")) self.actionOpen_File.setText(_translate("MainWindow", "Open File...")) self.actionPlaylist.setText(_translate("MainWindow", "Playlist")) self.actionQuit.setText(_translate("MainWindow", "Quit"))
class Ui_MainWindow(object): def setupUi(self, MainWindow): if not MainWindow.objectName(): MainWindow.setObjectName(u"MainWindow") MainWindow.resize(926, 600) self.actionQuitar = QAction(MainWindow) self.actionQuitar.setObjectName(u"actionQuitar") self.actionConfiguracion = QAction(MainWindow) self.actionConfiguracion.setObjectName(u"actionConfiguracion") self.centralwidget = QWidget(MainWindow) self.centralwidget.setObjectName(u"centralwidget") self.horizontalLayout = QHBoxLayout(self.centralwidget) self.horizontalLayout.setObjectName(u"horizontalLayout") self.splitter = QSplitter(self.centralwidget) self.splitter.setObjectName(u"splitter") self.splitter.setOrientation(Qt.Horizontal) self.groupBox = QGroupBox(self.splitter) self.groupBox.setObjectName(u"groupBox") self.verticalLayout = QVBoxLayout(self.groupBox) self.verticalLayout.setObjectName(u"verticalLayout") self.titlesListView = QListView(self.groupBox) self.titlesListView.setObjectName(u"titlesListView") self.verticalLayout.addWidget(self.titlesListView) self.splitter.addWidget(self.groupBox) self.groupBox_2 = QGroupBox(self.splitter) self.groupBox_2.setObjectName(u"groupBox_2") self.verticalLayout_2 = QVBoxLayout(self.groupBox_2) self.verticalLayout_2.setObjectName(u"verticalLayout_2") self.gridLayout_2 = QGridLayout() self.gridLayout_2.setObjectName(u"gridLayout_2") self.label = QLabel(self.groupBox_2) self.label.setObjectName(u"label") self.gridLayout_2.addWidget(self.label, 0, 0, 1, 1) self.tituloLineEdit = QLineEdit(self.groupBox_2) self.tituloLineEdit.setObjectName(u"tituloLineEdit") self.gridLayout_2.addWidget(self.tituloLineEdit, 0, 1, 1, 1) self.label_2 = QLabel(self.groupBox_2) self.label_2.setObjectName(u"label_2") self.gridLayout_2.addWidget(self.label_2, 1, 0, 1, 1) self.grupoLineEdit = QLineEdit(self.groupBox_2) self.grupoLineEdit.setObjectName(u"grupoLineEdit") self.gridLayout_2.addWidget(self.grupoLineEdit, 1, 1, 1, 1) self.label_3 = QLabel(self.groupBox_2) self.label_3.setObjectName(u"label_3") self.gridLayout_2.addWidget(self.label_3, 2, 0, 1, 1) self.yearLineEdit = QLineEdit(self.groupBox_2) self.yearLineEdit.setObjectName(u"yearLineEdit") self.gridLayout_2.addWidget(self.yearLineEdit, 2, 1, 1, 1) self.verticalLayout_2.addLayout(self.gridLayout_2) self.label_6 = QLabel(self.groupBox_2) self.label_6.setObjectName(u"label_6") sizePolicy = QSizePolicy(QSizePolicy.Preferred, QSizePolicy.Minimum) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.label_6.sizePolicy().hasHeightForWidth()) self.label_6.setSizePolicy(sizePolicy) self.verticalLayout_2.addWidget(self.label_6) self.videoPlayerWidget = QVideoWidget(self.groupBox_2) self.videoPlayerWidget.setObjectName(u"videoPlayerWidget") sizePolicy1 = QSizePolicy(QSizePolicy.Preferred, QSizePolicy.Expanding) sizePolicy1.setHorizontalStretch(0) sizePolicy1.setVerticalStretch(0) sizePolicy1.setHeightForWidth( self.videoPlayerWidget.sizePolicy().hasHeightForWidth()) self.videoPlayerWidget.setSizePolicy(sizePolicy1) self.verticalLayout_2.addWidget(self.videoPlayerWidget) self.horizontalLayout_2 = QHBoxLayout() self.horizontalLayout_2.setObjectName(u"horizontalLayout_2") self.stopButton = QPushButton(self.groupBox_2) self.stopButton.setObjectName(u"stopButton") self.horizontalLayout_2.addWidget(self.stopButton) self.pauseButton = QPushButton(self.groupBox_2) self.pauseButton.setObjectName(u"pauseButton") self.horizontalLayout_2.addWidget(self.pauseButton) self.playButton = QPushButton(self.groupBox_2) self.playButton.setObjectName(u"playButton") self.horizontalLayout_2.addWidget(self.playButton) self.verticalLayout_2.addLayout(self.horizontalLayout_2) self.splitter.addWidget(self.groupBox_2) self.horizontalLayout.addWidget(self.splitter) MainWindow.setCentralWidget(self.centralwidget) self.menubar = QMenuBar(MainWindow) self.menubar.setObjectName(u"menubar") self.menubar.setGeometry(QRect(0, 0, 926, 22)) self.menuArchivo = QMenu(self.menubar) self.menuArchivo.setObjectName(u"menuArchivo") MainWindow.setMenuBar(self.menubar) self.statusbar = QStatusBar(MainWindow) self.statusbar.setObjectName(u"statusbar") MainWindow.setStatusBar(self.statusbar) self.menubar.addAction(self.menuArchivo.menuAction()) self.menuArchivo.addSeparator() self.menuArchivo.addAction(self.actionConfiguracion) self.menuArchivo.addSeparator() self.menuArchivo.addAction(self.actionQuitar) self.retranslateUi(MainWindow) self.actionQuitar.triggered.connect(MainWindow.close) QMetaObject.connectSlotsByName(MainWindow) # setupUi def retranslateUi(self, MainWindow): MainWindow.setWindowTitle( QCoreApplication.translate("MainWindow", u"MainWindow", None)) self.actionQuitar.setText( QCoreApplication.translate("MainWindow", u"Quitar", None)) #if QT_CONFIG(shortcut) self.actionQuitar.setShortcut( QCoreApplication.translate("MainWindow", u"Ctrl+X", None)) #endif // QT_CONFIG(shortcut) self.actionConfiguracion.setText( QCoreApplication.translate("MainWindow", u"Configuraci\u00f3n", None)) self.groupBox.setTitle( QCoreApplication.translate("MainWindow", u"Canciones en la lista", None)) self.groupBox_2.setTitle( QCoreApplication.translate("MainWindow", u"Canci\u00f3n seleccionada", None)) self.label.setText( QCoreApplication.translate("MainWindow", u"T\u00edtulo", None)) self.label_2.setText( QCoreApplication.translate("MainWindow", u"Grupo", None)) self.label_3.setText( QCoreApplication.translate("MainWindow", u"A\u00f1o", None)) self.label_6.setText( QCoreApplication.translate("MainWindow", u"Reproductor", None)) self.stopButton.setText( QCoreApplication.translate("MainWindow", u"Stop", None)) self.pauseButton.setText( QCoreApplication.translate("MainWindow", u"Pause", None)) self.playButton.setText( QCoreApplication.translate("MainWindow", u"Play", None)) self.menuArchivo.setTitle( QCoreApplication.translate("MainWindow", u"Archivo", None))
class Ui_AddNewRecord(object): def setupUi(self, AddNewRecord): if not AddNewRecord.objectName(): AddNewRecord.setObjectName(u"AddNewRecord") AddNewRecord.resize(1724, 1243) self.horizontalLayout = QHBoxLayout(AddNewRecord) self.horizontalLayout.setObjectName(u"horizontalLayout") self.groupBox = QGroupBox(AddNewRecord) self.groupBox.setObjectName(u"groupBox") self.groupBox.setFlat(True) self.tbl_assets = QTableWidget(self.groupBox) if (self.tbl_assets.columnCount() < 12): self.tbl_assets.setColumnCount(12) self.tbl_assets.setObjectName(u"tbl_assets") self.tbl_assets.setGeometry(QRect(15, 31, 1161, 1191)) self.tbl_assets.setColumnCount(12) self.tbl_assets.horizontalHeader().setVisible(True) self.tbl_assets.verticalHeader().setVisible(True) self.horizontalLayout.addWidget(self.groupBox) self.groupBox_2 = QGroupBox(AddNewRecord) self.groupBox_2.setObjectName(u"groupBox_2") sizePolicy = QSizePolicy(QSizePolicy.Fixed, QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.groupBox_2.sizePolicy().hasHeightForWidth()) self.groupBox_2.setSizePolicy(sizePolicy) self.groupBox_2.setMinimumSize(QSize(500, 0)) self.groupBox_2.setFlat(True) self.layoutWidget = QWidget(self.groupBox_2) self.layoutWidget.setObjectName(u"layoutWidget") self.layoutWidget.setGeometry(QRect(20, 30, 461, 1186)) self.verticalLayout = QVBoxLayout(self.layoutWidget) self.verticalLayout.setObjectName(u"verticalLayout") self.verticalLayout.setContentsMargins(0, 0, 0, 0) self.prv_media_player = QVideoWidget(self.layoutWidget) self.prv_media_player.setObjectName(u"prv_media_player") sizePolicy1 = QSizePolicy(QSizePolicy.Preferred, QSizePolicy.Fixed) sizePolicy1.setHorizontalStretch(0) sizePolicy1.setVerticalStretch(0) sizePolicy1.setHeightForWidth( self.prv_media_player.sizePolicy().hasHeightForWidth()) self.prv_media_player.setSizePolicy(sizePolicy1) self.prv_media_player.setMinimumSize(QSize(0, 300)) self.verticalLayout.addWidget(self.prv_media_player) self.horizontalLayout_2 = QHBoxLayout() self.horizontalLayout_2.setObjectName(u"horizontalLayout_2") self.btn_play = QToolButton(self.layoutWidget) self.btn_play.setObjectName(u"btn_play") sizePolicy2 = QSizePolicy(QSizePolicy.Fixed, QSizePolicy.Fixed) sizePolicy2.setHorizontalStretch(0) sizePolicy2.setVerticalStretch(0) sizePolicy2.setHeightForWidth( self.btn_play.sizePolicy().hasHeightForWidth()) self.btn_play.setSizePolicy(sizePolicy2) self.horizontalLayout_2.addWidget(self.btn_play) self.sld_progress = QSlider(self.layoutWidget) self.sld_progress.setObjectName(u"sld_progress") sizePolicy3 = QSizePolicy(QSizePolicy.Expanding, QSizePolicy.Fixed) sizePolicy3.setHorizontalStretch(0) sizePolicy3.setVerticalStretch(0) sizePolicy3.setHeightForWidth( self.sld_progress.sizePolicy().hasHeightForWidth()) self.sld_progress.setSizePolicy(sizePolicy3) self.sld_progress.setOrientation(Qt.Horizontal) self.horizontalLayout_2.addWidget(self.sld_progress) self.label = QLabel(self.layoutWidget) self.label.setObjectName(u"label") sizePolicy1.setHeightForWidth( self.label.sizePolicy().hasHeightForWidth()) self.label.setSizePolicy(sizePolicy1) self.horizontalLayout_2.addWidget(self.label) self.verticalLayout.addLayout(self.horizontalLayout_2) self.groupBox_3 = QGroupBox(self.layoutWidget) self.groupBox_3.setObjectName(u"groupBox_3") sizePolicy4 = QSizePolicy(QSizePolicy.Preferred, QSizePolicy.Expanding) sizePolicy4.setHorizontalStretch(0) sizePolicy4.setVerticalStretch(0) sizePolicy4.setHeightForWidth( self.groupBox_3.sizePolicy().hasHeightForWidth()) self.groupBox_3.setSizePolicy(sizePolicy4) self.groupBox_3.setMinimumSize(QSize(0, 800)) self.groupBox_3.setMaximumSize(QSize(16777215, 750)) self.groupBox_3.setFlat(False) self.lbl_file_info = QLabel(self.groupBox_3) self.lbl_file_info.setObjectName(u"lbl_file_info") self.lbl_file_info.setGeometry(QRect(10, 30, 441, 721)) self.verticalLayout.addWidget(self.groupBox_3) self.horizontalLayout.addWidget(self.groupBox_2) self.retranslateUi(AddNewRecord) QMetaObject.connectSlotsByName(AddNewRecord) # setupUi def retranslateUi(self, AddNewRecord): AddNewRecord.setWindowTitle( QCoreApplication.translate("AddNewRecord", u"AssLib - Adding New Record(s)", None)) self.groupBox.setTitle( QCoreApplication.translate("AddNewRecord", u"Task", None)) self.groupBox_2.setTitle( QCoreApplication.translate("AddNewRecord", u"Output", None)) self.btn_play.setText( QCoreApplication.translate("AddNewRecord", u"...", None)) self.label.setText( QCoreApplication.translate("AddNewRecord", u"TextLabel", None)) self.groupBox_3.setTitle( QCoreApplication.translate("AddNewRecord", u"Info", None)) self.lbl_file_info.setText( QCoreApplication.translate("AddNewRecord", u"TextLabel", None))
class Ui_MainWindow(object): def setupUi(self, MainWindow): MainWindow.setObjectName("MainWindow") MainWindow.resize(1123, 892) self.centralwidget = QtWidgets.QWidget(MainWindow) self.centralwidget.setObjectName("centralwidget") self.horizontalLayout_5 = QtWidgets.QHBoxLayout(self.centralwidget) self.horizontalLayout_5.setObjectName("horizontalLayout_5") self.verticalLayout_2 = QtWidgets.QVBoxLayout() self.verticalLayout_2.setObjectName("verticalLayout_2") self.videoScreen = QVideoWidget(self.centralwidget) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.videoScreen.sizePolicy().hasHeightForWidth()) self.videoScreen.setSizePolicy(sizePolicy) self.videoScreen.setObjectName("videoScreen") self.verticalLayout_2.addWidget(self.videoScreen) self.horizontalLayout_2 = QtWidgets.QHBoxLayout() self.horizontalLayout_2.setContentsMargins(-1, 8, -1, 8) self.horizontalLayout_2.setObjectName("horizontalLayout_2") self.lbTimeReal = QtWidgets.QLabel(self.centralwidget) font = QtGui.QFont() font.setPointSize(11) self.lbTimeReal.setFont(font) self.lbTimeReal.setObjectName("lbTimeReal") self.horizontalLayout_2.addWidget(self.lbTimeReal) self.slTimeBarre = QtWidgets.QSlider(self.centralwidget) self.slTimeBarre.setMinimumSize(QtCore.QSize(20, 30)) self.slTimeBarre.setOrientation(QtCore.Qt.Horizontal) self.slTimeBarre.setObjectName("slTimeBarre") self.horizontalLayout_2.addWidget(self.slTimeBarre) self.lbTimeTot = QtWidgets.QLabel(self.centralwidget) font = QtGui.QFont() font.setPointSize(11) self.lbTimeTot.setFont(font) self.lbTimeTot.setObjectName("lbTimeTot") self.horizontalLayout_2.addWidget(self.lbTimeTot) self.verticalLayout_2.addLayout(self.horizontalLayout_2) self.horizontalLayout = QtWidgets.QHBoxLayout() self.horizontalLayout.setContentsMargins(-1, -1, -1, 5) self.horizontalLayout.setObjectName("horizontalLayout") self.pbLect = QtWidgets.QPushButton(self.centralwidget) self.pbLect.setMinimumSize(QtCore.QSize(0, 30)) font = QtGui.QFont() font.setPointSize(11) self.pbLect.setFont(font) self.pbLect.setObjectName("pbLect") self.horizontalLayout.addWidget(self.pbLect) self.pbPause = QtWidgets.QPushButton(self.centralwidget) self.pbPause.setMinimumSize(QtCore.QSize(0, 30)) font = QtGui.QFont() font.setPointSize(11) self.pbPause.setFont(font) self.pbPause.setObjectName("pbPause") self.horizontalLayout.addWidget(self.pbPause) self.pbStop = QtWidgets.QPushButton(self.centralwidget) self.pbStop.setMinimumSize(QtCore.QSize(0, 30)) font = QtGui.QFont() font.setPointSize(11) self.pbStop.setFont(font) self.pbStop.setObjectName("pbStop") self.horizontalLayout.addWidget(self.pbStop) self.pbPreced = QtWidgets.QPushButton(self.centralwidget) self.pbPreced.setMinimumSize(QtCore.QSize(0, 30)) font = QtGui.QFont() font.setPointSize(11) self.pbPreced.setFont(font) self.pbPreced.setObjectName("pbPreced") self.horizontalLayout.addWidget(self.pbPreced) self.pbSuiv = QtWidgets.QPushButton(self.centralwidget) self.pbSuiv.setMinimumSize(QtCore.QSize(0, 30)) font = QtGui.QFont() font.setPointSize(11) self.pbSuiv.setFont(font) self.pbSuiv.setObjectName("pbSuiv") self.horizontalLayout.addWidget(self.pbSuiv) self.verticalLayout_2.addLayout(self.horizontalLayout) self.horizontalLayout_5.addLayout(self.verticalLayout_2) self.verticalLayout = QtWidgets.QVBoxLayout() self.verticalLayout.setObjectName("verticalLayout") self.line = QtWidgets.QFrame(self.centralwidget) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.line.sizePolicy().hasHeightForWidth()) self.line.setSizePolicy(sizePolicy) self.line.setLayoutDirection(QtCore.Qt.LeftToRight) self.line.setFrameShape(QtWidgets.QFrame.VLine) self.line.setFrameShadow(QtWidgets.QFrame.Sunken) self.line.setObjectName("line") self.verticalLayout.addWidget(self.line) spacerItem = QtWidgets.QSpacerItem(20, 85, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed) self.verticalLayout.addItem(spacerItem) self.horizontalLayout_5.addLayout(self.verticalLayout) self.verticalLayout_3 = QtWidgets.QVBoxLayout() self.verticalLayout_3.setObjectName("verticalLayout_3") self.lbListFilm = QtWidgets.QLabel(self.centralwidget) self.lbListFilm.setMaximumSize(QtCore.QSize(16777215, 16777215)) font = QtGui.QFont() font.setPointSize(11) self.lbListFilm.setFont(font) self.lbListFilm.setObjectName("lbListFilm") self.verticalLayout_3.addWidget(self.lbListFilm) self.listFilm = QtWidgets.QListWidget(self.centralwidget) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.listFilm.sizePolicy().hasHeightForWidth()) self.listFilm.setSizePolicy(sizePolicy) self.listFilm.setObjectName("listFilm") self.verticalLayout_3.addWidget(self.listFilm) self.horizontalLayout_4 = QtWidgets.QHBoxLayout() self.horizontalLayout_4.setObjectName("horizontalLayout_4") spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum) self.horizontalLayout_4.addItem(spacerItem1) self.pbAjout = QtWidgets.QPushButton(self.centralwidget) font = QtGui.QFont() font.setPointSize(10) self.pbAjout.setFont(font) self.pbAjout.setObjectName("pbAjout") self.horizontalLayout_4.addWidget(self.pbAjout) self.pbSuppr = QtWidgets.QPushButton(self.centralwidget) font = QtGui.QFont() font.setPointSize(10) self.pbSuppr.setFont(font) self.pbSuppr.setObjectName("pbSuppr") self.horizontalLayout_4.addWidget(self.pbSuppr) self.verticalLayout_3.addLayout(self.horizontalLayout_4) self.horizontalLayout_3 = QtWidgets.QHBoxLayout() self.horizontalLayout_3.setObjectName("horizontalLayout_3") self.lbVolumeTitre = QtWidgets.QLabel(self.centralwidget) font = QtGui.QFont() font.setPointSize(11) self.lbVolumeTitre.setFont(font) self.lbVolumeTitre.setAlignment(QtCore.Qt.AlignCenter) self.lbVolumeTitre.setObjectName("lbVolumeTitre") self.horizontalLayout_3.addWidget(self.lbVolumeTitre) self.dlVolume = QtWidgets.QDial(self.centralwidget) self.dlVolume.setMaximumSize(QtCore.QSize(50, 50)) self.dlVolume.setObjectName("dlVolume") self.horizontalLayout_3.addWidget(self.dlVolume) self.lbVolumePourc = QtWidgets.QLabel(self.centralwidget) font = QtGui.QFont() font.setPointSize(11) self.lbVolumePourc.setFont(font) self.lbVolumePourc.setAlignment(QtCore.Qt.AlignCenter) self.lbVolumePourc.setObjectName("lbVolumePourc") self.horizontalLayout_3.addWidget(self.lbVolumePourc) self.verticalLayout_3.addLayout(self.horizontalLayout_3) self.horizontalLayout_5.addLayout(self.verticalLayout_3) MainWindow.setCentralWidget(self.centralwidget) self.menubar = QtWidgets.QMenuBar(MainWindow) self.menubar.setGeometry(QtCore.QRect(0, 0, 1123, 21)) self.menubar.setObjectName("menubar") self.menuFile = QtWidgets.QMenu(self.menubar) self.menuFile.setObjectName("menuFile") self.menuAide = QtWidgets.QMenu(self.menubar) self.menuAide.setObjectName("menuAide") MainWindow.setMenuBar(self.menubar) self.statusbar = QtWidgets.QStatusBar(MainWindow) self.statusbar.setObjectName("statusbar") MainWindow.setStatusBar(self.statusbar) self.menubar.addAction(self.menuFile.menuAction()) self.menubar.addAction(self.menuAide.menuAction()) self.retranslateUi(MainWindow) QtCore.QMetaObject.connectSlotsByName(MainWindow) def retranslateUi(self, MainWindow): MainWindow.setWindowTitle( QtWidgets.QApplication.translate("MainWindow", "MainWindow", None, -1)) self.lbTimeReal.setText( QtWidgets.QApplication.translate("MainWindow", "00:00:00", None, -1)) self.lbTimeTot.setText( QtWidgets.QApplication.translate("MainWindow", "00:00:00", None, -1)) self.pbLect.setText( QtWidgets.QApplication.translate("MainWindow", "Lecture", None, -1)) self.pbPause.setText( QtWidgets.QApplication.translate("MainWindow", "Pause", None, -1)) self.pbStop.setText( QtWidgets.QApplication.translate("MainWindow", "Stop", None, -1)) self.pbPreced.setText( QtWidgets.QApplication.translate("MainWindow", "Précédent", None, -1)) self.pbSuiv.setText( QtWidgets.QApplication.translate("MainWindow", "Suivant", None, -1)) self.lbListFilm.setText( QtWidgets.QApplication.translate("MainWindow", "Liste de lecture :", None, -1)) self.pbAjout.setText( QtWidgets.QApplication.translate("MainWindow", "+", None, -1)) self.pbSuppr.setText( QtWidgets.QApplication.translate("MainWindow", "-", None, -1)) self.lbVolumeTitre.setText( QtWidgets.QApplication.translate("MainWindow", "Volume :", None, -1)) self.lbVolumePourc.setText( QtWidgets.QApplication.translate("MainWindow", "0%", None, -1)) self.menuFile.setTitle( QtWidgets.QApplication.translate("MainWindow", "Fichier", None, -1)) self.menuAide.setTitle( QtWidgets.QApplication.translate("MainWindow", "Aide", None, -1))
class Ui_MainWindow(object): def setupUi(self, MainWindow): MainWindow.setObjectName("MainWindow") MainWindow.resize(941, 709) self.centralwidget = QtWidgets.QWidget(MainWindow) self.centralwidget.setObjectName("centralwidget") self.horizontalLayout_2 = QtWidgets.QHBoxLayout(self.centralwidget) self.horizontalLayout_2.setObjectName("horizontalLayout_2") self.verticalLayout_3 = QtWidgets.QVBoxLayout() self.verticalLayout_3.setObjectName("verticalLayout_3") self.widget = QVideoWidget(self.centralwidget) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.widget.sizePolicy().hasHeightForWidth()) self.widget.setSizePolicy(sizePolicy) self.widget.setObjectName("widget") self.verticalLayout_3.addWidget(self.widget) self.horizontalLayout_6 = QtWidgets.QHBoxLayout() self.horizontalLayout_6.setObjectName("horizontalLayout_6") self.time1 = QtWidgets.QLabel(self.centralwidget) self.time1.setTextFormat(QtCore.Qt.PlainText) self.time1.setObjectName("time1") self.horizontalLayout_6.addWidget(self.time1) self.sliderTime = QtWidgets.QSlider(self.centralwidget) self.sliderTime.setOrientation(QtCore.Qt.Horizontal) self.sliderTime.setObjectName("sliderTime") self.horizontalLayout_6.addWidget(self.sliderTime) self.time2 = QtWidgets.QLabel(self.centralwidget) self.time2.setObjectName("time2") self.horizontalLayout_6.addWidget(self.time2) self.verticalLayout_3.addLayout(self.horizontalLayout_6) self.buttons_layout = QtWidgets.QHBoxLayout() self.buttons_layout.setObjectName("buttons_layout") self.PLAY_Button = QtWidgets.QPushButton(self.centralwidget) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.PLAY_Button.sizePolicy().hasHeightForWidth()) self.PLAY_Button.setSizePolicy(sizePolicy) self.PLAY_Button.setObjectName("PLAY_Button") self.buttons_layout.addWidget(self.PLAY_Button) self.PAUSE_Button = QtWidgets.QPushButton(self.centralwidget) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.PAUSE_Button.sizePolicy().hasHeightForWidth()) self.PAUSE_Button.setSizePolicy(sizePolicy) self.PAUSE_Button.setObjectName("PAUSE_Button") self.buttons_layout.addWidget(self.PAUSE_Button) self.STOP_Button = QtWidgets.QPushButton(self.centralwidget) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.STOP_Button.sizePolicy().hasHeightForWidth()) self.STOP_Button.setSizePolicy(sizePolicy) self.STOP_Button.setObjectName("STOP_Button") self.buttons_layout.addWidget(self.STOP_Button) self.REW_Button = QtWidgets.QPushButton(self.centralwidget) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.REW_Button.sizePolicy().hasHeightForWidth()) self.REW_Button.setSizePolicy(sizePolicy) self.REW_Button.setObjectName("REW_Button") self.buttons_layout.addWidget(self.REW_Button) self.FFW_Button = QtWidgets.QPushButton(self.centralwidget) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.FFW_Button.sizePolicy().hasHeightForWidth()) self.FFW_Button.setSizePolicy(sizePolicy) self.FFW_Button.setObjectName("FFW_Button") self.buttons_layout.addWidget(self.FFW_Button) self.verticalLayout_3.addLayout(self.buttons_layout) self.horizontalLayout_2.addLayout(self.verticalLayout_3) self.verticalLayout = QtWidgets.QVBoxLayout() self.verticalLayout.setObjectName("verticalLayout") self.line = QtWidgets.QFrame(self.centralwidget) self.line.setFrameShape(QtWidgets.QFrame.VLine) self.line.setFrameShadow(QtWidgets.QFrame.Sunken) self.line.setObjectName("line") self.verticalLayout.addWidget(self.line) spacerItem = QtWidgets.QSpacerItem(20, 100, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed) self.verticalLayout.addItem(spacerItem) self.horizontalLayout_2.addLayout(self.verticalLayout) self.verticalLayout_2 = QtWidgets.QVBoxLayout() self.verticalLayout_2.setObjectName("verticalLayout_2") self.label_3 = QtWidgets.QLabel(self.centralwidget) self.label_3.setObjectName("label_3") self.verticalLayout_2.addWidget(self.label_3) self.file_list = QtWidgets.QListView(self.centralwidget) self.file_list.setObjectName("file_list") self.verticalLayout_2.addWidget(self.file_list) self.horizontalLayout_4 = QtWidgets.QHBoxLayout() self.horizontalLayout_4.setObjectName("horizontalLayout_4") spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) self.horizontalLayout_4.addItem(spacerItem1) self.next_file_button = QtWidgets.QPushButton(self.centralwidget) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.next_file_button.sizePolicy().hasHeightForWidth()) self.next_file_button.setSizePolicy(sizePolicy) self.next_file_button.setIconSize(QtCore.QSize(8, 16)) self.next_file_button.setObjectName("next_file_button") self.horizontalLayout_4.addWidget(self.next_file_button) self.prev_file_button = QtWidgets.QPushButton(self.centralwidget) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.prev_file_button.sizePolicy().hasHeightForWidth()) self.prev_file_button.setSizePolicy(sizePolicy) self.prev_file_button.setIconSize(QtCore.QSize(8, 8)) self.prev_file_button.setObjectName("prev_file_button") self.horizontalLayout_4.addWidget(self.prev_file_button) self.verticalLayout_2.addLayout(self.horizontalLayout_4) self.horizontalLayout_3 = QtWidgets.QHBoxLayout() self.horizontalLayout_3.setObjectName("horizontalLayout_3") spacerItem2 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) self.horizontalLayout_3.addItem(spacerItem2) self.label_Volumen = QtWidgets.QLabel(self.centralwidget) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.label_Volumen.sizePolicy().hasHeightForWidth()) self.label_Volumen.setSizePolicy(sizePolicy) self.label_Volumen.setObjectName("label_Volumen") self.horizontalLayout_3.addWidget(self.label_Volumen) self.dial_volumen = QtWidgets.QDial(self.centralwidget) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.dial_volumen.sizePolicy().hasHeightForWidth()) self.dial_volumen.setSizePolicy(sizePolicy) self.dial_volumen.setObjectName("dial_volumen") self.horizontalLayout_3.addWidget(self.dial_volumen) self.volumen_level = QtWidgets.QLabel(self.centralwidget) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.volumen_level.sizePolicy().hasHeightForWidth()) self.volumen_level.setSizePolicy(sizePolicy) self.volumen_level.setObjectName("volumen_level") self.horizontalLayout_3.addWidget(self.volumen_level) self.verticalLayout_2.addLayout(self.horizontalLayout_3) self.horizontalLayout_2.addLayout(self.verticalLayout_2) MainWindow.setCentralWidget(self.centralwidget) self.menubar = QtWidgets.QMenuBar(MainWindow) self.menubar.setGeometry(QtCore.QRect(0, 0, 941, 21)) self.menubar.setObjectName("menubar") MainWindow.setMenuBar(self.menubar) self.statusbar = QtWidgets.QStatusBar(MainWindow) self.statusbar.setObjectName("statusbar") MainWindow.setStatusBar(self.statusbar) self.retranslateUi(MainWindow) QtCore.QMetaObject.connectSlotsByName(MainWindow) def retranslateUi(self, MainWindow): MainWindow.setWindowTitle(QtWidgets.QApplication.translate("MainWindow", "MainWindow", None, -1)) self.time1.setText(QtWidgets.QApplication.translate("MainWindow", "0:00", None, -1)) self.time2.setText(QtWidgets.QApplication.translate("MainWindow", "1h:30s:35s", None, -1)) self.PLAY_Button.setText(QtWidgets.QApplication.translate("MainWindow", "PLAY", None, -1)) self.PAUSE_Button.setText(QtWidgets.QApplication.translate("MainWindow", "PAUSE", None, -1)) self.STOP_Button.setText(QtWidgets.QApplication.translate("MainWindow", "STOP", None, -1)) self.REW_Button.setText(QtWidgets.QApplication.translate("MainWindow", "REW", None, -1)) self.FFW_Button.setText(QtWidgets.QApplication.translate("MainWindow", "FFW", None, -1)) self.label_3.setText(QtWidgets.QApplication.translate("MainWindow", "File", None, -1)) self.next_file_button.setText(QtWidgets.QApplication.translate("MainWindow", "+", None, -1)) self.prev_file_button.setText(QtWidgets.QApplication.translate("MainWindow", "-", None, -1)) self.label_Volumen.setText(QtWidgets.QApplication.translate("MainWindow", "VOLUMEN", None, -1)) self.volumen_level.setText(QtWidgets.QApplication.translate("MainWindow", "3%", None, -1))
class Ui_MainWindow(object): def setupUi(self, MainWindow): MainWindow.setObjectName("MainWindow") MainWindow.resize(1066, 806) self.centralwidget = QtWidgets.QWidget(MainWindow) self.centralwidget.setObjectName("centralwidget") self.horizontalLayout_5 = QtWidgets.QHBoxLayout(self.centralwidget) self.horizontalLayout_5.setObjectName("horizontalLayout_5") self.verticalLayout = QtWidgets.QVBoxLayout() self.verticalLayout.setObjectName("verticalLayout") self.ecran = QVideoWidget(self.centralwidget) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.ecran.sizePolicy().hasHeightForWidth()) self.ecran.setSizePolicy(sizePolicy) self.ecran.setObjectName("ecran") self.verticalLayout.addWidget(self.ecran) self.horizontalLayout_2 = QtWidgets.QHBoxLayout() self.horizontalLayout_2.setContentsMargins(10, 5, 10, 5) self.horizontalLayout_2.setObjectName("horizontalLayout_2") self.debut = QtWidgets.QLabel(self.centralwidget) font = QtGui.QFont() font.setPointSize(12) self.debut.setFont(font) self.debut.setObjectName("debut") self.horizontalLayout_2.addWidget(self.debut) self.timeline = QtWidgets.QSlider(self.centralwidget) self.timeline.setMinimumSize(QtCore.QSize(5, 40)) self.timeline.setOrientation(QtCore.Qt.Horizontal) self.timeline.setObjectName("timeline") self.horizontalLayout_2.addWidget(self.timeline) self.fin = QtWidgets.QLabel(self.centralwidget) font = QtGui.QFont() font.setPointSize(12) self.fin.setFont(font) self.fin.setObjectName("fin") self.horizontalLayout_2.addWidget(self.fin) self.verticalLayout.addLayout(self.horizontalLayout_2) self.horizontalLayout = QtWidgets.QHBoxLayout() self.horizontalLayout.setSpacing(30) self.horizontalLayout.setContentsMargins(-1, 20, -1, 20) self.horizontalLayout.setObjectName("horizontalLayout") self.pblecture = QtWidgets.QPushButton(self.centralwidget) self.pblecture.setObjectName("pblecture") self.horizontalLayout.addWidget(self.pblecture) self.pbpause = QtWidgets.QPushButton(self.centralwidget) self.pbpause.setObjectName("pbpause") self.horizontalLayout.addWidget(self.pbpause) self.pbstop = QtWidgets.QPushButton(self.centralwidget) self.pbstop.setMinimumSize(QtCore.QSize(0, 20)) self.pbstop.setObjectName("pbstop") self.horizontalLayout.addWidget(self.pbstop) self.pbsuivant = QtWidgets.QPushButton(self.centralwidget) self.pbsuivant.setObjectName("pbsuivant") self.horizontalLayout.addWidget(self.pbsuivant) self.pbprecedent = QtWidgets.QPushButton(self.centralwidget) self.pbprecedent.setObjectName("pbprecedent") self.horizontalLayout.addWidget(self.pbprecedent) self.verticalLayout.addLayout(self.horizontalLayout) self.horizontalLayout_5.addLayout(self.verticalLayout) self.verticalLayout_2 = QtWidgets.QVBoxLayout() self.verticalLayout_2.setObjectName("verticalLayout_2") self.line = QtWidgets.QFrame(self.centralwidget) self.line.setFrameShape(QtWidgets.QFrame.VLine) self.line.setFrameShadow(QtWidgets.QFrame.Sunken) self.line.setObjectName("line") self.verticalLayout_2.addWidget(self.line) spacerItem = QtWidgets.QSpacerItem(10, 60, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed) self.verticalLayout_2.addItem(spacerItem) self.horizontalLayout_5.addLayout(self.verticalLayout_2) self.verticalLayout_3 = QtWidgets.QVBoxLayout() self.verticalLayout_3.setObjectName("verticalLayout_3") self.label_5 = QtWidgets.QLabel(self.centralwidget) font = QtGui.QFont() font.setPointSize(12) self.label_5.setFont(font) self.label_5.setObjectName("label_5") self.verticalLayout_3.addWidget(self.label_5) self.listWidget = QtWidgets.QListWidget(self.centralwidget) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.listWidget.sizePolicy().hasHeightForWidth()) self.listWidget.setSizePolicy(sizePolicy) self.listWidget.setObjectName("listWidget") self.verticalLayout_3.addWidget(self.listWidget) self.horizontalLayout_3 = QtWidgets.QHBoxLayout() self.horizontalLayout_3.setObjectName("horizontalLayout_3") spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum) self.horizontalLayout_3.addItem(spacerItem1) self.pbplus = QtWidgets.QPushButton(self.centralwidget) self.pbplus.setObjectName("pbplus") self.horizontalLayout_3.addWidget(self.pbplus) self.pbmoins = QtWidgets.QPushButton(self.centralwidget) self.pbmoins.setObjectName("pbmoins") self.horizontalLayout_3.addWidget(self.pbmoins) self.verticalLayout_3.addLayout(self.horizontalLayout_3) self.horizontalLayout_4 = QtWidgets.QHBoxLayout() self.horizontalLayout_4.setObjectName("horizontalLayout_4") spacerItem2 = QtWidgets.QSpacerItem(100, 20, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum) self.horizontalLayout_4.addItem(spacerItem2) self.label_3 = QtWidgets.QLabel(self.centralwidget) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.label_3.sizePolicy().hasHeightForWidth()) self.label_3.setSizePolicy(sizePolicy) font = QtGui.QFont() font.setPointSize(10) self.label_3.setFont(font) self.label_3.setObjectName("label_3") self.horizontalLayout_4.addWidget(self.label_3) self.dialVolume = QtWidgets.QDial(self.centralwidget) self.dialVolume.setMaximumSize(QtCore.QSize(80, 80)) self.dialVolume.setMaximum(100) self.dialVolume.setProperty("value", 100) self.dialVolume.setObjectName("dialVolume") self.horizontalLayout_4.addWidget(self.dialVolume) self.labelVol = QtWidgets.QLabel(self.centralwidget) self.labelVol.setMinimumSize(QtCore.QSize(50, 0)) font = QtGui.QFont() font.setPointSize(11) self.labelVol.setFont(font) self.labelVol.setObjectName("labelVol") self.horizontalLayout_4.addWidget(self.labelVol) self.verticalLayout_3.addLayout(self.horizontalLayout_4) self.horizontalLayout_5.addLayout(self.verticalLayout_3) MainWindow.setCentralWidget(self.centralwidget) self.menubar = QtWidgets.QMenuBar(MainWindow) self.menubar.setGeometry(QtCore.QRect(0, 0, 1066, 21)) self.menubar.setObjectName("menubar") MainWindow.setMenuBar(self.menubar) self.statusbar = QtWidgets.QStatusBar(MainWindow) self.statusbar.setObjectName("statusbar") MainWindow.setStatusBar(self.statusbar) self.retranslateUi(MainWindow) QtCore.QMetaObject.connectSlotsByName(MainWindow) def retranslateUi(self, MainWindow): MainWindow.setWindowTitle( QtWidgets.QApplication.translate("MainWindow", "MainWindow", None, -1)) self.debut.setText( QtWidgets.QApplication.translate("MainWindow", "Début", None, -1)) self.fin.setText( QtWidgets.QApplication.translate("MainWindow", "Fin", None, -1)) self.pblecture.setText( QtWidgets.QApplication.translate("MainWindow", "Lecture", None, -1)) self.pbpause.setText( QtWidgets.QApplication.translate("MainWindow", "Pause", None, -1)) self.pbstop.setText( QtWidgets.QApplication.translate("MainWindow", "Stop", None, -1)) self.pbsuivant.setText( QtWidgets.QApplication.translate("MainWindow", "Suivant", None, -1)) self.pbprecedent.setText( QtWidgets.QApplication.translate("MainWindow", "Préceédent", None, -1)) self.label_5.setText( QtWidgets.QApplication.translate("MainWindow", "LISTE DE LECTURE", None, -1)) self.pbplus.setText( QtWidgets.QApplication.translate("MainWindow", "+", None, -1)) self.pbmoins.setText( QtWidgets.QApplication.translate("MainWindow", "-", None, -1)) self.label_3.setText( QtWidgets.QApplication.translate("MainWindow", "Volume:", None, -1)) self.labelVol.setText( QtWidgets.QApplication.translate("MainWindow", "100%", None, -1))
class Form(QMainWindow): def __init__(self, parent=None): super(Form, self).__init__(parent) self.setObjectName("MainWindow") self.resize(804, 559) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.sizePolicy().hasHeightForWidth()) self.setSizePolicy(sizePolicy) self.centralwidget = QtWidgets.QWidget(self) self.centralwidget.setObjectName("centralwidget") self.horizontalLayout_5 = QtWidgets.QHBoxLayout(self.centralwidget) self.horizontalLayout_5.setObjectName("horizontalLayout_5") self.horizontalLayout = QtWidgets.QHBoxLayout() self.horizontalLayout.setObjectName("horizontalLayout") self.verticalLayout = QtWidgets.QVBoxLayout() self.verticalLayout.setObjectName("verticalLayout") self.wVideo = QVideoWidget(self.centralwidget) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.wVideo.sizePolicy().hasHeightForWidth()) self.wVideo.setSizePolicy(sizePolicy) self.wVideo.setObjectName("wVideo") self.verticalLayout.addWidget(self.wVideo) self.horizontalLayout_2 = QtWidgets.QHBoxLayout() self.horizontalLayout_2.setObjectName("horizontalLayout_2") self.lStartTime = QtWidgets.QLabel(self.centralwidget) self.lStartTime.setObjectName("lStartTime") self.horizontalLayout_2.addWidget(self.lStartTime) self.sProgression = QtWidgets.QSlider(self.centralwidget) self.sProgression.setOrientation(QtCore.Qt.Horizontal) self.sProgression.setObjectName("sProgression") self.horizontalLayout_2.addWidget(self.sProgression) self.lEndTime = QtWidgets.QLabel(self.centralwidget) self.lEndTime.setObjectName("lEndTime") self.horizontalLayout_2.addWidget(self.lEndTime) self.verticalLayout.addLayout(self.horizontalLayout_2) self.lBoutons = QtWidgets.QHBoxLayout() self.lBoutons.setObjectName("lBoutons") self.pbLecture = QtWidgets.QPushButton(self.centralwidget) self.pbLecture.setObjectName("pbLecture") self.lBoutons.addWidget(self.pbLecture) self.pbPause = QtWidgets.QPushButton(self.centralwidget) self.pbPause.setObjectName("pbPause") self.lBoutons.addWidget(self.pbPause) self.pbStop = QtWidgets.QPushButton(self.centralwidget) self.pbStop.setObjectName("pbStop") self.lBoutons.addWidget(self.pbStop) self.pbSuivant = QtWidgets.QPushButton(self.centralwidget) self.pbSuivant.setObjectName("pbSuivant") self.lBoutons.addWidget(self.pbSuivant) self.pbPrecedent = QtWidgets.QPushButton(self.centralwidget) self.pbPrecedent.setObjectName("pbPrecedent") self.lBoutons.addWidget(self.pbPrecedent) self.verticalLayout.addLayout(self.lBoutons) self.horizontalLayout.addLayout(self.verticalLayout) self.verticalLayout_3 = QtWidgets.QVBoxLayout() self.verticalLayout_3.setObjectName("verticalLayout_3") self.line = QtWidgets.QFrame(self.centralwidget) self.line.setBaseSize(QtCore.QSize(0, 0)) self.line.setFrameShape(QtWidgets.QFrame.VLine) self.line.setFrameShadow(QtWidgets.QFrame.Sunken) self.line.setObjectName("line") self.verticalLayout_3.addWidget(self.line) spacerItem = QtWidgets.QSpacerItem(20, 100, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed) self.verticalLayout_3.addItem(spacerItem) self.horizontalLayout.addLayout(self.verticalLayout_3) self.verticalLayout_2 = QtWidgets.QVBoxLayout() self.verticalLayout_2.setObjectName("verticalLayout_2") self.label_3 = QtWidgets.QLabel(self.centralwidget) self.label_3.setObjectName("label_3") self.verticalLayout_2.addWidget(self.label_3) self.listWidget = QtWidgets.QListWidget(self.centralwidget) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.listWidget.sizePolicy().hasHeightForWidth()) self.listWidget.setSizePolicy(sizePolicy) self.listWidget.setObjectName("listWidget") self.verticalLayout_2.addWidget(self.listWidget) self.horizontalLayout_3 = QtWidgets.QHBoxLayout() self.horizontalLayout_3.setObjectName("horizontalLayout_3") spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum) self.horizontalLayout_3.addItem(spacerItem1) self.pbAjout = QtWidgets.QPushButton(self.centralwidget) self.pbAjout.setObjectName("pbAjout") self.horizontalLayout_3.addWidget(self.pbAjout) self.pbSuppr = QtWidgets.QPushButton(self.centralwidget) self.pbSuppr.setObjectName("pbSuppr") self.horizontalLayout_3.addWidget(self.pbSuppr) self.verticalLayout_2.addLayout(self.horizontalLayout_3) self.horizontalLayout_4 = QtWidgets.QHBoxLayout() self.horizontalLayout_4.setObjectName("horizontalLayout_4") spacerItem2 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum) self.horizontalLayout_4.addItem(spacerItem2) self.label_4 = QtWidgets.QLabel(self.centralwidget) self.label_4.setObjectName("label_4") self.horizontalLayout_4.addWidget(self.label_4) self.dVolume = QtWidgets.QDial(self.centralwidget) self.dVolume.setObjectName("dVolume") self.horizontalLayout_4.addWidget(self.dVolume) self.lPourcentVolume = QtWidgets.QLabel(self.centralwidget) self.lPourcentVolume.setObjectName("lPourcentVolume") self.horizontalLayout_4.addWidget(self.lPourcentVolume) self.verticalLayout_2.addLayout(self.horizontalLayout_4) self.horizontalLayout.addLayout(self.verticalLayout_2) self.horizontalLayout_5.addLayout(self.horizontalLayout) self.setCentralWidget(self.centralwidget) self.menubar = QtWidgets.QMenuBar(self) self.menubar.setGeometry(QtCore.QRect(0, 0, 804, 21)) self.menubar.setObjectName("menubar") self.setMenuBar(self.menubar) self.statusbar = QtWidgets.QStatusBar(self) self.statusbar.setObjectName("statusbar") self.setStatusBar(self.statusbar) self.retranslateUi(self) QtCore.QMetaObject.connectSlotsByName(self) self.mediaPlayer = QMediaPlayer() self.mediaPlayer.setVideoOutput(self.wVideo) self.pbLecture.clicked.connect(self.lectureClic) self.pbPause.clicked.connect(self.pauseClic) self.pbStop.clicked.connect(self.stopClic) self.pbSuivant.clicked.connect(self.suivantClic) self.pbPrecedent.clicked.connect(self.precedentClic) self.dVolume.valueChanged.connect(self.volumeChange) self.mediaPlayer.positionChanged.connect(self.progressionChange) self.sProgression.sliderMoved.connect(self.progressionDeplace) self.pbSuppr.clicked.connect(self.supprVid) self.pbAjout.clicked.connect(self.addVid) self.listWidget.itemDoubleClicked.connect(self.listeDoubleClic) self.dVolume.setMaximum(100) self.lEndTime.setText("") self.lStartTime.setText("") self.lPourcentVolume.setText("") self.dVolume.setValue(31) def progressionDeplace(self): self.mediaPlayer.setPosition(self.sProgression.value()) def progressionChange(self): self.lEndTime.setText(convertMillis(self.mediaPlayer.duration())) self.lStartTime.setText(str(convertMillis( self.mediaPlayer.position()))) self.sProgression.setRange(0, self.mediaPlayer.duration()) self.sProgression.setValue(self.mediaPlayer.position()) def lectureClic(self): mediaContent = QMediaContent(QUrl.fromLocalFile(self.openFile[0])) self.mediaPlayer.setMedia(mediaContent) self.mediaPlayer.play() def pauseClic(self): print("Pause") if self.mediaPlayer.state() == QMediaPlayer.PausedState: self.mediaPlayer.play() else: self.mediaPlayer.pause() def stopClic(self): self.mediaPlayer.stop() def suivantClic(self): currentItemRow = self.listWidget.currentRow() if currentItemRow == -1: return totalItems = self.listWidget.count() self.listWidget.setCurrentRow((currentItemRow + 1) % totalItems) self.listeDoubleClic() def precedentClic(self): currentItemRow = self.listWidget.currentRow() if currentItemRow == -1: return totalItems = self.listWidget.count() self.listWidget.setCurrentRow((currentItemRow - 1) % totalItems) self.listeDoubleClic() def volumeChange(self): self.lPourcentVolume.setText(str(self.dVolume.value())) self.mediaPlayer.setVolume(self.dVolume.value()) def supprVid(self): if self.listWidget.currentRow() != -1: self.listWidget.takeItem(self.listWidget.currentRow()) def addVid(self): self.openFile = QFileDialog.getOpenFileName( self, "Ouvrir...", ".", "Image Files (*.avi *.mp4)") self.listWidget.addItem(self.openFile[0]) def listeDoubleClic(self): self.mediaPlayer.setMedia( QMediaContent( QUrl.fromLocalFile(self.listWidget.currentItem().text()))) self.mediaPlayer.play() def retranslateUi(self, MainWindow): self.setWindowTitle( QtWidgets.QApplication.translate("MainWindow", "MainWindow", None, -1)) self.lStartTime.setText( QtWidgets.QApplication.translate("MainWindow", "$start_time", None, -1)) self.lEndTime.setText( QtWidgets.QApplication.translate("MainWindow", "$end_time", None, -1)) self.pbLecture.setText( QtWidgets.QApplication.translate("MainWindow", "Lecture", None, -1)) self.pbPause.setText( QtWidgets.QApplication.translate("MainWindow", "Pause", None, -1)) self.pbStop.setText( QtWidgets.QApplication.translate("MainWindow", "Stop", None, -1)) self.pbSuivant.setText( QtWidgets.QApplication.translate("MainWindow", "Suivant", None, -1)) self.pbPrecedent.setText( QtWidgets.QApplication.translate("MainWindow", "Précédent", None, -1)) self.label_3.setText( QtWidgets.QApplication.translate("MainWindow", "Liste de lecture :", None, -1)) self.pbAjout.setText( QtWidgets.QApplication.translate("MainWindow", "+", None, -1)) self.pbSuppr.setText( QtWidgets.QApplication.translate("MainWindow", "-", None, -1)) self.label_4.setText( QtWidgets.QApplication.translate("MainWindow", "Volume :", None, -1)) self.lPourcentVolume.setText( QtWidgets.QApplication.translate("MainWindow", "$volume", None, -1))
class Ui_MainWindow(object): def setupUi(self, MainWindow): MainWindow.setObjectName("MainWindow") MainWindow.resize(931, 717) self.centralwidget = QtWidgets.QWidget(MainWindow) self.centralwidget.setObjectName("centralwidget") self.horizontalLayout_5 = QtWidgets.QHBoxLayout(self.centralwidget) self.horizontalLayout_5.setObjectName("horizontalLayout_5") self.verticalLayout = QtWidgets.QVBoxLayout() self.verticalLayout.setObjectName("verticalLayout") self.wVideo = QVideoWidget(self.centralwidget) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.wVideo.sizePolicy().hasHeightForWidth()) self.wVideo.setSizePolicy(sizePolicy) self.wVideo.setObjectName("wVideo") self.verticalLayout.addWidget(self.wVideo) self.horizontalLayout_2 = QtWidgets.QHBoxLayout() self.horizontalLayout_2.setObjectName("horizontalLayout_2") self.lTpsCourant = QtWidgets.QLabel(self.centralwidget) self.lTpsCourant.setObjectName("lTpsCourant") self.horizontalLayout_2.addWidget(self.lTpsCourant) self.sTpsCourant = QtWidgets.QSlider(self.centralwidget) self.sTpsCourant.setMinimumSize(QtCore.QSize(0, 40)) self.sTpsCourant.setOrientation(QtCore.Qt.Horizontal) self.sTpsCourant.setObjectName("sTpsCourant") self.horizontalLayout_2.addWidget(self.sTpsCourant) self.lTpsTotal = QtWidgets.QLabel(self.centralwidget) self.lTpsTotal.setObjectName("lTpsTotal") self.horizontalLayout_2.addWidget(self.lTpsTotal) self.verticalLayout.addLayout(self.horizontalLayout_2) self.horizontalLayout = QtWidgets.QHBoxLayout() self.horizontalLayout.setObjectName("horizontalLayout") self.pbLecture = QtWidgets.QPushButton(self.centralwidget) self.pbLecture.setObjectName("pbLecture") self.horizontalLayout.addWidget(self.pbLecture) self.pbPause = QtWidgets.QPushButton(self.centralwidget) self.pbPause.setObjectName("pbPause") self.horizontalLayout.addWidget(self.pbPause) self.pbStop = QtWidgets.QPushButton(self.centralwidget) self.pbStop.setObjectName("pbStop") self.horizontalLayout.addWidget(self.pbStop) self.pbSuivant = QtWidgets.QPushButton(self.centralwidget) self.pbSuivant.setObjectName("pbSuivant") self.horizontalLayout.addWidget(self.pbSuivant) self.pbPrecedent = QtWidgets.QPushButton(self.centralwidget) self.pbPrecedent.setObjectName("pbPrecedent") self.horizontalLayout.addWidget(self.pbPrecedent) self.verticalLayout.addLayout(self.horizontalLayout) self.horizontalLayout_5.addLayout(self.verticalLayout) self.verticalLayout_2 = QtWidgets.QVBoxLayout() self.verticalLayout_2.setObjectName("verticalLayout_2") self.line = QtWidgets.QFrame(self.centralwidget) self.line.setFrameShape(QtWidgets.QFrame.VLine) self.line.setFrameShadow(QtWidgets.QFrame.Sunken) self.line.setObjectName("line") self.verticalLayout_2.addWidget(self.line) spacerItem = QtWidgets.QSpacerItem(20, 80, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed) self.verticalLayout_2.addItem(spacerItem) self.horizontalLayout_5.addLayout(self.verticalLayout_2) self.verticalLayout_3 = QtWidgets.QVBoxLayout() self.verticalLayout_3.setObjectName("verticalLayout_3") self.label_3 = QtWidgets.QLabel(self.centralwidget) self.label_3.setObjectName("label_3") self.verticalLayout_3.addWidget(self.label_3) self.lPlaylist = QtWidgets.QListWidget(self.centralwidget) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.lPlaylist.sizePolicy().hasHeightForWidth()) self.lPlaylist.setSizePolicy(sizePolicy) self.lPlaylist.setObjectName("lPlaylist") self.verticalLayout_3.addWidget(self.lPlaylist) self.horizontalLayout_4 = QtWidgets.QHBoxLayout() self.horizontalLayout_4.setObjectName("horizontalLayout_4") spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum) self.horizontalLayout_4.addItem(spacerItem1) self.pbAjout = QtWidgets.QPushButton(self.centralwidget) self.pbAjout.setObjectName("pbAjout") self.horizontalLayout_4.addWidget(self.pbAjout) self.pbSuppr = QtWidgets.QPushButton(self.centralwidget) self.pbSuppr.setObjectName("pbSuppr") self.horizontalLayout_4.addWidget(self.pbSuppr) self.verticalLayout_3.addLayout(self.horizontalLayout_4) self.horizontalLayout_3 = QtWidgets.QHBoxLayout() self.horizontalLayout_3.setObjectName("horizontalLayout_3") spacerItem2 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum) self.horizontalLayout_3.addItem(spacerItem2) self.label_4 = QtWidgets.QLabel(self.centralwidget) self.label_4.setObjectName("label_4") self.horizontalLayout_3.addWidget(self.label_4) self.dVolume = QtWidgets.QDial(self.centralwidget) self.dVolume.setMaximumSize(QtCore.QSize(40, 40)) self.dVolume.setMaximum(100) self.dVolume.setObjectName("dVolume") self.horizontalLayout_3.addWidget(self.dVolume) self.lVolume = QtWidgets.QLabel(self.centralwidget) self.lVolume.setObjectName("lVolume") self.horizontalLayout_3.addWidget(self.lVolume) self.verticalLayout_3.addLayout(self.horizontalLayout_3) self.horizontalLayout_5.addLayout(self.verticalLayout_3) MainWindow.setCentralWidget(self.centralwidget) self.menubar = QtWidgets.QMenuBar(MainWindow) self.menubar.setGeometry(QtCore.QRect(0, 0, 931, 26)) self.menubar.setObjectName("menubar") MainWindow.setMenuBar(self.menubar) self.statusbar = QtWidgets.QStatusBar(MainWindow) self.statusbar.setObjectName("statusbar") MainWindow.setStatusBar(self.statusbar) self.retranslateUi(MainWindow) QtCore.QMetaObject.connectSlotsByName(MainWindow) def retranslateUi(self, MainWindow): MainWindow.setWindowTitle( QtWidgets.QApplication.translate("MainWindow", "MainWindow", None, -1)) self.lTpsCourant.setText( QtWidgets.QApplication.translate("MainWindow", "00:00", None, -1)) self.lTpsTotal.setText( QtWidgets.QApplication.translate("MainWindow", "00:00", None, -1)) self.pbLecture.setText( QtWidgets.QApplication.translate("MainWindow", "Lecture", None, -1)) self.pbPause.setText( QtWidgets.QApplication.translate("MainWindow", "Pause", None, -1)) self.pbStop.setText( QtWidgets.QApplication.translate("MainWindow", "Stop", None, -1)) self.pbSuivant.setText( QtWidgets.QApplication.translate("MainWindow", "Suivant", None, -1)) self.pbPrecedent.setText( QtWidgets.QApplication.translate("MainWindow", "Precedent", None, -1)) self.label_3.setText( QtWidgets.QApplication.translate("MainWindow", "Liste Lecture:", None, -1)) self.pbAjout.setText( QtWidgets.QApplication.translate("MainWindow", "+", None, -1)) self.pbSuppr.setText( QtWidgets.QApplication.translate("MainWindow", "-", None, -1)) self.label_4.setText( QtWidgets.QApplication.translate("MainWindow", "Volume :", None, -1)) self.lVolume.setText( QtWidgets.QApplication.translate("MainWindow", "0%", None, -1))
class Ui_MainWindow(object): def setupUi(self, MainWindow): MainWindow.setObjectName("MainWindow") MainWindow.resize(988, 794) self.centralwidget = QtWidgets.QWidget(MainWindow) self.centralwidget.setObjectName("centralwidget") self.horizontalLayout_5 = QtWidgets.QHBoxLayout(self.centralwidget) self.horizontalLayout_5.setObjectName("horizontalLayout_5") self.leftLayout = QtWidgets.QVBoxLayout() self.leftLayout.setObjectName("leftLayout") self.Lecteur = QVideoWidget(self.centralwidget) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.Lecteur.sizePolicy().hasHeightForWidth()) self.Lecteur.setSizePolicy(sizePolicy) self.Lecteur.setObjectName("Lecteur") self.leftLayout.addWidget(self.Lecteur) self.layoutSlider = QtWidgets.QHBoxLayout() self.layoutSlider.setObjectName("layoutSlider") self.lAvanceeTps = QtWidgets.QLabel(self.centralwidget) self.lAvanceeTps.setObjectName("lAvanceeTps") self.layoutSlider.addWidget(self.lAvanceeTps) self.sTpsCourant = QtWidgets.QSlider(self.centralwidget) self.sTpsCourant.setOrientation(QtCore.Qt.Horizontal) self.sTpsCourant.setObjectName("sTpsCourant") self.layoutSlider.addWidget(self.sTpsCourant) self.lRestantTps = QtWidgets.QLabel(self.centralwidget) self.lRestantTps.setObjectName("lRestantTps") self.layoutSlider.addWidget(self.lRestantTps) self.leftLayout.addLayout(self.layoutSlider) self.horizontalLayout_4 = QtWidgets.QHBoxLayout() self.horizontalLayout_4.setObjectName("horizontalLayout_4") self.pBLecture = QtWidgets.QPushButton(self.centralwidget) self.pBLecture.setObjectName("pBLecture") self.horizontalLayout_4.addWidget(self.pBLecture) self.pBPause = QtWidgets.QPushButton(self.centralwidget) self.pBPause.setObjectName("pBPause") self.horizontalLayout_4.addWidget(self.pBPause) self.pBStop = QtWidgets.QPushButton(self.centralwidget) self.pBStop.setObjectName("pBStop") self.horizontalLayout_4.addWidget(self.pBStop) self.pBPrecedent = QtWidgets.QPushButton(self.centralwidget) self.pBPrecedent.setObjectName("pBPrecedent") self.horizontalLayout_4.addWidget(self.pBPrecedent) self.pBSuivant = QtWidgets.QPushButton(self.centralwidget) self.pBSuivant.setObjectName("pBSuivant") self.horizontalLayout_4.addWidget(self.pBSuivant) self.leftLayout.addLayout(self.horizontalLayout_4) self.horizontalLayout_5.addLayout(self.leftLayout) self.centralLayout = QtWidgets.QVBoxLayout() self.centralLayout.setObjectName("centralLayout") self.line = QtWidgets.QFrame(self.centralwidget) self.line.setFrameShape(QtWidgets.QFrame.VLine) self.line.setFrameShadow(QtWidgets.QFrame.Sunken) self.line.setObjectName("line") self.centralLayout.addWidget(self.line) spacerItem = QtWidgets.QSpacerItem(20, 100, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed) self.centralLayout.addItem(spacerItem) self.horizontalLayout_5.addLayout(self.centralLayout) self.rightLayout = QtWidgets.QVBoxLayout() self.rightLayout.setObjectName("rightLayout") self.label = QtWidgets.QLabel(self.centralwidget) self.label.setObjectName("label") self.rightLayout.addWidget(self.label) self.listWidget = QtWidgets.QListWidget(self.centralwidget) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.listWidget.sizePolicy().hasHeightForWidth()) self.listWidget.setSizePolicy(sizePolicy) self.listWidget.setObjectName("listWidget") self.rightLayout.addWidget(self.listWidget) self.horizontalLayout = QtWidgets.QHBoxLayout() self.horizontalLayout.setObjectName("horizontalLayout") spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum) self.horizontalLayout.addItem(spacerItem1) self.pBAjout = QtWidgets.QPushButton(self.centralwidget) self.pBAjout.setObjectName("pBAjout") self.horizontalLayout.addWidget(self.pBAjout) self.pBSupp = QtWidgets.QPushButton(self.centralwidget) self.pBSupp.setObjectName("pBSupp") self.horizontalLayout.addWidget(self.pBSupp) self.rightLayout.addLayout(self.horizontalLayout) self.horizontalLayout_3 = QtWidgets.QHBoxLayout() self.horizontalLayout_3.setObjectName("horizontalLayout_3") spacerItem2 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum) self.horizontalLayout_3.addItem(spacerItem2) self.label_2 = QtWidgets.QLabel(self.centralwidget) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.label_2.sizePolicy().hasHeightForWidth()) self.label_2.setSizePolicy(sizePolicy) self.label_2.setObjectName("label_2") self.horizontalLayout_3.addWidget(self.label_2) self.dBVolume = QtWidgets.QDial(self.centralwidget) self.dBVolume.setMaximumSize(QtCore.QSize(50, 50)) self.dBVolume.setObjectName("dBVolume") self.horizontalLayout_3.addWidget(self.dBVolume) self.suiviVol = QtWidgets.QLabel(self.centralwidget) self.suiviVol.setObjectName("suiviVol") self.horizontalLayout_3.addWidget(self.suiviVol) self.rightLayout.addLayout(self.horizontalLayout_3) self.horizontalLayout_5.addLayout(self.rightLayout) MainWindow.setCentralWidget(self.centralwidget) self.statusbar = QtWidgets.QStatusBar(MainWindow) self.statusbar.setObjectName("statusbar") MainWindow.setStatusBar(self.statusbar) self.menubar = QtWidgets.QMenuBar(MainWindow) self.menubar.setGeometry(QtCore.QRect(0, 0, 988, 21)) self.menubar.setObjectName("menubar") self.menuFichier = QtWidgets.QMenu(self.menubar) self.menuFichier.setObjectName("menuFichier") self.menuAide = QtWidgets.QMenu(self.menubar) self.menuAide.setObjectName("menuAide") MainWindow.setMenuBar(self.menubar) self.menubar.addAction(self.menuFichier.menuAction()) self.menubar.addAction(self.menuAide.menuAction()) self.retranslateUi(MainWindow) QtCore.QMetaObject.connectSlotsByName(MainWindow) def retranslateUi(self, MainWindow): MainWindow.setWindowTitle( QtWidgets.QApplication.translate("MainWindow", "MainWindow", None, -1)) self.lAvanceeTps.setText( QtWidgets.QApplication.translate("MainWindow", "0:00", None, -1)) self.lRestantTps.setText( QtWidgets.QApplication.translate("MainWindow", "0:00", None, -1)) self.pBLecture.setText( QtWidgets.QApplication.translate("MainWindow", "Lecture", None, -1)) self.pBPause.setText( QtWidgets.QApplication.translate("MainWindow", "Pause", None, -1)) self.pBStop.setText( QtWidgets.QApplication.translate("MainWindow", "Stop", None, -1)) self.pBPrecedent.setText( QtWidgets.QApplication.translate("MainWindow", "Précédent", None, -1)) self.pBSuivant.setText( QtWidgets.QApplication.translate("MainWindow", "Suivant", None, -1)) self.label.setText( QtWidgets.QApplication.translate("MainWindow", "Liste de lecture", None, -1)) self.pBAjout.setText( QtWidgets.QApplication.translate("MainWindow", "+", None, -1)) self.pBSupp.setText( QtWidgets.QApplication.translate("MainWindow", "-", None, -1)) self.label_2.setText( QtWidgets.QApplication.translate("MainWindow", "Volume :", None, -1)) self.suiviVol.setText( QtWidgets.QApplication.translate("MainWindow", "TextLabel", None, -1)) self.menuFichier.setTitle( QtWidgets.QApplication.translate("MainWindow", "Fichier", None, -1)) self.menuAide.setTitle( QtWidgets.QApplication.translate("MainWindow", "Aide", None, -1))