本文整理汇总了Python中sextante.core.SextanteConfig.SextanteConfig.getSettings方法的典型用法代码示例。如果您正苦于以下问题:Python SextanteConfig.getSettings方法的具体用法?Python SextanteConfig.getSettings怎么用?Python SextanteConfig.getSettings使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sextante.core.SextanteConfig.SextanteConfig
的用法示例。
在下文中一共展示了SextanteConfig.getSettings方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: fillTree
# 需要导入模块: from sextante.core.SextanteConfig import SextanteConfig [as 别名]
# 或者: from sextante.core.SextanteConfig.SextanteConfig import getSettings [as 别名]
def fillTree(self):
self.items = {}
self.tree.clear()
text = str(self.searchBox.text())
settings = SextanteConfig.getSettings()
priorityKeys = ['General', "Models", "Scripts"]
for group in priorityKeys:
groupItem = QTreeWidgetItem()
groupItem.setText(0,group)
icon = SextanteConfig.getGroupIcon(group)
groupItem.setIcon(0, icon)
for setting in settings[group]:
if setting.hidden:
continue
if text =="" or text.lower() in setting.description.lower():
settingItem = TreeSettingItem(setting, icon)
self.items[setting]=settingItem
groupItem.addChild(settingItem)
self.tree.addTopLevelItem(groupItem)
if text != "":
groupItem.setExpanded(True)
providersItem = QTreeWidgetItem()
providersItem.setText(0, "Providers")
icon = QtGui.QIcon(os.path.dirname(__file__) + "/../images/alg.png")
providersItem.setIcon(0, icon)
for group in settings.keys():
if group in priorityKeys:
continue
groupItem = QTreeWidgetItem()
groupItem.setText(0,group)
icon = SextanteConfig.getGroupIcon(group)
groupItem.setIcon(0, icon)
for setting in settings[group]:
if setting.hidden:
continue
if text =="" or text.lower() in setting.description.lower():
settingItem = TreeSettingItem(setting, icon)
self.items[setting]=settingItem
groupItem.addChild(settingItem)
if text != "":
groupItem.setExpanded(True)
providersItem.addChild(groupItem)
self.tree.addTopLevelItem(providersItem)
self.tree.sortItems(0, Qt.AscendingOrder)
self.tree.setColumnWidth(0, 400)
示例2: fillTree
# 需要导入模块: from sextante.core.SextanteConfig import SextanteConfig [as 别名]
# 或者: from sextante.core.SextanteConfig.SextanteConfig import getSettings [as 别名]
def fillTree(self):
self.items = {}
self.tree.clear()
text = str(self.searchBox.text())
settings = SextanteConfig.getSettings()
for group in settings.keys():
groupItem = QtGui.QTreeWidgetItem()
groupItem.setText(0,group)
icon = SextanteConfig.getGroupIcon(group)
groupItem.setIcon(0, icon)
#groupItem.setIcon(0,self.groupIcon)
for setting in settings[group]:
if setting.hidden:
continue
if text =="" or text.lower() in setting.description.lower():
settingItem = TreeSettingItem(setting, icon)
self.items[setting]=settingItem
groupItem.addChild(settingItem)
self.tree.addTopLevelItem(groupItem)
if text != "":
groupItem.setExpanded(True)
self.tree.sortItems(0, Qt.AscendingOrder)