Exemplo n.º 1
0
 def __init__(self, parent=None):
     super(yindao_gui, self).__init__(parent)
     super().setupUi(self)
     self.pushButton.clicked.connect(self.enter_main)
     self.mongo = mongo_process.process_data()
     self.setStyleSheet('''
                     #MainWindow{border-image:url(tubiao//beijing.jpg)};
                     background:transparent;
     ''')
     self.setWindowTitle('个性化音乐推荐')
     self.setWindowIcon(QtGui.QIcon('tubiao//icon.png'))
     self.setWindowOpacity(0.9)  # 设置窗口透明度
     self.label_1.setStyleSheet("color:white")
     self.pushButton.setStyleSheet('''QPushButton{
                          color:white;
                          border-radius:10px;
                          background:#2ba3ff;}
                          QPushButton:hover{
                          color:white;
                          background:#156fff;}
                          QPushButton:pressed{
                          font:Bold;}
     ''')
     style_lists = self.mongo.get_all_style()
     self.comboBox.addItem('')
     for style in style_lists:
         self.comboBox.addItem(style)
     self.style_list = []
     self.comboBox.currentIndexChanged.connect(self.show_style)
Exemplo n.º 2
0
 def __init__(self, parent=None):
     super(yindao_gui, self).__init__(parent)
     super().setupUi(self)
     self.pushButton.clicked.connect(self.enter_main)
     self.mongo = mongo_process.process_data()
     style_lists = self.mongo.get_all_style()
     self.comboBox.addItem('')
     for style in style_lists:
         self.comboBox.addItem(style)
     self.style_list = []
     self.comboBox.currentIndexChanged.connect(self.show_style)
Exemplo n.º 3
0
 def __init__(self, parent=None):
     super(registered_gui, self).__init__(parent)
     super().setupUi(self)
     self.mongo = mongo_process.process_data()
     self.pushButton.clicked.connect(self.zhuce)
     self.lineEdit_2.setEchoMode(QLineEdit.Password)
     self.setWindowOpacity(0.9)  # 设置窗口透明度
     self.setAttribute(QtCore.Qt.WA_TranslucentBackground)  # 设置窗口背景透明
     self.set_label(self.label)
     self.set_label(self.label_2)
     self.set_label(self.label_3)
     self.statusbar.setStyleSheet("color:white")
     self.setWindowTitle('音乐播放器')
Exemplo n.º 4
0
def get_all_singer_url():
    client = MongoClient()
    my_software = client['singer']
    sing_url = my_software['sing_url']
    mongo=mongo_process.process_data()
    songs=mongo.song.find()
    singer_list=[]
    for song in songs:
        singer_list.append(song['author'])
    singer_list=list(set(singer_list))
    for singer in singer_list:
        data=sing_url.find_one({'name':singer})
        if(data==None):
            print(singer)
            url=get_url_sing(singer)
            sing_url.insert_one({"name":singer,'url':url})
            time.sleep(3)
Exemplo n.º 5
0
    def __init__(self,parent=None):
        super(main_gui,self).__init__(parent)
        super().setupUi(self)
        self.music_count = 0
        self.mongo = mongo_process.process_data()
        self.set_recommend()
        self.set_process_bar()
        self.setWindowTitle('个性化音乐推荐')
        self.setWindowIcon(QtGui.QIcon('tubiao//icon.png'))
        self.setWindowOpacity(0.9)  # 设置窗口透明度
        self.setStyleSheet('''
                        #MainWindow{border-image:url(tubiao//beijing.jpg)};
                        background:transparent;
        ''')

        self.img_label.setPixmap(QPixmap('tubiao//gedan.png'))
        self.sousuo.clicked.connect(self.find_music_singer)
        self.sousuo_input.returnPressed.connect(self.find_music_singer)
        self.sousuo.setIcon(qtawesome.icon('fa.search',color='white'))
        self.sousuo.setStyleSheet("border:none")
        self.sousuo_input.setPlaceholderText("搜索音乐,歌手,音乐类型")
        self.sousuo_input.setStyleSheet(
                          '''QLineEdit{
                             border:1px solid gray;
                             width:300px;
                             border-radius:10px;
                             padding:2px 4px;
                             background:transparent;
                             color:white;}
                               ''')
        self.set_background_style(self.music_form)
        self.set_background_style(self.scrollAreaWidgetContents_2)
        self.set_background_style(self.scrollArea)
        self.music_form_info.setStyleSheet("color:white")
        self.user_info.setStyleSheet("color:#8f8f8f")
        self.statusbar.setStyleSheet("color:red")
        self.algorithn1_form_info = {}  # 推荐算法一歌单
        self.algorithn2_form_info = {}  # 推荐算法二歌单
        self.player = QtMultimedia.QMediaPlayer()
        self.player.durationChanged.connect(self.set_dateDuration)
        self.player.positionChanged.connect(self.update_position)
        self.style_list=self.mongo.get_all_style()
        for style in self.style_list:
            self.comboBox.addItem(style)
        self.comboBox.currentIndexChanged.connect(self.show_style)
Exemplo n.º 6
0
 def __init__(self, parent=None):
     super(denglu_gui, self).__init__(parent)
     super().setupUi(self)
     self.mongo = mongo_process.process_data()
     self.user_name.returnPressed.connect(self.denglu)
     self.password.returnPressed.connect(self.denglu)
     self.pushButton.clicked.connect(self.denglu)
     self.pushButton_2.clicked.connect(self.enter_zhuce)
     self.setWindowTitle('个性化音乐推荐')
     self.setWindowIcon(QtGui.QIcon('tubiao//icon.png'))
     self.setWindowOpacity(0.9)  # 设置窗口透明度
     self.setAttribute(QtCore.Qt.WA_TranslucentBackground)  # 设置窗口背景透明
     self.statusbar.setStyleSheet("color:red")
     self.user_name.setPlaceholderText("用户名")
     self.password.setPlaceholderText("密码")
     self.password.setEchoMode(QLineEdit.Password)
     self.label.setPixmap((QPixmap('tubiao//denglu.jpg')))
     self.set_widget(self.widget)
     self.set_denglubutton(self.pushButton)
     self.set_zhucebutton(self.pushButton_2)
Exemplo n.º 7
0
 def __init__(self, parent=None):
     super(main_gui, self).__init__(parent)
     super().setupUi(self)
     self.music_count = 0
     self.mongo = mongo_process.process_data()
     self.set_recommend()
     self.set_process_bar()
     self.setWindowOpacity(0.8)  # 设置窗口透明度
     #self.setAttribute(QtCore.Qt.WA_TranslucentBackground)
     self.setStyleSheet('''#MainWindow{background-color:blue}''')
     self.sousuo.clicked.connect(self.find_music_singer)
     self.statusbar.setStyleSheet("color:white")
     self.algorithn1_form_info = {}  # 推荐算法一歌单
     self.algorithn2_form_info = {}  # 推荐算法二歌单
     self.user_info.setStyleSheet("color:white")
     self.setWindowTitle('音乐播放器')
     self.player = QtMultimedia.QMediaPlayer()
     self.player.durationChanged.connect(self.set_dateDuration)
     self.player.positionChanged.connect(self.update_position)
     self.style_list = self.mongo.get_all_style()
     for style in self.style_list:
         self.comboBox.addItem(style)
     self.comboBox.currentIndexChanged.connect(self.show_style)
Exemplo n.º 8
0
 def __init__(self, parent=None):
     super(registered_gui, self).__init__(parent)
     super().setupUi(self)
     self.mongo = mongo_process.process_data()
     self.user_name.returnPressed.connect(self.zhuce)
     self.password.returnPressed.connect(self.zhuce)
     self.check_pawd.returnPressed.connect(self.zhuce)
     self.zhuce_button.clicked.connect(self.zhuce)
     self.back_button.clicked.connect(self.go_back)
     self.setWindowTitle('个性化音乐推荐')
     self.setWindowIcon(QtGui.QIcon('tubiao//icon.png'))
     self.setWindowOpacity(0.9)  # 设置窗口透明度
     self.setStyleSheet('''
                     #MainWindow{border-image:url(tubiao//beijing.jpg)};
                     background:transparent;
     ''')
     self.user_name.setPlaceholderText("设置你的用户名")
     self.password.setPlaceholderText("设置你的密码")
     self.check_pawd.setPlaceholderText("再次输入密码")
     self.password.setEchoMode(QLineEdit.Password)
     self.check_pawd.setEchoMode(QLineEdit.Password)
     self.set_zhuce_button(self.zhuce_button)
     self.set_back_button(self.back_button)
     self.statusbar.setStyleSheet("color:red")