当前位置: 首页>>代码示例>>Python>>正文


Python MainPanel.update_current_view方法代码示例

本文整理汇总了Python中picard.ui.itemviews.MainPanel.update_current_view方法的典型用法代码示例。如果您正苦于以下问题:Python MainPanel.update_current_view方法的具体用法?Python MainPanel.update_current_view怎么用?Python MainPanel.update_current_view使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在picard.ui.itemviews.MainPanel的用法示例。


在下文中一共展示了MainPanel.update_current_view方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: MainWindow

# 需要导入模块: from picard.ui.itemviews import MainPanel [as 别名]
# 或者: from picard.ui.itemviews.MainPanel import update_current_view [as 别名]

#.........这里部分代码省略.........
_("""The separate file naming scheme for various artists albums has been
removed in this version of Picard. You currently do not use the this option,
but have a separate file naming scheme defined. Do you want to remove it or
merge it with your file naming scheme for single artist albums?"""),
            _("Merge"), _("Remove"))

    def show_va_removal_notice(self):
        QtGui.QMessageBox.information(self,
            _("Various Artists file naming scheme removal"),
_("""The separate file naming scheme for various artists albums has been
removed in this version of Picard. Your file naming scheme has automatically
been merged with that of single artist albums."""),
            QtGui.QMessageBox.Ok)


    def open_bug_report(self):
        webbrowser2.open("http://musicbrainz.org/doc/Picard_Troubleshooting")

    def open_support_forum(self):
        webbrowser2.open("http://forums.musicbrainz.org/viewforum.php?id=2")

    def open_donation_page(self):
        webbrowser2.open('http://metabrainz.org/donate')

    def save(self):
        """Tell the tagger to save the selected objects."""
        self.tagger.save(self.selected_objects)

    def remove(self):
        """Tell the tagger to remove the selected objects."""
        self.panel._ignore_selection_changes = True
        self.tagger.remove(self.selected_objects)
        self.panel._ignore_selection_changes = False
        self.panel.update_current_view()

    def analyze(self):
        if not self.config.setting['enable_fingerprinting']:
            if self.show_analyze_settings_info():
                self.show_options("fingerprinting")
            if not self.config.setting['enable_fingerprinting']:
                return
        return self.tagger.analyze(self.selected_objects)

    def open_file(self):
        files = self.tagger.get_files_from_objects(self.selected_objects)
        for file in files:
            url = QtCore.QUrl.fromLocalFile(file.filename)
            QtGui.QDesktopServices.openUrl(url)

    def open_folder(self):
        files = self.tagger.get_files_from_objects(self.selected_objects)
        for file in files:
            url = QtCore.QUrl.fromLocalFile(os.path.dirname(file.filename))
            QtGui.QDesktopServices.openUrl(url)

    def show_analyze_settings_info(self):
        ret = QtGui.QMessageBox.question(self,
            _(u"Configuration Required"),
            _(u"Audio fingerprinting is not yet configured. Would you like to configure it now?"),
            QtGui.QMessageBox.Yes | QtGui.QMessageBox.No,
            QtGui.QMessageBox.Yes)
        return ret == QtGui.QMessageBox.Yes

    def view_info(self):
        file = self.tagger.get_files_from_objects(self.selected_objects)[0]
        dialog = InfoDialog(file, self)
开发者ID:rossabaker,项目名称:picard,代码行数:70,代码来源:mainwindow.py


注:本文中的picard.ui.itemviews.MainPanel.update_current_view方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。