// qlayoutitem.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. class QLayoutItem { %TypeHeaderCode #include %End %ConvertToSubClassCode // Note that we let the QObject sub-class code handle QLayout and it's // sub-classes. if (sipCpp->widget()) sipClass = sipClass_QWidgetItem; else if (sipCpp->spacerItem()) sipClass = sipClass_QSpacerItem; else sipClass = 0; %End public: explicit QLayoutItem(Qt::Alignment aalignment = 0); virtual ~QLayoutItem(); virtual QSize sizeHint() const = 0; virtual QSize minimumSize() const = 0; virtual QSize maximumSize() const = 0; virtual Qt::Orientations expandingDirections() const = 0; virtual void setGeometry(const QRect &) = 0; virtual QRect geometry() const = 0; virtual bool isEmpty() const = 0; virtual bool hasHeightForWidth() const; virtual int heightForWidth(int) const; virtual int minimumHeightForWidth(int) const; virtual void invalidate(); virtual QWidget *widget(); virtual QLayout *layout(); virtual QSpacerItem *spacerItem(); Qt::Alignment alignment() const; void setAlignment(Qt::Alignment a); %If (Qt_4_3_0 -) QFlags controlTypes() const; %End }; class QSpacerItem : QLayoutItem { %TypeHeaderCode #include %End public: QSpacerItem(int w, int h, QSizePolicy::Policy hData = QSizePolicy::Minimum, QSizePolicy::Policy vData = QSizePolicy::Minimum); void changeSize(int w, int h, QSizePolicy::Policy hData = QSizePolicy::Minimum, QSizePolicy::Policy vData = QSizePolicy::Minimum); virtual QSize sizeHint() const; virtual QSize minimumSize() const; virtual QSize maximumSize() const; virtual Qt::Orientations expandingDirections() const; virtual bool isEmpty() const; virtual void setGeometry(const QRect &); virtual QRect geometry() const; virtual QSpacerItem *spacerItem(); }; class QWidgetItem : QLayoutItem { %TypeHeaderCode #include %End public: explicit QWidgetItem(QWidget *w); virtual QSize sizeHint() const; virtual QSize minimumSize() const; virtual QSize maximumSize() const; virtual Qt::Orientations expandingDirections() const; virtual bool isEmpty() const; virtual void setGeometry(const QRect &); virtual QRect geometry() const; virtual QWidget *widget(); virtual bool hasHeightForWidth() const; virtual int heightForWidth(int) const; private: %If (Qt_4_2_0 -) QWidgetItem(const QWidgetItem &); %End };