def _convert_label(label):
    """
    Convert a label from 1.X to the new format
    """
    style = qt_font_to_style(label.get("font"), label.get("color"))
    return {
        "text": html.escape(label["text"]),
        "rotation": 0,
        "style": style,
        "x": int(label["x"]),
        "y": int(label["y"])
    }
def _convert_label ( label ) : style = qt_font_to_style ( label . get ( "font" ) , label . get ( "color" ) ) return { "text" : html . escape ( label [ "text" ] ) , "rotation" : 0 , "style" : style , "x" : int ( label [ "x" ] ) , "y" : int ( label [ "y" ] ) }
Convert a label from 1.X to the new format