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


Python Universals.cancelThreadAction方法代码示例

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


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

示例1: closeEvent

# 需要导入模块: from Core import Universals [as 别名]
# 或者: from Core.Universals import cancelThreadAction [as 别名]
 def closeEvent(self, _event):
     if uni.isContinueThreadAction():
         uni.cancelThreadAction()
         _event.ignore()
开发者ID:supermurat,项目名称:hamsi-manager,代码行数:6,代码来源:GoogleEngine.py

示例2: closeEvent

# 需要导入模块: from Core import Universals [as 别名]
# 或者: from Core.Universals import cancelThreadAction [as 别名]
    def closeEvent(self, _event):
        try:
            if uni.isRaisedAnError is False:
                if uni.isContinueThreadAction():
                    uni.cancelThreadAction()
                    _event.ignore()
            uni.isStartedCloseProcess = True
            uni.printForDevelopers("Started closeEvent")
            MApplication.setQuitOnLastWindowClosed(True)
            try:
                self.PlayerBar.MusicPlayer.stop()
            except:
                pass
            Details.closeAllDialogs()
            uni.printForDevelopers("Closed Dialogs")
            if uni.isRaisedAnError is False:
                if self.Table.checkUnSavedValues() is False:
                    uni.isStartedCloseProcess = False
                    uni.printForDevelopers("Close ignored")
                    _event.ignore()
            uni.printForDevelopers("Before self.doBeforeCloseProcesses")
            if self.doBeforeCloseProcesses() is False:
                _event.ignore()
                return None
            uni.printForDevelopers("After self.doBeforeCloseProcesses")
            if isActivePyKDE4:
                uni.printForDevelopers("Before Save KDE Configs")
                kconf = MGlobal.config()
                kconfGroup = MConfigGroup(kconf, "DirectoryOperator")
                self.FileManager.dirOperator.writeConfig(kconfGroup)
                self.FileManager.actCollection.writeSettings(kconfGroup)
                uni.printForDevelopers("After Save KDE Configs")
            uni.printForDevelopers("Before Save Configs")
            uni.setMySetting(self.Table.hiddenTableColumnsSettingKey,
                             self.Table.hiddenTableColumns)
            Bars.setAllBarsStyleToMySettings()
            Records.setRecordType(1)
            fu.writeToBinaryFile(
                fu.joinPath(fu.pathOfSettingsDirectory, "LastState"), self.saveState())
            Records.restoreRecordType()
            geometry = [self.geometry().x(), self.geometry().y(), self.geometry().width(),
                        self.geometry().height()]
            uni.setMySetting("MainWindowGeometries", geometry)
            uni.setMySetting("lastDirectory", self.FileManager.currentDirectory)
            uni.setMySetting("isMainWindowMaximized", self.isMaximized())
            uni.setMySetting("isShowAdvancedSelections", self.SpecialTools.isShowAdvancedSelections)
            uni.setMySetting("tableType", uni.tableType)
            uni.setMySetting("activeTabNoOfSpecialTools", self.SpecialTools.tabwTabs.currentIndex())
            uni.saveSettings()
            Settings.saveUniversalSettings()
            if uni.isActiveAmarok and uni.getBoolValue("amarokIsUseHost") is False:
                import Amarok

                uni.printForDevelopers("Before Amarok.stopEmbeddedDB")
                Amarok.stopEmbeddedDB()
                uni.printForDevelopers("After Amarok.stopEmbeddedDB")
            uni.printForDevelopers("After Save Configs")
            uni.printForDevelopers("Before self.doAfterCloseProcesses")
            self.doAfterCloseProcesses()
            uni.printForDevelopers("After self.doAfterCloseProcesses")
        except:
            if ReportBug.isClose is False:
                ReportBug.ReportBug()
                _event.ignore()
开发者ID:supermurat,项目名称:hamsi-manager,代码行数:66,代码来源:MyMainWindow.py


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