12#include "Draggable_p.h"
13#include "DragController_p.h"
14#include "FloatingWindow_p.h"
15#include "WidgetResizeHandler_p.h"
21class Draggable::Private
25 : thisWidget(_thisWidget)
37 : d(new Private(thisWidget, enabled))
39 if (thisWidget && d->enabled)
40 DragController::instance()->registerDraggable(
this);
43Draggable::~Draggable()
45 if (d->thisWidget && d->enabled)
46 DragController::instance()->unregisterDraggable(
this);
55bool Draggable::dragCanStart(
QPoint pressPos,
QPoint globalPos)
const
57 return (globalPos - pressPos).manhattanLength() > KDDockWidgets::startDragDistance();
60void Draggable::setWidgetResizeHandler(WidgetResizeHandler *w)
62 Q_ASSERT(!d->widgetResizeHandler);
64 d->widgetResizeHandler = w;