// This is the SIP interface definition for QToolButton. // // Copyright (c) 2007 // Riverbank Computing Limited // // 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 as published by the Free // Software Foundation; either version 2, or (at your option) any later // version. // // 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. %ExportedDoc QToolButton QToolButton is fully implemented. %End class QToolButton : QButton { %TypeHeaderCode #include %End public: %If (Qt_3_1_0 -) enum TextPosition { %If (Qt_3_2_0 -) BesideIcon, BelowIcon, %End Right, // Obsolete Under // Obsolete }; %End %If (- Qt_2_00) QToolButton(QWidget * /TransferThis/ = 0,const char * = 0); QToolButton(const QPixmap &,const char *,const char *,SIP_RXOBJ_CON, SIP_SLOT_CON(),QToolBar * /TransferThis/,const char * = 0); QToolButton(QIconSet,const char *,const char *,SIP_RXOBJ_CON, SIP_SLOT_CON(),QToolBar * /TransferThis/,const char * = 0); %End %If (Qt_2_00 -) QToolButton(QWidget * /TransferThis/,const char * = 0); %End %If (Qt_2_00 - Qt_3_0_0) QToolButton(const QPixmap &,const QString &,const QString &, SIP_RXOBJ_CON,SIP_SLOT_CON(),QToolBar * /TransferThis/, const char * = 0); %End %If (Qt_2_00 -) QToolButton(const QIconSet &,const QString &,const QString &, SIP_RXOBJ_CON,SIP_SLOT_CON(),QToolBar * /TransferThis/, const char * = 0); %End %If (Qt_2_1_0 -) QToolButton(ArrowType,QWidget * /TransferThis/,const char * = 0); %End QSize sizeHint() const; %If (Qt_3_0_0 -) QSize minimumSizeHint() const; %End %If (Qt_2_00 - Qt_3_0_0) QSizePolicy sizePolicy() const; %End %If (Qt_2_1_0 - Qt_3_0_0) void setOnIconSet(const QIconSet &); void setOffIconSet(const QIconSet &); %End %If (- Qt_2_00) void setIconSet(const QIconSet &); %End %If (Qt_2_00 - Qt_3_0_0) virtual void setIconSet(const QIconSet &,bool = 0); %End %If (Qt_2_1_0 - Qt_3_0_0) QIconSet onIconSet() const; QIconSet offIconSet() const; %End %If (- Qt_2_00) QIconSet iconSet() const; %End %If (Qt_2_00 - Qt_3_0_0) QIconSet iconSet(bool = 0) const; %End %If (Qt_3_0_0 -) virtual void setIconSet(const QIconSet &); QIconSet iconSet() const; %End bool usesBigPixmap() const; bool usesTextLabel() const; %If (- Qt_2_00) const char *textLabel() const; %End %If (Qt_2_00 -) QString textLabel() const; %End %If (Qt_2_1_0 -) void setPopup(QPopupMenu *); QPopupMenu* popup() const; void setPopupDelay(int); int popupDelay() const; %End %If (Qt_3_0_0 -) void openPopup(); %End %If (Qt_2_1_0 -) void setAutoRaise(bool); bool autoRaise() const; %End %If (Qt_3_1_0 -) TextPosition textPosition() const; %End %If (Qt_3_2_0 -) void setText(const QString &); %End public slots: virtual void setUsesBigPixmap(bool); virtual void setUsesTextLabel(bool); %If (- Qt_2_00) virtual void setTextLabel(const char *,bool = 1); %End %If (Qt_2_00 - Qt_3_0_0) virtual void setTextLabel(const QString &,bool = 1); %End %If (Qt_3_0_0 -) virtual void setTextLabel(const QString &,bool); %End %If (- Qt_2_00) void setToggleButton(bool); %End %If (Qt_2_00 -) virtual void setToggleButton(bool); %End %If (- Qt_2_00) void setOn(bool); %End %If (Qt_2_00 -) virtual void setOn(bool); %End void toggle(); %If (Qt_3_0_0 -) // This was actually introduced in Qt v2.1.0 but gives signature // conflict until Qt v3.0.0. void setTextLabel(const QString &); %End %If (Qt_3_1_0 -) void setTextPosition(TextPosition); %End protected: %If (Qt_3_0_0 -) void mousePressEvent(QMouseEvent *); %End void drawButton(QPainter *); void drawButtonLabel(QPainter *); void enterEvent(QEvent *); void leaveEvent(QEvent *); %If (Qt_2_1_0 -) void moveEvent(QMoveEvent *); %End bool uses3D() const; %If (Qt_3_0_0 -) bool eventFilter(QObject *,QEvent *); %End private: %If (Qt_2_1_0 -) QToolButton(const QToolButton &); %End };