// qicon.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 QIcon { %TypeHeaderCode #include %End public: enum Mode { Normal, Disabled, Active, %If (Qt_4_2_0 -) Selected, %End }; enum State { On, Off, }; QIcon(); QIcon(const QPixmap &pixmap); QIcon(const QIcon &other); explicit QIcon(const QString &fileName); explicit QIcon(QIconEngine *engine /Transfer/); %If (Qt_4_3_0 -) explicit QIcon(QIconEngineV2 *engine /Transfer/); %End QIcon(const QVariant &variant) /NoDerived/; %MethodCode sipCpp = new QIcon(qVariantValue(*a0)); %End ~QIcon(); operator QVariant() const; QPixmap pixmap(const QSize &size, QIcon::Mode mode = QIcon::Normal, QIcon::State state = QIcon::Off) const; QPixmap pixmap(int w, int h, QIcon::Mode mode = QIcon::Normal, QIcon::State state = QIcon::Off) const; QPixmap pixmap(int extent, QIcon::Mode mode = QIcon::Normal, QIcon::State state = QIcon::Off) const; QSize actualSize(const QSize &size, QIcon::Mode mode = QIcon::Normal, QIcon::State state = QIcon::Off) const; void paint(QPainter *painter, const QRect &rect, Qt::Alignment alignment = Qt::AlignCenter, QIcon::Mode mode = QIcon::Normal, QIcon::State state = QIcon::Off) const; void paint(QPainter *painter, int x, int y, int w, int h, Qt::Alignment alignment = Qt::AlignCenter, QIcon::Mode mode = QIcon::Normal, QIcon::State state = QIcon::Off) const; bool isNull() const; bool isDetached() const; int serialNumber() const; void addPixmap(const QPixmap &pixmap, QIcon::Mode mode = QIcon::Normal, QIcon::State state = QIcon::Off); void addFile(const QString &fileName, const QSize &size = QSize(), QIcon::Mode mode = QIcon::Normal, QIcon::State state = QIcon::Off); %If (Qt_4_3_0 -) qint64 cacheKey() const; %End }; %If (Qt_4_2_0 -) QDataStream &operator<<(QDataStream &, const QIcon & /Constrained/); %End %If (Qt_4_2_0 -) QDataStream &operator>>(QDataStream &, QIcon & /Constrained/); %End %If (Qt_4_3_0 -) void qSwap(QIcon &value1, QIcon &value2); %End