qdockwidget.sip 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. // qdockwidget.sip generated by MetaSIP
  2. //
  3. // This file is part of the QtWidgets Python extension module.
  4. //
  5. // Copyright (c) 2026 Riverbank Computing Limited <info@riverbankcomputing.com>
  6. //
  7. // This file is part of PyQt6.
  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. class QDockWidget : public QWidget
  22. {
  23. %TypeHeaderCode
  24. #include <qdockwidget.h>
  25. %End
  26. public:
  27. QDockWidget(const QString &title, QWidget *parent /TransferThis/ = 0, Qt::WindowFlags flags = Qt::WindowFlags());
  28. QDockWidget(QWidget *parent /TransferThis/ = 0, Qt::WindowFlags flags = Qt::WindowFlags());
  29. virtual ~QDockWidget();
  30. QWidget *widget() const;
  31. void setWidget(QWidget *widget /Transfer/);
  32. enum DockWidgetFeature /BaseType=Flag/
  33. {
  34. DockWidgetClosable,
  35. DockWidgetMovable,
  36. DockWidgetFloatable,
  37. DockWidgetVerticalTitleBar,
  38. NoDockWidgetFeatures,
  39. };
  40. typedef QFlags<QDockWidget::DockWidgetFeature> DockWidgetFeatures;
  41. void setFeatures(QDockWidget::DockWidgetFeatures features);
  42. QDockWidget::DockWidgetFeatures features() const;
  43. void setFloating(bool floating);
  44. bool isFloating() const;
  45. void setAllowedAreas(Qt::DockWidgetAreas areas);
  46. Qt::DockWidgetAreas allowedAreas() const;
  47. bool isAreaAllowed(Qt::DockWidgetArea area) const;
  48. QAction *toggleViewAction() const /Transfer/;
  49. void setTitleBarWidget(QWidget *widget /Transfer/);
  50. QWidget *titleBarWidget() const;
  51. signals:
  52. void featuresChanged(QDockWidget::DockWidgetFeatures features);
  53. void topLevelChanged(bool topLevel);
  54. void allowedAreasChanged(Qt::DockWidgetAreas allowedAreas);
  55. void dockLocationChanged(Qt::DockWidgetArea area);
  56. void visibilityChanged(bool visible);
  57. protected:
  58. virtual void initStyleOption(QStyleOptionDockWidget *option) const;
  59. virtual void changeEvent(QEvent *event);
  60. virtual void closeEvent(QCloseEvent *event);
  61. virtual void paintEvent(QPaintEvent *event);
  62. virtual bool event(QEvent *event);
  63. public:
  64. %If (Qt_6_9_0 -)
  65. void setDockLocation(Qt::DockWidgetArea area);
  66. %End
  67. %If (Qt_6_9_0 -)
  68. Qt::DockWidgetArea dockLocation() const;
  69. %End
  70. };