Public Types | Signals | Public Member Functions | Protected Member Functions | Private Slots | Private Attributes | Friends | List of all members
ads::CFloatingDragPreview Class Reference

#include <FloatingDragPreview.h>

Inheritance diagram for ads::CFloatingDragPreview:
Inheritance graph
[legend]

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

FloatingDragPreviewPrivated
 

Friends

struct FloatingDragPreviewPrivate
 

Detailed Description

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.

Member Typedef Documentation

◆ Super

Definition at line 53 of file FloatingDragPreview.h.

Constructor & Destructor Documentation

◆ CFloatingDragPreview() [1/3]

ads::CFloatingDragPreview::CFloatingDragPreview ( QWidget *  Content,
QWidget *  parent 
)
protected

The content is a DockArea or a DockWidget

Definition at line 219 of file FloatingDragPreview.cpp.

◆ CFloatingDragPreview() [2/3]

ads::CFloatingDragPreview::CFloatingDragPreview ( CDockWidget Content)

Creates an instance for undocking the DockWidget in Content parameter

Definition at line 264 of file FloatingDragPreview.cpp.

◆ CFloatingDragPreview() [3/3]

ads::CFloatingDragPreview::CFloatingDragPreview ( CDockAreaWidget Content)

Creates an instance for undocking the DockArea given in Content parameters

Definition at line 277 of file FloatingDragPreview.cpp.

◆ ~CFloatingDragPreview()

ads::CFloatingDragPreview::~CFloatingDragPreview ( )

Delete private data

Definition at line 287 of file FloatingDragPreview.cpp.

Member Function Documentation

◆ draggingCanceled

void ads::CFloatingDragPreview::draggingCanceled ( )
signal

This signal is emitted, if dragging has been canceled by escape key or by active application switching via task manager

◆ eventFilter()

bool ads::CFloatingDragPreview::eventFilter ( QObject *  watched,
QEvent *  event 
)
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.

◆ finishDragging()

void ads::CFloatingDragPreview::finishDragging ( )
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.

◆ moveFloating()

void ads::CFloatingDragPreview::moveFloating ( )
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.

◆ onApplicationStateChanged

void ads::CFloatingDragPreview::onApplicationStateChanged ( Qt::ApplicationState  state)
privateslot

Cancel non opaque undocking if application becomes inactive

Definition at line 390 of file FloatingDragPreview.cpp.

◆ paintEvent()

void ads::CFloatingDragPreview::paintEvent ( QPaintEvent *  e)
overrideprotectedvirtual

Cares about painting the

Definition at line 357 of file FloatingDragPreview.cpp.

◆ startFloating()

void ads::CFloatingDragPreview::startFloating ( const QPoint &  DragStartMousePos,
const QSize &  Size,
eDragState  DragState,
QWidget *  MouseEventHandler 
)
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.

Friends And Related Function Documentation

◆ FloatingDragPreviewPrivate

friend struct FloatingDragPreviewPrivate
friend

Definition at line 33 of file FloatingDragPreview.h.

Member Data Documentation

◆ d

FloatingDragPreviewPrivate* ads::CFloatingDragPreview::d
private

Definition at line 32 of file FloatingDragPreview.h.


The documentation for this class was generated from the following files:


plotjuggler
Author(s): Davide Faconti
autogenerated on Mon Nov 11 2024 03:23:51