KDDockWidgets API Documentation 2.1
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
KDDockWidgets::Core::DropIndicatorOverlay Class Referenceabstract

#include <DropIndicatorOverlay.h>

Inheritance diagram for KDDockWidgets::Core::DropIndicatorOverlay:
Inheritance graph
[legend]
Collaboration diagram for KDDockWidgets::Core::DropIndicatorOverlay:
Collaboration graph
[legend]

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)
 
GrouphoveredGroup () 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.
 
Viewview () const
 Returns the view associated with this controller, if any.
 
int width () const
 
std::shared_ptr< Viewwindow () 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
 
Groupm_hoveredGroup = nullptr
 
- Protected Attributes inherited from KDDockWidgets::Core::Controller
bool m_inDtor = false
 

Detailed Description

The DropIndicatorOverlay controller has drop indicator state

Such as:

Definition at line 35 of file DropIndicatorOverlay.h.

Constructor & Destructor Documentation

◆ DropIndicatorOverlay() [1/2]

DropIndicatorOverlay::DropIndicatorOverlay ( DropArea dropArea,
View view 
)
explicit

◆ DropIndicatorOverlay() [2/2]

DropIndicatorOverlay::DropIndicatorOverlay ( Core::DropArea dropArea)
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.

◆ ~DropIndicatorOverlay()

DropIndicatorOverlay::~DropIndicatorOverlay ( )
override

Definition at line 60 of file DropIndicatorOverlay.cpp.

Member Function Documentation

◆ currentDropLocation()

DropLocation DropIndicatorOverlay::currentDropLocation ( ) const

◆ dptr()

DropIndicatorOverlay::Private * DropIndicatorOverlay::dptr ( ) const

◆ dropIndicatorVisible()

bool DropIndicatorOverlay::dropIndicatorVisible ( DropLocation  dropLoc) const
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().

◆ hover()

DropLocation DropIndicatorOverlay::hover ( Point  globalPos)

Definition at line 229 of file DropIndicatorOverlay.cpp.

References hover_impl(), and setCurrentDropLocation().

◆ hover_impl()

virtual DropLocation KDDockWidgets::Core::DropIndicatorOverlay::hover_impl ( Point  globalPos)
protectedpure virtual

◆ hoveredGroup()

Group * DropIndicatorOverlay::hoveredGroup ( ) const

◆ hoveredGroupRect()

Rect DropIndicatorOverlay::hoveredGroupRect ( ) const

◆ isHovered()

bool DropIndicatorOverlay::isHovered ( ) const

◆ multisplitterLocationFor()

KDDockWidgets::Location DropIndicatorOverlay::multisplitterLocationFor ( DropLocation  dropLoc)
static

◆ onHoveredGroupChanged()

void DropIndicatorOverlay::onHoveredGroupChanged ( Core::Group )
protectedvirtual

◆ posForIndicator()

virtual Point KDDockWidgets::Core::DropIndicatorOverlay::posForIndicator ( DropLocation  ) const
pure virtual

◆ removeHover()

void DropIndicatorOverlay::removeHover ( )

◆ setCurrentDropLocation()

void DropIndicatorOverlay::setCurrentDropLocation ( DropLocation  location)
virtual

◆ setHoveredGroup()

void DropIndicatorOverlay::setHoveredGroup ( Core::Group group)

◆ setWindowBeingDragged()

void DropIndicatorOverlay::setWindowBeingDragged ( bool  is)

◆ updateVisibility()

void DropIndicatorOverlay::updateVisibility ( )
protectedvirtual

Member Data Documentation

◆ m_draggedWindowIsHovering

bool KDDockWidgets::Core::DropIndicatorOverlay::m_draggedWindowIsHovering = false
protected

Definition at line 92 of file DropIndicatorOverlay.h.

Referenced by isHovered(), and setWindowBeingDragged().

◆ m_dropArea

DropArea* const KDDockWidgets::Core::DropIndicatorOverlay::m_dropArea
protected

◆ m_hoveredGroup

Group* KDDockWidgets::Core::DropIndicatorOverlay::m_hoveredGroup = nullptr
protected

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

© Klarälvdalens Datakonsult AB (KDAB)
"The Qt, C++ and OpenGL Experts"
https://www.kdab.com/
KDDockWidgets
Advanced Dock Widget Framework for Qt
https://www.kdab.com/development-resources/qt-tools/kddockwidgets/
Generated by doxygen 1.9.8