#include <FloatingDragPreview.h>
Public Types | |
using | Super = QWidget |
Signals | |
void | draggingCanceled () |
Public Member Functions | |
CFloatingDragPreview (CDockAreaWidget *Content) | |
CFloatingDragPreview (CDockWidget *Content) | |
virtual bool | eventFilter (QObject *watched, QEvent *event) override |
virtual void | finishDragging () override |
virtual void | moveFloating () override |
virtual void | startFloating (const QPoint &DragStartMousePos, const QSize &Size, eDragState DragState, QWidget *MouseEventHandler) override |
~CFloatingDragPreview () | |
Public Member Functions inherited from ads::IFloatingWidget | |
virtual | ~IFloatingWidget ()=default |
Protected Member Functions | |
CFloatingDragPreview (QWidget *Content, QWidget *parent) | |
virtual void | paintEvent (QPaintEvent *e) override |
Private Slots | |
void | onApplicationStateChanged (Qt::ApplicationState state) |
Private Attributes | |
FloatingDragPreviewPrivate * | d |
Friends | |
struct | FloatingDragPreviewPrivate |
A floating overlay is a temporary floating widget that is just used to indicate the floating widget movement. This widget is used as a placeholder for drag operations for non-opaque docking
Definition at line 28 of file FloatingDragPreview.h.
using ads::CFloatingDragPreview::Super = QWidget |
Definition at line 53 of file FloatingDragPreview.h.
|
protected |
The content is a DockArea or a DockWidget
Definition at line 219 of file FloatingDragPreview.cpp.
ads::CFloatingDragPreview::CFloatingDragPreview | ( | CDockWidget * | Content | ) |
Creates an instance for undocking the DockWidget in Content parameter
Definition at line 264 of file FloatingDragPreview.cpp.
ads::CFloatingDragPreview::CFloatingDragPreview | ( | CDockAreaWidget * | Content | ) |
Creates an instance for undocking the DockArea given in Content parameters
Definition at line 277 of file FloatingDragPreview.cpp.
ads::CFloatingDragPreview::~CFloatingDragPreview | ( | ) |
Delete private data
Definition at line 287 of file FloatingDragPreview.cpp.
|
signal |
This signal is emitted, if dragging has been canceled by escape key or by active application switching via task manager
|
overridevirtual |
We filter the events of the assigned content widget to receive escape key presses for canceling the drag operation
Definition at line 402 of file FloatingDragPreview.cpp.
|
overridevirtual |
Finishes dragging. Hides the dock overlays and executes the real undocking and docking of the assigned Content widget
Implements ads::IFloatingWidget.
Definition at line 319 of file FloatingDragPreview.cpp.
|
overridevirtual |
Moves the widget to a new position relative to the position given when startFloating() was called
Implements ads::IFloatingWidget.
Definition at line 294 of file FloatingDragPreview.cpp.
|
privateslot |
Cancel non opaque undocking if application becomes inactive
Definition at line 390 of file FloatingDragPreview.cpp.
|
overrideprotectedvirtual |
Cares about painting the
Definition at line 357 of file FloatingDragPreview.cpp.
|
overridevirtual |
Starts floating. This function should get called typically from a mouse press event handler
Implements ads::IFloatingWidget.
Definition at line 305 of file FloatingDragPreview.cpp.
|
friend |
Definition at line 33 of file FloatingDragPreview.h.
|
private |
Definition at line 32 of file FloatingDragPreview.h.