本文整理匯總了Python中processing.gui.AlgorithmClassification.getDisplayGroup方法的典型用法代碼示例。如果您正苦於以下問題:Python AlgorithmClassification.getDisplayGroup方法的具體用法?Python AlgorithmClassification.getDisplayGroup怎麽用?Python AlgorithmClassification.getDisplayGroup使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類processing.gui.AlgorithmClassification
的用法示例。
在下文中一共展示了AlgorithmClassification.getDisplayGroup方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: populate
# 需要導入模塊: from processing.gui import AlgorithmClassification [as 別名]
# 或者: from processing.gui.AlgorithmClassification import getDisplayGroup [as 別名]
def populate(self):
groups = {}
count = 0
provider = Processing.algs[self.providerName]
algs = provider.values()
# Add algorithms
for alg in algs:
if not alg.showInToolbox:
continue
if alg.group in groups:
groupItem = groups[alg.group]
else:
groupItem = QTreeWidgetItem()
name = AlgorithmClassification.getDisplayGroup(alg.group)
groupItem.setText(0, name)
groupItem.setToolTip(0, name)
groups[alg.group] = groupItem
algItem = TreeAlgorithmItem(alg)
groupItem.addChild(algItem)
count += 1
actions = Processing.actions[self.providerName]
for action in actions:
if action.group in groups:
groupItem = groups[action.group]
else:
groupItem = QTreeWidgetItem()
groupItem.setText(0, action.group)
groups[action.group] = groupItem
algItem = TreeActionItem(action)
groupItem.addChild(algItem)
self.setText(0, self.provider.getDescription()
+ QCoreApplication.translate( "TreeProviderItem", " [{0} geoalgorithms]" ).format( count ) )
self.setToolTip(0, self.text(0))
for groupItem in groups.values():
self.addChild(groupItem)