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


Python SextanteConfig.getSettings方法代码示例

本文整理汇总了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)
开发者ID:geodenilson,项目名称:Quantum-GIS,代码行数:49,代码来源:ConfigDialog.py

示例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)
开发者ID:mokerjoke,项目名称:Quantum-GIS,代码行数:24,代码来源:ConfigDialog.py


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