1// qdockwidget.sip generated by MetaSIP
2//
3// This file is part of the QtWidgets Python extension module.
4//
5// Copyright (c) 2021 Riverbank Computing Limited <info@riverbankcomputing.com>
6//
7// This file is part of PyQt5.
8//
9// This file may be used under the terms of the GNU General Public License
10// version 3.0 as published by the Free Software Foundation and appearing in
11// the file LICENSE included in the packaging of this file.  Please review the
12// following information to ensure the GNU General Public License version 3.0
13// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
14//
15// If you do not wish to use this file under the terms of the GPL version 3.0
16// then you may purchase a commercial license.  For more information contact
17// info@riverbankcomputing.com.
18//
19// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
20// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
21
22
23class QDockWidget : QWidget
24{
25%TypeHeaderCode
26#include <qdockwidget.h>
27%End
28
29public:
30    QDockWidget(const QString &title, QWidget *parent /TransferThis/ = 0, Qt::WindowFlags flags = Qt::WindowFlags());
31    QDockWidget(QWidget *parent /TransferThis/ = 0, Qt::WindowFlags flags = Qt::WindowFlags());
32    virtual ~QDockWidget();
33    QWidget *widget() const;
34    void setWidget(QWidget *widget /Transfer/);
35
36    enum DockWidgetFeature
37    {
38        DockWidgetClosable,
39        DockWidgetMovable,
40        DockWidgetFloatable,
41        DockWidgetVerticalTitleBar,
42        AllDockWidgetFeatures,
43        NoDockWidgetFeatures,
44    };
45
46    typedef QFlags<QDockWidget::DockWidgetFeature> DockWidgetFeatures;
47    void setFeatures(QDockWidget::DockWidgetFeatures features);
48    QDockWidget::DockWidgetFeatures features() const;
49    void setFloating(bool floating);
50    bool isFloating() const;
51    void setAllowedAreas(Qt::DockWidgetAreas areas);
52    Qt::DockWidgetAreas allowedAreas() const;
53    bool isAreaAllowed(Qt::DockWidgetArea area) const;
54    QAction *toggleViewAction() const /Transfer/;
55    void setTitleBarWidget(QWidget *widget /Transfer/);
56    QWidget *titleBarWidget() const;
57
58signals:
59    void featuresChanged(QDockWidget::DockWidgetFeatures features);
60    void topLevelChanged(bool topLevel);
61    void allowedAreasChanged(Qt::DockWidgetAreas allowedAreas);
62    void dockLocationChanged(Qt::DockWidgetArea area);
63    void visibilityChanged(bool visible);
64
65protected:
66    void initStyleOption(QStyleOptionDockWidget *option) const;
67    virtual void changeEvent(QEvent *event);
68    virtual void closeEvent(QCloseEvent *event);
69    virtual void paintEvent(QPaintEvent *event);
70    virtual bool event(QEvent *event);
71};
72
73QFlags<QDockWidget::DockWidgetFeature> operator|(QDockWidget::DockWidgetFeature f1, QFlags<QDockWidget::DockWidgetFeature> f2);
74