// qregion.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 QRegion { %TypeHeaderCode #include %End public: enum RegionType { Rectangle, Ellipse, }; QRegion(); QRegion(int x, int y, int w, int h, QRegion::RegionType t = QRegion::Rectangle); QRegion(const QRect &r, QRegion::RegionType t = QRegion::Rectangle); QRegion(const QPolygon &pa, Qt::FillRule fillRule = Qt::OddEvenFill); QRegion(const QBitmap &bitmap); QRegion(const QRegion ®ion); QRegion(const QVariant &variant) /NoDerived/; %MethodCode sipCpp = new QRegion(qVariantValue(*a0)); %End ~QRegion(); bool isEmpty() const; int __nonzero__() const; %MethodCode sipRes = !sipCpp->isEmpty(); %End bool contains(const QPoint &p) const; int __contains__(const QPoint &p) const; %MethodCode sipRes = sipCpp->contains(*a0); %End bool contains(const QRect &r) const; int __contains__(const QRect &r) const; %MethodCode sipRes = sipCpp->contains(*a0); %End void translate(int dx, int dy); void translate(const QPoint &p); QRegion translated(int dx, int dy) const; QRegion translated(const QPoint &p) const; QRegion unite(const QRegion &r) const; QRegion intersect(const QRegion &r) const; QRegion subtract(const QRegion &r) const; QRegion eor(const QRegion &r) const; QRect boundingRect() const; QVector rects() const; const QRegion operator|(const QRegion &r) const; const QRegion operator+(const QRegion &r) const; const QRegion operator&(const QRegion &r) const; const QRegion operator-(const QRegion &r) const; const QRegion operator^(const QRegion &r) const; QRegion &operator|=(const QRegion &r); QRegion &operator+=(const QRegion &r); QRegion &operator&=(const QRegion &r); QRegion &operator-=(const QRegion &r); QRegion &operator^=(const QRegion &r); bool operator==(const QRegion &r) const; bool operator!=(const QRegion &r) const; operator QVariant() const; %If (Qt_4_2_0 -) QRegion united(const QRegion &r) const; %End %If (Qt_4_2_0 -) QRegion intersected(const QRegion &r) const; %End %If (Qt_4_2_0 -) QRegion subtracted(const QRegion &r) const; %End %If (Qt_4_2_0 -) QRegion xored(const QRegion &r) const; %End %If (Qt_4_2_0 -) bool intersects(const QRegion &r) const; %End %If (Qt_4_2_0 -) bool intersects(const QRect &r) const; %End }; QDataStream &operator<<(QDataStream &, const QRegion & /Constrained/); QDataStream &operator>>(QDataStream &, QRegion & /Constrained/);