KDDockWidgets API Documentation 2.1
Loading...
Searching...
No Matches
qtquick/views/FloatingWindow.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_FLOATING_WINDOWQUICK_P_H
13#define KD_FLOATING_WINDOWQUICK_P_H
14
15#include "View.h"
16
17QT_BEGIN_NAMESPACE
18class QQuickView;
19QT_END_NAMESPACE
20
21namespace KDDockWidgets {
22
23namespace Core {
24class FloatingWindow;
25}
26
27namespace QtQuick {
28
29class MainWindow;
30class TitleBar;
31class DropArea;
32
33class DOCKS_EXPORT FloatingWindow : public QtQuick::View
34{
35 Q_OBJECT
36 Q_PROPERTY(QObject *titleBar READ titleBar CONSTANT)
37 Q_PROPERTY(QObject *dropArea READ dropArea CONSTANT)
38public:
39 explicit FloatingWindow(Core::FloatingWindow *controller,
40 QtQuick::MainWindow *parent = nullptr,
41 Qt::WindowFlags flags = {});
43
44 QSize minSize() const override;
45
46 // QML interface
47 QObject *titleBar() const;
48 QObject *dropArea() const;
49
50 Core::Item *rootItem() const;
51
52protected:
53 void setGeometry(QRect) override;
54
55private:
56 void onWindowStateChanged(Qt::WindowState);
57 int contentsMargins() const;
58 int titleBarHeight() const;
59 QWindow *candidateParentWindow() const;
60 void init() override final;
61 QQuickView *const m_quickWindow;
62 QQuickItem *m_visualItem = nullptr;
63 Core::FloatingWindow *const m_controller;
64 Q_DISABLE_COPY(FloatingWindow)
65};
66
67}
68
69}
70
71#endif
A docking area for dock widgets Named MainWindow as it's the QtWidgets/QMainWindow counterpart....
Class to abstract QAction, so code still works with QtQuick and Flutter.
WindowState

© 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