// qpen.sip generated by MetaSIP on Mon Oct 24 12:34:00 2011 // // This file is part of the QtGui Python extension module. // // Copyright (c) 2011 Riverbank Computing Limited // // This file is part of PyQt. // // This file may be used under the terms of the GNU General Public // License versions 2.0 or 3.0 as published by the Free Software // Foundation and appearing in the files LICENSE.GPL2 and LICENSE.GPL3 // included in the packaging of this file. Alternatively you may (at // your option) use any later version of the GNU General Public // License if such license has been publicly approved by Riverbank // Computing Limited (or its successors, if any) and the KDE Free Qt // Foundation. In addition, as a special exception, Riverbank gives you // certain additional rights. These rights are described in the Riverbank // GPL Exception version 1.1, which can be found in the file // GPL_EXCEPTION.txt in this package. // // If you are unsure which license is appropriate for your use, please // contact the sales department at sales@riverbankcomputing.com. // // This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE // WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. %ModuleCode #include %End class QPen { %TypeHeaderCode #include %End %ConvertToTypeCode // SIP doesn't support automatic type convertors so we explicitly allow a // QColor to be used whenever a QPen is expected. if (sipIsErr == NULL) return (sipCanConvertToType(sipPy, sipType_QPen, SIP_NO_CONVERTORS) || sipCanConvertToType(sipPy, sipType_QColor, 0)); if (sipCanConvertToType(sipPy, sipType_QPen, SIP_NO_CONVERTORS)) { *sipCppPtr = reinterpret_cast(sipConvertToType(sipPy, sipType_QPen, sipTransferObj, SIP_NO_CONVERTORS, 0, sipIsErr)); return 0; } int state; QColor *c = reinterpret_cast(sipConvertToType(sipPy, sipType_QColor, 0, 0, &state, sipIsErr)); if (*sipIsErr) { sipReleaseType(c, sipType_QColor, state); return 0; } *sipCppPtr = new QPen(*c); sipReleaseType(c, sipType_QColor, state); return sipGetState(sipTransferObj); %End public: QPen(); QPen(Qt::PenStyle); QPen(const QColor &color); QPen(const QBrush &brush, qreal width, Qt::PenStyle style = Qt::SolidLine, Qt::PenCapStyle cap = Qt::SquareCap, Qt::PenJoinStyle join = Qt::BevelJoin); QPen(const QPen &pen); QPen(const QVariant &variant) /NoDerived/; %MethodCode sipCpp = new QPen(qVariantValue(*a0)); %End ~QPen(); Qt::PenStyle style() const; void setStyle(Qt::PenStyle); qreal widthF() const; void setWidthF(qreal width); int width() const; void setWidth(int width); QColor color() const; void setColor(const QColor &color); QBrush brush() const; void setBrush(const QBrush &brush); bool isSolid() const; Qt::PenCapStyle capStyle() const; void setCapStyle(Qt::PenCapStyle pcs); Qt::PenJoinStyle joinStyle() const; void setJoinStyle(Qt::PenJoinStyle pcs); QVector dashPattern() const; void setDashPattern(const QVector &pattern); qreal miterLimit() const; void setMiterLimit(qreal limit); bool operator==(const QPen &p) const; bool operator!=(const QPen &p) const; %If (Qt_4_3_0 -) qreal dashOffset() const; %End %If (Qt_4_3_0 -) void setDashOffset(qreal doffset); %End %If (Qt_4_3_0 -) bool isCosmetic() const; %End %If (Qt_4_3_0 -) void setCosmetic(bool cosmetic); %End }; QDataStream &operator<<(QDataStream &, const QPen & /Constrained/); QDataStream &operator>>(QDataStream &, QPen & /Constrained/); %If (Qt_4_3_0 -) void qSwap(QPen &value1, QPen &value2); %End