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


Python TreeItem._getDescriptionHtml方法代码示例

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


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

示例1: _getDescriptionHtml

# 需要导入模块: from opengeo.gui.exploreritems import TreeItem [as 别名]
# 或者: from opengeo.gui.exploreritems.TreeItem import _getDescriptionHtml [as 别名]
 def _getDescriptionHtml(self, tree, explorer):  
     if not self.element.isValid:            
         html = ('<p>Cannot connect to this database. This might be caused by missing user/passwd credentials.'
                 'Try <a href="refresh">refreshing</a> the connection, to enter new credentials and retry to connect</p>')     
         return html
     else:
         return TreeItem._getDescriptionHtml(self, tree, explorer)
开发者ID:ischneider,项目名称:suite-qgis-plugin,代码行数:9,代码来源:pgexploreritems.py

示例2: _getDescriptionHtml

# 需要导入模块: from opengeo.gui.exploreritems import TreeItem [as 别名]
# 或者: from opengeo.gui.exploreritems.TreeItem import _getDescriptionHtml [as 别名]
 def _getDescriptionHtml(self, tree, explorer):  
     if not self.element.isValid:
         html = u'<div style="background-color:#ffffcc;"><h1>&nbsp; ' + self.text(0) + ' (GWC layer)</h1></div></br>'  
         html += ('<p>Cannot connect to this database. This might be caused by missing user/passwd credentials.'
                 'Try <a href="refresh">refreshing</a> the connection, to enter new credentials and retry to connect</p>')     
         return html
     else:
         return TreeItem._getDescriptionHtml(self, tree, explorer)
开发者ID:garnertb,项目名称:suite-qgis-plugin,代码行数:10,代码来源:pgexploreritems.py

示例3: _getDescriptionHtml

# 需要导入模块: from opengeo.gui.exploreritems import TreeItem [as 别名]
# 或者: from opengeo.gui.exploreritems.TreeItem import _getDescriptionHtml [as 别名]
    def _getDescriptionHtml(self, tree, explorer):
        if not self.element.isValid:
            html = ""
            typesok, typesmsg = self._checkAllSelectionTypes(self, tree)
            if not typesok:
                return typesmsg
            else:
                html += typesmsg

            items = tree.selectedItems()
            # don't show if multiple items selected, but not the current item
            if not items or self in items or len(items) == 1:
                html += ('<p>Cannot connect to this database. This might be caused by missing user/passwd credentials.'
                        'Try <a href="refresh">refreshing</a> the connection, to enter new credentials and retry to connect</p>')
            return html
        else:
            return TreeItem._getDescriptionHtml(self, tree, explorer)
开发者ID:GeoCat,项目名称:qgis-suite-plugin,代码行数:19,代码来源:pgexploreritems.py


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