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


Python Organizer.clear方法代码示例

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


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

示例1: apply

# 需要导入模块: from Core import Organizer [as 别名]
# 或者: from Core.Organizer import clear [as 别名]
 def apply(self):
     self.checkCompleters()
     self.reFillCompleters()
     getMainTable().createHistoryPoint()
     getMainTable().isAskShowHiddenColumn = True
     selectedColumnKey = self.columns.currentData()
     if selectedColumnKey == "all":
         columnKeys = getMainTable().getWritableColumnKeys()
     else:
         columnKeys = [selectedColumnKey]
     for columnKey in columnKeys:
         columnNo = getMainTable().getColumnNoFromKey(columnKey)
         if getMainTable().checkReadOnlyColumn(columnKey) is False:
             continue
         if getMainTable().checkHiddenColumn(columnKey, False) is False:
             continue
         for rowNo in range(getMainTable().rowCount()):
             if getMainTable().isChangeableItem(rowNo, columnKey):
                 newString = str(getMainTable().item(rowNo, columnNo).text())
                 newString = uni.trDecode(newString, "utf-8")
                 informationSectionX = self.specialTools.cbInformationSectionX.value()
                 informationSectionY = self.specialTools.cbInformationSectionY.value()
                 isCaseInsensitive = self.cckbCaseInsensitive.isChecked()
                 oldString = str(self.leClear.text())
                 cbClearType = self.cbClearType.currentText()
                 isRegExp = self.cckbRegExp.isChecked()
                 myString = None
                 if self.specialTools.cbInformationSection.currentIndex() == 0:
                     myString = Organizer.clear(cbClearType, newString,
                                                oldString, isCaseInsensitive, isRegExp)
                 elif self.specialTools.cbInformationSection.currentIndex() == 1:
                     myString = Organizer.clear(cbClearType, newString[:informationSectionX],
                                                oldString, isCaseInsensitive, isRegExp)
                     myString += newString[informationSectionX:]
                 elif self.specialTools.cbInformationSection.currentIndex() == 2:
                     myString = newString[:informationSectionX]
                     myString += Organizer.clear(cbClearType, newString[informationSectionX:],
                                                 oldString, isCaseInsensitive, isRegExp)
                 elif self.specialTools.cbInformationSection.currentIndex() == 3:
                     myString = Organizer.clear(cbClearType, newString[:-informationSectionX],
                                                oldString, isCaseInsensitive, isRegExp)
                     myString += newString[-informationSectionX:]
                 elif self.specialTools.cbInformationSection.currentIndex() == 4:
                     myString = newString[:-informationSectionX]
                     myString += Organizer.clear(cbClearType, newString[-informationSectionX:],
                                                 oldString, isCaseInsensitive, isRegExp)
                 elif self.specialTools.cbInformationSection.currentIndex() == 5:
                     myString = newString[:informationSectionX]
                     myString += Organizer.clear(cbClearType, newString[informationSectionX:informationSectionY],
                                                 oldString, isCaseInsensitive, isRegExp)
                     myString += newString[informationSectionY:]
                 elif self.specialTools.cbInformationSection.currentIndex() == 6:
                     myString = Organizer.clear(cbClearType, newString[:informationSectionX],
                                                oldString, isCaseInsensitive, isRegExp)
                     myString += newString[informationSectionX:informationSectionY]
                     myString += Organizer.clear(cbClearType, newString[informationSectionY:],
                                                 oldString, isCaseInsensitive, isRegExp)
                 getMainTable().item(rowNo, columnNo).setText(str(myString))
开发者ID:supermurat,项目名称:hamsi-manager,代码行数:60,代码来源:Clear.py


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