KDDockWidgets API Documentation 2.0
Loading...
Searching...
No Matches
qtwidgets/views/DockWidget.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
19#ifndef KD_DOCKWIDGET_WIDGETS_H
20#define KD_DOCKWIDGET_WIDGETS_H
21#pragma once
22
23#include "kddockwidgets/core/views/DockWidgetViewInterface.h"
24#include "View.h"
25
26// clazy:excludeall=ctor-missing-parent-argument
27
28namespace KDDockWidgets {
29
30namespace QtWidgets {
31
37#ifdef PYTHON_BINDINGS
38class DOCKS_EXPORT DockWidget : public QWidget,
39 public Core::DockWidgetViewInterface
40#else
41class DOCKS_EXPORT DockWidget : public QtWidgets::View<QWidget>,
43#endif
44{
45 Q_OBJECT
46public:
47 using Core::DockWidgetViewInterface::raise;
48 using Core::DockWidgetViewInterface::show;
49 using QWidget::size;
50
62 explicit DockWidget(const QString &uniqueName, DockWidgetOptions options = {},
63 LayoutSaverOptions layoutSaverOptions = {},
64 Qt::WindowFlags windowFlags = Qt::Tool);
65
67 ~DockWidget() override;
68
78 void setWidget(QWidget *widget);
79
81 QWidget *widget() const;
82
83 QAction *toggleAction() const;
84 QAction *floatAction() const;
85
86Q_SIGNALS:
87 void optionsChanged(KDDockWidgets::DockWidgetOptions);
89 void isFocusedChanged(bool);
90 void isOpenChanged(bool);
92
96
97protected:
98 bool event(QEvent *) override;
99 void resizeEvent(QResizeEvent *) override;
100 std::shared_ptr<Core::View> focusCandidate() const override;
101
102private:
103 class Private;
104 Private *const d;
105};
106
107}
108
109}
110
111#endif
The interface that DockWidget views should implement.
void isCurrentTabChanged(bool)
Emitted when a dock widget becomes current or not in its tab group.
void optionsChanged(KDDockWidgets::DockWidgetOptions)
Class to abstract QAction, so code still works with QtQuick and Flutter.
typedef WindowFlags

© 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