1// qabstractbutton.sip generated by MetaSIP 2// 3// This file is part of the QtWidgets Python extension module. 4// 5// Copyright (c) 2021 Riverbank Computing Limited <info@riverbankcomputing.com> 6// 7// This file is part of PyQt5. 8// 9// This file may be used under the terms of the GNU General Public License 10// version 3.0 as published by the Free Software Foundation and appearing in 11// the file LICENSE included in the packaging of this file. Please review the 12// following information to ensure the GNU General Public License version 3.0 13// requirements will be met: http://www.gnu.org/copyleft/gpl.html. 14// 15// If you do not wish to use this file under the terms of the GPL version 3.0 16// then you may purchase a commercial license. For more information contact 17// info@riverbankcomputing.com. 18// 19// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 20// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 21 22 23class QAbstractButton : QWidget 24{ 25%TypeHeaderCode 26#include <qabstractbutton.h> 27%End 28 29public: 30 explicit QAbstractButton(QWidget *parent /TransferThis/ = 0); 31 virtual ~QAbstractButton(); 32 void setAutoRepeatDelay(int); 33 int autoRepeatDelay() const; 34 void setAutoRepeatInterval(int); 35 int autoRepeatInterval() const; 36 void setText(const QString &text); 37 QString text() const; 38 void setIcon(const QIcon &icon); 39 QIcon icon() const; 40 QSize iconSize() const; 41 void setShortcut(const QKeySequence &key); 42 QKeySequence shortcut() const; 43 void setCheckable(bool); 44 bool isCheckable() const; 45 bool isChecked() const; 46 void setDown(bool); 47 bool isDown() const; 48 void setAutoRepeat(bool); 49 bool autoRepeat() const; 50 void setAutoExclusive(bool); 51 bool autoExclusive() const; 52 QButtonGroup *group() const; 53 54public slots: 55 void setIconSize(const QSize &size); 56 void animateClick(int msecs = 100); 57 void click(); 58 void toggle(); 59 void setChecked(bool); 60 61signals: 62 void pressed(); 63 void released(); 64 void clicked(bool checked = false); 65 void toggled(bool checked); 66 67protected: 68 virtual void paintEvent(QPaintEvent *e) = 0; 69 virtual bool hitButton(const QPoint &pos) const; 70 virtual void checkStateSet(); 71 virtual void nextCheckState(); 72 virtual bool event(QEvent *e); 73 virtual void keyPressEvent(QKeyEvent *e); 74 virtual void keyReleaseEvent(QKeyEvent *e); 75 virtual void mousePressEvent(QMouseEvent *e); 76 virtual void mouseReleaseEvent(QMouseEvent *e); 77 virtual void mouseMoveEvent(QMouseEvent *e); 78 virtual void focusInEvent(QFocusEvent *e); 79 virtual void focusOutEvent(QFocusEvent *e); 80 virtual void changeEvent(QEvent *e); 81 virtual void timerEvent(QTimerEvent *e); 82}; 83