KDDockWidgets API Documentation 2.0
Loading...
Searching...
No Matches
qtwidgets/views/ClassicIndicatorsWindow.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#ifndef KD_CLASSICINDICATORS_WINDOW_QTWIDGETS_H
13#define KD_CLASSICINDICATORS_WINDOW_QTWIDGETS_H
14#pragma once
15
16#include <kddockwidgets/core/views/ClassicIndicatorWindowViewInterface.h>
17
18#include <QImage>
19#include <QWidget>
20#include <QResizeEvent>
21
22namespace KDDockWidgets {
23
24class Indicator;
25
26namespace Core {
27class ClassicDropIndicatorOverlay;
28}
29
30namespace QtWidgets {
31
33{
35public:
36 explicit IndicatorWindow(Core::ClassicDropIndicatorOverlay *classicIndicators);
37
38 DropLocation hover(QPoint globalPos) override;
39 void updatePositions() override;
40 QPoint posForIndicator(DropLocation) const override;
41 void raise() override;
42 void setVisible(bool) override;
43 bool isWindow() const override;
44 void setGeometry(QRect) override;
45 void resize(QSize) override;
46 void setObjectName(const QString &) override;
47 void updateIndicatorVisibility() override;
48
49private:
50 void resizeEvent(QResizeEvent *ev) override;
51
52 // When the compositor doesn't support translucency, we use a mask instead
53 // Only happens on Linux
54 void updateMask();
55
56 Indicator *indicatorForLocation(DropLocation loc) const;
57
58 Core::ClassicDropIndicatorOverlay *const classicIndicators;
59 Indicator *const m_center;
60 Indicator *const m_left;
61 Indicator *const m_right;
62 Indicator *const m_bottom;
63 Indicator *const m_top;
64 Indicator *const m_outterLeft;
65 Indicator *const m_outterRight;
66 Indicator *const m_outterBottom;
67 Indicator *const m_outterTop;
68 QVector<Indicator *> m_indicators;
69};
70
71}
72
73}
74
75#endif
The window that will hold the classic indicators This is a window so it can be over the window that i...
Class to abstract QAction, so code still works with QtQuick and Flutter.
DropLocation
Enum describing the different drop indicator types.
Q_OBJECTQ_OBJECT

© 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