Added initial support for transparent undocking

This commit is contained in:
Uwe Kindler
2019-11-26 14:40:56 +01:00
parent 4504457da2
commit e15af4101a
15 changed files with 570 additions and 29 deletions

View File

@@ -52,7 +52,6 @@ struct DockOverlayPrivate
DockWidgetAreas AllowedAreas = InvalidDockWidgetArea;
CDockOverlayCross* Cross;
QPointer<QWidget> TargetWidget;
QRect TargetRect;
DockWidgetArea LastLocation = InvalidDockWidgetArea;
bool DropPreviewEnabled = true;
CDockOverlay::eMode Mode = CDockOverlay::ModeDockAreaOverlay;
@@ -408,7 +407,6 @@ DockWidgetArea CDockOverlay::showOverlay(QWidget* target)
}
d->TargetWidget = target;
d->TargetRect = QRect();
d->LastLocation = InvalidDockWidgetArea;
// Move it over the target.
@@ -427,8 +425,8 @@ void CDockOverlay::hideOverlay()
{
hide();
d->TargetWidget.clear();
d->TargetRect = QRect();
d->LastLocation = InvalidDockWidgetArea;
d->DropAreaRect = QRect();
}
@@ -440,6 +438,13 @@ void CDockOverlay::enableDropPreview(bool Enable)
}
//============================================================================
bool CDockOverlay::dropPreviewEnabled() const
{
return d->DropPreviewEnabled;
}
//============================================================================
void CDockOverlay::paintEvent(QPaintEvent* event)
{