ImportAutoFieldsDialog.py 文件源码

python
阅读 23 收藏 0 点赞 0 评论 0

项目:AutoFields 作者: gacarrillor 项目源码 文件源码
def getLabelWithArrow( self, indexLayerCombo, indexFieldCombo, layer, fieldName ):
        label = QLabel()
        if indexLayerCombo != 0 and indexFieldCombo != 0:
            if self.autoFieldManager.isFieldAnAutoField( layer, fieldName ):
                label.setPixmap( QPixmap( ":/plugins/AutoFields/icons/orange_arrow.png" ) )
                label.setToolTip( u'This AutoField will overwrite an existing AutoField in {}/{}'.format(layer.name(),fieldName) )
            else:
                label.setPixmap( QPixmap( ":/plugins/AutoFields/icons/green_arrow.png" ) )
                label.setToolTip( 'AutoField correctly assigned' )
        else:
            label.setPixmap( QPixmap( ":/plugins/AutoFields/icons/gray_arrow.png" ) )
            label.setToolTip( 'This AutoField will not be assigned to any layer/field' )
        label.setAlignment( Qt.AlignCenter )
        return label
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号