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