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