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


Python QMovie.state方法代码示例

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


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

示例1: __init__

# 需要导入模块: from PyQt4.QtGui import QMovie [as 别名]
# 或者: from PyQt4.QtGui.QMovie import state [as 别名]

#.........这里部分代码省略.........
    def show_loading_ui(self, message = "", loading = True):
        self.loading_ui.info_label.setText(message)
        self.loading_ui.info_label_icon.hide()
        self.thumb_was_visible = self.manager_ui.thumb_container.isVisible()
        self.manager_ui.thumb_container.hide()
        self.loading_widget.show()

        self.loading_ui.load_animation_label.setVisible(loading)
        if loading:
            self.loading_animation.start()
        else:
            self.loading_animation.stop()

    def show_information_ui(self, message, succesfull, timeout = 4000):
        self.loading_ui.load_animation_label.hide()
        self.thumb_was_visible = self.manager_ui.thumb_container.isVisible()
        if self.thumb_was_visible:
            self.manager_ui.thumb_container.hide()
        self.loading_ui.info_label.setText(message)
        if succesfull == None:
            icon = self.information_icon_queue
        elif succesfull:
            icon = self.information_icon_ok
        else:
            icon = self.information_icon_error
        self.loading_ui.info_label_icon.setPixmap(icon)
        self.loading_ui.info_label_icon.show()
        self.loading_widget.show()
        self.information_message_timer.start(timeout)

    def hide_loading_ui(self):
        if not self.information_message_timer.isActive():
            self.loading_widget.hide()
        if self.loading_animation.state() == QMovie.Running:
            self.loading_animation.stop()

    def hide_information_message(self):
        self.loading_ui.info_label_icon.hide()
        self.hide_loading_ui()
        self.manager_ui.thumb_container.setVisible(self.thumb_was_visible)
            
    def try_trusted_login(self):
        self.trusted_login_ui.label_error.setText("")
        email = self.trusted_login_ui.line_edit_email.text()
        password = self.trusted_login_ui.line_edit_password.text()

        error = None
        if email.isEmpty():
            error = "Email can't be empty!"
        elif email.count("@") != 1:
            error = "Invalid email, check your @ signs!"
        elif email.contains(" "):
            error = "Invalid email, can't have spaces!"
        elif password.isEmpty():
            error = "Password can't be empty!"
            
        if error == None:
            self.show_banner("Authenticating...", 3000)
            self.set_trusted_login_info("Authenticating, please wait...")
            self.truested_email = self.datahandler.to_unicode(str(email.toUtf8()))
            self.trusted_password = self.datahandler.to_unicode(str(password.toUtf8()))
            QTimer.singleShot(100, self.do_trusted_login_networking)
        else:
            self.set_trusted_login_error(error)
            
    def set_trusted_login_error(self, error):
开发者ID:Sohil876,项目名称:DropN900,代码行数:70,代码来源:uicontroller.py


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