KDDockWidgets API Documentation 2.0
Loading...
Searching...
No Matches
qtquick/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_QTQUICK_H
13#define KD_CLASSICINDICATORS_WINDOW_QTQUICK_H
14#pragma once
15
16#include "kddockwidgets/core/views/ClassicIndicatorWindowViewInterface.h"
17
18#include <QQuickView>
19
20namespace KDDockWidgets {
21
22namespace Core {
23class ClassicDropIndicatorOverlay;
24class View;
25}
26
27namespace QtQuick {
28
29class ClassicDropIndicatorOverlay;
30
31class IndicatorWindow : public QQuickView
32{
33 Q_OBJECT
34public:
35 explicit IndicatorWindow();
36 ~IndicatorWindow() override;
37
38 void init(const QUrl &rootQml);
39};
40
42{
64public:
67
68 Q_INVOKABLE QString iconName(int loc, bool active) const;
69
70 // Property getters for QML:
71 bool innerLeftIndicatorVisible() const;
72 bool innerRightIndicatorVisible() const;
73 bool innerTopIndicatorVisible() const;
74 bool innerBottomIndicatorVisible() const;
75 bool outterLeftIndicatorVisible() const;
76 bool outterRightIndicatorVisible() const;
77 bool outterTopIndicatorVisible() const;
79 bool tabIndicatorVisible() const;
80 QRect hoveredGroupRect() const;
82
83 DropLocation hover(QPoint globalPos) override;
84 void updatePositions() override;
85 QPoint posForIndicator(DropLocation) const override;
86 void raise() override;
87 void setVisible(bool) override;
88 bool isWindow() const override;
89 void setGeometry(QRect) override;
90 void resize(QSize) override;
91 void setObjectName(const QString &) override;
92 void updateIndicatorVisibility() override;
93
94 QQuickItem *indicatorForLocation(DropLocation loc) const;
95
100
101private:
102 Core::ClassicDropIndicatorOverlay *const m_classicIndicators;
103 DropLocation locationForIndicator(const QQuickItem *) const;
104 QQuickItem *indicatorForPos(QPoint) const;
105 QVector<QQuickItem *> indicatorItems() const;
106 QUrl qmlSouceUrl() const;
107
108 IndicatorWindow *const m_window;
109 QQuickItem *m_overlayItem = nullptr;
110};
111
112}
113
114}
115
116#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_INVOKABLEQ_INVOKABLE
Q_OBJECTQ_OBJECT
Q_PROPERTY(...)
Q_SIGNALSQ_SIGNALS
QObject * parent() const const

© 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