// qdockwidget.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. %ModuleCode #include %End class QDockWidget : QWidget { %TypeHeaderCode #include %End public: %If (Qt_4_2_0 -) QDockWidget(const QString &title, QWidget *parent /TransferThis/ = 0, Qt::WindowFlags flags = 0); %End %If (- Qt_4_2_0) QDockWidget(const QString &title, QWidget *parent /TransferThis/ = 0, Qt::WFlags flags = 0); %End %If (Qt_4_2_0 -) QDockWidget(QWidget *parent /TransferThis/ = 0, Qt::WindowFlags flags = 0); %End %If (- Qt_4_2_0) QDockWidget(QWidget *parent /TransferThis/ = 0, Qt::WFlags flags = 0); %End virtual ~QDockWidget(); QWidget *widget() const; void setWidget(QWidget *widget /Transfer/); enum DockWidgetFeature { DockWidgetClosable, DockWidgetMovable, DockWidgetFloatable, %If (Qt_4_3_0 -) DockWidgetVerticalTitleBar, %End AllDockWidgetFeatures, NoDockWidgetFeatures, }; typedef QFlags DockWidgetFeatures; void setFeatures(QFlags features); QFlags features() const; void setFloating(bool floating); bool isFloating() const; void setAllowedAreas(Qt::DockWidgetAreas areas); Qt::DockWidgetAreas allowedAreas() const; bool isAreaAllowed(Qt::DockWidgetArea area) const; QAction *toggleViewAction() const /Transfer/; %If (Qt_4_3_0 -) void setTitleBarWidget(QWidget *widget /Transfer/); %MethodCode // We have to implement /TransferBack/ on any existing title bar widget. QWidget *w = sipCpp->widget(); Py_BEGIN_ALLOW_THREADS sipCpp->setTitleBarWidget(a0); Py_END_ALLOW_THREADS if (w) { PyObject *wo = sipGetWrapper(w, sipClass_QWidget); if (wo) sipTransferBack(wo); } %End %End %If (Qt_4_3_0 -) QWidget *titleBarWidget() const; %End signals: void featuresChanged(QFlags features); void topLevelChanged(bool topLevel); void allowedAreasChanged(Qt::DockWidgetAreas allowedAreas); %If (Qt_4_3_0 -) void dockLocationChanged(Qt::DockWidgetArea area); %End %If (Qt_4_3_0 -) void visibilityChanged(bool visible); %End protected: %If (Qt_4_3_0 -) void initStyleOption(QStyleOptionDockWidget *option) const; %End virtual void changeEvent(QEvent *event); virtual void closeEvent(QCloseEvent *event); virtual void paintEvent(QPaintEvent *event); virtual bool event(QEvent *event); private: QDockWidget(const QDockWidget &); }; QFlags operator|(QDockWidget::DockWidgetFeature f1, QFlags f2); QFlags operator|(QDockWidget::DockWidgetFeature f1, QDockWidget::DockWidgetFeature f2);