KDDockWidgets API Documentation 2.1
Loading...
Searching...
No Matches
qtquick/views/Group.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
13#ifndef KD_FRAME_QUICK_P_H
14#define KD_FRAME_QUICK_P_H
15#pragma once
16
17#include "View.h"
18#include "TitleBar.h"
19#include "kddockwidgets/core/views/GroupViewInterface.h"
20
21QT_BEGIN_NAMESPACE
22class QQuickItem;
23QT_END_NAMESPACE
24
25namespace KDDockWidgets {
26
27namespace Core {
28class Group;
29class DockWidget;
30}
31
32namespace QtQuick {
33
34class TabBar;
35class Stack;
36
37class DOCKS_EXPORT Group : public QtQuick::View, public Core::GroupViewInterface
38{
39 Q_OBJECT
40 Q_PROPERTY(QObject *tabBar READ tabBarObj CONSTANT)
41 Q_PROPERTY(KDDockWidgets::QtQuick::TitleBar *titleBar READ titleBar CONSTANT)
42 Q_PROPERTY(int userType READ userType CONSTANT)
43 Q_PROPERTY(KDDockWidgets::QtQuick::TitleBar *actualTitleBar READ actualTitleBar NOTIFY
44 actualTitleBarChanged)
45 Q_PROPERTY(int currentIndex READ currentIndex NOTIFY currentDockWidgetChanged)
46 Q_PROPERTY(bool isMDI READ isMDI NOTIFY isMDIChanged)
47
48public:
49 explicit Group(Core::Group *controller, QQuickItem *parent = nullptr);
50 ~Group() override;
51
53 QSize minSize() const override;
54
56 QSize maxSizeHint() const override;
57
59 QQuickItem *visualItem() const override;
60
61 int currentIndex() const;
62
63 // QML interface:
64 KDDockWidgets::QtQuick::TitleBar *titleBar() const;
65 KDDockWidgets::QtQuick::TitleBar *actualTitleBar() const;
66 int userType() const;
67 QObject *tabBarObj() const;
68
70 Q_INVOKABLE void setMDISize(QSize);
71
72
73protected:
74 void removeDockWidget(Core::DockWidget *dw) override;
75 void insertDockWidget(Core::DockWidget *dw, int index) override;
76
77 Q_INVOKABLE void setStackLayout(QQuickItem *);
78
81 Q_INVOKABLE void startMDIResize();
82
83 int nonContentsHeight() const override;
84
85Q_SIGNALS:
86 void isMDIChanged();
87 void currentDockWidgetChanged();
88 void actualTitleBarChanged();
89
90public Q_SLOTS:
91 void updateConstraints();
92
93private:
94 void init() override final;
95 Stack *stackView() const;
96 TabBar *tabBarView() const;
97
98 class Private;
99 Private *const d;
100
101 QQuickItem *m_stackLayout = nullptr;
102 QQuickItem *m_visualItem = nullptr;
103};
104
105}
106}
107
108#endif
The interface that Frame views should implement.
Class to abstract QAction, so code still works with QtQuick and Flutter.

© 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