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
评论列表
文章目录