|
|
|
// This is the SIP interface definition for TQToolButton.
|
|
|
|
//
|
|
|
|
// Copyright (c) 2007
|
|
|
|
// Riverbank Computing Limited <info@riverbankcomputing.co.uk>
|
|
|
|
//
|
|
|
|
// This file is part of PyTQt.
|
|
|
|
//
|
|
|
|
// This copy of PyTQt 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.
|
|
|
|
//
|
|
|
|
// PyTQt 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
|
|
|
|
// PyTQt; see the file LICENSE. If not, write to the Free Software Foundation,
|
|
|
|
// Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
|
|
|
|
|
|
|
|
|
|
%ExportedDoc
|
|
|
|
<Sect2><Title>TQToolButton</Title>
|
|
|
|
<Para>
|
|
|
|
<Literal>TQToolButton</Literal> is fully implemented.
|
|
|
|
</Para>
|
|
|
|
</Sect2>
|
|
|
|
%End
|
|
|
|
|
|
|
|
|
|
|
|
class TQToolButton : TQButton
|
|
|
|
{
|
|
|
|
%TypeHeaderCode
|
|
|
|
#include <tqtoolbutton.h>
|
|
|
|
%End
|
|
|
|
|
|
|
|
public:
|
|
|
|
%If (TQt_3_1_0 -)
|
|
|
|
enum TextPosition {
|
|
|
|
%If (TQt_3_2_0 -)
|
|
|
|
BesideIcon,
|
|
|
|
BelowIcon,
|
|
|
|
%End
|
|
|
|
Right, // Obsolete
|
|
|
|
Under // Obsolete
|
|
|
|
};
|
|
|
|
%End
|
|
|
|
|
|
|
|
%If (- TQt_2_00)
|
|
|
|
TQToolButton(TQWidget * /TransferThis/ = 0,const char * = 0);
|
|
|
|
TQToolButton(const TQPixmap &,const char *,const char *,SIP_RXOBJ_CON,
|
|
|
|
SIP_SLOT_CON(),TQToolBar * /TransferThis/,const char * = 0);
|
|
|
|
TQToolButton(TQIconSet,const char *,const char *,SIP_RXOBJ_CON,
|
|
|
|
SIP_SLOT_CON(),TQToolBar * /TransferThis/,const char * = 0);
|
|
|
|
%End
|
|
|
|
%If (TQt_2_00 -)
|
|
|
|
TQToolButton(TQWidget * /TransferThis/,const char * = 0);
|
|
|
|
%End
|
|
|
|
%If (TQt_2_00 - TQt_3_0_0)
|
|
|
|
TQToolButton(const TQPixmap &,const TQString &,const TQString &,
|
|
|
|
SIP_RXOBJ_CON,SIP_SLOT_CON(),TQToolBar * /TransferThis/,
|
|
|
|
const char * = 0);
|
|
|
|
%End
|
|
|
|
%If (TQt_2_00 -)
|
|
|
|
TQToolButton(const TQIconSet &,const TQString &,const TQString &,
|
|
|
|
SIP_RXOBJ_CON,SIP_SLOT_CON(),TQToolBar * /TransferThis/,
|
|
|
|
const char * = 0);
|
|
|
|
%End
|
|
|
|
%If (TQt_2_1_0 -)
|
|
|
|
TQToolButton(ArrowType,TQWidget * /TransferThis/,const char * = 0);
|
|
|
|
%End
|
|
|
|
|
|
|
|
TQSize sizeHint() const;
|
|
|
|
%If (TQt_3_0_0 -)
|
|
|
|
TQSize minimumSizeHint() const;
|
|
|
|
%End
|
|
|
|
%If (TQt_2_00 - TQt_3_0_0)
|
|
|
|
TQSizePolicy sizePolicy() const;
|
|
|
|
%End
|
|
|
|
|
|
|
|
%If (TQt_2_1_0 - TQt_3_0_0)
|
|
|
|
void setOnIconSet(const TQIconSet &);
|
|
|
|
void setOffIconSet(const TQIconSet &);
|
|
|
|
%End
|
|
|
|
%If (- TQt_2_00)
|
|
|
|
void setIconSet(const TQIconSet &);
|
|
|
|
%End
|
|
|
|
%If (TQt_2_00 - TQt_3_0_0)
|
|
|
|
virtual void setIconSet(const TQIconSet &,bool = 0);
|
|
|
|
%End
|
|
|
|
%If (TQt_2_1_0 - TQt_3_0_0)
|
|
|
|
TQIconSet onIconSet() const;
|
|
|
|
TQIconSet offIconSet() const;
|
|
|
|
%End
|
|
|
|
%If (- TQt_2_00)
|
|
|
|
TQIconSet iconSet() const;
|
|
|
|
%End
|
|
|
|
%If (TQt_2_00 - TQt_3_0_0)
|
|
|
|
TQIconSet iconSet(bool = 0) const;
|
|
|
|
%End
|
|
|
|
%If (TQt_3_0_0 -)
|
|
|
|
virtual void setIconSet(const TQIconSet &);
|
|
|
|
TQIconSet iconSet() const;
|
|
|
|
%End
|
|
|
|
|
|
|
|
bool usesBigPixmap() const;
|
|
|
|
bool usesTextLabel() const;
|
|
|
|
%If (- TQt_2_00)
|
|
|
|
const char *textLabel() const;
|
|
|
|
%End
|
|
|
|
%If (TQt_2_00 -)
|
|
|
|
TQString textLabel() const;
|
|
|
|
%End
|
|
|
|
|
|
|
|
%If (TQt_2_1_0 -)
|
|
|
|
void setPopup(TQPopupMenu *);
|
|
|
|
TQPopupMenu* popup() const;
|
|
|
|
|
|
|
|
void setPopupDelay(int);
|
|
|
|
int popupDelay() const;
|
|
|
|
%End
|
|
|
|
|
|
|
|
%If (TQt_3_0_0 -)
|
|
|
|
void openPopup();
|
|
|
|
%End
|
|
|
|
|
|
|
|
%If (TQt_2_1_0 -)
|
|
|
|
void setAutoRaise(bool);
|
|
|
|
bool autoRaise() const;
|
|
|
|
%End
|
|
|
|
%If (TQt_3_1_0 -)
|
|
|
|
TextPosition textPosition() const;
|
|
|
|
%End
|
|
|
|
|
|
|
|
%If (TQt_3_2_0 -)
|
|
|
|
void setText(const TQString &);
|
|
|
|
%End
|
|
|
|
|
|
|
|
public slots:
|
|
|
|
virtual void setUsesBigPixmap(bool);
|
|
|
|
virtual void setUsesTextLabel(bool);
|
|
|
|
%If (- TQt_2_00)
|
|
|
|
virtual void setTextLabel(const char *,bool = 1);
|
|
|
|
%End
|
|
|
|
%If (TQt_2_00 - TQt_3_0_0)
|
|
|
|
virtual void setTextLabel(const TQString &,bool = 1);
|
|
|
|
%End
|
|
|
|
%If (TQt_3_0_0 -)
|
|
|
|
virtual void setTextLabel(const TQString &,bool);
|
|
|
|
%End
|
|
|
|
|
|
|
|
%If (- TQt_2_00)
|
|
|
|
void setToggleButton(bool);
|
|
|
|
%End
|
|
|
|
%If (TQt_2_00 -)
|
|
|
|
virtual void setToggleButton(bool);
|
|
|
|
%End
|
|
|
|
|
|
|
|
%If (- TQt_2_00)
|
|
|
|
void setOn(bool);
|
|
|
|
%End
|
|
|
|
%If (TQt_2_00 -)
|
|
|
|
virtual void setOn(bool);
|
|
|
|
%End
|
|
|
|
void toggle();
|
|
|
|
%If (TQt_3_0_0 -)
|
|
|
|
// This was actually introduced in TQt v2.1.0 but gives signature
|
|
|
|
// conflict until TQt v3.0.0.
|
|
|
|
void setTextLabel(const TQString &);
|
|
|
|
%End
|
|
|
|
%If (TQt_3_1_0 -)
|
|
|
|
void setTextPosition(TextPosition);
|
|
|
|
%End
|
|
|
|
|
|
|
|
protected:
|
|
|
|
%If (TQt_3_0_0 -)
|
|
|
|
void mousePressEvent(TQMouseEvent *);
|
|
|
|
%End
|
|
|
|
void drawButton(TQPainter *);
|
|
|
|
void drawButtonLabel(TQPainter *);
|
|
|
|
|
|
|
|
void enterEvent(TQEvent *);
|
|
|
|
void leaveEvent(TQEvent *);
|
|
|
|
%If (TQt_2_1_0 -)
|
|
|
|
void moveEvent(TQMoveEvent *);
|
|
|
|
%End
|
|
|
|
|
|
|
|
bool uses3D() const;
|
|
|
|
|
|
|
|
%If (TQt_3_0_0 -)
|
|
|
|
bool eventFilter(TQObject *,TQEvent *);
|
|
|
|
%End
|
|
|
|
|
|
|
|
private:
|
|
|
|
%If (TQt_2_1_0 -)
|
|
|
|
TQToolButton(const TQToolButton &);
|
|
|
|
%End
|
|
|
|
};
|