KDDockWidgets API Documentation 2.1
Loading...
Searching...
No Matches
core/indicators/SegmentedDropIndicatorOverlay.h
Go to the documentation of this file.
1/*
2 This file is part of KDDockWidgets.
3
4 SPDX-FileCopyrightText: 2019 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
5 Author: SĂ©rgio Martins <sergio.martins@kdab.com>
6
7 SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
8
9 Contact KDAB at <info@kdab.com> for commercial licensing options.
10*/
11
12#pragma once
13
14#include <kddockwidgets/QtCompat_p.h>
15#include <kddockwidgets/core/DropIndicatorOverlay.h>
16
17#include <unordered_map>
18
19namespace KDDockWidgets {
20
21namespace Core {
22
24{
25 Q_OBJECT
26public:
29 DropLocation hover_impl(Point globalPos) override;
30
31 DropLocation dropLocationForPos(Point pos) const;
32 Point hoveredPt() const;
33 const std::unordered_map<DropLocation, Polygon> &segments() const;
34
35 static int s_segmentGirth;
40
41protected:
42 Point posForIndicator(DropLocation) const override;
43
44private:
45 std::unordered_map<DropLocation, Polygon> segmentsForRect(Rect, bool inner, bool useOffset = false) const;
46 void updateSegments();
47 Point m_hoveredPt = {};
48 std::unordered_map<DropLocation, Polygon> m_segments;
49};
50
51}
52
53}
Class to abstract QAction, so code still works with QtQuick and Flutter.
DropLocation
Enum describing the different drop indicator types.

© 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