def upload(self): from upload import MyMainWindow print("continue") self.Window = QtWidgets.QMainWindow() self.ui = MyMainWindow() self.ui.setupUi(self.Window) self.Window.show()
def cplaylist(self): from createplaylist import Ui_cplaylist from settings import Ui_settings self.Window = QtWidgets.QMainWindow() self.ui = Ui_cplaylist() self.ui.setupUi(self.Window) self.Window.show()
def settings(self): from settings import Ui_settings self.Window = QtWidgets.QMainWindow() self.ui = Ui_settings() self.ui.setupUi(self.Window) self.Window.show()
def search(self): from searchbysong import Ui_search self.Window = QtWidgets.QMainWindow() self.ui = Ui_search() self.ui.setupUi(self.Window) self.Window.show()
def uplaylist(self): from yourplaylist import Ui_userplaylist self.Window = QtWidgets.QMainWindow() self.ui = Ui_userplaylist() self.ui.setupUi(self.Window) self.Window.show()
def home(self): from home import Ui_home self.Window = QtWidgets.QMainWindow() self.ui = Ui_home() self.ui.setupUi(self.Window) self.Window.show()
class Ui_userplaylist(object): def home(self): from home import Ui_home self.Window = QtWidgets.QMainWindow() self.ui = Ui_home() self.ui.setupUi(self.Window) self.Window.show() def uplaylist(self): from yourplaylist import Ui_userplaylist self.Window = QtWidgets.QMainWindow() self.ui = Ui_userplaylist() self.ui.setupUi(self.Window) self.Window.show() def cplaylist(self): from createplaylist import Ui_cplaylist from settings import Ui_settings self.Window = QtWidgets.QMainWindow() self.ui = Ui_cplaylist() self.ui.setupUi(self.Window) self.Window.show() def search(self): from searchbysong import Ui_search self.Window = QtWidgets.QMainWindow() self.ui = Ui_search() self.ui.setupUi(self.Window) self.Window.show() def settings(self): from settings import Ui_settings self.Window = QtWidgets.QMainWindow() self.ui = Ui_settings() self.ui.setupUi(self.Window) self.Window.show() def upload(self): from upload import MyMainWindow self.Window = QtWidgets.QMainWindow() self.ui = MyMainWindow() self.ui.setupUi(self.Window) self.Window.show() def setupUi(self, MainWindow): MainWindow.setObjectName("MainWindow") MainWindow.resize(800, 600) self.centralwidget = QtWidgets.QWidget(MainWindow) self.centralwidget.setObjectName("centralwidget") self.label_4 = QtWidgets.QLabel(self.centralwidget) self.label_4.setGeometry(QtCore.QRect(160, 39, 261, 71)) font = QtGui.QFont() font.setFamily("Arial Black") font.setPointSize(14) font.setBold(True) font.setWeight(75) self.label_4.setFont(font) self.label_4.setStyleSheet("alternate-background-color: rgb(85, 170, 255);") self.label_4.setObjectName("label_4") self.label_6 = QtWidgets.QLabel(self.centralwidget) self.label_6.setGeometry(QtCore.QRect(200, 190, 481, 71)) font = QtGui.QFont() font.setFamily("Arial Black") font.setPointSize(14) font.setBold(True) font.setWeight(75) self.label_6.setFont(font) self.label_6.setStyleSheet("alternate-background-color: rgb(85, 170, 255);") self.label_6.setObjectName("label_6") self.pushButton_7 = QtWidgets.QPushButton(self.centralwidget) self.pushButton_7.setGeometry(QtCore.QRect(320, 480, 121, 51)) font = QtGui.QFont() font.setFamily("Arial Rounded MT Bold") font.setPointSize(11) self.pushButton_7.setFont(font) self.pushButton_7.setStyleSheet("background-color: rgb(255, 255, 255);") self.pushButton_7.setObjectName("pushButton_7") self.pushButton_6 = QtWidgets.QPushButton(self.centralwidget) self.pushButton_6.setGeometry(QtCore.QRect(0, 460, 151, 121)) font = QtGui.QFont() font.setFamily("Arial Rounded MT Bold") font.setPointSize(11) self.pushButton_6.setFont(font) self.pushButton_6.setStyleSheet("") self.pushButton_6.setText("") icon = QtGui.QIcon() icon.addPixmap(QtGui.QPixmap("../../createplaylist.jpeg"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.pushButton_6.setIcon(icon) self.pushButton_6.setIconSize(QtCore.QSize(220, 113)) self.pushButton_6.setObjectName("pushButton_6") self.lineEdit_2 = QtWidgets.QLineEdit(self.centralwidget) self.lineEdit_2.setGeometry(QtCore.QRect(440, 59, 341, 41)) self.lineEdit_2.setObjectName("lineEdit_2") self.pushButton = QtWidgets.QPushButton(self.centralwidget) self.pushButton.setGeometry(QtCore.QRect(0, 0, 151, 71)) self.pushButton.setStyleSheet("background-color: rgb(255, 255, 255);") self.pushButton.setText("") icon1 = QtGui.QIcon() icon1.addPixmap(QtGui.QPixmap("../../home.jpeg"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.pushButton.setIcon(icon1) self.pushButton.setIconSize(QtCore.QSize(150, 78)) self.pushButton.setAutoDefault(True) self.pushButton.setDefault(False) self.pushButton.setObjectName("pushButton") self.line = QtWidgets.QFrame(self.centralwidget) self.line.setGeometry(QtCore.QRect(132, 0, 41, 581)) self.line.setFrameShape(QtWidgets.QFrame.VLine) self.line.setFrameShadow(QtWidgets.QFrame.Sunken) self.line.setObjectName("line") self.pushButton_8 = QtWidgets.QPushButton(self.centralwidget) self.pushButton_8.setGeometry(QtCore.QRect(0, 140, 151, 81)) font = QtGui.QFont() font.setPointSize(11) self.pushButton_8.setFont(font) self.pushButton_8.setText("") icon2 = QtGui.QIcon() icon2.addPixmap(QtGui.QPixmap("../../settings.jpeg"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.pushButton_8.setIcon(icon2) self.pushButton_8.setIconSize(QtCore.QSize(150, 78)) self.pushButton_8.setAutoDefault(True) self.pushButton_8.setDefault(True) self.pushButton_8.setFlat(True) self.pushButton_8.setObjectName("pushButton_8") self.pushButton_4 = QtWidgets.QPushButton(self.centralwidget) self.pushButton_4.setGeometry(QtCore.QRect(410, 130, 121, 51)) font = QtGui.QFont() font.setFamily("Arial Rounded MT Bold") font.setPointSize(11) self.pushButton_4.setFont(font) self.pushButton_4.setStyleSheet("background-color: rgb(255, 255, 255);") self.pushButton_4.setObjectName("pushButton_4") self.pushButton_2 = QtWidgets.QPushButton(self.centralwidget) self.pushButton_2.setGeometry(QtCore.QRect(0, 70, 151, 71)) self.pushButton_2.setMouseTracking(False) self.pushButton_2.setStyleSheet("background-color: rgb(85, 170, 255);") self.pushButton_2.setText("") icon3 = QtGui.QIcon() icon3.addPixmap(QtGui.QPixmap("../../search.jpeg"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.pushButton_2.setIcon(icon3) self.pushButton_2.setIconSize(QtCore.QSize(150, 78)) self.pushButton_2.setCheckable(False) self.pushButton_2.setAutoDefault(True) self.pushButton_2.setDefault(True) self.pushButton_2.setFlat(True) self.pushButton_2.setObjectName("pushButton_2") self.label = QtWidgets.QLabel(self.centralwidget) self.label.setGeometry(QtCore.QRect(0, 210, 151, 61)) font = QtGui.QFont() font.setFamily("Arial Rounded MT Bold") font.setPointSize(12) self.label.setFont(font) self.label.setStyleSheet("background-color: rgb(216, 216, 216);") self.label.setPixmap(QtGui.QPixmap("../../library.jpeg")) self.label.setScaledContents(True) self.label.setWordWrap(True) self.label.setOpenExternalLinks(True) self.label.setObjectName("label") self.label_5 = QtWidgets.QLabel(self.centralwidget) self.label_5.setGeometry(QtCore.QRect(0, -1, 151, 581)) self.label_5.setStyleSheet("background-color: rgb(255, 255, 255);") self.label_5.setText("") self.label_5.setObjectName("label_5") self.pushButton_3 = QtWidgets.QPushButton(self.centralwidget) self.pushButton_3.setGeometry(QtCore.QRect(0, 260, 151, 121)) font = QtGui.QFont() font.setFamily("Arial Rounded MT Bold") font.setPointSize(10) self.pushButton_3.setFont(font) self.pushButton_3.setStyleSheet("background-color: rgb(255, 255, 255);") self.pushButton_3.setText("") icon4 = QtGui.QIcon() icon4.addPixmap(QtGui.QPixmap("../../upload.jpeg"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.pushButton_3.setIcon(icon4) self.pushButton_3.setIconSize(QtCore.QSize(215, 106)) self.pushButton_3.setObjectName("pushButton_3") self.label_3 = QtWidgets.QLabel(self.centralwidget) self.label_3.setGeometry(QtCore.QRect(10, 0, 801, 611)) font = QtGui.QFont() font.setPointSize(10) self.label_3.setFont(font) self.label_3.setStyleSheet("background-color: rgb(255, 255, 255);") self.label_3.setText("") self.label_3.setPixmap(QtGui.QPixmap("../../background.jpeg")) self.label_3.setScaledContents(True) self.label_3.setObjectName("label_3") self.listWidget = QtWidgets.QListWidget(self.centralwidget) self.listWidget.setGeometry(QtCore.QRect(200, 250, 561, 211)) self.listWidget.setObjectName("listWidget") self.pushButton_5 = QtWidgets.QPushButton(self.centralwidget) self.pushButton_5.setGeometry(QtCore.QRect(0, 370, 151, 111)) font = QtGui.QFont() font.setFamily("Arial Rounded MT Bold") font.setPointSize(11) self.pushButton_5.setFont(font) self.pushButton_5.setStyleSheet("background-color: rgb(255, 255, 255);") self.pushButton_5.setText("") icon5 = QtGui.QIcon() icon5.addPixmap(QtGui.QPixmap("../../yourplaylist.jpeg"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.pushButton_5.setIcon(icon5) self.pushButton_5.setIconSize(QtCore.QSize(200, 106)) self.pushButton_5.setObjectName("pushButton_5") self.pushButton_9 = QtWidgets.QPushButton(self.centralwidget) self.pushButton_9.setGeometry(QtCore.QRect(490, 480, 121, 51)) font = QtGui.QFont() font.setFamily("Arial Rounded MT Bold") font.setPointSize(11) self.pushButton_9.setFont(font) self.pushButton_9.setStyleSheet("background-color: rgb(255, 255, 255);") self.pushButton_9.setObjectName("pushButton_9") self.label_3.raise_() self.label_5.raise_() self.label_4.raise_() self.label_6.raise_() self.pushButton_7.raise_() self.pushButton_6.raise_() self.lineEdit_2.raise_() self.pushButton.raise_() self.line.raise_() self.pushButton_8.raise_() self.pushButton_4.raise_() self.pushButton_2.raise_() self.pushButton_3.raise_() self.listWidget.raise_() self.pushButton_5.raise_() self.label.raise_() self.pushButton_9.raise_() MainWindow.setCentralWidget(self.centralwidget) self.menubar = QtWidgets.QMenuBar(MainWindow) self.menubar.setGeometry(QtCore.QRect(0, 0, 800, 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) self.pushButton.clicked.connect(self.displaylist) self.listWidget.itemDoubleClicked.connect(self.selectsong) self.pushButton_7.clicked.connect(self.playsong) self.pushButton_5.clicked.connect(self.uplaylist) self.pushButton_9.clicked.connect(self.pausesong) self.pushButton_2.clicked.connect(self.search) self.pushButton_8.clicked.connect(self.settings) self.pushButton_6.clicked.connect(self.cplaylist) self.pushButton_3.clicked.connect(self.upload) self.pushButton.clicked.connect(self.home) self.pushButton_4.clicked.connect(self.displaylist) def displaylist(self): global i pname = self.lineEdit_2.text() while (i < 10): users_by_name = db.child("PLAYLIST").child(pname).child(i).child("Song Name").get() i += 1 s1 = users_by_name.val() self.listWidget.addItem(s1) def selectsong(self): global player s = self.listWidget.currentItem().text() import vlc s1 = s + ".mp3" links = storage.child(s1).get_url(None) player = vlc.MediaPlayer(links) def pausesong(self): player.pause() def playsong(self): player.play() def retranslateUi(self, MainWindow): _translate = QtCore.QCoreApplication.translate MainWindow.setWindowTitle(_translate("MainWindow", "MainWindow")) self.label_4.setText(_translate("MainWindow", "Enter playlist name")) self.label_6.setText(_translate("MainWindow", "The songs in your playlist are")) self.pushButton_7.setText(_translate("MainWindow", "Play")) self.pushButton_4.setText(_translate("MainWindow", "Done")) self.pushButton_9.setText(_translate("MainWindow", "Pause"))
class Ui_details(object): def upload(self): from upload import MyMainWindow self.Window = QtWidgets.QMainWindow() self.ui = MyMainWindow() self.ui.setupUi(self.Window) self.Window.show() def setupUi(self, MainWindow): MainWindow.setObjectName("MainWindow") MainWindow.resize(800, 600) self.centralwidget = QtWidgets.QWidget(MainWindow) self.centralwidget.setObjectName("centralwidget") self.label_2 = QtWidgets.QLabel(self.centralwidget) self.label_2.setGeometry(QtCore.QRect(230, 80, 181, 31)) font = QtGui.QFont() font.setFamily("Arial Rounded MT Bold") font.setPointSize(11) self.label_2.setFont(font) self.label_2.setObjectName("label_2") self.lineEdit = QtWidgets.QLineEdit(self.centralwidget) self.lineEdit.setGeometry(QtCore.QRect(470, 80, 211, 31)) self.lineEdit.setObjectName("lineEdit") self.lineEdit_4 = QtWidgets.QLineEdit(self.centralwidget) self.lineEdit_4.setGeometry(QtCore.QRect(470, 230, 211, 31)) self.lineEdit_4.setObjectName("lineEdit_4") self.lineEdit_5 = QtWidgets.QLineEdit(self.centralwidget) self.lineEdit_5.setGeometry(QtCore.QRect(470, 280, 211, 31)) self.lineEdit_5.setObjectName("lineEdit_5") self.lineEdit_2 = QtWidgets.QLineEdit(self.centralwidget) self.lineEdit_2.setGeometry(QtCore.QRect(470, 130, 211, 31)) self.lineEdit_2.setObjectName("lineEdit_2") self.label_3 = QtWidgets.QLabel(self.centralwidget) self.label_3.setGeometry(QtCore.QRect(230, 280, 221, 31)) font = QtGui.QFont() font.setFamily("Arial Rounded MT Bold") font.setPointSize(11) self.label_3.setFont(font) self.label_3.setObjectName("label_3") self.label_6 = QtWidgets.QLabel(self.centralwidget) self.label_6.setGeometry(QtCore.QRect(230, 230, 211, 31)) font = QtGui.QFont() font.setFamily("Arial Rounded MT Bold") font.setPointSize(11) self.label_6.setFont(font) self.label_6.setObjectName("label_6") self.label = QtWidgets.QLabel(self.centralwidget) self.label.setGeometry(QtCore.QRect(0, 0, 811, 601)) self.label.setStyleSheet("background-color: rgb(52, 105, 157);") self.label.setText("") self.label.setObjectName("label") self.lineEdit_3 = QtWidgets.QLineEdit(self.centralwidget) self.lineEdit_3.setGeometry(QtCore.QRect(470, 180, 211, 31)) self.lineEdit_3.setObjectName("lineEdit_3") self.label_4 = QtWidgets.QLabel(self.centralwidget) self.label_4.setGeometry(QtCore.QRect(230, 180, 231, 31)) font = QtGui.QFont() font.setFamily("Arial Rounded MT Bold") font.setPointSize(11) self.label_4.setFont(font) self.label_4.setObjectName("label_4") self.label_5 = QtWidgets.QLabel(self.centralwidget) self.label_5.setGeometry(QtCore.QRect(230, 130, 211, 31)) font = QtGui.QFont() font.setFamily("Arial Rounded MT Bold") font.setPointSize(11) self.label_5.setFont(font) self.label_5.setObjectName("label_5") self.pushButton = QtWidgets.QPushButton(self.centralwidget) self.pushButton.setGeometry(QtCore.QRect(440, 360, 61, 31)) font = QtGui.QFont() font.setFamily("Arial Rounded MT Bold") font.setPointSize(10) self.pushButton.setFont(font) self.pushButton.setStyleSheet("background-color: rgb(255, 255, 255);") self.pushButton.setObjectName("pushButton") self.label.raise_() self.label_2.raise_() self.lineEdit.raise_() self.lineEdit_4.raise_() self.lineEdit_5.raise_() self.lineEdit_2.raise_() self.label_3.raise_() self.label_6.raise_() self.lineEdit_3.raise_() self.label_4.raise_() self.label_5.raise_() self.pushButton.raise_() MainWindow.setCentralWidget(self.centralwidget) self.menubar = QtWidgets.QMenuBar(MainWindow) self.menubar.setGeometry(QtCore.QRect(0, 0, 800, 18)) 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) self.pushButton.clicked.connect(self.upload) def retranslateUi(self, MainWindow): _translate = QtCore.QCoreApplication.translate MainWindow.setWindowTitle(_translate("MainWindow", "MainWindow")) self.label_2.setText(_translate("MainWindow", "Song name")) self.label_3.setText(_translate("MainWindow", "Genre")) self.label_6.setText(_translate("MainWindow", "Year")) self.label_4.setText(_translate("MainWindow", "Artist")) self.label_5.setText(_translate("MainWindow", "Album")) self.pushButton.setText(_translate("MainWindow", "Ok"))