KDDockWidgets API Documentation 2.1
|
#include <DropIndicatorOverlay.h>
Public Member Functions | |
DropIndicatorOverlay (DropArea *dropArea) | |
DropIndicatorOverlay (DropArea *dropArea, View *view) | |
~DropIndicatorOverlay () override | |
DropLocation | currentDropLocation () const |
Private * | dptr () const |
virtual bool | dropIndicatorVisible (DropLocation) const |
Returns whether the specified drop indicator should be visible. | |
KDDockWidgets::DropLocation | hover (Point globalPos) |
Group * | hoveredGroup () const |
Rect | hoveredGroupRect () const |
bool | isHovered () const |
virtual Point | posForIndicator (DropLocation) const =0 |
returns the position of the specified drop location The return is in global coordinates | |
void | removeHover () |
Clears and hides drop indicators. | |
virtual void | setCurrentDropLocation (DropLocation) |
void | setHoveredGroup (Group *) |
void | setWindowBeingDragged (bool) |
Public Member Functions inherited from KDDockWidgets::Core::Controller | |
Controller (ViewType type, View *) | |
virtual | ~Controller () |
bool | close () |
void | destroyLater () |
Controller::Private * | dptr () const |
Rect | geometry () const |
int | height () const |
bool | inDtor () const |
bool | is (ViewType) const |
Returns whether this controller is of the specified type. | |
bool | isFixedHeight () const |
bool | isFixedWidth () const |
bool | isVisible () const |
Point | mapToGlobal (Point) const |
Point | pos () const |
Rect | rect () const |
void | setParentView (View *parent) |
void | setVisible (bool) |
void | show () const |
Size | size () const |
ViewType | type () const |
Returns the type of this controller. | |
View * | view () const |
Returns the view associated with this controller, if any. | |
int | width () const |
std::shared_ptr< View > | window () const |
int | x () const |
int | y () const |
Static Public Member Functions | |
static KDDockWidgets::Location | multisplitterLocationFor (DropLocation) |
Protected Member Functions | |
virtual DropLocation | hover_impl (Point globalPos)=0 |
virtual void | onHoveredGroupChanged (Group *) |
virtual void | updateVisibility () |
Protected Member Functions inherited from KDDockWidgets::Core::Controller | |
virtual void | setParentView_impl (View *parent) |
Protected Attributes | |
bool | m_draggedWindowIsHovering = false |
DropArea *const | m_dropArea |
Group * | m_hoveredGroup = nullptr |
Protected Attributes inherited from KDDockWidgets::Core::Controller | |
bool | m_inDtor = false |
The DropIndicatorOverlay controller has drop indicator state
Such as:
Definition at line 35 of file DropIndicatorOverlay.h.
Constructor This overload takes the associated view (i.e QWidget where indicators are drawn). This overload is used by the Segmented Indicators type
Definition at line 30 of file DropIndicatorOverlay.cpp.
References KDDockWidgets::DockRegistry::dptr(), KDDockWidgets::Core::View::enableAttribute(), KDDockWidgets::Core::Platform::instance(), removeHover(), KDDockWidgets::DockRegistry::self(), KDDockWidgets::Core::View::setViewName(), KDDockWidgets::Core::Controller::setVisible(), KDDockWidgets::Core::Controller::view(), and Qt::WA_TransparentForMouseEvents.
|
explicit |
Constructor Used by the Classic Indicators, creates a dummy/unused view internally. Classic Indicators is a special case, as it paints the indicators on a separate top-level window not on the main window itself
Definition at line 55 of file DropIndicatorOverlay.cpp.
|
override |
Definition at line 60 of file DropIndicatorOverlay.cpp.
DropLocation DropIndicatorOverlay::currentDropLocation | ( | ) | const |
Definition at line 123 of file DropIndicatorOverlay.cpp.
Referenced by KDDockWidgets::QtQuick::ClassicDropIndicatorOverlay::currentDropLocation(), and KDDockWidgets::Core::SegmentedDropIndicatorOverlay::hover_impl().
DropIndicatorOverlay::Private * DropIndicatorOverlay::dptr | ( | ) | const |
Definition at line 212 of file DropIndicatorOverlay.cpp.
Referenced by KDDockWidgets::QtQuick::ClassicDropIndicatorOverlay::ClassicDropIndicatorOverlay().
|
virtual |
Returns whether the specified drop indicator should be visible.
Reimplemented in KDDockWidgetsBindings_wrappersNS::DropIndicatorOverlay_wrapper, and KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::ClassicDropIndicatorOverlay_wrapper.
Definition at line 158 of file DropIndicatorOverlay.cpp.
References KDDockWidgets::Core::Group::affinities(), KDDockWidgets::Core::Group::dockWidgets(), KDDockWidgets::DropLocation_Center, KDDockWidgets::DropLocation_Inner, KDDockWidgets::DropLocation_None, KDDockWidgets::DropLocation_Outter, KDDockWidgets::Core::Group::isDockable(), KDDockWidgets::Core::Group::isTheOnlyGroup(), m_hoveredGroup, KDDockWidgets::Config::self(), KDDockWidgets::DockRegistry::self(), KDDockWidgets::Core::Controller::view(), and KDDockWidgets::Core::View::window().
Referenced by KDDockWidgets::QtQuick::ClassicDropIndicatorOverlay::innerBottomIndicatorVisible(), KDDockWidgets::QtQuick::ClassicDropIndicatorOverlay::innerLeftIndicatorVisible(), KDDockWidgets::QtQuick::ClassicDropIndicatorOverlay::innerRightIndicatorVisible(), KDDockWidgets::QtQuick::ClassicDropIndicatorOverlay::innerTopIndicatorVisible(), KDDockWidgets::QtQuick::ClassicDropIndicatorOverlay::outterBottomIndicatorVisible(), KDDockWidgets::QtQuick::ClassicDropIndicatorOverlay::outterLeftIndicatorVisible(), KDDockWidgets::QtQuick::ClassicDropIndicatorOverlay::outterRightIndicatorVisible(), KDDockWidgets::QtQuick::ClassicDropIndicatorOverlay::outterTopIndicatorVisible(), KDDockWidgets::QtQuick::ClassicDropIndicatorOverlay::tabIndicatorVisible(), and KDDockWidgets::QtWidgets::IndicatorWindow::updateIndicatorVisibility().
DropLocation DropIndicatorOverlay::hover | ( | Point | globalPos | ) |
Definition at line 229 of file DropIndicatorOverlay.cpp.
References hover_impl(), and setCurrentDropLocation().
|
protectedpure virtual |
Implemented in KDDockWidgetsBindings_wrappersNS::DropIndicatorOverlay_wrapper, KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::ClassicDropIndicatorOverlay_wrapper, KDDockWidgets::Core::ClassicDropIndicatorOverlay, KDDockWidgets::Core::SegmentedDropIndicatorOverlay, and KDDockWidgets::Core::NullDropIndicatorOverlay.
Referenced by hover().
Group * DropIndicatorOverlay::hoveredGroup | ( | ) | const |
Definition at line 250 of file DropIndicatorOverlay.cpp.
References m_hoveredGroup.
Referenced by c_KDDockWidgets__Core__DropIndicatorOverlay__hoveredGroup(), KDDockWidgets::flutter::IndicatorWindow::hoveredGroup(), KDDockWidgets::flutter::IndicatorWindow::updatePositions(), and KDDockWidgets::QtWidgets::IndicatorWindow::updatePositions().
Rect DropIndicatorOverlay::hoveredGroupRect | ( | ) | const |
Definition at line 82 of file DropIndicatorOverlay.cpp.
Referenced by c_KDDockWidgets__Core__DropIndicatorOverlay__hoveredGroupRect(), and KDDockWidgets::QtQuick::ClassicDropIndicatorOverlay::hoveredGroupRect().
bool DropIndicatorOverlay::isHovered | ( | ) | const |
Definition at line 118 of file DropIndicatorOverlay.cpp.
References m_draggedWindowIsHovering.
Referenced by c_KDDockWidgets__Core__DropIndicatorOverlay__isHovered(), KDDockWidgets::Core::ClassicDropIndicatorOverlay::setCurrentDropLocation(), and KDDockWidgets::Core::ClassicDropIndicatorOverlay::updateVisibility().
|
static |
Definition at line 128 of file DropIndicatorOverlay.cpp.
References KDDockWidgets::DropLocation_Bottom, KDDockWidgets::DropLocation_Center, KDDockWidgets::DropLocation_Horizontal, KDDockWidgets::DropLocation_Inner, KDDockWidgets::DropLocation_Left, KDDockWidgets::DropLocation_None, KDDockWidgets::DropLocation_Outter, KDDockWidgets::DropLocation_OutterBottom, KDDockWidgets::DropLocation_OutterLeft, KDDockWidgets::DropLocation_OutterRight, KDDockWidgets::DropLocation_OutterTop, KDDockWidgets::DropLocation_Right, KDDockWidgets::DropLocation_Top, KDDockWidgets::DropLocation_Vertical, KDDockWidgets::Location_None, KDDockWidgets::Location_OnBottom, KDDockWidgets::Location_OnLeft, KDDockWidgets::Location_OnRight, and KDDockWidgets::Location_OnTop.
|
protectedvirtual |
Reimplemented in KDDockWidgetsBindings_wrappersNS::DropIndicatorOverlay_wrapper, and KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::ClassicDropIndicatorOverlay_wrapper.
Definition at line 217 of file DropIndicatorOverlay.cpp.
Referenced by KDDockWidgetsBindings_wrappersNS::DropIndicatorOverlay_wrapper::onHoveredGroupChanged(), KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::ClassicDropIndicatorOverlay_wrapper::onHoveredGroupChanged(), KDDockWidgetsBindings_wrappersNS::DropIndicatorOverlay_wrapper::onHoveredGroupChanged_nocallback(), KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::ClassicDropIndicatorOverlay_wrapper::onHoveredGroupChanged_nocallback(), and setHoveredGroup().
|
pure virtual |
returns the position of the specified drop location The return is in global coordinates
Implemented in KDDockWidgets::Core::ClassicDropIndicatorOverlay, KDDockWidgets::Core::NullDropIndicatorOverlay, KDDockWidgets::Core::SegmentedDropIndicatorOverlay, KDDockWidgetsBindings_wrappersNS::DropIndicatorOverlay_wrapper, and KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::ClassicDropIndicatorOverlay_wrapper.
References KDDockWidgets::DropLocation_None.
void DropIndicatorOverlay::removeHover | ( | ) |
Clears and hides drop indicators.
Definition at line 244 of file DropIndicatorOverlay.cpp.
References KDDockWidgets::DropLocation_None, setCurrentDropLocation(), and setWindowBeingDragged().
Referenced by DropIndicatorOverlay(), c_KDDockWidgets__Core__DropIndicatorOverlay__removeHover(), and KDDockWidgetsBindings_wrappersNS::DropIndicatorOverlay_wrapper::removeHover().
|
virtual |
Reimplemented in KDDockWidgets::Core::ClassicDropIndicatorOverlay, KDDockWidgetsBindings_wrappersNS::DropIndicatorOverlay_wrapper, and KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::ClassicDropIndicatorOverlay_wrapper.
Definition at line 221 of file DropIndicatorOverlay.cpp.
Referenced by hover(), KDDockWidgets::Core::SegmentedDropIndicatorOverlay::hover_impl(), removeHover(), KDDockWidgets::Core::ClassicDropIndicatorOverlay::setCurrentDropLocation(), KDDockWidgetsBindings_wrappersNS::DropIndicatorOverlay_wrapper::setCurrentDropLocation(), and KDDockWidgetsBindings_wrappersNS::DropIndicatorOverlay_wrapper::setCurrentDropLocation_nocallback().
void DropIndicatorOverlay::setHoveredGroup | ( | Core::Group * | group | ) |
Definition at line 87 of file DropIndicatorOverlay.cpp.
References KDDockWidgets::Core::View::geometry(), m_hoveredGroup, onHoveredGroupChanged(), updateVisibility(), and KDDockWidgets::Core::Controller::view().
Referenced by c_KDDockWidgets__Core__DropIndicatorOverlay__setHoveredGroup_Group(), KDDockWidgetsBindings_wrappersNS::DropIndicatorOverlay_wrapper::setHoveredGroup(), and setWindowBeingDragged().
void DropIndicatorOverlay::setWindowBeingDragged | ( | bool | is | ) |
Definition at line 65 of file DropIndicatorOverlay.cpp.
References KDDockWidgets::Core::Controller::is(), m_draggedWindowIsHovering, m_dropArea, KDDockWidgets::Core::View::raise(), KDDockWidgets::Core::Controller::rect(), KDDockWidgets::Core::View::setGeometry(), setHoveredGroup(), KDDockWidgets::Core::Controller::setVisible(), updateVisibility(), and KDDockWidgets::Core::Controller::view().
Referenced by c_KDDockWidgets__Core__DropIndicatorOverlay__setWindowBeingDragged_bool(), removeHover(), and KDDockWidgetsBindings_wrappersNS::DropIndicatorOverlay_wrapper::setWindowBeingDragged().
|
protectedvirtual |
Reimplemented in KDDockWidgetsBindings_wrappersNS::DropIndicatorOverlay_wrapper, KDDockWidgetsBindings_wrappersNS::KDDWBindingsCore::ClassicDropIndicatorOverlay_wrapper, and KDDockWidgets::Core::ClassicDropIndicatorOverlay.
Definition at line 255 of file DropIndicatorOverlay.cpp.
Referenced by setHoveredGroup(), setWindowBeingDragged(), KDDockWidgetsBindings_wrappersNS::DropIndicatorOverlay_wrapper::updateVisibility(), and KDDockWidgetsBindings_wrappersNS::DropIndicatorOverlay_wrapper::updateVisibility_nocallback().
|
protected |
Definition at line 92 of file DropIndicatorOverlay.h.
Referenced by isHovered(), and setWindowBeingDragged().
|
protected |
Definition at line 91 of file DropIndicatorOverlay.h.
Referenced by KDDockWidgets::Core::ClassicDropIndicatorOverlay::setCurrentDropLocation(), and setWindowBeingDragged().
|
protected |
Definition at line 90 of file DropIndicatorOverlay.h.
Referenced by dropIndicatorVisible(), hoveredGroup(), KDDockWidgets::Core::ClassicDropIndicatorOverlay::setCurrentDropLocation(), and setHoveredGroup().