Skip to main content
`Ctrl`+`K`

# `SFViewParamTree`: `ScalarFieldView` parameters widget

This module provides a tree widget to set/view parameters of a ScalarFieldView.

## `TreeView`

class TreeView(parent=None)

  Bases: `QTreeView`

  TreeView displaying the SubjectItems for the ScalarFieldView.

  setSfView(sfView)

    Sets the ScalarFieldView this view is controlling.

    Parameters:

      sfView – A ScalarFieldView

  setModel(model)

    Reimplementation of the QTreeView.setModel method. It connects the rowsRemoved signal and opens the persistent editors.

    Parameters:

      model (qt.QStandardItemModel) – the model

  rowsAboutToBeRemoved(parent, start, end)

    Reimplementation of the QTreeView.rowsAboutToBeRemoved. Closes all persistent editors under parent.

    Parameters:

      - parent (qt.QModelIndex) – Parent index

      - start (int) – Start index from parent index (inclusive)

      - end (int) – End index from parent index (inclusive)

  rowsRemoved(parent, start, end)

    Called when QTreeView.rowsRemoved is emitted. Opens all persistent editors under parent.

    Parameters:

      - parent (qt.QModelIndex) – Parent index

      - start (int) – Start index from parent index (inclusive)

      - end (int) – End index from parent index (inclusive)

  rowsInserted(parent, start, end)

    Reimplementation of the QTreeView.rowsInserted. Opens all persistent editors under parent.

    Parameters:

      - parent (qt.QModelIndex) – Parent index

      - start (int) – Start index from parent index

      - end (int) – End index from parent index

  keyReleaseEvent(event)

    Reimplementation of the QTreeView.keyReleaseEvent. At the moment only Key_Delete is handled. It calls the selected item’s queryRemove method, and deleted the item if needed.

    Parameters:

      event (qt.QKeyEvent) – A key event

  setIsoLevelSliderNormalization(normalization)

    Set the normalization for iso level slider

    This MUST be called before `setSfView()` to have an effect.

    Parameters:

      normalization (str) – Either ‘linear’ or ‘arcsinh’