// qcursor.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 QCursor { %TypeHeaderCode #include %End %ConvertToTypeCode // SIP doesn't support automatic type convertors so we explicitly allow a // Qt::CursorShape to be used whenever a QCursor is expected. if (sipIsErr == NULL) return (PyObject_TypeCheck(sipPy, sipEnum_Qt_CursorShape) || sipCanConvertToInstance(sipPy, sipClass_QCursor, SIP_NO_CONVERTORS)); if (PyObject_TypeCheck(sipPy, sipEnum_Qt_CursorShape)) { *sipCppPtr = new QCursor((Qt::CursorShape)PyInt_AsLong(sipPy)); return sipGetState(sipTransferObj); } *sipCppPtr = reinterpret_cast(sipConvertToInstance(sipPy, sipClass_QCursor, sipTransferObj, SIP_NO_CONVERTORS, 0, sipIsErr)); return 0; %End public: QCursor(); QCursor(Qt::CursorShape shape); QCursor(const QBitmap &bitmap, const QBitmap &mask, int hotX = -1, int hotY = -1); QCursor(const QPixmap &pixmap, int hotX = -1, int hotY = -1); QCursor(const QCursor &cursor); QCursor(const QVariant &variant) /NoDerived/; %MethodCode sipCpp = new QCursor(qVariantValue(*a0)); %End ~QCursor(); operator QVariant() const; Qt::CursorShape shape() const; void setShape(Qt::CursorShape newShape); const QBitmap *bitmap() const; const QBitmap *mask() const; QPixmap pixmap() const; QPoint hotSpot() const; static QPoint pos(); static void setPos(int x, int y); static void setPos(const QPoint &p); }; QDataStream &operator<<(QDataStream &outS, const QCursor &cursor /Constrained/); QDataStream &operator>>(QDataStream &inS, QCursor &cursor /Constrained/);