diff --git a/Vedio Player.py b/Vedio Player.py new file mode 100644 index 0000000..6a6042a --- /dev/null +++ b/Vedio Player.py @@ -0,0 +1,467 @@ +# Vedio player using pyqt +# Made by Yash Rajput Date : 21-05-2020,Time : 01:55 +import os +import sys +from PyQt5.QtMultimediaWidgets import QVideoWidget +from PyQt5.QtWidgets import * +from PyQt5.QtCore import * +from PyQt5.QtGui import * +from PyQt5.QtMultimedia import * +from demovedio import * +class GUI(QMainWindow): + def __init__(self): + super().__init__() + self.ui=Ui_MainWindow() + self.ui.setupUi(self) + self.setWindowTitle("Video Player") + self.setWindowIcon(QIcon(r"C:\Users\Yash\PycharmProjects\ppppp\App-Media-icon.png")) + self.ui.files.setCheckable(True) + self.setMinimumSize(500,500) + status=QStatusBar(self) + status.setStyleSheet("background-color: rgb(177, 177, 177);") + self.setStatusBar(status) + self.player=QMediaPlayer() + self.player.play() + self.player.error.connect(self.erroralert) + + self.playlist = QMediaPlaylist() + self.ui.play.clicked.connect(self.plays) + self.current=False + self.player.setPlaylist(self.playlist) + self.player.setVolume(30) + self.ui.horizontalSlider_2.setValue(30) + self.videoWidget = QVideoWidget(self) + self.videoWidget.setGeometry(10,300,141,111) + self.videoWidget.setStyleSheet("background-color: rgb(0,0,0);") + self.player.setVideoOutput(self.videoWidget) + + style="""QSlider::groove:horizontal { + border: 1px solid #bbb; + background: black; + height: 10px; + border-radius: 4px; + } + + QSlider::sub-page:horizontal { + background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, + stop: 0 #66e, stop: 1 #bbf); + background: qlineargradient(x1: 0, y1: 0.2, x2: 1, y2: 1, + stop: 0 #bbf, stop: 1 #55f); + border: 1px solid #777; + height: 10px; + border-radius: 4px; + } + + QSlider::add-page:horizontal { + background: #fff; + border: 1px solid #777; + height: 10px; + border-radius: 4px; + } + + QSlider::handle:horizontal { + background: qlineargradient(x1:0, y1:0, x2:1, y2:1, + stop:0 #eee, stop:1 #ccc); + border: 1px solid #777; + width: 13px; + margin-top: -2px; + margin-bottom: -2px; + border-radius: 4px; + } + + QSlider::handle:horizontal:hover { + background: qlineargradient(x1:0, y1:0, x2:1, y2:1, + stop:0 #000, stop:1 #ddd); + border: 1px solid #444; + border-radius: 4px; + } + + QSlider::sub-page:horizontal:disabled { + background: #bbb; + border-color: #999; + } + + QSlider::add-page:horizontal:disabled { + background: #eee; + border-color: #999; + } + + QSlider::handle:horizontal:disabled { + background: #eee; + border: 1px solid #aaa; + border-radius: 4px; + }""" + self.ui.horizontalSlider_3.setMinimum(0) + self.ui.horizontalSlider_3.setMaximum(2) + self.ui.horizontalSlider_3.setValue(1) + self.player.setPlaybackRate(1) + self.ui.horizontalSlider_3.valueChanged.connect(self.volume) + self.ui.horizontalSlider.setStyleSheet(style) + self.ui.horizontalSlider.setPageStep(5) + self.ui.horizontalSlider.setSingleStep(5) + self.ui.play.setToolTip("Play") + self.ui.horizontalSlider_2.valueChanged.connect(self.voice) + self.ui.next.pressed.connect(self.playlist.next) + self.ui.prev.pressed.connect(self.playlist.previous) + self.ui.reset.pressed.connect(self.stop) + self.working=False + self.ui.files.pressed.connect(self.check) + self.ui.sound.pressed.connect(self.voice1) + self.ui.actionIncrease_Sound.triggered.connect(self.voice2) + self.ui.actionDecrease_Sound.triggered.connect(self.voice3) + self.ui.actionSilent_Sound.triggered.connect(self.silent) + self.ui.actionLight_Background.setCheckable(True) + self.ui.actionDark_Background.setCheckable(True) + self.ui.actionLight_Background.setChecked(True) + self.ui.actionLight_Background.toggled.connect(self.background2) + self.ui.actionDark_Background.toggled.connect(self.background1) + self.ui.actionOpen_Folder.triggered.connect(self.open_folder) + self.ui.actionhelp.triggered.connect(self.help) + self.ui.actionabout.triggered.connect(self.about) + #self.ui.files.toggled.connect(self.toggle_viewer) + self.ui.listView.doubleClicked.connect(self.plays) + self.ui.listView.setWindowIcon(QIcon(r"C:\Users\Yash\PycharmProjects\ppppp\App-Media-icon.png")) + self.ui.comboBox.currentTextChanged.connect(self.change) + self.ui.lineEdit.textEdited.connect(self.text_folder) + #self.viewer.state.connect(self.ui.files.setChecked) + self.ui.horizontalSlider.setFocusPolicy(Qt.StrongFocus) + self.ui.horizontalSlider.setSingleStep(2) + self.ui.horizontalSlider.setPageStep(2) + + play=QAction(self) + play.setShortcut("Space") + play.triggered.connect(self.plays) + self.addAction(play) + self.player.durationChanged.connect(self.update_duration) + self.player.positionChanged.connect(self.update_position) + self.list=[] + + self.timer=QTimer(self) + self.timer.timeout.connect(self.time) + self.timer.start(1000) + self.model = PlaylistModel(self.playlist) + self.ui.listView.setModel(self.model) + self.playlist.currentIndexChanged.connect(self.playlist_position_changed) + selection_model = self.ui.listView.selectionModel() + selection_model.selectionChanged.connect(self.playlist_selection_changed) + try: + path=sys.argv[1] + self.playlist.addMedia( + QMediaContent(QUrl.fromLocalFile(path)) + ) + self.model.layoutChanged.emit() + # If not playing, seeking to first of newly added + play. + self.list.append(path) + self.plays() + except: + pass + right_arrow=QAction(self) + right_arrow.setShortcut("Right") + self.addAction(right_arrow) + right_arrow.triggered.connect(self.forward) + super_right=QAction(self) + super_right.setShortcut("Ctrl+Right") + self.addAction(super_right) + super_right.triggered.connect(self.forwards) + left_arrow=QAction(self) + left_arrow.setShortcut("Left") + self.addAction(left_arrow) + left_arrow.triggered.connect(self.backward) + super_left=QAction(self) + super_left.setShortcut("Ctrl+Left") + self.addAction(super_left) + super_left.triggered.connect(self.backwards) + + self.ui.actionOpen_File.triggered.connect(self.open_file) + self.setAcceptDrops(True) + self.show() + + def help(self): + QMessageBox.information(self, "Help", "This is your video player using Python") + + def about(self): + QMessageBox.information(self, "About", "This is the video player made by Yash Rajput") + def backwards(self): + temp=self.player.position()-60000 + if temp>0: + self.player.setPosition(temp) + self.update_position(temp) + else: + temp=0 + self.player.setPosition(temp) + self.update_position(temp) + def forwards(self): + temp=self.player.position()+60000 + if temp0: + self.player.setPosition(temp) + self.update_position(temp) + else: + temp=0 + self.player.setPosition(temp) + self.update_position(temp) + def forward(self): + temp=self.player.position()+30000 + if temp -1: + ix = self.model.index(i) + self.ui.listView.setCurrentIndex(ix) + + def open_file(self): + path, _ = QFileDialog.getOpenFileName(self, "Open file", "", "vedio files(*.264;*.3ga;*.3gp;*.aac;*.avi;*.cda;*.dash;*.dvr;*flac;*.ifo;*.m2t;*.m2ts;*.m3u8;*.m4v;*.mkv;*.mov;*.mp3;*.mp4;*.mpg;*.mts;*.ogg;*.ogu;*.opus;*.pls;*.rec;*.rmvb;*.snd;*.sub;*.ts;*.vob;*.webm;*.wma;*.wmv;*.zab") + if path and path not in self.list: + self.playlist.addMedia( + QMediaContent( + QUrl.fromLocalFile(path) + ) + ) + self.list.append(path) + + self.model.layoutChanged.emit() + self.plays() + def update_duration(self, duration): + self.ui.horizontalSlider.setMaximum(duration) + + if duration >= 0: + self.ui.label_2.setText(self.hhmmss(duration)) + self.time=self.hhmmss(duration) + def update_position(self, position): + if position >= 0: + self.ui.label_14.setText(str(self.hhmmss(position))+"/"+str(self.time)) + self.ui.label_3.setText(self.hhmmss(position)) + # Disable the events to prevent updating triggering a setPosition event (can cause stuttering). + self.ui.horizontalSlider.blockSignals(True) + self.ui.horizontalSlider.setValue(position) + self.ui.horizontalSlider.blockSignals(False) + + def hhmmss(self,ms): + + # s = 1000 + # m = 60000 + # h = 360000 + h, r = divmod(ms,3600000) + m, r = divmod(r,60000) + s, _ = divmod(r,1000) + return ("%d:%02d:%02d" % (h, m, s)) if h else ("%d:%02d" % (m, s)) + def plays(self): + if self.current==False: + self.player.play() + self.ui.play.setIcon(QIcon(r'C:\Users\Yash\PycharmProjects\ppppp\images\Pause-icon.png')) + self.current=True + else: + self.player.pause() + self.ui.play.setIcon(QIcon(r'C:\Users\Yash\PycharmProjects\ppppp\images\Button-Play-icon.png')) + self.current=False + self.videoWidget.setGeometry(0, 21, self.ui.widget.geometry().width(), self.ui.widget.geometry().height()) + self.working = True + def voice(self): + self.player.setVolume(self.ui.horizontalSlider_2.value()) + if self.ui.horizontalSlider_2.value()==0: + self.ui.sound.setIcon(QIcon(r'C:\Users\Yash\PycharmProjects\ppppp\images\Status-audio-volume-muted-icon.png')) + else: + self.ui.sound.setIcon(QIcon(r'C:\Users\Yash\PycharmProjects\ppppp\images\62788-speaker-low-volume-icon.png')) + def voice1(self): + if self.ui.horizontalSlider_2.value()>0: + self.ui.horizontalSlider_2.setValue(0) + self.player.setVolume(self.ui.horizontalSlider_2.value()) + self.ui.sound.setIcon(QIcon(r'C:\Users\Yash\PycharmProjects\ppppp\images\Status-audio-volume-muted-icon.png')) + else: + self.ui.horizontalSlider_2.setValue(30) + self.player.setVolume(self.ui.horizontalSlider_2.value()) + self.ui.sound.setIcon(QIcon(r'C:\Users\Yash\PycharmProjects\ppppp\images\62788-speaker-low-volume-icon.png')) + def voice2(self): + if self.player.volume()<100: + self.player.setVolume(self.player.volume()+1) + self.ui.sound.setIcon( + QIcon(r'C:\Users\Yash\PycharmProjects\ppppp\images\62788-speaker-low-volume-icon.png')) + self.ui.horizontalSlider_2.setValue(self.player.volume()) + def voice3(self): + if self.player.volume()>-1: + self.player.setVolume(self.player.volume()-1) + if self.player.volume()==0: + self.ui.sound.setIcon(QIcon(r'C:\Users\Yash\PycharmProjects\ppppp\images\Status-audio-volume-muted-icon.png')) + self.ui.horizontalSlider_2.setValue(self.player.volume()) + def silent(self): + self.player.setVolume(0) + self.ui.sound.setIcon(QIcon(r'C:\Users\Yash\PycharmProjects\ppppp\images\62788-speaker-low-volume-icon.png')) +class ViewerWindow(QMainWindow): + state = pyqtSignal(bool) + def closeEvent(self, e): + # Emit the window state, to update the viewer toggle button. + self.state.emit(False) + + +class PlaylistModel(QAbstractListModel): + def __init__(self, playlist, *args, **kwargs): + super(PlaylistModel, self).__init__(*args, **kwargs) + self.playlist = playlist + + def data(self, index, role): + if role == Qt.DisplayRole: + media = self.playlist.media(index.row()) + return media.canonicalUrl().fileName() + + def rowCount(self, index): + return self.playlist.mediaCount() +if __name__=="__main__": + app = QApplication(sys.argv) + app.setWindowIcon(QIcon(r'C:\Users\Yash\PycharmProjects\ppppp\App-Media-icon.png')) + w = GUI() + app.setStyle("Fusion") + w.background2() + app.exec_() diff --git a/demovedio.py b/demovedio.py new file mode 100644 index 0000000..4bfa80e --- /dev/null +++ b/demovedio.py @@ -0,0 +1,299 @@ +# -*- coding: utf-8 -*- + +# Form implementation generated from reading ui file 'demovedio.ui' +# +# Created by: PyQt5 UI code generator 5.14.2 +# +# WARNING! All changes made in this file will be lost! + + +from PyQt5 import QtCore, QtGui, QtWidgets + + +class Ui_MainWindow(object): + def setupUi(self, MainWindow): + MainWindow.setObjectName("MainWindow") + MainWindow.resize(693, 593) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) + sizePolicy.setHorizontalStretch(13) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(MainWindow.sizePolicy().hasHeightForWidth()) + MainWindow.setSizePolicy(sizePolicy) + MainWindow.setMinimumSize(QtCore.QSize(25, 0)) + self.centralwidget = QtWidgets.QWidget(MainWindow) + self.centralwidget.setObjectName("centralwidget") + self.widget = QtWidgets.QWidget(self.centralwidget) + self.widget.setGeometry(QtCore.QRect(0, 0, 693, 411)) + self.widget.setObjectName("widget") + self.listView = QtWidgets.QListView(self.widget) + self.listView.setGeometry(QtCore.QRect(150, 0, 541, 411)) + self.listView.setVerticalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOn) + self.listView.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOn) + self.listView.setObjectName("listView") + self.layoutWidget = QtWidgets.QWidget(self.widget) + self.layoutWidget.setGeometry(QtCore.QRect(0, 0, 148, 411)) + self.layoutWidget.setObjectName("layoutWidget") + self.verticalLayout_2 = QtWidgets.QVBoxLayout(self.layoutWidget) + self.verticalLayout_2.setContentsMargins(0, 0, 0, 0) + self.verticalLayout_2.setObjectName("verticalLayout_2") + self.label_9 = QtWidgets.QLabel(self.layoutWidget) + font = QtGui.QFont() + font.setPointSize(13) + self.label_9.setFont(font) + self.label_9.setFrameShape(QtWidgets.QFrame.NoFrame) + self.label_9.setFrameShadow(QtWidgets.QFrame.Sunken) + self.label_9.setLineWidth(4) + self.label_9.setMidLineWidth(2) + self.label_9.setObjectName("label_9") + self.verticalLayout_2.addWidget(self.label_9) + self.lcdNumber = QtWidgets.QLCDNumber(self.layoutWidget) + self.lcdNumber.setObjectName("lcdNumber") + self.verticalLayout_2.addWidget(self.lcdNumber) + self.label = QtWidgets.QLabel(self.layoutWidget) + font = QtGui.QFont() + font.setPointSize(13) + self.label.setFont(font) + self.label.setFrameShape(QtWidgets.QFrame.NoFrame) + self.label.setFrameShadow(QtWidgets.QFrame.Sunken) + self.label.setLineWidth(4) + self.label.setMidLineWidth(2) + self.label.setObjectName("label") + self.verticalLayout_2.addWidget(self.label) + self.lineEdit = QtWidgets.QLineEdit(self.layoutWidget) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.lineEdit.sizePolicy().hasHeightForWidth()) + self.lineEdit.setSizePolicy(sizePolicy) + self.lineEdit.setCursorMoveStyle(QtCore.Qt.LogicalMoveStyle) + self.lineEdit.setClearButtonEnabled(True) + self.lineEdit.setObjectName("lineEdit") + self.verticalLayout_2.addWidget(self.lineEdit) + self.label_8 = QtWidgets.QLabel(self.layoutWidget) + font = QtGui.QFont() + font.setPointSize(13) + self.label_8.setFont(font) + self.label_8.setFrameShape(QtWidgets.QFrame.NoFrame) + self.label_8.setFrameShadow(QtWidgets.QFrame.Sunken) + self.label_8.setLineWidth(4) + self.label_8.setMidLineWidth(2) + self.label_8.setObjectName("label_8") + self.verticalLayout_2.addWidget(self.label_8) + self.comboBox = QtWidgets.QComboBox(self.layoutWidget) + self.comboBox.setObjectName("comboBox") + self.comboBox.addItem("") + self.comboBox.addItem("") + self.verticalLayout_2.addWidget(self.comboBox) + self.label_10 = QtWidgets.QLabel(self.layoutWidget) + font = QtGui.QFont() + font.setPointSize(13) + self.label_10.setFont(font) + self.label_10.setFrameShape(QtWidgets.QFrame.NoFrame) + self.label_10.setFrameShadow(QtWidgets.QFrame.Sunken) + self.label_10.setLineWidth(4) + self.label_10.setMidLineWidth(2) + self.label_10.setObjectName("label_10") + self.verticalLayout_2.addWidget(self.label_10) + self.horizontalSlider_3 = QtWidgets.QSlider(self.layoutWidget) + self.horizontalSlider_3.setProperty("value", 50) + self.horizontalSlider_3.setOrientation(QtCore.Qt.Horizontal) + self.horizontalSlider_3.setInvertedAppearance(False) + self.horizontalSlider_3.setInvertedControls(False) + self.horizontalSlider_3.setTickPosition(QtWidgets.QSlider.TicksBelow) + self.horizontalSlider_3.setTickInterval(15) + self.horizontalSlider_3.setObjectName("horizontalSlider_3") + self.verticalLayout_2.addWidget(self.horizontalSlider_3) + spacerItem = QtWidgets.QSpacerItem(20, 0, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) + self.verticalLayout_2.addItem(spacerItem) + self.widget_2 = QtWidgets.QWidget(self.centralwidget) + self.widget_2.setGeometry(QtCore.QRect(0, 420, 693, 31)) + self.widget_2.setObjectName("widget_2") + self.horizontalSlider = QtWidgets.QSlider(self.widget_2) + self.horizontalSlider.setGeometry(QtCore.QRect(30, 0, 631, 31)) + self.horizontalSlider.setOrientation(QtCore.Qt.Horizontal) + self.horizontalSlider.setTickPosition(QtWidgets.QSlider.TicksBothSides) + self.horizontalSlider.setObjectName("horizontalSlider") + self.label_3 = QtWidgets.QLabel(self.widget_2) + self.label_3.setGeometry(QtCore.QRect(0, 0, 51, 31)) + self.label_3.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignVCenter) + self.label_3.setObjectName("label_3") + self.label_2 = QtWidgets.QLabel(self.widget_2) + self.label_2.setGeometry(QtCore.QRect(660, 0, 31, 31)) + self.label_2.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) + self.label_2.setObjectName("label_2") + self.widget_3 = QtWidgets.QWidget(self.centralwidget) + self.widget_3.setGeometry(QtCore.QRect(0, 460, 693, 31)) + self.widget_3.setObjectName("widget_3") + self.play = QtWidgets.QPushButton(self.widget_3) + self.play.setGeometry(QtCore.QRect(0, 0, 28, 24)) + self.play.setStatusTip("") + self.play.setText("") + icon = QtGui.QIcon() + icon.addPixmap(QtGui.QPixmap(r"C:\Users\Yash\PycharmProjects\ppppp\images\Button-Play-icon.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) + self.play.setIcon(icon) + self.play.setObjectName("play") + self.prev = QtWidgets.QPushButton(self.widget_3) + self.prev.setGeometry(QtCore.QRect(40, 0, 28, 24)) + self.prev.setText("") + icon1 = QtGui.QIcon() + icon1.addPixmap(QtGui.QPixmap(r"C:\Users\Yash\PycharmProjects\ppppp\images\Fast-backward-icon.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) + self.prev.setIcon(icon1) + self.prev.setObjectName("prev") + self.reset = QtWidgets.QPushButton(self.widget_3) + self.reset.setGeometry(QtCore.QRect(80, 0, 28, 24)) + self.reset.setText("") + icon2 = QtGui.QIcon() + icon2.addPixmap(QtGui.QPixmap(r"C:\Users\Yash\PycharmProjects\ppppp\images\control-stop-square.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) + self.reset.setIcon(icon2) + self.reset.setObjectName("reset") + self.next = QtWidgets.QPushButton(self.widget_3) + self.next.setGeometry(QtCore.QRect(120, 0, 28, 24)) + self.next.setText("") + icon3 = QtGui.QIcon() + icon3.addPixmap(QtGui.QPixmap(r"C:\Users\Yash\PycharmProjects\ppppp\images\Fast-forward-icon.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) + self.next.setIcon(icon3) + self.next.setObjectName("next") + self.files = QtWidgets.QPushButton(self.widget_3) + self.files.setGeometry(QtCore.QRect(160, 0, 28, 24)) + self.files.setText("") + icon4 = QtGui.QIcon() + icon4.addPixmap(QtGui.QPixmap(r"C:\Users\Yash\PycharmProjects\ppppp\images\application-image.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) + self.files.setIcon(icon4) + self.files.setCheckable(True) + self.files.setObjectName("files") + self.sound = QtWidgets.QPushButton(self.widget_3) + self.sound.setGeometry(QtCore.QRect(540, 0, 28, 24)) + self.sound.setText("") + icon5 = QtGui.QIcon() + icon5.addPixmap(QtGui.QPixmap(r"C:\Users\Yash\PycharmProjects\ppppp\images\62788-speaker-low-volume-icon.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) + self.sound.setIcon(icon5) + self.sound.setObjectName("sound") + self.horizontalSlider_2 = QtWidgets.QSlider(self.widget_3) + self.horizontalSlider_2.setGeometry(QtCore.QRect(580, 0, 108, 31)) + self.horizontalSlider_2.setOrientation(QtCore.Qt.Horizontal) + self.horizontalSlider_2.setObjectName("horizontalSlider_2") + self.widget_4 = QtWidgets.QWidget(self.centralwidget) + self.widget_4.setGeometry(QtCore.QRect(0, 500, 693, 21)) + font = QtGui.QFont() + font.setPointSize(11) + self.widget_4.setFont(font) + self.widget_4.setObjectName("widget_4") + self.label_5 = QtWidgets.QLabel(self.widget_4) + self.label_5.setGeometry(QtCore.QRect(0, 0, 611, 21)) + sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) + sizePolicy.setHorizontalStretch(1) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.label_5.sizePolicy().hasHeightForWidth()) + self.label_5.setSizePolicy(sizePolicy) + font = QtGui.QFont() + font.setPointSize(11) + self.label_5.setFont(font) + self.label_5.setFrameShape(QtWidgets.QFrame.Box) + self.label_5.setText("") + self.label_5.setObjectName("label_5") + self.label_14 = QtWidgets.QLabel(self.widget_4) + self.label_14.setGeometry(QtCore.QRect(620, 0, 71, 21)) + self.label_14.setObjectName("label_14") + MainWindow.setCentralWidget(self.centralwidget) + self.menubar = QtWidgets.QMenuBar(MainWindow) + self.menubar.setGeometry(QtCore.QRect(0, 0, 693, 21)) + self.menubar.setObjectName("menubar") + self.menuFile = QtWidgets.QMenu(self.menubar) + self.menuFile.setObjectName("menuFile") + self.menuEdit = QtWidgets.QMenu(self.menubar) + self.menuEdit.setObjectName("menuEdit") + self.help=QtWidgets.QMenu(self.menubar) + self.help.setObjectName("help") + self.menuBackground = QtWidgets.QMenu(self.menuEdit) + self.menuBackground.setObjectName("menuBackground") + MainWindow.setMenuBar(self.menubar) + self.statusbar = QtWidgets.QStatusBar(MainWindow) + self.statusbar.setObjectName("statusbar") + MainWindow.setStatusBar(self.statusbar) + self.actionBack = QtWidgets.QAction(MainWindow) + icon6 = QtGui.QIcon() + icon6.addPixmap(QtGui.QPixmap(r"C:\Users\Yash\PycharmProjects\ppppp\images\Fast-backward-icon.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) + self.actionBack.setIcon(icon6) + self.actionBack.setObjectName("actionBack") + self.actionOpen_File = QtWidgets.QAction(MainWindow) + self.actionOpen_File.setObjectName("actionOpen_File") + self.actionOpen_Folder = QtWidgets.QAction(MainWindow) + self.actionOpen_Folder.setObjectName("actionOpen_Folder") + self.actionDark_Background = QtWidgets.QAction(MainWindow) + self.actionDark_Background.setObjectName("actionDark_Background") + self.actionLight_Background = QtWidgets.QAction(MainWindow) + self.actionLight_Background.setObjectName("actionLight_Background") + self.actionIncrease_Sound = QtWidgets.QAction(MainWindow) + icon7 = QtGui.QIcon() + icon7.addPixmap(QtGui.QPixmap(r"C:\Users\Yash\PycharmProjects\ppppp\images\62788-speaker-low-volume-icon.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) + self.actionIncrease_Sound.setIcon(icon7) + self.actionIncrease_Sound.setObjectName("actionIncrease_Sound") + self.actionDecrease_Sound = QtWidgets.QAction(MainWindow) + self.actionDecrease_Sound.setObjectName("actionDecrease_Sound") + self.actionSilent_Sound = QtWidgets.QAction(MainWindow) + icon8 = QtGui.QIcon() + icon8.addPixmap(QtGui.QPixmap(r"C:\Users\Yash\PycharmProjects\ppppp\images\Status-audio-volume-muted-icon.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) + self.actionSilent_Sound.setIcon(icon8) + self.actionSilent_Sound.setObjectName("actionSilent_Sound") + self.actionhelp=QtWidgets.QAction(MainWindow) + self.actionhelp.setObjectName("actionhelp") + self.actionabout=QtWidgets.QAction(MainWindow) + self.actionabout.setObjectName("actionabout") + self.menuFile.addAction(self.actionOpen_File) + self.menuFile.addAction(self.actionOpen_Folder) + self.menuBackground.addAction(self.actionDark_Background) + self.menuBackground.addAction(self.actionLight_Background) + self.menuEdit.addAction(self.menuBackground.menuAction()) + self.menuEdit.addAction(self.actionIncrease_Sound) + self.menuEdit.addAction(self.actionDecrease_Sound) + self.menuEdit.addAction(self.actionSilent_Sound) + self.menubar.addAction(self.menuFile.menuAction()) + self.menubar.addAction(self.menuEdit.menuAction()) + self.help.addAction(self.actionhelp) + self.help.addAction(self.actionabout) + self.menubar.addAction(self.help.menuAction()) + self.retranslateUi(MainWindow) + QtCore.QMetaObject.connectSlotsByName(MainWindow) + + def retranslateUi(self, MainWindow): + _translate = QtCore.QCoreApplication.translate + MainWindow.setWindowTitle(_translate("MainWindow", "MainWindow")) + self.label_9.setText(_translate("MainWindow", "Time:")) + self.label.setText(_translate("MainWindow", "Search:")) + self.lineEdit.setToolTip(_translate("MainWindow", "Search Bar")) + self.label_8.setText(_translate("MainWindow", "Change View:")) + self.comboBox.setToolTip(_translate("MainWindow", "List View Mode")) + self.comboBox.setItemText(0, _translate("MainWindow", "View Mode")) + self.comboBox.setItemText(1, _translate("MainWindow", "Icon Mode")) + self.label_10.setText(_translate("MainWindow", "Current Play Speed:")) + self.label_3.setText(_translate("MainWindow", "00:00:00")) + self.label_2.setText(_translate("MainWindow", "00:00:00")) + self.play.setToolTip(_translate("MainWindow", "Play and Pause the media")) + self.prev.setToolTip(_translate("MainWindow", "Previous vedio")) + self.reset.setToolTip(_translate("MainWindow", "Stop PlayBack")) + self.next.setToolTip(_translate("MainWindow", "Next vedio")) + self.files.setToolTip(_translate("MainWindow", "Toggle Playlist")) + self.sound.setToolTip(_translate("MainWindow", "Volume icon")) + self.horizontalSlider_2.setToolTip(_translate("MainWindow", "Volume")) + self.label_5.setToolTip(_translate("MainWindow", "Status")) + self.label_14.setText(_translate("MainWindow", "--:--:--/--:--:--")) + self.menuFile.setTitle(_translate("MainWindow", "File")) + self.menuEdit.setTitle(_translate("MainWindow", "Edit")) + + self.help.setTitle(_translate("MainWindow","Help")) + self.menuBackground.setTitle(_translate("MainWindow", "Background")) + self.actionBack.setText(_translate("MainWindow", "Back")) + self.actionBack.setShortcut(_translate("MainWindow", "Left")) + self.actionOpen_File.setText(_translate("MainWindow", "Open File")) + self.actionOpen_File.setShortcut(_translate("MainWindow", "Ctrl+O")) + self.actionOpen_Folder.setText(_translate("MainWindow", "Open Folder")) + self.actionOpen_Folder.setShortcut(_translate("MainWindow", "Alt+Shift+O")) + self.actionDark_Background.setText(_translate("MainWindow", "Dark Background")) + self.actionLight_Background.setText(_translate("MainWindow", "Light Background")) + self.actionIncrease_Sound.setText(_translate("MainWindow", "Increase Sound")) + self.actionIncrease_Sound.setShortcut(_translate("MainWindow", "Up")) + self.actionDecrease_Sound.setText(_translate("MainWindow", "Decrease Sound")) + self.actionDecrease_Sound.setShortcut(_translate("MainWindow", "Down")) + self.actionSilent_Sound.setText(_translate("MainWindow", "Silent Sound")) + self.actionhelp.setText(_translate("MainWindow","Help")) + self.actionabout.setText(_translate("MainWindow","About"))