// qpoint.sip generated by MetaSIP on Fri Sep 28 17:07:47 2007 // // This file is part of the QtCore 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 QPoint { %TypeHeaderCode #include %End %PickleCode sipRes = Py_BuildValue((char *)"ii", sipCpp->x(), sipCpp->y()); %End public: int manhattanLength() const; QPoint(); QPoint(int xpos, int ypos); bool isNull() const; int __nonzero__() const; %MethodCode sipRes = !sipCpp->isNull(); %End int x() const; int y() const; void setX(int xpos); void setY(int ypos); QPoint &operator+=(const QPoint &p); QPoint &operator-=(const QPoint &p); QPoint &operator*=(qreal c); QPoint &operator/=(qreal c); }; QDataStream &operator<<(QDataStream &, const QPoint & /Constrained/); QDataStream &operator>>(QDataStream &, QPoint & /Constrained/); bool operator==(const QPoint &p1, const QPoint &p2); bool operator!=(const QPoint &p1, const QPoint &p2); const QPoint operator+(const QPoint &p1, const QPoint &p2); const QPoint operator-(const QPoint &p1, const QPoint &p2); const QPoint operator*(const QPoint &p, qreal c); const QPoint operator-(const QPoint &p); const QPoint operator/(const QPoint &p, qreal c); class QPointF { %TypeHeaderCode #include %End %PickleCode sipRes = Py_BuildValue((char *)"dd", sipCpp->x(), sipCpp->y()); %End public: QPointF(); QPointF(qreal xpos, qreal ypos); QPointF(const QPoint &p); bool isNull() const; int __nonzero__() const; %MethodCode sipRes = !sipCpp->isNull(); %End qreal x() const; qreal y() const; void setX(qreal xpos); void setY(qreal ypos); QPointF &operator+=(const QPointF &p); QPointF &operator-=(const QPointF &p); QPointF &operator*=(qreal c); QPointF &operator/=(qreal c); QPoint toPoint() const; }; QDataStream &operator<<(QDataStream &, const QPointF & /Constrained/); QDataStream &operator>>(QDataStream &, QPointF & /Constrained/); bool operator==(const QPointF &p1, const QPointF &p2); bool operator!=(const QPointF &p1, const QPointF &p2); const QPointF operator+(const QPointF &p1, const QPointF &p2); const QPointF operator-(const QPointF &p1, const QPointF &p2); const QPointF operator*(const QPointF &p, qreal c); const QPointF operator-(const QPointF &p); const QPointF operator/(const QPointF &p, qreal c);