construct::ui::OverlayDropIndicator

The drop slot between two rows of the floating SceneOverlayBrowser.

Declared in src/libs/libconstruct/construct/ui/OverlayDropIndicator.hpp
Inherits QWidget
Group construct

Detailed description

An indicator exists only during a drag. It has three states:

  • Closed: a strip 4 px tall, with a bright line 2 px tall at its center. It shows that a drop is possible here.
  • Hovered: the same strip, with a brighter line and a taller wash, so the cursor stays inside the hit box while the open animation runs.
  • Opened: the strip animates to openedHeight(), the height of the dragged row. The rows below move down and the ghost row goes into the gap.

The drop position is set when the indicator is constructed, as a parent id and an insert index. The consumer moves the item with IScenePanelModel::moveItem and these two values.

The animations run a QPropertyAnimation on the slotHeight property, with an OutCubic curve to open and an InCubic curve to close. The indicator uses one animation and stops it before it starts the next, so fast mouse motion cannot queue animations that conflict.

Property documentation

slotHeight property

slotHeight : int

This property holds the current height of the slot, in pixels.

The indicator sets its fixed height to this value. It is 4 when the slot is closed and openedHeight() when it is open. The open and close animations change it between these values.

Access functions:

  • int slotHeight() const
  • void setSlotHeight(int h)