# sec_interp.gui.legend_widget module

Legend Widget Module.

class sec_interp.gui.legend_widget.LegendWidget(*args: Any, **kwargs: Any)

  Bases: `QWidget`

  Widget to display the geological legend over the map canvas.

  __init__(dialog: SecInterpDialog) → None

    Initialize the legend widget.

    Parameters:

      dialog – The main SecInterp dialog.

  cleanup() → None

    Remove event filter from dialog.

  eventFilter(obj: qgis.PyQt.QtCore.QObject, event: qgis.PyQt.QtCore.QEvent) → bool

    Handle parent resize events.

  paintEvent(event: qgis.PyQt.QtCore.QEvent) → None

    Handle paint event to draw the legend.

  update_legend(renderer: Renderer, visible: bool = True) → None

    Update legend with data from renderer.