qmdisubwindow.sip 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. // qmdisubwindow.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 QMdiSubWindow : public QWidget
  22. {
  23. %TypeHeaderCode
  24. #include <qmdisubwindow.h>
  25. %End
  26. public:
  27. enum SubWindowOption /BaseType=Flag/
  28. {
  29. RubberBandResize,
  30. RubberBandMove,
  31. };
  32. typedef QFlags<QMdiSubWindow::SubWindowOption> SubWindowOptions;
  33. QMdiSubWindow(QWidget *parent /TransferThis/ = 0, Qt::WindowFlags flags = Qt::WindowFlags());
  34. virtual ~QMdiSubWindow();
  35. virtual QSize sizeHint() const;
  36. virtual QSize minimumSizeHint() const;
  37. void setWidget(QWidget *widget /Transfer/);
  38. %MethodCode
  39. // We have to implement /TransferBack/ on any existing widget.
  40. QWidget *w = sipCpp->widget();
  41. Py_BEGIN_ALLOW_THREADS
  42. sipCpp->setWidget(a0);
  43. Py_END_ALLOW_THREADS
  44. if (w)
  45. {
  46. PyObject *wo = sipGetPyObject(w, sipType_QWidget);
  47. if (wo)
  48. sipTransferBack(wo);
  49. }
  50. %End
  51. QWidget *widget() const;
  52. bool isShaded() const;
  53. void setOption(QMdiSubWindow::SubWindowOption option, bool on = true);
  54. bool testOption(QMdiSubWindow::SubWindowOption) const;
  55. void setKeyboardSingleStep(int step);
  56. int keyboardSingleStep() const;
  57. void setKeyboardPageStep(int step);
  58. int keyboardPageStep() const;
  59. void setSystemMenu(QMenu *systemMenu /Transfer/);
  60. %MethodCode
  61. // We have to break the parent association on any existing menu.
  62. QMenu *w = sipCpp->systemMenu();
  63. if (w)
  64. {
  65. PyObject *wo = sipGetPyObject(w, sipType_QMenu);
  66. if (wo)
  67. sipTransferTo(wo, 0);
  68. }
  69. Py_BEGIN_ALLOW_THREADS
  70. sipCpp->setSystemMenu(a0);
  71. Py_END_ALLOW_THREADS
  72. %End
  73. QMenu *systemMenu() const;
  74. QMdiArea *mdiArea() const;
  75. signals:
  76. void windowStateChanged(Qt::WindowStates oldState, Qt::WindowStates newState);
  77. void aboutToActivate();
  78. public slots:
  79. void showSystemMenu();
  80. void showShaded();
  81. protected:
  82. virtual bool eventFilter(QObject *object, QEvent *event);
  83. virtual bool event(QEvent *event);
  84. virtual void showEvent(QShowEvent *showEvent);
  85. virtual void hideEvent(QHideEvent *hideEvent);
  86. virtual void changeEvent(QEvent *changeEvent);
  87. virtual void closeEvent(QCloseEvent *closeEvent);
  88. virtual void leaveEvent(QEvent *leaveEvent);
  89. virtual void resizeEvent(QResizeEvent *resizeEvent);
  90. virtual void timerEvent(QTimerEvent *timerEvent);
  91. virtual void moveEvent(QMoveEvent *moveEvent);
  92. virtual void paintEvent(QPaintEvent *paintEvent);
  93. virtual void mousePressEvent(QMouseEvent *mouseEvent);
  94. virtual void mouseDoubleClickEvent(QMouseEvent *mouseEvent);
  95. virtual void mouseReleaseEvent(QMouseEvent *mouseEvent);
  96. virtual void mouseMoveEvent(QMouseEvent *mouseEvent);
  97. virtual void keyPressEvent(QKeyEvent *keyEvent);
  98. virtual void contextMenuEvent(QContextMenuEvent *contextMenuEvent);
  99. virtual void focusInEvent(QFocusEvent *focusInEvent);
  100. virtual void focusOutEvent(QFocusEvent *focusOutEvent);
  101. virtual void childEvent(QChildEvent *childEvent);
  102. };