// qmdiarea.sip generated by MetaSIP on Fri Sep 28 17:07:47 2007 // // This file is part of the QtGui Python extension module. // // Copyright (c) 2007 // Phil Thompson // // This file is part of PyQt. // // This copy of PyQt is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License version 2 as published by // the Free Software Foundation and appearing in the file LICENSE included in the // packaging of this file. // // PyQt is supplied in the hope that it will be useful, but WITHOUT ANY // WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS // FOR A PARTICULAR PURPOSE. See the GNU General Public License for more // details. // // You should have received a copy of the GNU General Public License along with // PyQt; see the file LICENSE. If not, write to the Free Software Foundation, // Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. %If (Qt_4_3_0 -) %ModuleCode #include %End %End %If (Qt_4_3_0 -) class QMdiArea : QAbstractScrollArea { %TypeHeaderCode #include %End public: enum AreaOption { DontMaximizeSubWindowOnActivation, }; typedef QFlags AreaOptions; enum WindowOrder { CreationOrder, StackingOrder, }; QMdiArea(QWidget *parent /TransferThis/ = 0); virtual ~QMdiArea(); virtual QSize sizeHint() const; virtual QSize minimumSizeHint() const; QMdiSubWindow *activeSubWindow() const; QMdiSubWindow *addSubWindow(QWidget *widget /Transfer/, Qt::WindowFlags flags = 0); QList subWindowList(QMdiArea::WindowOrder order = QMdiArea::CreationOrder) const; QMdiSubWindow *currentSubWindow() const; void removeSubWindow(QWidget *widget /GetWrapper/); %MethodCode // We need to implement /TransferBack/ on the argument, but it might be the // QMdiSubWindow that wraps the widget we are really after. QMdiSubWindow *swin = qobject_cast(a0); if (swin) { QWidget *w = swin->widget(); a0Wrapper = (w ? sipGetWrapper(w, sipClass_QWidget) : 0); } else a0Wrapper = 0; Py_BEGIN_ALLOW_THREADS sipCpp->removeSubWindow(a0); Py_END_ALLOW_THREADS if (a0Wrapper) sipTransferBack(a0Wrapper); %End QBrush background() const; void setBackground(const QBrush &background); void setOption(QMdiArea::AreaOption option, bool on = true); bool testOption(QMdiArea::AreaOption opton) const; signals: void subWindowActivated(QMdiSubWindow *); public slots: void setActiveSubWindow(QMdiSubWindow *window); void tileSubWindows(); void cascadeSubWindows(); void closeActiveSubWindow(); void closeAllSubWindows(); void activateNextSubWindow(); void activatePreviousSubWindow(); protected: void setupViewport(QWidget *viewport); virtual bool event(QEvent *event); virtual bool eventFilter(QObject *object, QEvent *event); virtual void paintEvent(QPaintEvent *paintEvent); virtual void childEvent(QChildEvent *childEvent); virtual void resizeEvent(QResizeEvent *resizeEvent); virtual void timerEvent(QTimerEvent *timerEvent); virtual void showEvent(QShowEvent *showEvent); virtual bool viewportEvent(QEvent *event); virtual void scrollContentsBy(int dx, int dy); private: QMdiArea(const QMdiArea &); }; %End %If (Qt_4_3_0 -) QFlags operator|(QMdiArea::AreaOption f1, QFlags f2); %End %If (Qt_4_3_0 -) QFlags operator|(QMdiArea::AreaOption f1, QMdiArea::AreaOption f2); %End