35#include <NDEVR/RibbonArea.h>
48 friend class DropOverlayCross;
110 DropOverlayCross* _cross;
111 QWidget* m_payload =
nullptr;
123 friend class DropOverlay;
153 DropOverlay* _overlay;
154 QHash<DropArea, QWidget*> _widgets;
Shows a cross with 5 different drop area possibilities.
DropOverlayCross(DropOverlay *overlay)
Constructs the cross overlay for the given DropOverlay parent.
void setAreaWidgets(const QHash< DropArea, QWidget * > &widgets)
Sets the mapping of drop areas to their corresponding indicator widgets.
virtual void showEvent(QShowEvent *e)
Handles the show event to position the cross indicator widgets.
DropArea cursorLocation() const
Returns the drop area currently under the mouse cursor.
virtual void paintEvent(QPaintEvent *e) override
Paints the translucent drop indicator rectangle.
void setAreaWidgets(const QHash< DropArea, QWidget * > &widgets)
Sets the mapping of drop areas to their corresponding indicator widgets.
void hideDropOverlay()
Hides the drop overlay.
DropArea showDropOverlay(QWidget *target, QWidget *payload)
Shows the drop overlay over the target widget for the given payload.
virtual void moveEvent(QMoveEvent *e) override
Handles move events to update overlay positioning.
virtual void showEvent(QShowEvent *e) override
Handles the show event to update overlay positioning.
DropArea cursorLocation() const
Returns the drop area currently under the mouse cursor.
virtual void resizeEvent(QResizeEvent *e) override
Handles resize events to update overlay geometry.
void showDropOverlay(QWidget *target, const QRect &targetAreaRect)
Shows the drop overlay over the target widget constrained to a specific rectangle.
virtual void hideEvent(QHideEvent *e) override
Handles the hide event to clean up overlay state.
DropOverlay(QWidget *parent)
Constructs a DropOverlay with the given parent widget.
The primary namespace for the NDEVR SDK.
DropArea
relates where a widget should be dropped relative to another.