• OctoMY API
  • OctoMY API Reference
  • C++ Classes
  • libconfigui
  • ConfigItemDelegate
  • config::ui::ConfigItemDelegate Class

    class config::ui::ConfigItemDelegate

    Paints and edits every cell of the settings table, with no widget per cell. More...

    Header: #include <ConfigItemDelegate>
    Inherits: QStyledItemDelegate

    Detailed Description

    Qt documents setIndexWidget() for static content only, and the persistent-editor path walks every open editor on each scroll (config-ui §CFGV-5). So a cell paints the look of its input, and an edit opens a real input for that one cell, or is handled here in editorEvent().

    Paint

    A number paints through DragNumber::paintLook(), the code the widget itself paints with, so a settings row looks like every other number in the tree. A yes-or-no setting paints the toggle of BoolInput, a list a combo box, a color a swatch.

    A drag

    A view sends a mouse move to the delegate of the cell under the cursor, not to the cell that took the press, and nothing when the cursor leaves the viewport. So a press on a number installs a filter on the viewport that feeds every move to a DragSession until the release. One drag is one undo step: the model merges the edits of one drag session.